schoel schoel - 10 months ago 66
Android Question

How to unlock android phone through ADB

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 easy password (was hoping for an Unlock option once I locked it) and tried various methods to unlock it for example:

adb shell input text 1234

Since I don't know what the lock screen look like I'm not sure of the correct inputs to unlock it.

I know the phone is on and that it responds to adb. I am also able to run apps on it through Eclipse.
It's a Samsung Galaxy S5 with Android 5.0.


In my phone, after typing the passcode, I should press OK to unlock. So this command will unlock my phone:

adb shell input text XXXX && adb shell input keyevent 66

Where XXXX is your passcode.

66 is keycode of key Enter.