I have an Android device which is running Android 4.0.3 (or something like that).

My little brother decided to try and guess my lock screen pattern the other day, and ended up locking me out.

I have since been unable to log back in to the tablet using my Google Account details. I provided the correct login details, however it says they are incorrect. Could this be connected to the fact I have no internet connection?

I have no internet connection as the device is WiFi only, and the WiFi is currently turned off. I cannot turn it on, as I am locked out.

How can I log back into my tablet without wiping the user data?

  • 3
    Good luck! Even this has no answer: android.stackexchange.com/questions/33063/…
    – geffchang
    Dec 20, 2012 at 14:57
  • 3
    Never give your tablet to anyone, same applies to smartphones, not sounding off-putting or as if "mistrusting" but its very easy for others once they have their hands on it, to play a practical joke on you or intentionally give you grief! :)
    – t0mm13b
    Dec 20, 2012 at 19:59
  • 1
    @LiamW :o That's a terrible thing! Should have said "Wait til I tell your mom and dad on you..." should make your little brother think twice! :)
    – t0mm13b
    Dec 20, 2012 at 20:06
  • 1
    @t0mm13b Thats what he was threatening to do to me! Like I said - no choice ;)
    – Liam W
    Dec 20, 2012 at 20:08
  • 1
    Using two-factor auth? Try turning it off (from another device/machine).
    – gary
    Dec 25, 2012 at 0:57

3 Answers 3


There are several ways even in this stage. I'll try to sum up as many of them as I remember/find. Also, I don't keep it restricted to a single device -- but try to cover as many as possible, so it will be helpful to as many readers as possible. As you kept the device-tag from your question, all of them should find it :)

All devices: if your credentials are not accepted, though they are correct

Sometimes this part seems to be buggy, so this page lists a few work-arounds. Amongst others, these include:

  1. try entering null as password. (together with your google username; according to this page it should be the literal term null)
  2. try entering your username without @gmail.com
  3. Combine 1 and 2
  4. Try the normal recover password routine from GMail.com and start over from 1.

All devices: Bypass screenlock using a special app

UPDATE: The app mentioned in this solution is no longer available. Instead, Reset Screen Lock should do the same.

According to TheUnlockr, the problem should be very easy to resolve:

  1. Go to the web version of Google Play.
  2. Login with the Google account associated with your Android device.
  3. Install Screen Lock Bypass (unfortunately a paid app now).
  4. Reboot your device.

Another source mentioning this is UltraTechy.Com, which contains a few more explanations. According to that, the app will circumvent the "too many attempts" block, so you can directly access your device again (to e.g. make a complete backup before resetting it). As soon as this app is uninstalled, the "too many attempts" will be in effect again immediately. Hence, they add a few more steps:

  1. Go to Settings → Accounts & Sync
  2. Under Manage Accounts, remove all accounts except your Google account. (this should enable your Google username and password)
  3. Go to Settings → Applications → Manage Applications. Find Screen Lock Bypass and uninstall the app. (this will trigger the “too many pattern attempts” screen immediately)
  4. Use your original Google username and password to finally unlock your phone properly
  5. Enter your new security pattern twice to finish

All devices: Unlock via web

If you still know your pattern (and it only was your little brother who played with your device), and have your Google Account login/password ready, UltraTechy.Com offers another approach:

  1. Using your computer, log into your Google account
  2. Go to this link directly – https://accounts.google.com/IssuedAuthSubTokens OR click your e-mail on the top right corner, select Account settings, then hit “Visit the previous version of the Google accounts screen” towards the bottom, click “Authorizing applications & sites” under your Personal Settings → Security.
  3. Under “Connected Sites, Apps & Services”“Revoke Access” of your Google Account with Android. You will see the screen showing “You have successfully revoked access to Full Account Access”
    [Alternate for step 3 - If you have already signed up for 2-Step Authorization previously and are able to generate a new application-specific password at the bottom, go ahead and generate a new password and use that password to unlock your device]
  4. Enter Gmail login and password on your device. It will now accept your login details and will show a pattern screen. Enter the “correct” pattern and you can see the home screen.

All devices: Disable Pattern Lock via ADB

According to this source, there's a way to disable the pattern lock via ADB. A few requirements for this, though:

  • Your device probably must be rooted
    (not mentioned there, but the database we need to update is owned by system/system, and nobody else has read or even write access to it. Also removing files from /data/system is unlikely to be permitted without)
  • USB Debugging must be enabled on the device (rooted users: alternatively you can boot into recovery, where USB Debugging is not required -- but you might need to manually mount the /data partition)
  • the Android SDK must be installed on your computer
  • device must be plugged-in and connected via USB
  • you need a command line on the computer

On the command line, enter the following:

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

(According to a comment from Kay, on Android 2.3.7 the SQL-Statement should read update secure set value=0 where name='lock_pattern_autolock'; -- at least with CM7 on a HTC Desire)

Now disconnect and power off your phone, and turn it back on and the pattern lock should be gone.

According to Geeknizer, there are a few additional useful steps to follow: After the reboot, use your ADB shell again and...

adb shell rm /data/system/gesture.key

Then reboot again. When device reboots, you will still see a pattern lock screen. But here’s the catch: just try any random pattern and it may unlock then remove the pattern from settings.

