phhusson / super-bootimg

Tools to edit Android boot.img. NDK buildable, to be usable in an update.zip
GNU General Public License v3.0
226 stars 121 forks source link

Generated image does not boot on Moto X 2014 #46

Open 5685C4A059D5 opened 7 years ago

5685C4A059D5 commented 7 years ago

Image created with build.sh script. Does not boot after flashing ("boot failed" immediately after attempting to boot).

The device is unlocked and a similar image from supersu works fine. I think a missing sha1 at 0x240 is the cause, but I've only taken a quick look at both files. Erasing that doesn't prevent booting, so it's something else.

I attached the original boot.img below. boot.zip

5685C4A059D5 commented 7 years ago

After messing around a bit, I found that the stock image has another section after the initramfs, which was either not present or corrupted after generating the new boot image. Its size apparently is also in the stock image header while all zeroes on the generated image (The value is 0x907bc).

After manually adding this section and the header to the generated image it now boots normally.

I attached the files below (For the stock image the section starts at 0x72f000 to 0x7bf7f0. Header value at 0x28) https://my.mixtape.moe/akkyax.zip (These are from a different stock image from the one above)

nephdev commented 7 years ago

I also have the same problem with moto g4 plus with android 7.0. It goes to bootloop when trying to update by using zip and also by using modified boot.img. However I was not able to fix it the way 5685C4A059D5 did it. Any ideas if this can be solved?