Merging init_boot.img into boot.img on Android 13+ native devices for use with "fastboot boot" #144
Replies: 3 comments 1 reply
-
This may be specific to bootloader implementation.
More to try: Thanks ~ |
Beta Was this translation helpful? Give feedback.
-
Thanks for the suggestions. Just to clarify things, I am using " I tried further combining vendor_boot.img, vendor_kernel_boot.img, and init_boot.img into boot.img, but that poses a problem with the tool, because I think when it packs a v4 "boot.img", it does not allow some things in boot.json that are typically only in a vendor_boot.img, such as a And beyond that issue, the "ramdisk" json section for v4 boot.img doesn't allow " I guess I could maybe try a v2 boot.img, which supported Here is what my images contain: |
Beta Was this translation helpful? Give feedback.
-
I also tried combining vendor_kernel_boot.img, boot.img, and init_boot.img into vendor_boot.img If I simply combine my modified ramdisk with the vendor_kernel_boot and vendor_boot ramdisks and pack them into a boot.img, this does boot successfully but just as before it totally ignores the contents of that ramdisk, it seems. As you say, clearly something in the bootloader is not operating as expected, but I do not know what or how. And it is closed source, as far as I know. I've looked at it a bit with Ghidra for reverse engineering, specifically the "abl" section, which has an interesting string in it of "failed to read ramdisk from stored boot.img" that seems to imply that perhaps a "fastboot boot" image can indeed supply a ramdisk and it will be used in some scenarios. I am going to try to build a debugging UART/serial/TTL USB cable to hopefully view the bootloader log or kernel logs to see more about what is happening: |
Beta Was this translation helpful? Give feedback.
-
Hi,
I see that the README contains a use case for "How to merge init_boot.img into boot.img".
I tried this, and it seemed to work, however when I send the resulting boot.img.signed to "fastboot boot" for an Android 13+ native device (a device that originally shipped with Android 13+, such as Pixel 8 and Pixel 7), the device seems to ignore the ramdisk inside of the image and use the ramdisk already stored onboard in the init_boot partition.
In other words, although I can merge init_boot.img into boot.img, this seems to do nothing because although the resulting image contains the ramdisk, the device will not use it. Could this be specific to the Pixel 8 (Android 14)? Or could it be that the implementation of "fastboot boot" is somehow designed to ignore the ramdisk sent within the boot image on this particular device?
Are there files within the build/unzip_boot/ folder that I can modify to try to get this to work?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions