18

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.

  • 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 '13 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. – aggregate1166877 Mar 4 '13 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 '13 at 8:25
  • @Narayanan - Unfortunately the link on that page is broken. However, your link led me to finding this. Going to test now – aggregate1166877 Mar 4 '13 at 9:10
  • When it worked out, feel free to answer your own question! Two days after that, you can accept your own answer and thus show other "searchers" there's a working solution. Thank you! – Izzy Apr 5 '13 at 16:04
16

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.

  • Some of those directories require root access.. – t0mm13b Jun 12 '13 at 12:57
  • @t0mm13b - Oops, forgot to mention. Edited. – aggregate1166877 Jun 12 '13 at 13:00
  • 1
    All of those directories require root access to write to. – afrazier Jun 12 '13 at 13:55
  • Can you please point out locations where brightness and volume level are stored ? – JRC Jun 9 '15 at 9:26
  • very valuable, yet, I found no way to turn off display. – ransh Nov 25 '16 at 6:47
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
3

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.

1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.