If you’ve forgotten your Android pattern lock, you might think the only way back in is a factory reset, which wipes your photos, apps, and settings. That’s not true. In several scenarios, you can recover access without losing data. This guide covers the methods that work on current Android versions, starting with the least invasive and progressing to more involved options. Before you begin, check whether your device has any of the following: a Google account you’ve logged into on the phone, a Samsung or other manufacturer account, or a previously enabled USB debugging. If you have none of those, your options are limited, but some methods may still work.
What You’ll Need
- Your locked Android phone
- A computer with internet access (for some methods)
- The Google account credentials you used on the phone (if you use the Google method)
- A Samsung account (if you have a Samsung phone)
- A USB cable (if you use ADB)
Step-by-Step
- Try the obvious first. On the lock screen, enter a few patterns you might have used. If the phone shows a “Forgot pattern” or “Forgot password” link, tap it. You’ll be asked to enter your Google account email and password. If you remember them, you can set a new pattern immediately. This works on older Android versions (up to about Android 4.4) and some manufacturer skins.
- Use your Google account (if prompted). After several wrong attempts, some devices display a “Forgot pattern” button. Tap it, enter your Google credentials, and follow the prompts to set a new pattern. If you don’t see this option and you’re on Android 5.0 or later, skip to the next method.
- Try Smart Lock (if you enabled it earlier). If you had Smart Lock set to “On-body detection,” “Trusted places,” or “Trusted devices,” your phone might unlock automatically when conditions are met. For example, if you set your home as a trusted place, go home and try to unlock. This won’t work if you never set it up, but it’s worth a try.
- Use your manufacturer’s “Find My Device” feature. Samsung phones have “Find My Mobile” (requires a Samsung account). Google offers “Find My Device” for all Android phones with a Google account. On a computer, go to google.com/android/find (or Samsung’s site) and sign in with the same account. If your phone is listed, you may have an option to “Lock” it with a new PIN or pattern. This can override the old lock. This works even if the phone is not connected to Wi-Fi, as long as it has a data connection.
- Use ADB (if USB debugging was enabled). This is a technical method that works on many devices. On your computer, install ADB (Android Debug Bridge). Connect your phone to the computer via USB. Open a command prompt and type:
adb shellthenrm /data/system/gesture.key(for pattern) orrm /data/system/password.key(for PIN/password). Then reboot the phone. The lock screen will be gone. This works only if you had USB debugging enabled before the lockout. - Boot into Safe Mode. This doesn’t remove the lock, but it can help if a third-party app is causing the lock screen to misbehave. To enter Safe Mode, press and hold the power button, then tap and hold “Power off” until you see “Safe mode.” In Safe Mode, the pattern might work if the issue was an app. If it works, uninstall the problematic app after unlocking.
- Use the “Emergency Call” trick (very old devices only). On Android 4.4 and earlier, you could tap “Emergency call,” then type a series of characters to bypass the lock. This is not patched on modern devices, so don’t rely on it.
- Reset via recovery (last resort, but not factory reset). If you have a custom recovery like TWRP installed, you can boot into recovery and use the file manager to delete the lock screen files. This is advanced and requires a custom recovery, which most users don’t have. If you do, navigate to Advanced → File Manager → /data/system and delete gesture.key or locksettings.db (depending on Android version). Then reboot.
Common Mistakes
- Giving up too soon. Many people immediately reset the phone when they see the “Forgot pattern” button. Try the Google account method first—it’s the simplest.
- Entering the wrong Google account. Make sure you’re using the account that was set up on the phone, not a secondary one. If you have multiple Google accounts, try each one.
- Assuming “Find My Device” will work if the phone is off. The phone must be powered on and have a network connection. If it’s off, you can’t use this method.
- Using ADB without USB debugging enabled. If you never turned on USB debugging, the ADB method will fail. Don’t waste time on it.
- Deleting the wrong file. If you use the recovery method, deleting locksettings.db can cause issues on newer Android versions. Stick to gesture.key if it exists.
Tips
- Always keep your Google account password saved in a password manager or written down somewhere safe. This is your lifeline.
- Set up Smart Lock on your device now, so you have a backup unlock method in the future.
- Enable USB debugging when you first get a phone, even if you don’t plan to use it. It’s a hidden safety net.
- Use a pattern you can remember but not too simple. Combine a pattern with a PIN if your phone allows it.
- If you have a Samsung phone, register for Find My Mobile and keep your Samsung account credentials handy.
Troubleshooting
- “Forgot pattern” doesn’t appear. On Android 5.0 and later, the option is hidden after too many attempts. You may need to wait 30 seconds or restart the phone. If it never appears, use the Find My Device method.
- Find My Device says “Couldn’t lock device.” This usually means the phone is offline. Try turning on the phone (if it’s off) and ensure it has a data connection. If it’s in airplane mode, you’re stuck until it connects.
- ADB says “device not found.” Make sure USB debugging is enabled (it must have been on before). Also, check that you have the correct USB drivers installed. Try a different USB port or cable.
- Safe Mode doesn’t help. If the pattern still fails in Safe Mode, the issue is not a third-party app. Move on to other methods.
- Recovery method fails. If you don’t have a custom recovery, you can’t use that method. If you do, but the file doesn’t exist, your Android version may store locksettings elsewhere. Look for locksettings.db or locksettings.db-wal and delete those.
- All methods fail. If you have no Google account, no manufacturer account, no USB debugging, and no custom recovery, the only remaining option is a factory reset. Before you do that, try contacting your carrier or manufacturer—they may have a backdoor for legitimate owners, but be prepared to provide proof of purchase.
Frequently Asked Questions
Will I lose my data if I use Find My Device?
No. Using Find My Device to set a new lock does not erase any data. It only changes the lock screen credential.
Can I bypass the pattern lock without a Google account?
If you have USB debugging enabled or a custom recovery, yes. Otherwise, it’s very difficult. Most modern phones require a Google account or manufacturer account to bypass.
Does the ADB method work on Android 10 or newer?
It can, but only if USB debugging was enabled before you were locked out. The file names have changed on newer versions—look for locksettings.db instead of gesture.key.
How many times can I try the pattern before it locks me out?
Typically, after 5 failed attempts, the phone waits 30 seconds. After 10, it may lock you out for longer. Some devices have a “Forgot pattern” option after 5 attempts.
Is there any way to unlock a phone with a dead battery?
No. The phone must be powered on to attempt any unlock method. Charge it first, then try.
What if I bought a used phone and the previous owner’s pattern is on it?
You should contact the previous owner. If that’s not possible, you may need to perform a factory reset, but that will erase the previous owner’s data. It’s best to ask for their Google account credentials or have them remove the device from their account.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- Gmail Gemini Privacy: Data Access & Limit Settings
- Fix Outlook Inbox Corruption with DISM in Windows
- How to Set Up Apple Pay on iPhone
- How to Choose a Refurbished iPhone With Years of Support
- Voice Dictation in Google Docs: How to Use It
- Turn Off Message Notifications on Mac