# Lockscreen pin corrupted...



## fletcher969 (Feb 10, 2012)

Hi all...

I have CM7.1 on DX, stock lockscreen with PIN unlock.

I've been using the same lockscreen PIN for some time now, but just a couple of hours ago it started rejecting my PIN. I did of course try it more than 5 times (various times), and got the message indicating I'd have to wait 30 seconds, but I never get a prompt to enter my Google credentials (which I've read is an option...perhaps on older Android versions?). I've tried to no avail, so I installed Screenlock Bypass from the Market/Play which disables the lockscreen PIN so I can get into my phone, but doesn't allow me to reset the PIN (the Pro version purports to do so however). Some questions regarding removing/changing my PIN:

1. Again, I have access to my phone's operations, and I have Titanium Backup therein...are there any system components, all of which I backed up previously, which I can select to restore to a previous point when I know I had no PIN (or a working PIN), thereby "replacing" the currently unknown/corrupt PIN?

2. I've read there's an sql database in the /data directory where one can issue some sqlite commands to "erase" the current PIN inside the database. If so, what is the exact location/name of said database, and which sqlite commands should I issue to remove the current/corrupted PIN?

3. If I update my CM7 to a more recent build, wipe cache, dalvik, and data, will it in effect replace my PIN with the default of "no PIN" or will the PIN remain? For that matter, if I wipe data in CWM recovery without updating to a newer build, will it wipe my PIN?

4. The above three questions aside, is there any other solution for removing the lockscreen PIN that doesn't involve resetting the phone to default?

5. Has anybody used the Market/Play app Lockscreen Bypass Pro on a DroidX, and if so, did it successfully remove the PIN without having to reset the phone?

Thanks for anybody with suggestions or solutions. I can live with the bypass disabling my PIN for now, but I'd really like to fix this situation properly...then figure out why it corrupted in the first place.

D


----------



## bmt11 (Dec 30, 2011)

Apparently CM7 changed it as in my liberty slot the forgot password option is at the bottom right next to the emergancy call button, by in my CM7(YACK) slot it's just a popup windows telling you to wait 30 seconds. You might want to try asking over on the CM forums as it seems to be a specific problem.

As for commands to reset it the only ones I know of are to just disable the security which you have already accomplished, but yes a factory reset will reset your password just installing a rom over the top of it should not.


----------



## fletcher969 (Feb 10, 2012)

bmt11 said:


> Apparently CM7 changed it as in my liberty slot the forgot password option is at the bottom right next to the emergancy call button, by in my CM7(YACK) slot it's just a popup windows telling you to wait 30 seconds. You might want to try asking over on the CM forums as it seems to be a specific problem.
> 
> As for commands to reset it the only ones I know of are to just disable the security which you have already accomplished, but yes a factory reset will reset your password just installing a rom over the top of it should not.


Thanks for the response. I was wondering after posting if perhaps it was a CM7 "oversight" or feature which removed the Google Credential option. If so, that's a pretty big problem in my book given it appears the PIN can corrupt, however remote that possibility is. Since posting I found another reference to how one can remove the PIN (and other security options) using sqlite commands, but like the first one, it wasn't specific to the DX, so I can't really be certain I can apply it, but it does suggest there is a way to remove one's PIN using sqlite commands from a root shell. Perhaps I can find my settings db, transfer it over to my pc, and peek inside to see what I might find.

Thanks again. I may post in one of the CM7 forums to see if they have a "fix" for the missing Google Credential bypass.

D


----------



## fletcher969 (Feb 10, 2012)

There are two fields inside the settings.db file in /data that seem to be related to the lockscreen password/PIN:

lockscreen.password_salt (19 digit value follows)
lockscreen.password_type (6 digit value follows)

Further research seems to confirm the above is the target. Seems if I delete those two fields from settings.db using sqlite commands or via my pc and a sqlite manager, it will remove the PIN lock. There is also a method using python scripts that seem to use the password.key and the salt value obtained inside settings.db that will also remove the PIN, but for me that seems a bit more involved as I don't have python installed, and I'm not very familiar with its use. Anybody know if removing the above entries sounds like a safe thing to do? I'm assuning it is...


----------



## bmt11 (Dec 30, 2011)

Worth a try...just do a nandroid first or you may end up doing that reset anyways


----------



## fletcher969 (Feb 10, 2012)

bmt11 said:


> Worth a try...just do a nandroid first or you may end up doing that reset anyways


Nandroids are a given, but thanks just the same. I did manage to remove it after I found a really useful link regarding same for CM7 specifically. Simply use sqlite from a root shell (or adb shell) to change the value of 3 fields in settings.db to a value of 0, reboot, and it's gone. If interested, the link is here. It mentions the 3 fields, but uses only two to sample the commands needed...but I changed all 3 referenced fields, and it worked beautifully.


----------

