Backing up an Android device without rooting can feel like a guessing game. The built‑in Google backup only saves app data for a handful of apps, and a full image backup usually requires a custom recovery. Fortunately, the Android Debug Bridge (ADB) ships a adb backup command that can capture almost everything—apps, their private data, and shared files—directly to your computer. This tutorial walks you through the entire workflow: preparing your PC, enabling the necessary options on the phone, creating the backup, and restoring it later. Along the way you’ll learn why each flag matters, what the command cannot do, and how to troubleshoot the most common hiccups.
The adb binary is part of the Android SDK Platform‑Tools package. You only need this small package; a full SDK is unnecessary.
C:\adb.PATH (optional but convenient):
setx PATH "%PATH%;C:\adb"
adb version to verify the installation.mkdir -p ~/adb && unzip ~/Downloads/platform-tools-latest-darwin.zip -d ~/adb
PATH by editing ~/.zshrc or ~/.bash_profile:
export PATH=$PATH:~/adb/platform-tools
adb version to confirm.~/adb (or /opt/adb for system‑wide use).PATH in ~/.bashrc:
export PATH=$PATH:~/adb/platform-tools
adb version.The steps differ slightly between manufacturers, but the core idea is the same.
Connect the phone with the USB cable, then run:
adb devices
You should see a line like:
0123456789ABCDEF device
If the output shows unauthorized, a dialog will appear on the phone asking to Allow USB debugging. Tap Allow and optionally check “Always allow from this computer”.
adb backup FlagsADB’s backup command accepts several flags that control what gets saved:
-apk – include the APK files of installed apps (so you can reinstall them without the Play Store).-shared – back up the shared storage (photos, downloads, music). This can make the backup very large.-all – include all user‑installed apps. Without this, only the apps you list after the command are backed up.-f <file.ab> – specify the destination file on the PC.-nosystem – (default) skips system apps, which cannot be restored anyway.-keyvalue – creates a faster, key/value‑only backup (no APKs). Useful for quick data dumps.For a truly “full” backup we combine -apk, -shared, and -all.
Open a terminal (or Command Prompt) in the folder where you want the backup file to live, then run:
adb backup -apk -shared -all -f full-backup.ab
What happens next?
When the process finishes, the terminal returns to the prompt and the phone shows a “Backup complete” toast.
-shared. The resulting .ab file will be much smaller.Navigate to the folder where you saved full-backup.ab. Check its size:
ls -lh full-backup.ab # macOS/Linux
dir full-backup.ab # Windows
The size should roughly match the amount of data you saw on the phone’s backup dialog. If the file is only a few kilobytes, the backup likely failed or you omitted -shared.
Restoring follows the same basic steps: connect the device, enable USB debugging, and run adb restore. The command reads the .ab file and pushes the data back onto the phone.
adb restore full-backup.ab
When you execute the command, the phone displays a “Full restore” dialog. If the backup was encrypted, you’ll be prompted to enter the password you set earlier.
After the restore, you may notice that some apps need to be opened once to finish their first‑run setup (e.g., sign‑in again). This is normal because the backup restores the app’s private data, but certain authentication tokens are refreshed.
ADB does not provide a built‑in way to pick individual apps from a full backup. However, you can create a partial backup first and restore that later. For example, to back up just WhatsApp and its media:
adb backup -apk -shared -f whatsapp-backup.ab com.whatsapp
Later, restore only that backup:
adb restore whatsapp-backup.ab
When you need to extract a single app from a full backup, you can unpack the .ab file with the open‑source Android Backup Extractor (abe). This tool converts the proprietary format into a standard tar archive, which you can browse with any archive manager.
abe to Inspect a Backupabe.jar file from the GitHub releases page.full-backup.ab with your file):
java -jar abe.jar unpack full-backup.ab full-backup.tar
tar archive:
tar -xf full-backup.tar -C backup_contents
backup_contents you’ll find directories named after each package, e.g., com.whatsapp/ containing apk, shared, and keyvalue subfolders.This method is handy if you suspect a particular app is causing issues and you want to inspect its data without restoring the whole device.
adb kill-server && adb start-server to reset the daemon.-shared. Without it only app data is saved.adb backup. In that case you’ll need to copy media manually (e.g., via adb pull /sdcard/).adb version should match the platform‑tools version you used to create the backup..ab file between computers, verify it didn’t get truncated (compare file sizes).adb backup skips system apps, so they won’t be restored.While adb backup is powerful, it has a few hard limits you should be aware of:
adb backup for new builds. If the command fails with “Backup is not supported on this device”, you’ll need to fall back to Google’s cloud backup or a custom recovery.adb backup Is UnavailableIf you hit a roadblock, consider one of the following:
.ab file on an encrypted drive or a password‑protected cloud folder.| Action | Command | Key Flags |
|---|---|---|
| Install Platform‑Tools | Download zip, extract | – |
| Enable USB debugging | Settings → About → tap Build number 7× → Settings → System → Developer options → USB debugging | – |
| Verify connection | adb devices | – |
| Full backup (apps + data + media) | adb backup -apk -shared -all -f full-backup.ab | -apk, -shared, -all, -f |
| Backup only apps (no media) | adb backup -apk -all -f apps-only.ab | -apk, -all, -f |
| Restore backup | adb restore full-backup.ab | -f (implicit) |
| Extract .ab to .tar | java -jar abe.jar unpack full-backup.ab full-backup.tar | – |
Using adb backup gives you a portable, PC‑based snapshot of an Android device without ever rooting it. The workflow is straightforward: install platform‑tools, enable USB debugging, run a single command, and you have a .ab file that can be restored on the same or a different phone. Understanding the flags, the encryption option, and the known limitations helps you avoid the common pitfalls that turn a backup into a false sense of security. Keep the backup in a safe place, remember the password, and you’ll have a reliable fallback whenever you upgrade, reset, or replace a device.









