KNOWN ISSUE: MAY BROKEN QUICK CHARGE
NOTE: prebuilt kernel image artifacts compiled with config from NamelessOS TQ2A.230505.002, follow steps below to build if using other OS.
Download zip from artifact or:
at the root of repo:
curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash -
Then enter nix devShell (pretend Nix has already installed)
nix develop
- using
adb shell
enter shell in device and runzcat /proc/config.gz > /sdcard/config
to export kernel config. - run
adb pull /sdcard/config .config
on your computer, with the device adb connected. - put
.config
under /out directory. then:
make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE CROSS_COMPILE_ARM32=CROSS_COMPILE_ARM32 LLVM=1 LLVM_IAS=1 O=$O CC=$CC oldconfig
make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE CROSS_COMPILE_ARM32=CROSS_COMPILE_ARM32 LLVM=1 LLVM_IAS=1 O=$O CC=$CC -j$(nproc)
Found file Image
under out/arch/arm64/boot/
.
-
get your current origin boot.img, put it on a clean dir
-
get
magiskboot
binary from whatever place, runmagiskboot unpack ./boot.img
, -
remove the file
kernel
unpacked, placeImage
in place and rename intokernel
, -
run
./magiskboot repack ./boot.img
Just simply flash or boot the new-boot.img using fastboot.