Skip to content

Instantly share code, notes, and snippets.

@adamjparrott
Created July 31, 2018 19:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamjparrott/ace61cc74f9bf6d5f9d819f03f22fb20 to your computer and use it in GitHub Desktop.
Save adamjparrott/ace61cc74f9bf6d5f9d819f03f22fb20 to your computer and use it in GitHub Desktop.
Pulling Sqlite Db from non debuggable Android App
# make a backup
adb backup -noapk com.package.name -f backup.ab
# strip out the bits
dd if=backup.ab bs=1 skip=24 of=backup.bak
# use convertToTar.py (see other file in gist)
python convertToTar.py
# untar
tar -xvf backup.tar
import zlib
compressed_data = open('backup.bak', 'rb').read()
decompressed_data = zlib.decompress(compressed_data)
file = open("backup.tar","wb")
file.write(decompressed_data)
file.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment