Last active
February 8, 2019 16:44
-
-
Save virtualprodigy/874c4fc0b2f6060a973a5c31a962d5d4 to your computer and use it in GitHub Desktop.
This gist is targeted at Android developers who need to unlock their device via terminal. Make sure you give your script access. Mac users run : $chmod +x <location of the script>. Windows users: The ADB shell commands below will work but if you may need to DL something to run shell scripts.
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
adb shell input keyevent KEYCODE_WAKEUP # activate | |
adb shell input touchscreen swipe 530 1420 530 1120 # swipe up | |
adb shell input touchscreen swipe 530 1420 530 1120 # swipe up | |
adb shell input text <lock-code> # input password | |
adb shell input keyevent 66 # press enter |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In my case, my organization's security rules forces the phone screen to lock in a minute & keep the phone awake when connected to usb is disabled. This little shell script will at least allow devs to unlock their test devices by running this little script. It beats typing it on the phone, especially if you work like me and use Genymotion's Scrcpy.