为AOSP 12版本Pixel 6a(Bluejay)集成自定义内核的问题与解决
Pixel 6a 自定义内核嵌入AOSP后无法启动的解决方法
AOSP构建步骤
mkdir AOSP_ROOT && cd AOSP_ROOTrepo init -u https://android.googlesource.com/platform/manifest -b android-12.1.0_r12repo sync- 下载
google_devices-bluejay-sd2a.220601.001.a1-0145bbe6.tgz并复制到AOSP_ROOT/ unzip google_devices-bluejay-sd2a.220601.001.a1-0145bbe6.tgzrun extract-google_devices-bluejay.shsource build/envsetup.shlunch aosp_bluejay-userdebugmake updatepackage -j16
镜像刷入命令
fastboot -w update out/target/product/bluejay/aosp_bluejay-img-eng.host.zip
内核构建原步骤及问题
原内核构建步骤
mkdir KERNEL_ROOT && cd KERNEL_ROOTrepo init -u https://android.googlesource.com/kernel/manifest -b android-gs-bluejay-5.10-android12L-d2repo syncBUILD_CONFIG=private/devices/google/bluejay/build.config.bluejay build/build.sh
遇到的问题
按上述步骤构建后,在out/android-gs-pixel-5.10/dist路径得到Image.lz4,尝试以下操作均无法正常启动Pixel 6a:
- 使用
fastboot boot out/android-gs-pixel-5.10/dist/Image.lz4直接启动内核,设备无法启动 - 使用
fastboot flash boot out/android-gs-pixel-5.10/dist/boot.img刷入boot.img,设备卡在Google界面 - 将
KERNEL_ROOT/out/android-gs-pixel-5.10/dist下所有文件复制到AOSP_ROOT/device/google/bluejay-kernel,重新构建bootimage后,设备仍无法启动
解决方案
仅需修改内核构建的第4步命令,其余步骤保持不变:LTO=full BUILD_AOSP_KERNEL=1 ./build_bluejay.sh
执行该命令后,Image.lz4会生成在out/android-gs-pixel-5.10/dist/路径。将该文件复制到AOSP_ROOT/device/google/bluejay-kernel/,重新构建AOSP源码并刷入设备,即可正常启动。
内容的提问来源于stack exchange,提问作者Ilaveni Ranjith
相关产品推荐
相关产品推荐

