
Extract and repack Android ADB backups (ICS+). Supports encrypted archives, tar conversion, and standard I/O for forensic analysis or data recovery.
Utility to extract and repack Android backups created with adb backup (ICS+).
Largely based on BackupManagerService.java from AOSP.
Building requires JDK 17+ (via the bundled Gradle wrapper). The compiled JAR targets Java 8+ bytecode (--release 8).
To create a self-executable all-in-one JAR:
./gradlew shadowJar
Then run:
java -jar build/libs/abe-all.jar pack|unpack|pack-kk ...
Or use the included ./abe wrapper script, which locates build/libs/abe-all.jar automatically.
./gradlew test
See Releases for pre-built runnable JAR files.
abe unpack <backup.ab> <backup.tar> [password]abe pack <backup.tar> <backup.ab> [password]abe pack-kk <backup.tar> <backup.ab> [password]
(creates version 2 backups, compatible with Android 4.4.3)If the filename is -, data is read from standard input or written to standard output.
If the password is not given on the command line, the environment variable ABE_PASSWD is tried. If no password is specified, the backup archive will not be encrypted, only compressed.
allowBackup flag set to false are not backed up nor restored.
adb push and adb shell)BackupManagerService.The safest way to pack a tar archive is to extract the exact entry order from the original backup.tar file (excluding directory-only entries ending in /):
tar tf backup.tar | grep -F "com.package.name" | grep -v '/$' > package.list
Then build the new tar archive from the extracted backup directory with --no-recursion so directories in the list are not re-walked (which would duplicate files and break ordering):
tar cf restore.tar --no-recursion -T package.list
On macOS, set COPYFILE_DISABLE=1 to avoid adding AppleDouble (._*) metadata entries, or use POSIX pax instead of BSD tar (which avoids directory entries, trailing slashes, and .DS_Store files):
pax -wd < package.list > restore.tar
If you are building a fresh archive from an extracted apps/ directory on macOS/Linux (note that each package's _manifest file must appear before its data files):
find apps -type f -not -path '*/\.*' | pax -wd > restore.tar
You can now pack restore.tar and try adb restore restore.ab.
Releases are built with GitHub Actions when a version tag (v*, e.g. v1.0.0) is pushed and include a runnable fat JAR, its SHA-256 checksum, and build provenance attestation.
Use the binaries at your own risk. No warranty or support provided.
Please report only bugs in backup extractor itself; I can't answer questions regarding unpacking/repacking backups or tar files. (See Usage for a mini usage guide.)
More details about the backup format and the tool implementation in the associated blog post.

Automated mobile application security testing framework for Android, iOS, and Windows. Performs static and dynamic analysis, malware detection, and API security testing with CI/CD integration.

Command-line and GUI tool for decompiling Android Dex and APK files into readable Java source code, with resource decoding, deobfuscation, and Smali debugging capabilities.

A tool for reverse engineering Android apk files