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).
adb installed.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.
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.
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.
There are two quick ways:
id= is the package name.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.
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.
.ab file to a tar archiveDownload 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.
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.
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.
tar back to an .ab fileIf 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.
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.
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).
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.
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..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.shared_prefs files (as described in Step 6) and leave other data untouched.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.
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.









