Kawaii-Hachii
Kawaii-Hachii

Reputation: 1061

Changing doze mode setting using adb

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

Upvotes: 0

Views: 2489

Answers (2)

vliux
vliux

Reputation: 97

According to official comments in Android SDK, you need to put all the value-pairs under the key "device_idle_constants", example: "inactive_timeout=60000,sensing_timeout=400000"

Upvotes: 1

Mattia Maestrini
Mattia Maestrini

Reputation: 32780

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.

Upvotes: 1

Related Questions