Skip to content

Instantly share code, notes, and snippets.

@defHLT
Created March 10, 2015 00:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save defHLT/07db5bc56dc7fd55a768 to your computer and use it in GitHub Desktop.
Save defHLT/07db5bc56dc7fd55a768 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Send power button press if screen is off
(adb shell dumpsys power | grep -q "Display Power: state=OFF" ) && adb shell input keyevent KEYCODE_POWER
# Send menu key press to unlock
adb shell input keyevent 82
# Even if failed let the gradle build continue
true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment