How to Create an Encrypted ADB Backup of Android App Data (No Root)

16 min read Step‑by‑step guide to back up Android app data with ADB, encrypt the backup, and restore it safely without rooting your device. October 14, 2026 12:00 How to Create an Encrypted ADB Backup of Android App Data (No Root)

Why an Encrypted ADB Backup?

When you change phones, perform a factory reset, or simply want a safety net, a full backup of your app data is invaluable. Google’s cloud backup is convenient, but it stores data on Google’s servers and can’t be transferred between unrelated accounts. Using adb (Android Debug Bridge) lets you create a local backup file that you control entirely. Adding encryption protects that file from anyone who might get hold of it, which is especially important if the backup contains personal messages, banking app credentials, or private documents.

Before You Start

  • Charge your phone to at least 60 %—the backup process can take several minutes.
  • Use a USB‑C or micro‑USB cable that supports data transfer (not just charging).
  • Make sure your computer has ADB installed. The steps differ slightly between Windows, macOS, and Linux (see the “Set Up ADB” section).
  • Have a secure location ready to store the backup file, such as an encrypted external drive or a password‑protected cloud folder.

Step 1 – Enable Developer Options and USB Debugging

  1. Open Settings on your Android device.
  2. Scroll down to About phone (or About device).
  3. Tap Build number seven times. You’ll see a toast that says “You are now a developer!”.
  4. Return to the main Settings screen; a new entry called Developer options will appear.
  5. Enter Developer options and toggle USB debugging on.
  6. If a prompt appears asking to allow USB debugging from this computer, tap Allow. You can also check “Always allow from this computer” for future use.

Why this matters: adb communicates with the device over USB only when debugging is enabled. Without it, the computer cannot issue backup commands.

Step 2 – Install ADB on Your Computer

The Android SDK Platform‑Tools package contains the adb binary. Follow the instructions for your OS.

Windows

  1. Download the Platform‑Tools zip from the official Android developer site.
  2. Extract the zip to a folder, e.g., C:\adb.
  3. Add that folder to your PATH environment variable (Control Panel → System → Advanced → Environment Variables).
  4. Open a Command Prompt and type adb version to verify the installation.

macOS

  1. Open Terminal.
  2. Run brew install --cask android-platform-tools if you have Homebrew installed, or download the zip and unzip it to /usr/local/adb.
  3. Add the folder to your PATH by editing ~/.zshrc or ~/.bash_profile and adding export PATH=$PATH:/usr/local/adb.
  4. Run adb version to confirm.

Linux

  1. On Debian/Ubuntu, run sudo apt-get install android-tools-adb.
  2. On Fedora, run sudo dnf install android-tools.
  3. Verify with adb version.

Step 3 – Verify the Connection

  1. Connect your phone to the computer with the data cable.
  2. On the computer, open a terminal (Command Prompt, PowerShell, or Terminal) and run adb devices.
  3. You should see a line with your device’s serial number followed by device. If it shows unauthorized, check the phone for a debugging permission dialog.

If no device appears, try a different cable, enable “USB for file transfer” on the phone, or restart the adb server with adb kill-server && adb start-server.

Step 4 – Create the Backup File

The adb backup command can include apps, shared storage (photos, downloads), and the device’s settings. Adding the -f flag tells ADB where to write the file.

  1. Open your terminal and navigate to a folder where you want to keep the backup, e.g., cd ~/AndroidBackups.
  2. Run the following command:
    adb backup -apk -shared -all -f android-backup.ab
    • -apk – includes the APK files of installed apps (useful if you want to reinstall without downloading again).
    • -shared – backs up files on the shared storage partition (photos, downloads, etc.).
    • -all – backs up all user apps; system apps are excluded by design.
    • -f android-backup.ab – names the output file.
  3. After you press Enter, the phone will display a “Full backup mode” screen. You’ll be asked to set a password for encryption. Enter a strong password (minimum 8 characters, mix of letters, numbers, symbols) and confirm it.
  4. Tap Back up my data. The progress bar will show the amount of data being copied. Wait until it finishes and the device returns to the home screen.

The resulting android-backup.ab file is already encrypted with the password you supplied. However, the ADB format is not universally readable, so many users prefer to re‑encrypt the file with a standard tool like OpenSSL for easier handling.

Step 5 – (Optional) Re‑Encrypt the Backup with OpenSSL

Re‑encrypting gives you a portable .zip or .enc file that can be opened with any OpenSSL‑compatible program.

  1. First, convert the ADB backup to a raw tar archive. Run:
    adb backup -noapk -nosystem -shared -f backup.tar
    Note: This step creates an unencrypted tar; you’ll encrypt it in the next command. If you prefer to keep the original .ab file, skip this conversion and encrypt the .ab directly.
  2. Encrypt the tar with OpenSSL using AES‑256‑CBC:
    openssl enc -aes-256-cbc -salt -in backup.tar -out backup.tar.enc
    You will be prompted for a password. Use the same strong password you set in the ADB step, or a new one if you want separate credentials.
  3. Delete the intermediate backup.tar file to avoid leaving an unencrypted copy on disk:
    rm backup.tar
  4. Store backup.tar.enc in your secure location.

