Undoing a Lockout on an Android Phone

| No Comments | No TrackBacks

Over the weekend I ran into a major problem with my Android-based phone. While we were moving into our new condo, I had the phone in my pocket, and had somehow triggered the touch screen pattern-unlock mechanism, and proceeded to accidentally lock out my phone badly enough that it was demanding my username and password to unlock the device.

Unfortunately, I apparently can’t remember that password.

Fortunately, if you have debugging over USB enabled, you can hack your way into the phone.

Yes, this is a security vulnerability, but most any device has some security problems when you have physical access to it, and at least in this case, you have to enable USB Debugging, which is only enabled by default on developer firmwares.

To perform this fix, you need to have the Android SDK, and your phone needs to appear on the output of adb devices. Google provides a Windows Driver, and most Linux distributions should work fine. Once you have the device attached, just execute the following.

$ adb -d shell
# sqlite3 data/data/com.android.providers.settings/databases/settings.db    
sqlite> update system set value=0 where name='lockscreen.lockedoutpermanently';
sqlite> .exit
# exit

The effect should be almost immediate. Press the ‘Menu’ button on your phone, and you’ll be prompted for your pattern. If you’ve, for some reason, forgotten what your pattern is, you can follow these instructions to disable the pattern prompt, which was the basis for my solution.

  • StumbleUpon Toolbar Stumble It!

No TrackBacks

TrackBack URL: http://blog.foxxtrot.net/cgi-bin/mt-tb.cgi/355

Leave a comment

About this Entry

This page contains a single entry by Jeff Craig published on October 6, 2009 8:00 AM.

Home Ownership The DIY-Way was the previous entry in this blog.

Flock of Dodos is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Once You Know, You Newegg

μ-updates

  • No Updates!
OpenID accepted here Learn more about OpenID
Powered by Movable Type 4.21-en