作者ls4860 (我是熟番)
看板Android
標題[軟體] 編譯後KernelSU檔案 (小米Mi10T)
時間Thu Dec 7 15:36:39 2023
因為用Magisk不太容易能真的能閃過很多銀行app
後來看板上有人用KernelSU效果會不錯
就想要來試試
了解KernelSU之後才發現非GKI核心的手機官方不支援
要自己手動編譯...
沒有程式背景 照著youtube資料自己編譯出來
有需要的人可以幫忙測試用用
目前自己試了星展跟富邦都可以順利執行
編譯使用RealKing核心4.19.300
KernelSU version 11384
我是用twrp刷入
更新連結,新的編譯放在這邊
https://github.com/ls4860/CCL_RK_KSU_Xiaomi_Apollo
KernelSU 管理器apk
https://tinyurl.com/j3dpp8uv
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 61.230.112.158 (臺灣)
※ 文章網址: https://webptt.com/m.aspx?n=bbs/Android/M.1701934605.A.E0A.html
1F:推 eqhibiki: 用狐狸magisk,有同樣的效果 12/07 15:51
2F:→ ls4860: 我用過狐狸 星展一樣會閃退 12/07 16:03
3F:推 MK47: 你好認真 幫推 12/07 16:24
4F:推 ivon852: 現在比較麻煩的是閃Play Integrity API... 12/07 17:56
5F:→ KyA: 現在要挑戰的是兆豐、Friday理財 其他都好處理 12/07 18:05
6F:→ ls4860: kerneksu也是可以刷PIF模組 我刷了之後一度有逃過 隔天又 12/07 18:21
7F:→ ls4860: 一樣恢復不能用 12/07 18:21
8F:推 empingao: megabank, ksu 沒問題. 12/07 19:36
9F:推 chamg: 超厲害,我編譯都失敗,可否提供yt連結 12/09 09:33
我的編譯環境是Debian12 (我有試過Debian Trixie測試版無法編譯,有一個YT在windows
下用WSL編譯)
1. 編譯需要的套件跟環境設定,參考LineageOS的Wiki,其中要注意的是OpenJDK用11即
可編譯所有版本Android,除了你要編譯android 14要改用OpenJDK 17。
https://wiki.lineageos.org/devices/apollon/build/variant1
2. 找一個你機器kernel原始檔下載使用,最好在arch/arm64/configs下有你設備的
defconfig(ex. apollo_defconfig)比較好編譯。
Xiaomi M10T kernel
https://github.com/Rohail33/Realking_kernel_sm8250
3. 再來就是照著yt的方式做,兩個人的大同小異。(這兩個好像都用Arch Linux)
https://www.youtube.com/watch?v=eNDNoZour_U
https://www.youtube.com/watch?v=_aZD8TYp0bo (媽的,這個我一開始以為我找錯勒)
4. 照著編譯的時候應該會有問題出現,有去找了網頁資料,我也不太確定,但是應該是
proton-clang/bin裡面"ld"檔案不相容,要記得自己手動刪掉。
===========================================================================
下面是我看完後大略寫下來的流程,不然每次都要一直看yt很麻煩
1. Download Kernel files
https://github.com/Rohail33/Realking_kernel_sm8250
2. unzip Kernel files
3. copy proton clang
https://github.com/kdrag0n/proton-clang
code:
git clone --depth=1
https://github.com/kdrag0n/proton-clang.git
4. copy KernelSU
code:
太長了...請自己看KernelSU的網頁有寫
https://kernelsu.org/guide/how-to-integrate-for-non-gki.html
5. enter into KernelSU folder and type
code:
git pull origin main
6. modify kernel_folder/arch/arm64/configs/apolo_defconfig
add these lines:
CONFIG_KPROBES=y
CONFIG_HAVE_KPROBES=y
CONFIG_KPROBE_EVENTS=y
#find this line(載入模組功能)
CONFIG_OVERLAY_FS=y
7. modify kernel_folder/fs/exec.c, open.c, read_write.c, stat.c
https://kernelsu.org/guide/how-to-integrate-for-non-gki.html
8. set $PATH to find proton-clang
code:
export PATH=kernerl_folder/proton-clang/bin:${PATH}
use "clnag -v" to test the path is right
9. remove "ld" file from proton-clang folder
10. make O=out ARCH=arm64 CC=clang apollo_defconfig
11. make O=out ARCH=arm64 CC=clang CROSS_COMPILE=aarch64-linux-gnu-
CROSS_COMPILE_ARM32=arm-linux-gnueabi- AR=llvm-ar NM=llvm-nm
OBJCOPY=llvm-objcopy OBJDUMP=llvm-objdump STRIP=llvm-strip LD=ld.lld -j12
※ 編輯: ls4860 (180.177.25.42 臺灣), 12/09/2023 13:27:20
※ 編輯: ls4860 (61.230.118.12 臺灣), 12/18/2023 12:24:57