user2281606 user2281606 - 6 days ago 5
Android Question

How to shift device in Doze Mode (Android Preview M / Marshmallow)?

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

Answer

Ok, i got it. The trick was to turn the screen off! After that

$ adb shell dumpsys deviceidle step outputs:

IDLE_PENDING

then

SENSING

then

IDLE

then

IDLE_MAINTENANCE

then

IDLE

then

IDLE_MAINTENANCE

and so on...

Many thanks to this site:

https://newcircle.com/s/post/1739/2015/06/12/diving-into-android-m-doze