I have an android device and its kernel source code. I am able to compile the kernel source code and get "Image.gz-dtb" image file.
Now I need to flash it on my android device.
As per my knowledge the step required to flashing a kernel image on android device is as following:
Android Image Kitchen
- Pull your device's boot image from the latest image available for your device (whether it be a ROM or stock)
- Download the latest Android Image Kitchen from this thread.
- Run the following with the boot image:
- Locate the zImage file and replace it with your kernel image (rename it to what came out of the boot image)
- Run the following to repack:
- Flash the new boot image with fastboot or TWRP!
These steps are copied from:
I am facing a problem in following these steps because the device I am using has two boot partitions i.e.
boot_a -> /dev/block/sde11
boot_b -> /dev/block/sde39
So I am not able to proceed with the first step to pull the boot image.
I can pull both image with dd command i.e. `dd if=/dev/block/sde11 of=/sdcard/boot_a.img` and `dd if=/dev/block/sde39 of=/sdcard/boot_b.img` but I don't know what should I do after that because I have only single image file generated from the source code.
I searched over the internet for A/B partitioning and I found that these are used for seamless updates i.e. One partition is active at a time and another partition which is inactive can be used to flash the update. On reboot, another partition will become active and One partition will become inactive. More Info: https://www.xda-developers.com/how-a...opment-on-xda/
If my understanding is true then I just need to follow following steps to find the correct image to be used at the first step of flashing the kernel:
1. fastboot getvar all | grep “current-slot”
2. dd if=<path to boot of active slot> of=/sdcard/boot.img
3. Continue with boot.img and flash the kernel with above written steps for flashing a kernel.
Anyone who has this knowledge, please confirm. I will be very thankful to you.