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
If a user leaves a device unplugged and stationary for a period of time, with the screen off, the device enters Doze mode. In Doze mode, the system attempts to conserve battery by restricting apps' access to network and CPU-intensive services.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With