Talk:HOWTO: Unpack, Edit, and Re-Pack Boot Images

From Android Wiki

Jump to: navigation, searcha

When creating your own custom update.zip files (especially when adapting the stock images), you can get tripped up if you forget to replace /system/recovery.img and it ends up overwriting /dev/mtd/mtd1 unbeknownst to you. Watch out.


The file: http://android-dls.com/files/linux/split_bootimg.zip is a dead link!Source(s): Android solutions

Contents

Weirdness

H have and HTC Desire Bravo with CM 7.0.3 installed. For some reason, mkbootimg doesn't know how to properly create a working boot image on my phone. Even more strange, fastboot boot <kernel> works, but fastboot boot <kernel> <ramdisk> hangs at the splash image.

So... I took an hex editor and looked at the diff between the stock boot.img and the same identical image re-created through mkbootimg.

Beginning of my stock boot.img:

41 4e 44 52 4f 49 44 21 f8 eb 1b 00 00 80 00 20 90 31 02 00 00 00 00 21 00 00 00 00 00 00 f0 20 00 01 00 20 00 08 00 00 00 00 00 00

Beginning of identical boot.img re-created by mkbootimg:

41 4e 44 52 4f 49 44 21 f8 eb 1b 00 00 80 00 10 90 31 02 00 00 00 00 11 00 00 00 00 00 00 f0 10 00 01 00 10 00 08 00 00 00 00 00 00

If you take the bits number 16, 24, 32 and 36 of the re-created image and change them into 20, 21, 20, 20 respectively (thus restoring the values they had in the stock boot.img from cyanogenmod), then it works!!!Maze 16:20, 22 July 2011 (MST)

No boot.img on a Vizio VTAB1008

On this Android 2.3 tablet there appears to be no /boot partition. There is a separate /kernel, /ramdisk, and /recovery partition.

Source(s): Android solutions

Dead Links

  1. All the links to Perl scripts on the page are dead. The page was last edited less than 2 months ago. How can we get hold of those scripts?
  2. As an alternative to the flashing procedure described in the OP, can I just use fastboot? Would the lines below work?

fastboot erase boot
fastboot flash boot my_boot.img
--Sasho 02:32, 5 January 2012 (MST)

I just fixed the links for unpack and repack scripts, couldn't find the splitting one though Beide

unbootimg

in branch 'felix' of git://tool.em.cs.uni-frankfurt.de/git/android-core i have commited "mkbootimg/unbootimg.c" this basically implements the inverse of mkbootimg, also fails on checksum errors. (use at your own risk etc.)

--felix

Recreating the cpio archive

"Recreate the cpio archive using the mkbootfs binary"

And how would you do that? Cygwin says -bash: mkbootfs: command not found

Source(s): Android solutions

Personal tools