Hint: if the Settings app crashes when you try to set a new pattern, remove all .key and locksettings.db* files from /data/system (see "More" below).

Some additional notes from this comment by krlmlr:

  1. Mounting /data will be necessary. This can be done using mount /data via adb -d shell
  2. If the sqlite binary is not available on the device, you can use adb pull to copy the database file to your computer, edit it there (e.g. using SQLiteMan, and finally use adb push to replace it on the device
  3. On his Android 2.x device, the SQL command had to be update secure set value=0 where name='lockscreen.lockedoutpermanently';

All devices: Similar thing without ADB

For those not having USB Debug activated on their device, there might be a work-around using a flashable zip, as described here. This procedure requires the zip file (to be found at the linked page), an editor, busybox and root on the device, plus the device needs to be rooted. Extensive procedure -- too long to be included here. And as it is no help without the zip either, you have to follow the link for this one.

Phones: Use a hole to disable your lock

If it is a phone -- i.e. if you can give it a voice call -- you might be able to use a "security hole", as described here:

Call yourself from another phone, answer, hang-up, directly after hanging up start pressing your buttons like a madman for <30-60 seconds ending with your home button (might take a while to get the timing right). Go into settings and disable pattern-lock.

However, I guess that might leave you without protection afterwards, as you need to verify with the old method before being able to reset it to a new. But still, I didn't try: it might as well be it ignores the "failed attempts" at this place.

Phones: Use a hole to create a new account

For phones there's a bad work-around according to this post:

  1. call the device from another phone (or have a friend calling it)
  2. answer the call, do not hang up
  3. use the back key (not the home key) over and over. This should eventually bring you to your home screen
  4. go to Settings → Google Accounts and add a new Google account. Sign in with this new account
  5. after it accepts the new account credentials, and logs you in, hang up the phone, and go back to the lock screen.

Now, use the new Google Account's data to bypass the lock screen (via the "forgot" button).

Samsung users with Windows PC

There's a One-Click-Solution to be found at GSMHosting.com which claims to be able to solve the issue. According to the many thanks the poster received, it seems to work. You can download the Windows executable there, connect your phone to your computer, and click...


Oh yeah. Those guys who work for courts, police, secret services, corporate security... They've got ways as well. Example needed? ViaForensic's viaExtract can even decode pattern locks! So don't think you're unbreakable. Though: this is only mentioned here for completeness -- I don't think you easily get your hands on that :)


There might be more alternatives to that. If I happen to stumble upon them, I hope I remember to update my answer again ;) … And here we go:

  • The 'Disable Pattern Lock via ADB' trick makes me want to turn off USB Debugging from now on!
    – William C
    Dec 21, 2012 at 6:54
  • 1
    Thanks for your detailed explanation, I was able to unlock using USB debugging in recovery mode. A few hints: 1) As you noted, mounting data is necessary: mount /data in adb -d shell works. 2) sqlite3 was not available on the device. I had to pull the file, edit locally and push it back using adb pull /data/... and adb push settings.db /data/.... 3) Ultimately, I had to say update secure set value=0 where name='lockscreen.lockedoutpermanently'; on my device (Android 2.x, tell me how to find out the info about the device I need to tell you ;-) )
    – krlmlr
    Jan 5, 2014 at 20:32
  • 1
    The "App Password" (under Unlock Via Web) worked for me and was very easy, thanks! (Galaxy S2).
    – MGOwen
    Aug 9, 2015 at 23:22
  • 1
    Thank you for this. I used the database/ADB method. There were some differences, though, that might be worth mentioning. My database was /data/system/locksettings.db on CM12. Also, I had no access via adb (unauthorized), so I pulled the file to an external SD card using Aroma FM v1.91 (v2.00 didn't work for me) and edited them on a PC. Nov 23, 2016 at 15:49
  • 1
    @Izzy I apparently forgot to upvote. I had CWM 6.x that didn't allow me to use ADB in recovery either. Also, I used an Aroma zip from the same SD card I used to copy the database. Nov 23, 2016 at 18:34

So the same thing happened with me today- a friend fiddled with my pattern lock - too many attempts- asked me to enter my google account and password, but it didn't work even though i remembered it correctly. I tried all permutations and combinations and possible passwords. I read multiple blogs to find a solution (and to avoid a factory reset). What finally worked was very bizarre - (keep clicking on the sign in button without entering anything, then enter something random and keep clicking. then enter your username (without @gmail) and your password. If you get lucky, it'll ask for a new pattern and your phone will be normal. However, this happened 4-5 after it got locked and after i tried everything. So presing buttons like a madman is the only shot !! also download "Screen Lock Bypass Pro" for next time


Here's how I cleared the screen lock password on my phone running CyanogenMod 11:

  • Boot into TeamWin (or other adb-enabled) recovery,
  • Connect the USB cable on the computer, then perform:


sudo -i
adb -d shell
mount /data
cd /data/system
rm gesture.key
rm password.key
  • reboot
  • And next time you wish to set a new pattern, settings app will crash – as you forgot to also remove locksettings.db*. At least that was already reported recently.
    – Izzy
    Jul 27, 2018 at 9:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .