Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
I'd think it would work similarly provided that you have the Google apps package installed (as described in Recovering from forgotten lock pattern). Is that option unavailable to you? – eldarerathis Jun 18 '12 at 22:43
That's correct. The Cyanogenmod gesture lock screen has no such button available. – Christi Jun 18 '12 at 22:50
Havent tried yet, but search for 'lockscreen adb settings.db'. best answer i found: – ce4 Jun 18 '12 at 23:18
Right idea, slightly different method. See below. – Christi Jun 18 '12 at 23:31

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.

cd "\Program Files (x86)\Android\android-sdk\platform-tools"
adb shell

You will then get a prompt consisting of a single # if all is well. Enter the following command:

sqlite3 /data/data/

The prompt will then change to


Enter the command

select * from secure;

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

update secure set value=0 where _id=<id>;

So in this example the command would be

update secure set value=0 where _id=440;

Reboot the phone, and the unlock button will have returned and you will have access to the phone again.

share|improve this answer
Not that complex.. but good to know. – user606723 Jun 19 '12 at 17:04
@user606723 - Given the time between the questioner asking the question and answering it themselves I can only guess that while the answer doesn't look very complex, it took some considerable time to work out that relatively simple solution. Shame that you weren't around earlier to answer the question sooner. – Mark Booth Jun 20 '12 at 22:42
@MarkBooth, obscure would be a much better adjective. In fact, hideously obscure would be quite accurate. :) – user606723 Jun 21 '12 at 14:38
On my Cyanogen 7.2 device I also had the key 360|lockscreen.lockedoutpermanently|1 which needed to be set to 0. – user16286 Jun 24 '12 at 15:03
@Mark Complex would be having to compile a modified version of the framework and pushing that. This is just plain obscure. – Richard Borcsik Jun 24 '12 at 17:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.