sodcalculator

10 Tech How-To

How to Unlock PIN Code on Android

Guide 10-44312 · Updated · Step by step

This guide walks you through the various ways to unlock an Android device when you’ve forgotten your PIN, pattern, or password. Depending on your device’s brand, Android version, and whether you’ve previously set up certain recovery options, you may be able to regain access without losing any data. In other cases, a factory reset is the only option, which erases everything on the phone. Before starting, make sure your phone has some battery charge and, if possible, back up any important data through your Google account or cloud services.

What You’ll Need

  • Your Android device (locked)
  • A Google account and password (for most recovery methods)
  • A computer or another device to access the internet (for some methods)
  • USB cable (if using ADK or recovery mode methods)
  • Access to the phone number associated with the device (for two-step verification)

Step-by-Step

  1. Try the “Forgot Pattern” or “Forgot PIN” option. After several incorrect attempts, most Android devices will display a “Forgot pattern” or “Forgot PIN” link on the lock screen. Tap it and sign in with the Google account that was previously synced on the device. You may then be prompted to create a new lock screen PIN or pattern.
  2. Use “Find My Device” (Google’s service). On a computer or another phone, go to google.com/android/find and sign in with the Google account linked to the locked device. Select the locked device from the list. If the device is online, you’ll see options like “Play Sound,” “Secure Device,” and “Erase Device.” If you have previously enabled “Secure Device,” you can set a temporary PIN or password remotely, which will unlock the phone. If not, you may only be able to erase the device (which removes the lock, but also all data).
  3. Use Samsung’s “Find My Mobile” (for Samsung devices). If you have a Samsung phone and have a Samsung account set up, go to findmymobile.samsung.com on a computer. Log in with your Samsung credentials, select your device, and choose “Unlock.” This will remove the current lock screen security, allowing you to set a new one. This works only if the device is connected to the internet and you’ve previously enabled remote unlock in settings.
  4. Boot into Recovery Mode and perform a factory reset. This is a last resort because it erases all data on the device. To do this, turn off your phone. Then, press and hold a specific combination of buttons (usually Volume Up + Power, or Volume Down + Power, depending on the model) until the recovery menu appears. Use the volume keys to navigate and the power button to select. Choose “Wipe data/factory reset” (or similar), then confirm. After the reset, select “Reboot system now.” The device will restart with the factory settings, and you can set it up as new or restore from a backup.
  5. Use Android Debug Bridge (ADB) if USB debugging was enabled. If you previously enabled USB debugging on the phone, you can connect it to a computer with ADB installed and run the command adb shell rm /data/system/gesture.key (for pattern lock) or adb shell rm /data/system/password.key (for PIN/password). This removes the lock file, and after rebooting, the lock screen will be gone. This method is technical and requires that ADB is authorized on the phone, which is unlikely if the phone is locked.
  6. Contact your carrier or manufacturer. If all else fails, your mobile carrier or the phone manufacturer may be able to assist, especially if you can prove ownership. They might provide a master reset code or guide you through a specific recovery process. Note that they will likely require proof of purchase or identification.

Common Mistakes

  • Guessing too many times: Repeatedly entering wrong PINs can lead to a temporary lockout (e.g., 30 seconds, then 1 minute, etc.) or, after many attempts, a permanent lock requiring a factory reset. Stop after a few tries and use a recovery method.
  • Forgetting Google account credentials: Many recovery methods require you to log into the Google account that was on the phone. If you’ve forgotten that password, you’ll need to recover it first via Google’s account recovery process.
  • Not having backup enabled: If you haven’t backed up your data, a factory reset will permanently erase contacts, photos, and apps. Always enable Google backup or use cloud services to regularly back up your device.
  • Using the wrong button combination for recovery mode: Different manufacturers use different key combos. Pressing the wrong ones may boot the phone normally or into a different mode. Look up the exact combination for your specific model before attempting.
  • Assuming “Find My Device” can unlock without prior setup: The remote unlock feature only works if you’ve enabled it in settings beforehand. If not, you may only be able to erase the device.

