androidadb

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 back up my pictures.

I locked the phone through Android Device Manager, setting an easy password (I 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 looks 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.


Solution

  • 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