# In `adb shell`
$ settings get global captive_portal_http_url
null
$ settings get global captive_portal_https_url
null

$ settings put global captive_portal_http_url https://204.vercel.app/generate_204
$ settings put global captive_portal_https_url https://204.vercel.app/generate_204

$ settings
Settings provider (settings) commands:
  help
      Print this help text.
  get [--user <USER_ID> | current] [--lineage] NAMESPACE KEY
      Retrieve the current value of KEY.
  put [--user <USER_ID> | current] [--lineage] NAMESPACE KEY VALUE [TAG] [default]
      Change the contents of KEY to VALUE.
      TAG to associate with the setting.
      {default} to set as the default, case-insensitive only for global/secure namespace
  delete [--lineage] NAMESPACE KEY
      Delete the entry for KEY.
  reset [--user <USER_ID> | current] NAMESPACE {PACKAGE_NAME | RESET_MODE}
      Reset the global/secure table for a package with mode.
      RESET_MODE is one of {untrusted_defaults, untrusted_clear, trusted_defaults}, case-insensitive
  list [--lineage] NAMESPACE
      Print all defined keys.
      NAMESPACE is one of {system, secure, global}, case-insensitive
# In `adb shell`
$ settings get global captive_portal_http_url
http://google.cn/generate_204
$ settings get global captive_portal_https_url
https://google.cn/generate_204

$ settings put global captive_portal_http_url https://204.vercel.app/generate_204
$ settings put global captive_portal_https_url https://204.vercel.app/generate_204

$ settings
usage:  settings [--user <USER_ID> | current] [--cm] get namespace key
        settings [--user <USER_ID> | current] [--cm] put namespace key value
        settings [--user <USER_ID> | current] [--cm] delete namespace key
        settings [--user <USER_ID> | current] [--cm] list namespace

'namespace' is one of {system, secure, global}, case-insensitive
If '--user <USER_ID> | current' is not given, the operations are performed on the system user.
If '--cm' is given, the operations are performed on the CMSettings provider.

Source: android-9.0.0\_r8, android-7.1.2\_r36

标签: Android

添加新评论