This blog post explains how to unlock an Android phone using adb if you know the password. This can be useful if the touch screen of your phone is broken.
- You have a computer running Windows, Mac OS X or Linux.
- You have a USB cable with which you can connect the phone to the computer.
- USB debugging has been enabled on the phone. You can enable it in the Settings / Development menu (but you need a working touch screen for that).
- Install the adb command-line tool. It's part of the Platform SDK Tools SDK package. First download the Android SDK, then run the tools/android GUI tool, select Platform SDK Tools and install. The adb binary will be downloaded to platform-tools/adb .
- On Linux, follow these steps to make sure that your user has the permission to access the phone.
- Don't connect your phone yet to the computer via USB.
- Run adb devices and verify that it doesn't see the phone.
- If not enabled yet, enable USB debugging on the phone, in the Settings / Development menu.
- Connect the phone to your computer using an USB cable.
- Run adb devices and verify that it sees your phone.
- You will have to run the following two commands very quickly, i.e. faster than the screen blanking time on the phone.
- Run adb shell input text PASSWORD, replacing PASSWORD with your Android unlock password.
- Run adb shell input keyevent 66 to simulate pressing the Enter key. (See this page for event codes of other keys.)