How to change Settings values from adb in Android

This article will introduce how to check and change a value of Settings.Global/System/Secure from adb command in Android.

1. How to check Settings value

The settings value is divided into system, global, and secure areas.

You can check the values in each area with the following command.

adb shell settings get <namespace> <key>
  • namespace: The namespace of key, and value of the setting you want to check, such as, system, global, secure.
  • key: The key you want to check
# system
$ adb shell settings get system pointer_location
null

# global
$ adb shell settings get global device_provisioned
1

# secure
$ adb shell settings get secure user_setup_complete
1

2. How to change Settings value

You can use the following command to change the Settings value.

adb shell settings put <namespace> <key> <value>
  • namespace: The namespace of key, and value of the setting you want to change, such as, system, global, secure.
  • key: The key you want to change
  • value: The value you want to change
# system
$ adb shell settings put system pointer_location 1

# global
$ adb shell settings put global device_provisioned 1

# secure
$ adb shell settings put secure user_setup_complete 1

Related Posts

codechachaCopyright ©2019 codechacha