I flashed the latest Cyanogenmod ROM for my device (Samsung Captivate) last night and after doing so I set a numeric lock screen password. I then customized my phone and spent a goodly amount of time working on it and locked and unlocked it successfully multiple times. This morning when I woke up and went to unlock it, my password did not work. I have tried the password (and combinations thereof) over 100 times and it never unlocks. I also never get the "Lost Password" button on the lock screen to use my Gmail account to unlock the device. Does anyone know if there is a way to connect to the device using an ADB shell and reset the password? I am able to get to a shell and can run commands. Any help is appreciated.
Yes, you can delete the PIN data from the settings database. In the below instructions, anything that follows a
sqlite> is a command you should enter (from an adb shell):
# cd /data/data/com.android.providers.settings/databases
# sqlite3 settings.db
sqlite> delete from secure where name='lockscreen.password_type';
sqlite> delete from secure where name='lockscreen.password_salt';
When the phone reboots the PIN lock should be disabled. If this doesn't work then try executing the following from within sqlite (second might not be needed):
sqlite> select * from secure;
sqlite> select * from system;
These two commands will simply list all entries in the
system tables, respectively. That will help you find the proper rows that need to be deleted in the case that they are named differently (though I don't think they will be as I just tested this on my own CyanogenMod 7 install).
Here is how a Samsung GT-S5300 was unlocked which according to the user would not recognise its screen lock PIN anymore. No data was lost during the process. The device was not rooted, nor did it had anything fancy installed. An internet connection ---WiFi or G2/3/4--- is required though.
- Unplug the charger from your device.
- Install the free version of Screen Lock Bypass Reset. Ignore any warnings about purchasing the Pro version.
- Once installed, a bypass can be activated by plugging in the charger.
- The black Screen Lock Bypass Reset screen appears. Hit the return key ⏎ on your device to show the temporarily unlocked device desktop.
- This offers a window of opportunity to approve the Lock & Erase application which can be sent from any internet the Google Android Device Manager website.
- After approval, it may take anything up to half an hour to become visible on the Google Android Device Manager website.
- Once visible on the website, click on
Lockto enter a new PIN.
- The device can now be unlocked with the new PIN.