Export & Import Android System Settings via ADB (No Root)

13 min read Learn step‑by‑step how to back up, edit, and restore Android system settings using ADB without rooting your device. October 05, 2026 10:00 How to Export and Import Android System Settings with ADB (No Root)

When you change a lot of preferences on a new Android phone – display size, ringtone, developer options, notification channels – you quickly realize there’s no single “export settings” button. The next time you flash a new ROM or reset the device, you have to recreate those tweaks manually.

This tutorial shows how to capture the entire settings database using the Android Debug Bridge (ADB), edit it on a PC, and push it back – all without rooting the phone.

Why ADB can back up settings without root

ADB runs with the android.permission.DUMP privilege when you enable USB debugging. That privilege lets the bridge read the settings provider (the SQLite database that stores system, secure, and global settings). Because the provider is exposed through a content URI, ADB can query it and write a copy to the local filesystem. No super‑user rights are required, but you do need to be careful: overwriting the database with an incompatible version can render the device unbootable.

Before you start

  • Charge your phone to at least 50 %. A power loss while writing the settings DB could corrupt it.
  • Back up any important data (photos, messages) using your preferred method. The procedure only touches settings, but a full backup is a safety net.
  • Install the latest Android platform‑tools on your computer. The adb executable is the only required binary.
  • Enable Developer options → USB debugging on the device (Settings → About phone → Tap Build number seven times, then Settings → System → Developer options).
  • Connect the phone via USB and verify the connection with adb devices. You should see the device listed as device, not unauthorized.

Step 1 – Pull the current settings database

  1. Open a terminal (Command Prompt, PowerShell, or a Linux shell) and navigate to the folder where you want the backup file.
  2. Run the following command to create a temporary directory on the device and copy the three settings DB files:
    adb shell "mkdir -p /data/local/tmp/settings_backup && cp /data/data/com.android.providers.settings/databases/* /data/local/tmp/settings_backup/"
  3. Pull the files to your computer:
    adb pull /data/local/tmp/settings_backup ./android-settings-backup
    This creates a folder android-settings-backup containing settings.db, settings.db-wal, and settings.db-shm.
  4. Optionally, verify the pull succeeded:
    ls ./android-settings-backup
    You should see the three files listed.

What you should see: The folder now holds a faithful copy of the device’s settings database. You can open settings.db with any SQLite viewer (e.g., DB Browser for SQLite).

Step 2 – Inspect and edit the settings (optional)

Most users simply back up the file and restore it later, but the real power comes from editing specific keys.

  • Open settings.db in your SQLite viewer.
  • The database contains three tables: system, secure, and global. Each row is a name / value pair.
    • system – UI‑related settings (screen timeout, font scale).
    • secure – security‑related flags (install non‑market apps, ADB‑enabled).
    • global – settings that affect all users (airplane mode, network‑related flags).
  • To change a value, edit the value column and save the file. Example: set screen_off_timeout from 30000 (30 s) to 120000 (2 min).
    UPDATE system SET value='120000' WHERE name='screen_off_timeout';
  • Save the changes and close the viewer.
If you only need to tweak a few keys, consider using adb shell settings put directly (see the “quick edit” box below) instead of editing the DB file.

Quick edit without pulling the DB

ADB already provides a settings command that can read or write individual keys. Use this when you know exactly which setting you want to change.

# Read a value
adb shell settings get system screen_off_timeout

# Write a new value (value must be a string or integer)
adb shell settings put system screen_off_timeout 120000

This method is faster but does not give you a full backup.

Step 3 – Push the edited database back to the device

  1. First, stop the Settings provider to avoid file‑locking conflicts. Run:
    adb shell "pm disable com.android.providers.settings"
    This disables the provider temporarily; it will be re‑enabled later.
  2. Copy the edited files back to the temporary folder on the device (overwrites the originals):
    adb push ./android-settings-backup/settings.db /data/local/tmp/settings_backup/
    Repeat for the -wal and -shm files if you edited them.
  3. Move the files into the real location with proper permissions:
    adb shell "cp /data/local/tmp/settings_backup/* /data/data/com.android.providers.settings/databases/ && chown system:system /data/data/com.android.providers.settings/databases/* && chmod 660 /data/data/com.android.providers.settings/databases/*"
  4. Re‑enable the provider:
    adb shell "pm enable com.android.providers.settings"
  5. Force the system to reload the database:
    adb shell "am broadcast -a android.intent.action.ACTION_SETTINGS_CHANGED"
  6. Reboot the device (optional but recommended) to ensure all services read the new values:
    adb reboot

What you should see after reboot: All the settings you edited should be applied. For example, the screen timeout will now stay on for two minutes, and any secure flag you changed (e.g., allowing installations from unknown sources) will reflect the new state in the Settings UI.

Step 4 – Verify the restored settings

  • Open Settings on the device and navigate to the sections you changed (Display → Sleep, Security → Install unknown apps, etc.). Confirm the values match your expectations.
  • Alternatively, use the adb shell settings get command to read back a specific key:
    adb shell settings get system screen_off_timeout

Common pitfalls and troubleshooting

Device not rooted and permission denied

If the cp or chmod commands fail with “Permission denied”, your device may be running a hardened OEM ROM that blocks access to /data/data/com.android.providers.settings even with ADB. In that case, you have two options:

  1. Use the settings put command for each key instead of pushing the whole DB.
  2. Temporarily grant the android.permission.WRITE_SECURE_SETTINGS permission via adb shell pm grant on devices that allow it (usually only on userdebug builds).

ADB reports "device unauthorized"

Detach and re‑attach the USB cable, then accept the RSA fingerprint prompt on the phone. If the prompt does not appear, go to Settings → Developer options and toggle USB debugging off and on.

Device boots into a bootloop after restoring

This usually means the DB file is corrupted or the SQLite version on the device differs from the one you edited with. To recover:

  1. Boot into recovery mode (usually Power + Volume Up). Choose Apply update from ADB if available.
  2. Use adb shell rm /data/data/com.android.providers.settings/databases/settings.db to delete the faulty file.
  3. Reboot; Android will recreate a fresh, default settings DB.
  4. Restore only the keys you are confident about, using adb shell settings put instead of a full DB push.

Settings not taking effect after reboot

Some values are cached in memory. After pushing the DB, you can clear the cache for the Settings app:

adb shell pm clear com.android.providers.settings
Then reboot.

Advanced use cases

  • Mass migration between devices. Export the DB from an old phone, edit the android_id in the secure table if you plan to keep the same Google account, then import on the new device.
  • Creating a reusable profile. Store a cleaned‑up settings.db in version control. When you flash a fresh ROM, push the profile to get your preferred UI instantly.
  • Testing custom ROMs. Developers can script the import step to verify that a ROM respects user‑defined values.

Safety warnings

  • Never edit keys you do not understand. Changing adb_enabled or development_settings_enabled can expose your device to unintended remote control.
  • Always keep an untouched copy of the original settings.db on your PC. If something goes wrong, you can restore it using the same push procedure.
  • Do not mix DB files from different Android major versions (e.g., Android 10 vs Android 13). Schema changes may cause crashes.

Wrapping up

With the steps above you now have a reliable, no‑root workflow to back up, tweak, and restore Android system settings using ADB. The method works on most stock Android devices from Android 7 (Nougat) onward, and it can be adapted for OEM skins with minor path adjustments. By keeping a personal settings backup, you eliminate the tedious manual re‑configuration after a factory reset, ROM flash, or device migration – saving time and preserving your preferred user experience.

User Comments (0)

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