pbreault / adb-idea

A plugin for Android Studio and Intellij IDEA that speeds up your day to day android development.
Apache License 2.0
2.11k stars 255 forks source link

Request : Unlock screen before action #101

Open 2math opened 5 years ago

2math commented 5 years ago

Hi and thanks for your plugin!

It will be nice to have an option to unlock the device before to start the app or other comands.

I don't know if is available trough the adb, but will be nice :).

PhilippNowak96 commented 5 years ago

It would be possible by the following commands:

adb shell input keyevent 82 && adb shell input text 1234 && adb shell input keyevent 66

Some devices may need keyevent 82 twice, if you have to activate the screen and then swipe to be able to insert the pin.

2math commented 5 years ago

On my side the device auto lock after 5 min, but turn off screen after 15 sec. I'm able to turn screen on with: adb shell input keyevent 26 Which is toggle power button. Will be nice to have that command as a shortcut