Search code examples
androidandroid-contentprovider

Resetting development_settings_enabled does not change developer status


I tried to reset the developer status on a rooted moto g4 android device. First I used content shell command to read the setting:

adb shell content query  --uri content://settings/global/development_settings_enabled

The result is:

> Row: 0 _id=173, name=development_settings_enabled, value=1

Because an update command was not successfull i deleted and reinserted the setting using

adb shell content delete --uri content://settings/global --where "name=\'development_settings_enabled\'"
adb shell content insert --uri content://settings/global --bind name:s:development_settings_enabled --bind value:i:0

After rebooting the system the value of development_settings_enabled state is reset to 1.

Do I need a script to actively reset this value during boot time? Is there another place where to reset the developer state? I refused to use "reset data", which is the recommended method because this would remove all my settings.


Solution

  • Resetting the data of the Android "Settings" App, as recommended in other solutions, seems not to delete all settings of the phone. Therefore this is the simple solution to my problem. It is still not a programmatic solution I could use in a batch production process.