User Tools

Site Tools


android:adb-backup-restore

adb backup/restore/run-as

adb backup

  1. adb shell
  2. adb backup -f ~/data.ab -noapk app.package.name
  3. dd if=data.ab bs=1 skip=24 | python -c “import zlib,sys;sys.stdout.write(zlib.decompress(sys.stdin.read()))” | tar -xvf -

adb run-as

  1. run-as com.package.name

adb restore

  1. adb restore client.ab

Example

adb backup -apk   -f pushups.ab me.pjq.pushups
adb backup -apk   -f client.ab me.pjq.ftclient
adb backup -apk   -f pm25.ab me.pjq.chinapm25
 
adb restore client.ab
adb restore pushups.ab
adb restore pm25.ab

/var/www/dokuwiki/wiki/data/pages/android/adb-backup-restore.txt · Last modified: 2016/08/24 10:53 by percy