mirror of
https://github.com/JackA1ltman/NonGKI_Kernel_Build_2nd.git
synced 2026-08-19 15:03:40 +08:00
Page:
打包与刷入
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
Table of contents
This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
打包与刷入
基础编译 · 第四步
编译完成后,内核文件位于 out/arch/arm64/boot/,提供以下两种打包方式。
方式一:Anykernel3
- 地址:
https://github.com/osm0sis/AnyKernel3 - 分支:
master
步骤:
-
将
out/arch/arm64/boot/Image.gz-dtb移动至 Anykernel3 目录 -
修改
anykernel.sh中的以下三项:
do.devicecheck=0
BLOCK=auto;
is_slot_device=auto;
-
将整个 Anykernel3 目录打包成 zip 刷机包
-
进入 Recovery,刷入该 zip 包
方式二:MKBOOTIMG
- 地址:
https://android.googlesource.com/platform/system/tools/mkbootimg - 分支:
main-kernel-build-2024
步骤:
-
提取设备纯净
boot.img,置于/home/username/boot.img -
解包并获取打包参数:
BOOT_CMD=$(echo `mkbootimg/unpack_bootimg.py --boot_img=boot.img --format mkbootimg`)
mkbootimg/unpack_bootimg.py --boot_img boot.img
-
将编译好的
Image.gz-dtb改名为kernel,并覆盖out/目录中的同名文件 -
重新打包:
eval "mkboottools/mkbootimg.py $BOOT_CMD -o boot_moded.img"
- 进入 fastboot 并刷入:
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痕迹