Created
April 4, 2020 14:23
-
-
Save msm81/2e9b8e4831c8b32c836fbcbeb1fc70a3 to your computer and use it in GitHub Desktop.
ADB commands to test Doze mode and App Standby in android
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Test Doze mode (Idle mode) => | |
-> Enable Doze mode (may be required on Emulator) | |
adb shell dumpsys deviceidle enable | |
-> Force the system into idle mode | |
adb shell dumpsys deviceidle force-idle | |
-> Exit idle mode | |
adb shell dumpsys deviceidle unforce | |
-> Reactivate the device | |
adb shell dumpsys battery reset | |
------------ | |
Test App Standby => | |
-> Force the app into App Standby mode | |
adb shell dumpsys battery unplug | |
adb shell am set-inactive <packageName> true | |
-> Waking app | |
adb shell am set-inactive <packageName> false | |
adb shell am get-inactive <packageName> | |
------------ | |
Get some information about Doze mode on the device => | |
-> Dump Doze mode info | |
adb shell dumpsys deviceidle | |
-> Get status of Light Doze mode | |
adb shell dumpsys deviceidle get light | |
-> Get status of Deep Doze mode | |
adb shell dumpsys deviceidle get deep |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment