Where is the database to save android volumes In android settings database, we can see below items:

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


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?
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:



(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.