adb commands to test Doze mode
#! /bin/zsh | |
# Buttery powered state | |
adb shell dumpsys battery | grep powered | |
# Unplug battery | |
adb shell dumpsys battery unplug | |
# Reset battery | |
adb shell dumpsys battery reset | |
# Dump Doze mode info | |
adb shell dumpsys deviceidle | |
# Enable Doze mode (may be required on Android Emulator) | |
adb shell dumpsys deviceidle enable | |
# Get status of Light Doze mode | |
adb shell dumpsys deviceidle get light | |
# Get status of Deep Doze mode | |
adb shell dumpsys deviceidle get deep | |
# Enter Light Doze mode (should be called several times to pass all phases) | |
adb shell dumpsys deviceidle step light | |
# Enter Deep Doze mode (should be called several times to pass all phases) | |
adb shell dumpsys deviceidle step deep |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
I found that
adb shell dumpsys deviceidle step deep
does not cause any real deep sleep side effects.Only if I enter:
adb shell dumpsys deviceidle force-idle
my app behaves as in real deep sleep - network connections get disrupted and app thinks its offline.
Also, there's a typo in the comment - the last line should be
Deep Doze