mirror of
https://github.com/JackA1ltman/NonGKI_Kernel_Build_2nd.git
synced 2026-08-19 15:03:40 +08:00
Page:
en Packaging and Flashing
Pages
Fork 项目
Home
en Automated Release
en Choosing a Toolchain
en Compiling on a Mobile Device
en Compiling the Kernel
en Compiling the Stock Vendor Kernel
en Configuring the YML File
en Embedding KernelSU and Patching SuSFS
en Fork the Repository
en Hiding Root Common Methods
en Introduction
en Kernel Build FAQ
en Packaging and Flashing
en Requirements
en Running and Downloading Artifacts
en Setting Up the Environment
en Variable Reference
内核编译答疑
利用移动设备编译内核
变量参考
基础需求
嵌入KernelSU和SuSFS修补
序章
打包与刷入
搭建基础环境
编译内核
编译器选择
编译设备厂商原始内核
自动发布
运行与产物
配置 YML 文件
隐藏Root常规方式
No results
1
en Packaging and Flashing
JackA1ltman edited this page 2026-04-04 23:24:57 +08:00
Table of contents
Packaging and Flashing
Local Build · Step 4
After a successful build, the kernel image is located at out/arch/arm64/boot/. Two packaging methods are available.
Method 1: Anykernel3
- Repository:
https://github.com/osm0sis/AnyKernel3 - Branch:
master
Steps:
-
Move
out/arch/arm64/boot/Image.gz-dtbinto the Anykernel3 directory -
Edit
anykernel.shand set the following three values:
do.devicecheck=0
BLOCK=auto;
is_slot_device=auto;
-
Zip the entire Anykernel3 directory into a flashable package
-
Boot into Recovery and flash the zip
Method 2: MKBOOTIMG
- Repository:
https://android.googlesource.com/platform/system/tools/mkbootimg - Branch:
main-kernel-build-2024
Steps:
-
Extract a clean
boot.imgfrom your device and place it at/home/username/boot.img -
Unpack the image and capture the repacking parameters:
BOOT_CMD=$(echo `mkbootimg/unpack_bootimg.py --boot_img=boot.img --format mkbootimg`)
mkbootimg/unpack_bootimg.py --boot_img boot.img
-
Rename your compiled
Image.gz-dtbtokerneland replace the existingkernelfile inside theout/directory -
Repack the boot image:
eval "mkboottools/mkbootimg.py $BOOT_CMD -o boot_moded.img"
- Boot into fastboot and flash:
fastboot flash boot boot_moded.img
🌐 Language / 语言
📖 English
Local Build
- Setting Up the Environment
- Choosing a Toolchain
- Compiling the Kernel
- Compiling on a Mobile Device
- Compiling the Stock Vendor Kernel
- Embedding KernelSU & Patching SuSFS
- Packaging and Flashing
- Kernel Build FAQ
Build with Actions
- Fork the Repository
- Configuring the YML File
- Variable Reference
- Running and Downloading Artifacts
- Automated Release
Hide Root Trace
📖 中文
基础编译
利用 Action 构建内核
隐藏Root痕迹