Is there any reference about settings.db
database file?
I see mostly obviously variables but there is not enough for confidence.
Asked
Active
Viewed 4,453 times
0

CommonsWare
- 986,068
- 189
- 2,389
- 2,491

Крайст
- 776
- 1
- 9
- 22
2 Answers
3
On a rooted device, you can pull the file from /data/data/com.android.providers.settings/databases/settings.db
(you will need to do adb root
before)
Then you can open it a with a sqlite database explorer:
The names are self-explanatory. If one confuses you, a simple google search should help.

Charles Milette
- 388
- 3
- 21
-
1Where has this database gone in Android 7? – JohnyTex Jun 15 '18 at 10:20
0
There is hardly any reference. You should be using the Settings.System class to be access the system settings in Android. Using the Settings.System class, you are able to both read and write to the system settings.
Checking Mobile Network:
ConnectivityManager nInfo = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
nInfo.getActiveNetworkInfo().isConnectedOrConnecting();
Log.d(tag, "Net avail:"
+ nInfo.getActiveNetworkInfo().isConnectedOrConnecting());
ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo netInfo = cm.getActiveNetworkInfo();
if (netInfo != null && netInfo.isConnectedOrConnecting()) {
Log.d(tag, "Network available:true");
return true;
} else {
Log.d(tag, "Network available:false");
return false;
}

Zaid Daghestani
- 8,555
- 3
- 34
- 44
-
-
I think I've found that: [Settings.System][1] But, for example, variable `mobile_network_enabled` isn't in this ref :( I think only playing with this and other parameters will answer to all questions, but it's very dangerous. In Russia we say: "Who is not risking - not drinking the champagne" =) (but my English is bad) [1]: http://developer.android.com/reference/android/provider/Settings.System.html – Крайст Sep 30 '11 at 17:09
-
Ah yes, for network information you must use ConnectivityManager and NetworkInfo. I added the code to the answer – Zaid Daghestani Sep 30 '11 at 19:46
-
Thank you! Can some non-system app read and save their own settings into this file or not? I can't find any info about `mobile_network_enabled` var :( – Крайст Oct 01 '11 at 08:22