Backup boot.img via terminal one-line command 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
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.