2

I built a recovery.img (using flo lunch setup) for my Nexus 7 device using AOSP source code. I can use it like:

$ adb reboot bootloader
$ fastboot boot recovery.img

However, when I unpack and re-pack the recovery.img file using abootimg utility (without making any modifications to ramdisk) and retry to boot using recovery.img, my Nexus 7 simply goes into Google splash screen loop. Device keeps rebooting after coming to splash screen.

For details, here are my steps:

$ ls
recovery.img
$ abootimg -x recovery.img
$ abootimg-unpack-initrd initrd.img
$ abootimg-pack-initrd myinitrd.img ./ramdisk
$ abootimg -u recovery.img -r myinitrd.img

Resulting updated recovery.img doesn't work as intended, even though its simply an unmodified copy of original recovery.img file.

Stupid
  • 113
  • 5

1 Answers1

0

I had the same problem some weeks ago, but with the boot image, not the recovery... The only solution I found to be working is to extract the initfs from the img file extracted from the device after being installed by using dd command:

dd if=/dev/block/mmcblk0pX of=/sdcard/recovery.img
(Where X is the number of your recovery partition)

You can find the number of your recovery partition by using:

ls -l /dev/block/platform/soc.0/7824900.sdhci/by-name
(Please, note this path may be device specific, but should be similar for all. This one worked for Sony Xperia X Compact device)

Then, the recovery.img file being extracted, you can now extract the initfs and repack again

BamsBamx
  • 4,139
  • 4
  • 38
  • 63