Skip to content

Instantly share code, notes, and snippets.

@TheHippo
Created November 12, 2013 14:16
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 TheHippo/7431507 to your computer and use it in GitHub Desktop.
Save TheHippo/7431507 to your computer and use it in GitHub Desktop.
Backup all the data of an Android package to the local folder. This could useful in various occasion, e.g if you want to inspect the Sqlite database of a package without rooting you device. Usage: `./get-data-backup.sh your.package.name`
#!/bin/bash
if [[ "${#}" != "1" ]]; then
echo "Need exactly one command line argument: package name"
exit 1
fi
PACKAGE=${1}
echo "Please allow backup for: ${PACKAGE}"
adb backup -f data.ab -noapk ${PACKAGE}
dd if=data.ab bs=1 skip=24 | openssl zlib -d | tar -xvf -
rm data.ab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment