Forgetting your Android PIN, pattern or password is stressful, especially when your photos and messages are on the other side of the lock screen. Before you erase anything, check the few options that can still get you in without losing data. If none of them apply, a factory reset is the official way back in, and a few checks beforehand can keep a forgotten PIN from turning into a bigger problem.
Quick answer: On a modern Android phone, there’s no official way to remove a forgotten PIN, pattern or password without erasing the phone, with one notable exception: Samsung Galaxy phones on One UI 6.1 or later let you use your previous screen lock within 72 hours of changing it. If fingerprint, face unlock or Extend Unlock still opens the phone, use that access to back up your data, since you usually need the current PIN to change it. Otherwise, you’ll need to factory reset the phone with Google Find Hub or recovery mode, then sign in with your Google account.

Can you unlock an Android phone without losing data?
Sometimes, but only if something you set up earlier still works. Android encrypts your data and ties it to your screen lock, so there’s no “master code” or back door. Here’s a quick way to see where you stand:
| Your situation | What to try | Keeps your data? |
|---|---|---|
| Fingerprint, face unlock or Extend Unlock still opens the phone | Back up your photos and data right away | May let you save accessible data before a reset; restoring everything isn’t guaranteed |
| Samsung Galaxy, changed lock in the last 72 hours | Use your previous PIN, password or pattern | Yes |
| None of the above | Factory reset with Find Hub or recovery mode | No. Previously backed-up data may be recoverable, but restoring it isn’t guaranteed |
1. If fingerprint, face unlock or Extend Unlock still works, back up first
If biometrics are set up, the phone may still accept your fingerprint or face. Fingerprint or face unlock may remain available until Android requires your PIN, pattern or password again, which can happen after a restart, after certain security timeouts or under other security conditions.
Extend Unlock, formerly called Smart Lock, works in a similar way. If you turned it on earlier, it can keep a phone you already unlocked open while it’s on your body, at a trusted place or connected to a trusted device. Samsung says this lasts up to four hours, after which the PIN is required again. It can’t unlock a phone that is already asking for the PIN.
While you still have access, keep the phone charged, don’t restart it, and stop guessing the PIN. Too many wrong attempts can switch off fingerprint and face unlock, and a phone that stays locked for about three days restarts by itself and then asks for the PIN. On a Samsung phone with Auto factory reset turned on in Secure lock settings, enough wrong guesses will erase it.
Either way, changing the screen lock usually requires the current PIN, pattern or password, so this route often won’t let you set a new one. Use the access to back up what matters instead: open Google Photos (or your phone maker’s backup) and make sure your photos have finished uploading, and save any files and account data you can still reach. Keep in mind that Google says some Android backup data is end-to-end encrypted with your screen lock PIN, pattern or password, so a backup doesn’t guarantee every item can be restored after a reset. Photos backed up to Google Photos aren’t protected that way.
2. Samsung Galaxy: use your previous screen lock (within 72 hours)
On Galaxy phones running One UI 6.1 or later, Samsung temporarily keeps your previous PIN, password or pattern for 72 hours after you change it. If you forget the new one in that window:
- Enter the wrong PIN, password or pattern at least five times.
- Tap Forgot PIN (or Forgot password or Forgot pattern) when it appears.
- Enter your previous PIN, password or pattern and tap OK.
- Set a new screen lock.
Keep in mind:
- It only works within 72 hours of changing your lock, and only if you didn’t delete the previous one.
- If you enter the previous lock incorrectly three times, no further attempts are allowed.
- It doesn’t help if you only used biometrics.
See Samsung’s guide to unlocking with a previous screen lock for model-specific screens.
What about Samsung’s remote unlock? Samsung ended the Remote Unlock feature in SmartThings Find on December 4, 2023, citing security reasons, so older guides that tell you to unlock a Galaxy phone from the Find website are out of date. Samsung also says its service centers can’t unlock a phone without deleting the data.
Before you factory reset, check these things
- Your Google account. After a reset, the phone will ask you to verify with a Google account that was on it (see Factory Reset Protection below). Make sure you can sign in to that account on another device. If you don’t know the password, recover it first at Google Account Recovery.
- Recent password changes. Google says to wait 24 hours after resetting your Google Account password before you factory reset the phone.
- Your backups. Sign in to photos.google.com or your phone maker’s cloud service from a computer to check which photos, contacts and other data have already synced. A factory reset permanently removes data stored only on the phone, and some backed-up device data is encrypted with your screen lock, so not everything may come back.
- Battery and connection. Google recommends charging the phone to at least 70% and keeping it connected to Wi-Fi or mobile data, since a reset can take up to an hour.
- Your SIM and memory card. Removing the SIM card and any microSD card first is a sensible precaution; how a reset treats a memory card varies by phone. Our guide on whether removing a SIM card deletes anything explains what’s stored where.
3. Factory reset with Google Find Hub
If none of the options above work, a factory reset removes the screen lock by erasing the phone. Google’s Find Hub (formerly Find My Device) lets you do this remotely, which is handy if you don’t know your phone’s recovery-mode buttons.
- On a computer or another phone, go to android.com/find or open the Find Hub app.
- Sign in with the Google account on the locked phone.
- Select the phone, open its settings and choose Factory reset. Google may ask for the phone’s screen lock PIN when you select it; if you can’t complete that verification, use recovery mode instead.
- Confirm the reset. The phone must have power and an internet connection, and it must meet Google’s Find Hub requirements, including being signed in to a Google account with Find Hub turned on. If it’s offline, the erase can’t complete until it’s connected again.
This only works if the phone is signed in to your Google account and visible in Find Hub, so it isn’t available for every locked phone. Find Hub’s Mark as lost option won’t help here either: it locks the phone with your existing screen lock, so it can’t set a new PIN for you. For more on what the service can do, see our guide to how Android Find Hub helps you find a lost phone. Samsung owners can also erase a phone from SmartThings Find with their Samsung account.
4. Factory reset through recovery mode (last resort)
If the phone is offline or Find Hub isn’t set up, you can reset it using its buttons. Button combinations and menus vary by brand and model, so follow your manufacturer’s instructions; the steps below are only a general example:
- Turn off the phone. (Many newer Samsung phones need a USB cable connected to a computer, not just a charger, before they’ll enter recovery.)
- Use the button combination your phone maker specifies to enter recovery mode or the bootloader. It often involves holding Power with a volume button, but it varies by model.
- On supported Pixel phones, the buttons open Fastboot mode first; use the volume keys to choose Recovery mode and press Power. If you then see a “No command” screen, hold Power and press Volume up once to open the recovery menu.
- Use the volume buttons to highlight Wipe data/factory reset and press Power to select it, then confirm.
- When it finishes, choose Reboot system now.
Google’s guide to resetting an Android device to factory settings links to manufacturer instructions.
What happens to your data after a factory reset?
A factory reset erases apps, settings, photos, messages and files stored on the phone. When you set the phone up again and sign in to the same Google account, you may be able to restore what was backed up, such as apps, contacts, settings, call history, texts and photos, depending on what backup was turned on. Some of that data is end-to-end encrypted with your old screen lock, so restoring every item isn’t guaranteed. Device backups of texts, call history and app data may ask for that old PIN, pattern or password before they restore, while photos and contacts synced to your Google account aren’t affected. If fingerprint or face unlock still works, copy important files off the phone directly rather than counting on the backup. Google’s guide to backing up and restoring Android data explains what’s included.
Why your phone may still be locked after a reset (Factory Reset Protection)
Factory Reset Protection (FRP) is Android’s anti-theft check. After a reset that wasn’t done from Settings, the phone asks you to verify with the previous screen lock or a Google account that was previously synced to it. Since you’ve forgotten the screen lock, plan on using your Google account. This stops a thief from wiping and using a stolen phone.
- If it’s your phone: sign in with the same Google account and password.
- If you don’t remember that account: use Google Account Recovery, or contact the phone’s manufacturer or your carrier with proof of purchase.
- If you bought a used phone that’s locked to someone else’s account: contact the seller and ask them to remove the device from their account. Don’t use bypass tools.
What about “Forgot pattern,” ADB tricks and unlocker apps?
The old “Forgot pattern?” link that let you sign in with Google only worked on Android 4.4 and earlier. ADB commands generally need USB debugging and authorization set up before you were locked out, so they rarely help. Paid “unlocker” tools that promise to remove a lock without data loss may wipe the phone anyway, install unwanted software or put your data at risk. The safe, official routes are the ones above.
How to avoid getting locked out again
- Choose a strong PIN or password you can remember. If you keep a copy in a password manager, make sure you can open it from another trusted device.
- Set up fingerprint or face unlock as a backup.
- Turn on backup in Settings and Google Photos backup so photos, contacts and app data are saved to your account.
- Keep your Google account recovery email and phone number up to date.
- Make sure you know your Google account password.
- On Samsung, don’t delete the previous screen lock right after changing it, so you keep the 72-hour safety net.
Frequently asked questions
Is there a universal unlock PIN for Android?
No. There’s no master PIN or code that unlocks every Android phone. Websites that claim to offer one are wrong or trying to sell something.
Can I unlock my Android phone without losing photos?
Only if one of the access or recovery options above works. Otherwise, photos stored only on the phone will be lost in a reset, while photos already backed up to Google Photos or another cloud service stay available in your account.
Can I get my phone unlocked if I forgot my password?
Not without erasing it, unless Samsung’s 72-hour option applies. Carriers and repair shops, including Samsung service centers, can help with a factory reset, but they can’t remove the screen lock and keep your data. Carrier “unlocking” refers to using other networks, not the screen lock.
Does Google Find Hub let me set a new PIN remotely?
No. Find Hub can ring, locate, mark as lost or factory reset your phone. Mark as lost uses your existing screen lock, and a factory reset removes everything on the phone.
What’s the difference between a screen lock and Factory Reset Protection?
Your screen lock prevents unauthorized access during normal use. Factory Reset Protection helps stop someone from setting up a phone after an unauthorized reset. Depending on the device and reset method, verification may require the previous screen lock or a Google account previously synced to the phone.
How we researched this guide
We based this guide on Google’s help pages for Find Hub and factory resets, Samsung’s support articles on unlocking with a previous screen lock, Extend Unlock and the end of SmartThings Find Remote Unlock, and the questions US users ask on Google and Bing. Menu names vary by phone maker and software version.

Louis Mugan writes how-to and troubleshooting guides for EasyTechLife, covering Android phones, iPhones, laptops, Chromebooks, headphones and everyday software.
He aims to base each guide on official manufacturer documentation and support pages, and to link the sources so readers can check the steps for themselves. Questions or corrections? Use the contact page.


