Created
June 11, 2015 05:13
-
-
Save twmht/b2a0bb1e304a788667f4 to your computer and use it in GitHub Desktop.
unlock the device
This file contains hidden or 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
if [ "$(adb shell dumpsys power | grep mScreenOn= | grep -oE '(true|false)')" == false ] ; then | |
echo "Screen is off. Turning on." | |
adb shell input keyevent 26 # wakeup | |
adb shell input keyevent 82 # unlock | |
echo "OK, should be on now." | |
else | |
echo "Screen is already on." | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment