I set up my phone to use a gesture based unlock, and told it to hide the unlock button. Now the gesture isn't working and I can't get past the lock screen. For the standard Android lock screen, there is a feature whereby if you enter the wrong pass code 5 times, you can press a button to enter the username and password of your Android account to reset the lock screen. Is there any way to do this, or any other way to bypass the lock screen on Cyanogenmod 7.2? I have adb shell access to the device.
The answer to this question is hideously complex. It requires ADB set up on your mobile and PC. Cyanogenmod enables adb on the device by default. Instructions for setting adb up on the PC can be found here.
With the phone connected to the PC, using a command prompt go to the directory containing adb, and start a shell. On my system the command to do this is as follows, but it may be different on yours.
You will then get a prompt consisting of a single # if all is well. Enter the following command:
The prompt will then change to
Enter the command
This will produce a list of parameters. The one you are looking for will be something like:
The number on the left hand side is an <id> which varies from phone to phone. The next command is then
So in this example the command would be
Reboot the phone, and the unlock button will have returned and you will have access to the phone again.