My screen is dead and I want to unlock my phone so I can access it through Kies to backup my pictures.
I locked the phone through Android Device Manager setting an e
To lock the screen:
adb shell input keyevent 82 && adb shell input keyevent 26 && adb shell input keyevent 26
To lock the screen and turn it off
adb shell input keyevent 82 && adb shell input keyevent 26
To unlock the screen without pass
adb shell input keyevent 82 && adb shell input keyevent 66
To unlock the screen that has pass 1234
adb shell input keyevent 82 && adb shell input text 1234 && adb shell input keyevent 66
If you want to open your phone without touching it here is the way
Steps
adb devices
to cheek if your phone is ready or notList of devices attached
059c97f4 device
then enter the following command
adb shell input keyevent 26 && adb shell input swipe 600 600 0 0 && adb shell input text <pass> && adb shell input keyevent 66
put your password in <pass>
and done. You phone is hopefully opened
Slightly modifying answer by @Yogeesh Seralathan. His answer works perfectly, just run these commands at once.
adb shell input keyevent 26 && adb shell input touchscreen swipe 930 880 930 380 && adb shell input text XXXX && adb shell input keyevent 66
If you have to click OK after entering your passcode, this command will unlock your phone:
adb shell input text XXXX && adb shell input keyevent 66
Where
XXXX
is your passcode.66
is keycode of button OK.adb shell input text XXXX
will enter your passcode.adb shell input keyevent 66
will simulate click the OK buttonIf you have USB-Debugging/ADB enabled on your phone and your PC is authorized for debugging on your phone then you can try one of the follwing tools:
scrcpy connects over adb to your device and executes a temporary app to stream the contents of your screen to your PC and you're able to remote control your device. It works on GNU/Linux, Windows and macOS.
Vysor is a chrome web app that connects to your device via adb and installs a companion app to stream your screen content to the PC. You can then remote control your device with your mouse.
MonkeyRemote is a remote control tool written by myself before I found Vysor. It also connects through adb and lets you control your device by mouse but in contrast to Vysor, the streamed screen content updates very slow (~1 frame per second). The upside is that there is no need for a companion app to be installed.
This command helps you to unlock phone using ADB
adb shell input keyevent 82 # unlock