Modify settings parameters through database

I have been able to successfully modify and update the settings in the Android phone using ADB commands such as these..

Enable GPRS data:

adb shell sqlite3 -batch /data/data/com.android.providers.settings/databases/settings.db "update system SET value='1' where name='gprs_connection_setting'";


Enable GPS :

adb shell sqlite3 -batch /data/data/com.android.providers.settings/databases/settings.db "update secure SET value='gps' where name='location_providers_allowed'";


While these were successful, I couldn't find the database or xml where the option for enabling disable data while roaming can be modified. I have been trying with many databases one after another with no luck. Can anyone help me in pointing the database or xml which gets modified (from the settings are taken) for the data roaming setting:

Screenshot of Roaming Option

Note: This answer is tested on Android 4.2.1.

To enable data roaming for default SIM, enter:

adb shell settings put global data_roaming 1


Changes would take effect immediately. Note that for a dual SIM phone, change the key to data_roaming_2 if roaming has to be toggled for SIM2.

Use this command:

adb shell sqlite3 -batch /data/data/com.android.providers.settings/databases/settings.db "update system SET value='1' where name='data_roaming'";

• On which Android version did you test your solution? data_roaming is under the table global for Android 4.2.1, 4.4.2, and 5.0.2 – Firelord Aug 6 '15 at 13:47