1

In android settings database, we can see below items:

  <setting id="96" name="volume_music_bt_sco_hs" value="15" package="android" />
  <setting id="4" name="volume_alarm" value="6" package="android" />
  <setting id="0" name="volume_music" value="11" package="android" />
  <setting id="3" name="volume_voice" value="4" package="android" />
  <setting id="78" name="volume_ring_bt_a2dp" value="1" package="android" />
  <setting id="1" name="volume_ring" value="5" package="android" />
  <setting id="93" name="volume_alarm_bt_sco_hs" value="7" package="android" />
  <setting id="38" name="volume_voice_bt_a2dp" value="6" package="android" />
  <setting id="6" name="volume_bluetooth_sco" value="7" package="android" />
  <setting id="34" name="volume_voice_earpiece" value="6" package="android" />
  <setting id="70" name="volume_alarm_speaker" value="6" package="android" />
  <setting id="148" name="volume_voice_headset" value="1" package="android" />
  <setting id="55" name="volume_music_bt_a2dp" value="15" package="android" />
  <setting id="71" name="volume_bluetooth_sco_earpiece" value="9" package="android" />
  <setting id="5" name="volume_notification" value="5" package="android" />
  <setting id="89" name="volume_voice_bt_sco_hs" value="1" package="android" />
  <setting id="132" name="volume_ring_speaker" value="7" package="android" />
  <setting id="146" name="volume_music_headset" value="5" package="android" />
  <setting id="2" name="volume_system" value="7" package="android" />
  <setting id="116" name="volume_bluetooth_sco_bt_sco_hs" value="15" package="android" />
  <setting id="42" name="volume_bluetooth_sco_bt_a2dp" value="9" package="android" />
  <setting id="65" name="volume_music_headphone" value="5" package="android" />
  <setting id="76" name="volume_bluetooth_sco_headset" value="9" package="android" />

But it's not the actual volume settings but default ones. so if I changed the volume settings in UI, which database will save such settings?

2
  • I suppose you're using Android Marshmallow and the output is from the file settings_system.xml available under /data/system/users/0/. In that case, change the volume (try alarm), reload your file viewer/editor and then load the file. You will see the difference.
    – Firelord
    Commented Mar 16, 2016 at 20:51
  • Thanks, I only checked "volume_music" just now, but it seems "volume_music" always not change, the volume adjust will change "volume_music_speaker" item! so what's "volume_music" for, why we need that key if didn't use it.
    – lucky1928
    Commented Mar 16, 2016 at 21:07

1 Answer 1

6

The file does reflect the changes. You need to observe it a bit more carefully.

My little research tells me that in Android 4.2.1, 4.4.2, 5.0.2 and 5.1.1, most of the changes performed in Settings app are saved in an SQLite database of Settings Storage/Providers app, located at /data/data/com.android.providers.settings/databases/settings.db.

Some of the settings can be found in the private data directory of Settings app, which is /data/data/com.android.settings.

However, the preformatted text in your question appears to be been taken from settings_system.xml. The file is located under /data/system/users/0 (or an appropriate position in case of full disk encryption).

That file is available only in Android Marshmallow release and it does reflect the changes made through Volume button.

Example:

enter image description here

(Lines starting with echo are only for the purpose of explaining what I'm going to do with consecutive command. Avoid executing them. adbs stands for adb shell.)

I suppose the source code or official documentation for developers would provide a better idea on what other keys starting with volume_ are meant for.

You must log in to answer this question.

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