MiCode / patchrom_tools

apktool and misc auto-packaging tools
90 stars 126 forks source link

mkbootimg can not rebuild mi-4c boot.img #24

Open cong2014 opened 8 years ago

cong2014 commented 8 years ago

on xiaomi 4c, android version is 5.1.1, miui is v7.1

  1. use tool to unpack boot.img
  2. do nothing, but use mkbootimg to pack kernel and ramdisk again
  3. the new boot.img is much smaller than before
  4. push to device, can not boot.
yunlai commented 8 years ago

I have a similar issue

  1. use unpackbootimg to unpack boot.img
  2. do nothing, but use mkbootfs and mkbootimg to pack kernel and ramdisk again
  3. push to the new boot img to device, boot failure

I compared the new boot.img with the original one ,fount out that even through the secondary partition size is 0, there is still 2048 bytes data seams like secondary partition data at the end of the original boot.img, but the new one don't have this part. I append this 2048 bytes to the new one ,still can not boot

yunlai commented 7 years ago

I hava the same issue with mi4s,miui 8.0.2