Tips

  • Set up a backup PIN or pattern: Some Android versions allow you to set a fallback security method (like a backup PIN) when you create a pattern. Use this feature if available.
  • Enable Smart Lock: Smart Lock can keep your phone unlocked when you’re at home, connected to a trusted Bluetooth device, or when it detects your face or voice. This reduces the chances of being locked out.
  • Write down your PIN in a safe place: It sounds simple, but many lockouts happen because we forget a PIN we rarely use. Keep a record in a secure password manager or a physical safe.
  • Keep your Google account recovery options up to date: Ensure your recovery email and phone number are current so you can quickly regain access to your Google account if needed.
  • Regularly back up your phone: Use Google One or manufacturer cloud services to back up your data automatically. If you ever need to factory reset, you can restore your data seamlessly.

Troubleshooting

  • “Forgot pattern” option doesn’t appear: This option may only show after several failed attempts. If it doesn’t appear, try entering a wrong pattern a few more times (but beware of lockout). Alternatively, use “Find My Device” or factory reset.
  • “Find My Device” says device is offline: The device must be connected to the internet for remote commands to work. If it’s offline, you can’t unlock it remotely. You may need to wait until it comes online, or use a factory reset (which doesn’t require internet).
  • Samsung’s “Find My Mobile” unlock fails: This feature requires that you have a Samsung account and have previously enabled “Remote unlock” in Settings > Biometrics and security > Find My Mobile. If not, the option won’t work. You can still try “Erase data” or use recovery mode.
  • Factory reset doesn’t remove the lock: On some newer devices, especially those with Factory Reset Protection (FRP), the device will still ask for the Google account credentials after a reset. This is a security feature to prevent thieves from using stolen phones. You’ll need to enter the Google account that was previously on the device to proceed.
  • ADB method says “device not found”: This usually means USB debugging isn’t enabled or the ADB authorization wasn’t granted. Since the phone is locked, you can’t grant authorization now, so this method is only viable if you had previously authorized the computer.
  • Device is stuck in a boot loop after reset: If the phone restarts repeatedly, try wiping the cache partition from recovery mode. If that doesn’t work, perform a factory reset again. If the issue persists, there might be a hardware problem, and you should contact the manufacturer.

Frequently Asked Questions

Can I unlock my Android phone without losing data?

Yes, if you can use the “Forgot pattern” option, Google’s Find My Device, or Samsung’s Find My Mobile (if set up beforehand), you can unlock without losing data. If those aren’t available, a factory reset will erase everything.

What is Factory Reset Protection (FRP)?

FRP is a security feature that requires you to enter the Google account credentials that were previously on the device after a factory reset. It prevents someone from using a stolen phone. If you forget your Google password, you’ll need to recover it first.

How many times can I try a PIN before it locks?

It varies by device and Android version. Typically, after 5 failed attempts, the phone will lock for 30 seconds, then 1 minute, then 5 minutes, and so on. After 10-20 attempts, it may permanently lock, requiring a factory reset.

Can I unlock my phone using my fingerprint or face if I forgot the PIN?

If you have biometric unlock enabled, you can often use your fingerprint or face to unlock the phone without entering the PIN. However, after a reboot or after a certain period, the phone may require the PIN as a fallback. Also, if you’ve tried the PIN too many times, biometrics may be disabled temporarily.

Will a factory reset remove the PIN lock?

Yes, a factory reset will remove the PIN lock because it resets the device to its original factory state. However, you’ll need to set up the phone again, and if FRP is active, you’ll need the Google account credentials.

Is there a universal master code to unlock any Android?

No, there is no universal master code for Android devices. Each manufacturer and model has its own recovery methods, and security features like FRP are designed to prevent unauthorized access. Avoid any service that claims to have a universal code, as they are likely scams.

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

The whole Tech How-To bed →