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


My command line

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

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

1 Answer 1


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


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?
    – user191256
    Jan 25, 2018 at 3:41
  • 1
    @СергейГрушин Sure.
    – iBug
    Jan 25, 2018 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, 2018 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, 2018 at 13:18

You must log in to answer this question.