I followed steps described here:
https://developer.android.com/preview/testing/guide.html#doze-standby
Circumstances:
Android Debug Bridge version 1.0.32
Nexus 9 with Preview M
Shell:
$ adb shell dumpsys battery unplug
=> worked, device unplugged
$ adb shell dumpsys deviceidle step
=> Output: Stepped to: ACTIVE
$ adb shell dumpsys deviceidle -h
=> does not work => Output:
Device idle controller (deviceidle) dump options:
[-h] [CMD]
-h: print this help text.
Commands:
step
disable
enable
whitelist
I tried it with:
adb shell dumpsys deviceidle enable
But it didn't work.
So my question, as mentioned above, how to shift the device in Doze-Mode? What did i make wrong?
EDIT - JUNE, 2016:
New Link: https://developer.android.com/training/monitoring-device-state/doze-standby.html
There is a better way to achieve this in the new releases:
$ adb shell dumpsys deviceidle force-idle
No need to unplug from power, no need to wait for the screen to turn off.