22

I have to set up 50+ plus phones for my company, and I am allowed to root the phones. Each phone needs to have the exact same WIFI SSID's / passwords, account / privacy settings, brightness, input methods, etc. Repeating the exact same manual setup 50 times seems a bit tedious..

Where are the phone settings stored? Can I simply adb push the settings to each device? The phones are Samsung Galaxy Pockets.

5
  • 1
    If all phones are of same brand/model/Os etc. you can configure one to your satisfaction and then take a Nandroid backup and restore it to all phones.
    – Narayanan
    Mar 4, 2013 at 8:12
  • @Narayanan - I've considered that, but it seems there are no bootloaders / tools out that can make nandroid backups of Galaxy Pockets. Mar 4, 2013 at 8:15
  • I found a webpage that helps user to install CWM recovery in S5300 a.k.a Galaxy Pocket. If I am correct, CMW had nandroid backup facility.
    – Narayanan
    Mar 4, 2013 at 8:25
  • @Narayanan - Unfortunately the link on that page is broken. However, your link led me to finding this. Going to test now Mar 4, 2013 at 9:10
  • Also keep in mind, if you root a device make sure to un-root it once you're done. Rooted device is not secure. For example if it has TWRP installed you can disable lockscreen protection easily.
    – Emil
    Sep 10, 2017 at 9:21

4 Answers 4

21

As it turns out, there is no magic file or directory that contains all settings. They are stored in various places, and depends greatly on how the manufacturer decides to set things up. I primarily work with Samsung phones, so the information here will mostly be Samsung oriented. Also, note that all of the below requires root access. If anyone has anything to add / rectify, feel free to comment.

First off, I have found that "copying settings" is not always the best way to go. You can do nandroid backups and restores, which pretty much clones one phone to another. If you're technical enough, and you're using Samsung, then creating your own odin image might be an even better option as it doesn't rely on you or someone else having created nandroid / recovery support.

The Settings

General settings:
Settings are mostly stored in the /data subdirectory. If you're looking for something specific, start there.

Built-in apps:
Built-in apps tend to keep their settings in /data/data/com.android.* and /data/data/com.google.android.*
For example:
Contacts: /data/data/com.android.contacts
Email accounts: /data/data/com.android.email
MMS: /data/data/com.android.mms

WiFi:
WiFi settings location depends on the manufacturer, but is generally predictable.
Samsung Galaxy Pocket, S2, S3: /data/misc/wifi/wpa_supplicant.conf
Samsung Tab: /data/wifi/bcm_supp.conf
HTC Desire: /data/misc/wifi/wpa_supplicant.conf
Dell Streak: /data/misc/wifi/wpa.conf
Oneplus 2, 3: /data/misc/wifi/networkHistory.txt

Keyboard configs:
I have had to disable hardware keys, reconfigure layouts, or alter general keyboard behaviour before. The exact file name tends to be different on every phone, but I've found the config files to always be in /system/usr/keylayout/. Be careful, as breaking those could render your phone unusable.

Misc:
Most miscellaneous settings like product information, boot sounds, and enabling / disabling the on-screen nav bar are stored in /system/build.prop. Breaking this config file could bootloop your device.

If I find more information, I'll add later.

0
6

I'm not an expert in android technologies. So I'm not totally sure whether my answer is true or not. But, using Root Explorer, I discovered that some of the settings are stored in the following files:

  • /data/system/users/0/settings_system.xml
  • /data/system/users/0/settings_secure.xml

For example the screen brightness is stored in the file settings_system.xml. If you open this file using a text editor, you may come across the following line of code:

<setting id="2220" name="screen_brightness" value="66" package="com.android.settings" />

In the code above, the number "66" indicates the screen brightness. The higher the number, the brighter the screen. I also discovered that the background image of your cell phone is stored in the following file path:

  • /data/system/users/0/wallpaper

My cell phone is Samsung SM-J7. Maybe my discovery may vary for other smart phones.

5

another possible way to do that is through the ``content'' command, e.g.:

adb shell content query --uri content://settings/global 
adb shell content insert --uri content://settings/global --bind name:s:preferred_network_mode1 --bind value:i:0
2

Most Android settings are found in /data/data/com.android.providers.settings/databases/settings‌​.db, which is an SQLite database which can easily manipulated by an SQLite browser. Android itself normally uses a protected SettingsProvider to manipulate those settings.

Sidenote: It seems that even though the settings have actually changed under the hood, the Settings GUI might not always seem to be up to date with the underlying reality. However, it is always the database that counts, and is provided to all the modules that are using them

Though, as stated previously, some settings can be stored as shared_prefs or in files-dir for individual apps etc. Also, some manufacturers used mod'ed versions of Android which may use settings stored on other places.

In later versions of Android, some settings seem to have moved to other places.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .