Export and Restore Android App Settings Using ADB (No Root)

12 min read Learn how to back up a single Android app’s settings to a file using ADB, extract the data, and restore it later—all without rooting your device. September 29, 2026 12:30 How to Export and Restore Android App Settings with ADB (No Root)

Before you start

Backing up an app’s settings involves reading files stored in the app’s private data directory (/data/data/…). Android protects that area, but the adb backup command can create a device‑side snapshot that you can later pull to a PC. The method works on Android 4.4+ and does not require root, provided the app’s manifest allows backups (the android:allowBackup="true" flag).

  • PC requirements: Windows, macOS or Linux with adb installed.
  • Device requirements: USB debugging enabled, battery ≥ 30 % (or keep the device plugged in).
  • Safety note: The backup file contains all app data, including login tokens and personal preferences. Store it in an encrypted folder or a secure cloud service.

What the process actually does

When you run adb backup -f backup.ab -noapk com.example.app, Android creates a .ab (Android Backup) container that holds a tar archive of the app’s data. The container is encrypted with a temporary key that the device supplies; you can keep it unencrypted by adding -noencrypt (available on Android 9 and newer). After you have the .ab file you need a small Java utility called Android Backup Extractor (abe.jar) to turn it into a regular tar archive. Inside the archive you will find the shared_prefs XML files that store most user‑visible settings.

Step‑by‑step workflow

Step 1 – Install ADB on your computer

If you haven’t already, download the Platform‑Tools package from the official Android developer site. Extract the archive to a convenient folder (e.g., C:\adb on Windows or ~/adb on macOS/Linux). Add the folder to your system PATH or keep a command prompt open in that directory.

Verify the installation by running:

adb version

You should see something like Android Debug Bridge version 1.0.41. If you get an error, double‑check that the adb executable is reachable.

Step 2 – Enable USB debugging on the Android device

Open Settings → About phone and tap Build number seven times to unlock Developer options. Then go back to Settings → System → Developer options and toggle USB debugging on.

Connect the phone to the PC with a USB cable. When the prompt “Allow USB debugging?” appears, check Always allow from this computer and tap OK.

Step 3 – Identify the package name of the target app

There are two quick ways:

  1. Open the Play Store page of the app and look at the URL – the part after id= is the package name.
  2. Run adb shell pm list packages | grep -i "partial‑name" to filter the list.

For this tutorial we’ll use com.example.myapp as a placeholder.

Step 4 – Create a backup of the app’s data

Run the following command, replacing the package name as needed:

adb backup -f myapp_backup.ab -noapk -noencrypt com.example.myapp

The flags mean:

  • -f myapp_backup.ab – name of the output file.
  • -noapk – do not include the APK itself (saves space).
  • -noencrypt – store the archive unencrypted (simplifies extraction). Omit this flag if you prefer the extra protection.

After you press Enter, the device shows a confirmation screen. Tap Back up my data. When the progress bar finishes, you’ll have myapp_backup.ab in the current directory.

Step 5 – Convert the .ab file to a tar archive

Download abe.jar from the GitHub repository linked earlier. Place the JAR file in the same folder as your backup, or note its full path.

Run the conversion command:

java -jar abe.jar unpack myapp_backup.ab myapp_backup.tar

If you omitted -noencrypt in step 4, you’ll be prompted for the password you set on the device. After the command finishes, you’ll have myapp_backup.tar.

Step 6 – Extract the settings (shared_prefs) files

Use any archive tool (7‑Zip, tar, etc.) to open myapp_backup.tar. Navigate to the folder:

apps/com.example.myapp/f/shared_prefs/

Inside you’ll see one or more .xml files, e.g., preferences.xml. These files contain key‑value pairs that represent the app’s settings.

Copy the XML files to a safe location. If you want to edit a setting, open the file in a plain‑text editor and modify the value (respect the XML structure!). Save the file when you’re done.

Step 7 – (Optional) Re‑package the modified settings

If you edited any XML, you need to put the files back into the tar archive so that the restore process picks them up. The easiest way is to create a new folder that mirrors the original structure, copy the unchanged files plus your edited XML, and then re‑create the tar:

mkdir -p rebuild/apps/com.example.myapp/f/shared_prefs
cp myapp_backup.tar ./rebuild   # extract everything first
tar -xf myapp_backup.tar -C rebuild
cp edited_preferences.xml rebuild/apps/com.example.myapp/f/shared_prefs/
cd rebuild
tar -cvf ../myapp_modified.tar .

Now you have myapp_modified.tar ready for the next step.

Step 8 – Convert the tar back to an .ab file

If you kept the original .ab (unencrypted), you can skip this step and restore directly from the original backup. To use the modified archive, run:

java -jar abe.jar pack myapp_modified.tar myapp_modified.ab

The resulting myapp_modified.ab contains your edited settings.

Step 9 – Restore the backup to the device

Make sure the target app is installed on the device (same package name, compatible version). Then execute:

adb restore myapp_modified.ab

The phone will display a restore confirmation screen. Tap Restore my data. When the progress bar disappears, the app’s data – including the settings you extracted – have been written back to /data/data/com.example.myapp.

Verifying that the settings were restored

Open the app and navigate to the screen where the changed setting should be visible (for example, a toggle in the Preferences screen). If the value matches what you edited, the process succeeded. If the app behaves as if it were a fresh install, double‑check that the shared_prefs XML file was placed in the correct path and that the file permissions are preserved (the adb restore command handles permissions automatically).

Alternative method: Using Helium (No Root)

Helium (formerly Carbon) offers a GUI‑driven backup that can also extract app data without root. The workflow is similar – you create a backup, pull the .tar file, edit the XML, then push it back. Helium may be preferable for users uncomfortable with command‑line tools, but it requires the companion desktop app and works only on devices that support the Helium “Desktop Sync” protocol.

Common issues and troubleshooting

  • Backup fails with “Backup failed”: The target app may have android:allowBackup="false" in its manifest. In that case ADB cannot read its data. You’ll need to look for a third‑party backup solution that works at the file level (e.g., using root) or accept that the settings cannot be exported.
  • abe.jar reports “Invalid backup file”: This usually means the .ab is encrypted but you omitted the password, or you used a version of adb that creates a newer format not yet supported by the older abe.jar. Download the latest abe.jar from the repository and retry.
  • After restore the app crashes: The restored data may be from a different app version, causing schema mismatches. Try restoring only the shared_prefs files (as described in Step 6) and leave other data untouched.
  • Device shows “Battery low – backup aborted”: Keep the device plugged into a charger or enable “Stay awake” in Developer options while connected to USB.

Safety and privacy considerations

Because the backup contains everything the app stores locally, treat it like a password vault. If you store the file on a cloud service, enable end‑to‑end encryption (e.g., using cryptomator or an encrypted archive). Also, avoid sharing the backup with anyone – a malicious actor could extract authentication tokens and gain access to your accounts.

Wrapping up

Using ADB’s backup/restore mechanism together with the Android Backup Extractor gives you fine‑grained control over an app’s settings without ever rooting the device. The workflow is a bit more involved than a one‑click “export settings” button, but it works for any app that permits backups, and the same steps can be adapted to migrate settings between phones, create version‑controlled snapshots, or even audit what data an app stores locally. Keep your backup files safe, and you’ll have a reliable safety net for your favorite Android apps.

User Comments (0)

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