If you keep the original .ab file, you can encrypt it directly:

openssl enc -aes-256-cbc -salt -in android-backup.ab -out android-backup.ab.enc
Remember to delete the unencrypted .ab afterwards.

Step 6 – Restoring the Backup

When you need to move to a new device or recover after a factory reset, the restore process mirrors the backup steps.

6.1 – Prepare the Target Device

  1. Enable Developer Options and USB debugging on the new or reset phone (see Step 1).
  2. Connect the phone to the computer and verify the connection with adb devices.

6.2 – Decrypt (if you re‑encrypted)

  1. If you used OpenSSL, decrypt first:
    openssl enc -d -aes-256-cbc -in backup.tar.enc -out backup.tar
  2. If you kept the original .ab, skip this step.

6.3 – Run the Restore Command

  1. For a standard ADB backup file:
    adb restore android-backup.ab
  2. If you decrypted to a .tar, you need to convert it back to the ADB format. Unfortunately, ADB does not accept a raw tar for restore, so the recommended path is to keep the original .ab. If you only have the tar, you can manually extract its contents and reinstall apps, but that is beyond the scope of this guide.
  3. When the phone shows the “Restore backup” screen, enter the password you set during the backup step.
  4. Tap Restore now. The device will unpack the data; you may see a progress indicator for each app.

After the restore finishes, reboot the phone. Most apps will launch as if they were never closed, preserving login sessions and settings.

Step 7 – Verify the Restore

  • Open a few of your most used apps (e.g., messaging, banking, notes) and confirm that settings and logged‑in accounts are intact.
  • Check the Photos app or Files app for the presence of previously backed‑up media.
  • If an app reports that data is missing, it may have opted out of ADB backup. In that case, consider using the app’s own export feature.

Common Pitfalls and Troubleshooting

Device Not Detected

  • Make sure the USB cable is a data cable, not a charge‑only cable.
  • On some devices, the default USB mode is “No data transfer”. Pull down the notification shade, tap the USB option, and select “File transfer / MTP”.
  • Restart the ADB server: adb kill-server && adb start-server.
  • On Windows, you may need to install the OEM USB driver (e.g., Samsung USB driver, Google USB driver).

Backup File Is Empty or Very Small

  • Some apps explicitly disable ADB backup via the android:allowBackup="false" manifest flag. Those apps will not appear in the backup.
  • Make sure you tapped “Back up my data” on the phone’s prompt. If you cancelled, the file will be empty.

Restore Fails with “Backup format not recognized”

  • This usually means the file was corrupted or the encryption password was entered incorrectly.
  • Verify the file’s integrity (e.g., compare checksum if you stored one) and try restoring again.

App Crashes After Restore

  • Some apps store data in locations that are not covered by ADB (e.g., protected internal storage). After a restore, they may need to be re‑installed from the Play Store.
  • Clear the app’s cache (Settings → Apps → [App] → Storage → Clear cache) and relaunch.

Limitations of ADB Backup

  • System apps and data are excluded by design; you cannot back up the OS itself without root.
  • Apps that set android:allowBackup="false" (many banking or DRM‑protected apps) will be skipped.
  • Backup does not include the device’s internal encryption keys, so if you encrypt the backup with a password and later forget it, the data is unrecoverable.
  • The ADB backup format is deprecated in newer Android versions (starting with Android 12, many manufacturers disable it). If adb backup returns “command not found”, your device may not support it.

When you encounter a device that refuses the adb backup command, the fallback is to use the built‑in Google backup or a third‑party app that can export data without root (e.g., Helium). Those solutions are outside the scope of this tutorial.

Best Practices for Secure Storage

  • Store the encrypted backup on an external SSD that you keep in a locked drawer.
  • If you keep a copy in the cloud, use a service that offers zero‑knowledge encryption (e.g., Sync.com, Tresorit).
  • Rotate your backup password every 6–12 months and keep a password manager entry for it.
  • Periodically test the restore process on a spare device to ensure the backup remains usable.

Wrapping Up

By following these steps you gain a portable, encrypted snapshot of all your Android app data and shared files—without ever needing root access. The workflow gives you full control over where the backup lives, how it’s protected, and how you restore it on any compatible Android device. Remember to keep the backup password safe, verify the backup after creation, and store the file in a secure location. With a reliable ADB backup in place, you can switch phones, reset your device, or recover from accidental data loss with confidence.

User Comments (0)

Add Comment
We'll never share your email with anyone else.