Unpack and repack android backups
$ pip install android_backup
Optional (for encrypted archives):
$ pip install pycrypto
$ android-backup-unpack foo.ab
Results in directory foo.ab_unpacked
$ android-backup-pack foo.ab
Packs foo.ab_unpacked folder to foo.ab. Requires a previously generated foo.ab.pickle file.
from android_backup import AndroidBackup, CompressionType, EncryptionType
with AndroidBackup('foo.ab') as ab:
ab.list() # print content to stdout
with AndroidBackup('foo.ab') as ab:
ab.unpack()
ab = AndroidBackup()
ab.version = 3
ab.compression = CompressionType.ZLIB
ab.encryption = EncryptionType.NONE
ab.pack('foo.ab')