0

I am trying to make an image backup of boot. The script must work on any android. I think on any Android the boot location is

/dev/block/platform/???/by-name/boot

My command line

find /dev/block/platform -name boot -exec dd={} of=/sdcard/boot.img \;

doesn't work: {} no such file or directory

2

Fortunately, there's a static path available for you:

/dev/block/bootdevice/by-name/boot
           ^^^^^^^^^^

Problem solved 😊

dd if=/dev/block/bootdevice/by-name/boot of=boot.img

Stay away from /dev/block/platform, it'll only make things harder.

  • wow, it's really works with any android version, CPU and ROM? – Сергей Грушин Jan 25 '18 at 3:41
  • 1
    @СергейГрушин Sure. – iBug Jan 25 '18 at 3:42
  • @iBug Will this work on the A/B partitions? I see in the directory that there is boot_a and boot_b. I tried to extract boot_a and it comes out at 64MB, whereas I'm sure that the boot.img in the stock ROM is only 32MB. Any leads? – singhnsk Aug 9 '18 at 11:15
  • @singhnsk It works, despite a few differences. You need to back up the image from ghe slot you're running. And the backed up image will be the size of the partition, not the size of actual data, because of the use of dd. – iBug Aug 9 '18 at 13:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.