Take the 2-minute tour ×
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.

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.

share|improve this question

2 Answers 2

Yes, you can delete the PIN data from the settings database. In the below instructions, anything that follows a # or 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';
sqlite> .exit
# reboot

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 secure and 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).

share|improve this answer
    
I ended up re-flashing and restoring from a Titanium backup I had. However, out of sheer curiosity, I am testing what you have posted and even after deleting the two entries from the database file and rebooting the lock is still on the screen and I can find no way around it. I did confirm that both lockscree.password_type and _salt are no longer in the database file. Any other suggestions? Like I said this is not critical at this point, it is now an experiment in Android security. –  t11m Jun 30 '11 at 3:45
    
@t11m: Hm, I'm not aware of any other relevant entries offhand, but maybe I'll mess around with it a little bit. Just deleting those two definitely works for me if I set up a PIN lock... –  eldarerathis Jun 30 '11 at 13:08

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.

  1. Unplug the charger from your device.
  2. Install the free version of Screen Lock Bypass Reset. Ignore any warnings about purchasing the Pro version.
  3. Once installed, a bypass can be activated by plugging in the charger.
  4. The black Screen Lock Bypass Reset screen appears. Hit the return key ⏎ on your device to show the temporarily unlocked device desktop.
  5. 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.
  6. After approval, it may take anything up to half an hour to become visible on the Google Android Device Manager website.
  7. Once visible on the website, click on Lock to enter a new PIN.
  8. The device can now be unlocked with the new PIN.
share|improve this answer

Your Answer

 
discard

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.