Skip to content

Instantly share code, notes, and snippets.

@ouyi
Last active December 3, 2017 08:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ouyi/c4f1da8c4521432ba71597bb96b0d1b6 to your computer and use it in GitHub Desktop.
Save ouyi/c4f1da8c4521432ba71597bb96b0d1b6 to your computer and use it in GitHub Desktop.
Backup and restore android data from a Fedora Linux host
#!/usr/bin/env bash
dnf install -y android-tools
# backup apps
adb backup -all -f adb-backup-2017-12-03-v9.adb
# backup photos
adb pull /sdcard/DCIM/Camera/ v9_sdcard_DCIM_Camera/
# figure out storage path
adb shell 'echo $EXTERNAL_STORAGE'
#adb push v9_sdcard_DCIM_Camera/ /sdcard/DCIM/Camera/
#adb restore adb-backup-2017-12-03-v9.adb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment