0

My AOSP building steps are as follows

  1. mkdir AOSP_ROOT && cd AOSP_ROOT
  2. repo init -u ``https://android.googlesource.com/platform/manifest`` -b android-12.1.0_r12
  3. repo sync
  4. download google_devices-bluejay-sd2a.220601.001.a1-0145bbe6.tgz copy it to AOSP_ROOT/
  5. unzip google_devices-bluejay-sd2a.220601.001.a1-0145bbe6.tgz
  6. run extract-google_devices-bluejay.sh
  7. source build/envsetup.sh
  8. lunch aosp_bluejay-userdebug
  9. make updatepackage -j16

i flashed the zip image with following command

fastboot -w update out/target/product/bluejay/aosp_bluejay-img-eng.host.zip

Kernel building steps are as follows

  1. mkdir KERNEL_ROOT && cd KERNEL_ROOT

  2. repo init u https://android.googlesource.com/kernel/manifest -b android-gs-bluejay-5.10-android12L-d2

  3. repo sync

  4. BUILD_CONFIG=private/devices/google/bluejay/build.config.bluejay build/build.sh

with above commands i got Image.lz4 in the path out/android-gs-pixel-5.10/dist i tried to flash the Image.lz4 with command

fastboot boot out/android-gs-pixel-5.10/dist/Image.lz4

then also the device is not booted then i tried to flash the boot.img with the following command

fastboot flash boot out/android-gs-pixel-5.10/dist/boot.img

now the device is stuck at google logo it is not booting. I have also try to copy all files in

KERNEL_ROOT/out/android-gs-pixel-5.10/dist to AOSP_ROOT/device/google/bluejay-kernel and export TARGET_PREBUILT_KERNEL=/KERNEL_ROOT/out/android-gs-pixel-5.10/dist/Image.lz4 and then go to the android folder to make bootimage. The Pixel 6a still couldn't boot up after that. hoping for your help regard this!!

i developed android custom kernel for pixel 6a according to the official documention provided by google

  1. kernel : https://source.android.com/docs/setup/build/building-kernels

  2. AOSP : https://source.android.com/docs/setup/build/building

and i embedded kernel images onto the aosp still it is not working

2 Answers2

0

From what I remember, AOSP no longer does kernel builds during the full OS compilation but supports prebuilts. But since you do want to modify that and add your own custom changes in the kernel source, I came across these sets of patches to allow custom kernel builds for gs101 when applied to LineageOS (AOSP fork)

https://review.lineageos.org/q/topic:gs101-inline-kernel

Rajat Gupta
  • 419
  • 3
  • 10
0

I have managed to flash the kernel to Pixel 5a (Android 13) successfully, here are the tools I used to flash the custom kernel:

  1. AnyKernal3 for packing the necessary kernel files;
  2. KernalFlasher for flashing the packed kernel file(safer than flash the boot.img to the device directly);

install these apks(try download the latest version) to your device, I also have modified the anykernel.sh for my Pixel 5a:

### AnyKernel setup
# begin properties
do.devicecheck=0
do.modules=1 # need copy all the module files to the device


## boot shell variables
block=auto;
is_slot_device=1;
ramdisk_compression=auto;
patch_vbmeta_flag=auto;
  • copy dtbo_barbet.img, Image.lz4, Image.lz4-dtb, ramdisk.lz4 from your kernel build directory(mine is: out/android-msm-pixel-4.19/dist) to AnyKernel3 root directory;
  • copy all the module files from the build directory to AnyKernel3/modules/system/lib/modules;
  • zip AnyKernel3 directory: zip -r9 kernel.zip * -x .git README.md *placeholder;
  • copy kernel.zip to your device, somewhere likesdcard/Download;
  • run KernelFlasher app, maybe backup the old kernel file first;
  • KernalFlasher app, select Slot A - Flash - Flash AK3 Zip(chose the kernel.zip file you created);
  • wait for the flash operation finish, if nothing goes wrong, then reboot the system.
Meonardo
  • 182
  • 13