How to make Doze on Marshmallow?

Everything seems to point to these two commands:

adb shell dumpsys battery unplug
adb shell dumpsys deviceidle step

I followed the instructions on my Nexus 6, where the official release of Marshmallow was released. I connect my phone to my test machine. I set up my application to test the part that I want to test with the dose. I turn off the screen. After doing the battery unplugabove, I don't get the output, so I assume that it works, but every time I start deviceidle step, the output is always Stepped to: ACTIVE.

I am not sure if this matters, but a special feature of my application that I am trying to test is the alarm that I set to get the phone out of Doze. I want my device to be in the middle of the day when my PendingIntentscheduled on AlarmManager.setAlarmClockshuts down. Could this prevent my device from entering Doze?

+4
source share
2 answers

Use the commands to force the device to disconnect.

Disconnect battery

adb shell dumpsys battery unplug

You can use the commands below to force the wait state

adb shell dumpsys deviceidle force-idle
or
adb shell dumpsys deviceidle enable

Verify that you are more in a dose or lower with the command

adb shell dumpsys deviceidle enabled 

disable mode:

adb shell dumpsys deviceidle disable 

Reset device battery status:

adb shell dumpsys battery reset
+4
source

Greenify Doze, . , root . Greenify - . . !

0

Source: https://habr.com/ru/post/1613859/


All Articles