Tinker Board Forum

Full Version: Rebuild / modify recovery partition
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I'm trying, without any luck, to modify the recovery image within the v131104 android image. I've tried various tools, but attempting to boot the modified image ends up with no signal on my display.

What I've done that gets me closest to success is:

Extract the recovery partition using dd via a root adb shell

Extract this image on a linux box (RaspPi) using abootimg -x <image file>. This gives me the config, kernel and initial ramdisk

If I then pack the ramdisk back into the boot image with abootimg -u, the new image is identical to the old one, and boots ok.

However, if I gunzip the ramdisk, then re-gzip it (without any changes), the new zip doesn't match the old zip exactly.

Writing this to the boot image - either with -u or --create leaves the recovery partition unbootable until I overwrite it with the original image.

I may have another problem ahead, in that un-cpio-ing the ramdisk, then re-cpio-ing it doesn't make an identical archive to the original, but that's a fight for another day.

So, tl;dr - how can I ungzip and gzip a ramdisk image such that the new file is identical to the old one??  Huh

Cheers,
Iain