From what I learned from this source code of Doze Editor app it is possible to change the doze settings using adb.
My question, can I change only one setting at a time?
for example:
adb shell settings put global device_idle_constants KEY_INACTIVE_TIMEOUT=720000
Or should I put all the value-pairs separated by comma?
for example:
adb shell settings put global device_idle_constants KEY_INACTIVE_TIMEOUT=720000, KEY_SENSING_TIMEOUT=xxxx, KEY_LOCATING_TIMEOUT=yyyy ... and so on
can I change only one setting at a time?
Yes, you can't change multiple settings at once.
The command adb shell settings
only supports one key/value at a time, as you can see in the command help:
adb shell settings
usage: settings [--user NUM] get namespace key
settings [--user NUM] put namespace key value
settings [--user NUM] delete namespace key
'namespace' is one of {system, secure, global}, case-insensitive
If '--user NUM' is not given, the operations are performed on the owner user.
根据Android SDK中的官方评论,您需要将所有值对放在键“ device_idle_constants”下,例如:“ inactive_timeout = 60000,sensing_timeout = 400000”
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.