Skip to content

Instantly share code, notes, and snippets.

@nestserau
Last active August 29, 2015 14:07
Show Gist options
  • Save nestserau/a8e3df58c13a9b92b185 to your computer and use it in GitHub Desktop.
Save nestserau/a8e3df58c13a9b92b185 to your computer and use it in GitHub Desktop.
Backup APK content from the currently connected device
#!/bin/bash
output=~/data.ab
package=${1:-"com.my.package"}
openssl="/usr/local/opt/openssl/bin/"
export PATH=$openssl:$PATH
adb -d backup -f $output -noapk $package
pushd ~
dd if=$output bs=1 skip=24 | openssl zlib -d | tar -xvf -
rm $output
open ~/apps/$package
popd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment