.AB

AB File

Android Backup file
Ask a question
QUICK ANSWER

An AB file is an Android backup produced by the Android Debug Bridge command "adb backup". It stores app data in a compressed, optionally encrypted archive. To read it on a PC, convert it to .tar with Android Backup Extractor (abe.jar); to restore it to a phone, run "adb restore backup.ab".

Developer: Google (Android Open Source Project) Category: Backup Files Open standard MIME: application/octet-stream
OPENS ON Windows macOS Linux
Related: .BUP · .BAK · .SKB · .SET

On this page

19k+ extensions indexed
Last reviewed Jul 30, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the AB file format?

.ab files are associated with Android Debug Bridge (ADB), a debugging tool available for Android 4.0 and later. Files with the .ab extension store backup copies generated using the adb backup command directly from the command line.

An .ab file is a binary container. It opens with the plain-text magic string ANDROID BACKUP, then four newline-terminated ASCII header lines that declare the format version (1 through 5), a compression flag, and an encryption tag (none or AES-256). Everything after that header is a DEFLATE-compressed TAR archive - and, when a password is given, an AES-256-encrypted one, with the key derived via PBKDF2 and a master-key checksum stored in the header.

Android Debug Bridge allows users to create custom backups that may include all installed applications or only selected app data. By default an .ab file stores app data - settings, databases and cache files - but not the APK itself; add the -apk flag to adb backup to include the installer packages. Android Debug Bridge also offers a feature to restore from an .ab backup using adb restore.

Android Debug Bridge offers many different features beside the ability to create backup copies, such as:

  • file and folder copy,
  • device control,
  • ability to run a Unix-like shell,
  • application installer.

Note that adb backup was deprecated starting with Android 12 (2021). Many apps already opt out by setting android:allowBackup="false" in their manifest. The format is being superseded by cloud backup solutions such as Google One Auto Backup and the open-source Seedvault project.

Security & safety

RISK: MEDIUM

An .ab is data, not executable code, so the file itself does not run anything. The real concerns are privacy and recovery: an UNencrypted .ab exposes app databases, tokens and personal data to anyone with the file - always set a password when backing up, and store .ab files securely. If you encrypted it and forget the password, the AES-256 payload is effectively unrecoverable (there is no backdoor). Only restore .ab files you created yourself; restoring an unknown backup can write attacker-controlled data into your apps.

Format details

in a nutshell
FULL NAMEAndroid Backup fileaka ADB backup, Android Debug Bridge backup
DEVELOPERGoogle (Android Open Source Project)since 2012 (Android 4.0 Ice Cream Sandwich, adb backup)
CATEGORYBackup Files
MIME TYPEapplication/octet-stream
TYPEADB backup container - header + (optionally encrypted) DEFLATE-compressed TAR payload (binary)
STANDARDOpen · royalty-free
MAGIC BYTES · FILE SIGNATURE
OFFSET
000102030405060708090a0b0c0d
HEX
414E44524F4944204241434B5550
ASCII
ANDROID BACKUP
An .ab file starts with the literal text line "ANDROID BACKUP\n", then four newline- terminated ASCII header lines: format version (e.g. 1 or 5), a compression flag (1 = DEFLATE), and an encryption tag ("none" or "AES-256"). Everything after that header is a zlib/DEFLATE-compressed (and, if encrypted, AES-256-wrapped) TAR stream.

Programs that open AB files

Windows3 apps
7-Zip Open-source Opens the resulting .tar (after abe.jar) to extract individual files - cannot read the raw .ab directly.
Android SDK Platform-Tools (adb) Free Restore to a connected device: 'adb restore backup.ab' (then confirm/enter the password on the phone).
Android Backup Extractor (abe.jar) Open-source Convert to a browsable TAR: 'java -jar abe.jar unpack backup.ab backup.tar [password]' (needs Java).
macOS2 apps
Android SDK Platform-Tools (adb) Free 'adb restore backup.ab' from Terminal with the device connected and USB debugging on.
Android Backup Extractor (abe.jar) Open-source 'java -jar abe.jar unpack backup.ab backup.tar [password]' then open the TAR in Archive Utility.
Linux2 apps
Android SDK Platform-Tools (adb) Free Install platform-tools (or distro package), then 'adb restore backup.ab'.
Android Backup Extractor (abe.jar) Open-source 'java -jar abe.jar unpack backup.ab backup.tar [password]'; then 'tar xf backup.tar'.

Technical details

deep spec
Format typeBinary container - plain-text ASCII header followed by a DEFLATE-compressed TAR payload; optionally AES-256 encrypted
Magic bytes (ASCII)`ANDROID BACKUP` at byte offset 0, followed by four newline-terminated ASCII header lines
Header fieldsMagic line, format version number, compression flag (1 = DEFLATE), and encryption tag (`none` or `AES-256`)
CompressionDEFLATE / zlib; controlled by the compression flag in the header (1 = compressed, 0 = uncompressed)
EncryptionOptional AES-256 (CBC); password-derived key via PBKDF2; master-key blob with HMAC checksum stored in the header
Internal payloadStandard POSIX/ustar TAR archive; per-app content stored in `apps/<package>/` directory trees
Format versionsVersions 1-5; version 5 introduced a stronger AES-256 encryption header; the inner TAR format is consistent across all versions
MIME type`application/octet-stream`
Typical file sizeA few MB to several GB, depending on the number of backed-up apps and their user data
APK inclusionApp installer packages are excluded by default; use the `-apk` flag with `adb backup` to include them
App opt-out mechanismApps declaring `android:allowBackup="false"` in their manifest are automatically excluded from the backup
Deprecation status`adb backup` deprecated since Android 12 (API level 31, 2021); functionality increasingly restricted on modern devices
Restore command`adb restore <file.ab>` - symmetric counterpart to `adb backup`, reinstalls data to a connected Android device
DeveloperGoogle / Android Open Source Project (AOSP)
Platform supportCreated on an Android device via `adb`; host-side tools run on Windows, macOS and Linux
Released2012 (Android 4.0 Ice Cream Sandwich, adb backup)
Latest versionBackup format version 5 (adds AES-256 encryption header); 'adb backup' deprecated since Android 12 (2021)
Open standardYes · royalty-free
Specificationandroid.googlesource.com

AB conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with AB files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about AB files.

Frequently asked questions

How do I open an .ab Android backup file on my computer?
You can't read it directly - it's a compressed (often encrypted) TAR. Use Android Backup Extractor: 'java -jar abe.jar unpack backup.ab backup.tar [password]', then open backup.tar in 7-Zip. To restore it to a phone instead, run 'adb restore backup.ab'.
How do I restore a .ab file to my Android phone?
Connect the device with USB debugging enabled, install Android platform-tools, then run 'adb restore backup.ab' and confirm (and enter your password) on the phone's screen.
Does an .ab backup contain the app (APK) too?
Only if you created it with the -apk flag (e.g. 'adb backup -apk ...'). By default an .ab holds app data only - settings and databases - not the installable APK.
I forgot the password for my encrypted .ab - can I still open it?
No. Encrypted backups use AES-256 with a key derived from your password; without it the data can't be decrypted. There is no recovery tool or backdoor.
Why does 'adb backup' say it's deprecated / back up nothing?
Google deprecated adb backup (warnings since Android 12) and many apps now set allowBackup=false, so they're skipped. Use the app's own export feature or Google's cloud backup for those.
Is a .ab file the same as a Nandroid/TWRP backup?
No. A .ab is an adb (app-data) backup made without root. A Nandroid/TWRP backup is a full partition image made in custom recovery - a different, larger format.

References

1Android Developers - adb (Android Debug Bridge)developer.android.com
2Android Developers - Platform Tools downloadsdeveloper.android.com

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.PARTPartial Download File
4.BINCD/DVD Disc Image (BIN/CUE)
5.RPMSGRestricted Permission Message
6.MDMarkdown Document
7.NOMEDIAAndroid No-Media Marker File
8.EXEWindows Executable (Portable Executable)
9.PRO6XProPresenter 6 Bundle File
10.PRDXSoftMaker Presentations Document

Related extensions

.BUPDVD IFO Backup File
.BAKBackup File (generic)
.SKBSketchUp Backup File
.SETMicrosoft Backup File Set
.BAK~AbiWord auto-saved document file
.BACKUPBackup File (generic)

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z