Skip to content

Instantly share code, notes, and snippets.

@for2ando
Created July 1, 2017 14:21
Show Gist options
  • Save for2ando/4f07e87971929cc49b8dc3d278cb9483 to your computer and use it in GitHub Desktop.
Save for2ando/4f07e87971929cc49b8dc3d278cb9483 to your computer and use it in GitHub Desktop.
Back up several configuration files from Android device via adb.
#!/bin/sh
adb shell ls /system || { echo $0:Please connect w/ adb.>&2; exit 2; }
for i in build.prop recovery-from-boot.p etc/recovery-resource.dat bin/install-recovery.sh; do
test -f $i && { echo $0: $i: exists. Please delete it and retry.>&2; exit 3; }
done
mkdir -p bin etc
adb pull /system/build.prop .
adb pull /system/recovery-from-boot.p .
adb pull /system/etc/recovery-resource.dat etc
adb pull /system/etc/install-recovery.cfg etc
adb pull /system/bin/install-recovery.sh bin
less --force build.prop recovery-from-boot.p etc/recovery-resource.dat etc/install-recovery.cfg bin/install-recovery.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment