Skip to content

Instantly share code, notes, and snippets.

@FacuM
Last active February 7, 2017 03:46
Show Gist options
  • Save FacuM/b0e1df525d55f1b844ae553c7930deb3 to your computer and use it in GitHub Desktop.
Save FacuM/b0e1df525d55f1b844ae553c7930deb3 to your computer and use it in GitHub Desktop.
Backup harpia boot image
#!/bin/sh
printf "Backing up boot...\n"
dd if=/dev/block/bootdevice/by-name/boot of=/sdcard/boot.img
if [ $? -eq 0 ]
then
printf "Complete, saved to /sdcard/boot.img\n"
exit 0
else
printf "Something went wrong. (permissions problem?)\n"
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment