Security
Forgot the PIN or pattern of your own phone: the official ways back in
Short version
- On current phones there is no unlock that keeps your data — a backup is what makes the difference.
- Changed the code within the last 72 hours? On Samsung One UI 6.1+ and iPhone with iOS 17+ you get in with the old code — no losses.
- Fingerprint or face still opens the phone? Back it up right now — they stop helping after the first restart.
- The official routes that erase everything: remote erase from your account, or a button-combo reset.
- After erasing, the phone asks for the account that was on it — Google, Apple, Samsung or Mi — as proof it is yours.
Why there is no workaround
The honest answer is short: a forgotten PIN, password or pattern cannot be removed while keeping the data. The lock code is part of the key that encrypts everything on the phone — without it, your photos and messages are mathematically unreachable, for you and for anyone else. Anyone promising a workaround is selling snake oil.
Danger· What you will lose
The phone itself slows you down on the wrong path: after a few wrong tries it makes you wait — first a few seconds or a minute, then whole minutes, then up to an hour. On iPhone, after enough misses the screen reaches iPhone Unavailable and then Security Lockout; on Android the message and the timer differ by maker, but the mechanics are the same. These pauses are the sign to stop and read your options, not to keep guessing.
Phone screen: iPhone Unavailable. try again in 15 minutes [Emergency] [Forgot Passcode?]
Before you erase: the checks that can save your data
Not everyone goes straight to erasing. Depending on what was turned on and on when you last changed the code, a few doors are still open — all free, all official:
- Does a fingerprint or face still work? If the phone wasn't restarted and the lock screen still accepts your finger or your face, open it and back it up immediately — photos to the cloud, WhatsApp, contacts. You can't change the code without knowing it, but after a backup, erasing is no longer a disaster.
- Did you change the code within the last 72 hours? Samsung (One UI 6.1 or newer) and iPhone (iOS 17 or newer) keep the previous code for three days and let you in with it to set a new one — no losses. The exact steps are in the next section, under your brand.
- Does the phone stay unlocked somewhere? Smart Lock / Extend Unlock, if you ever set it up, may keep the phone open at home or near a trusted device — one more chance to back up.
- Did someone "prank" your code? A child or a friend who changed the pattern can maybe tell it back to you. Ask before erasing anything.
Phone screen: Wrong PIN. Try again in 30 seconds
Tip· The restart rule
The official ways back in, per brand
There are two families of solutions: the one that gives your phone back intact — only if you changed the code recently — and the ones that erase it, remotely or with buttons. Here they are side by side, then per brand:
| Route | What you need | What you lose |
|---|---|---|
| Previous code (Samsung One UI 6.1+, iPhone iOS 17+) | The old code, within 72 hours of the change | Nothing |
| Remote erase (Find Hub, SmartThings Find, i.mi.com, Find My) | The account password + the phone on and online | All data on the phone |
| Button reset (recovery) | The right button combo; on recent Samsung, a USB cable to a computer | All data on the phone |
| iPhone via computer (Finder / Apple Devices) | A Mac or PC, a cable, internet, up to an hour | All data on the phone |
| The maker's official support | Proof of purchase and ID | All data (sometimes a fee too) |
| Blocked SIM card | The PUK from your carrier | Nothing — if you stay under 10 tries |
Connection: Another device via internet → Your account. Your account via mobile data → The locked phone.
On a Galaxy you have a real lifeline — but only if you changed the code within the last 72 hours. Otherwise the official route is erasing: remotely or from recovery.
Use the previous code (One UI 6.1 or newer)
After five or more wrong tries tap Forgot PIN? on the lock screen — the label follows your lock type: PIN, password or pattern. Enter the previous code, tap OK, pick a lock type and set a new one. The feature keeps the old code for only 72 hours, and only if you didn't delete it from
Secure lock settings— and you get only three tries with the old code, then it's gone. You lose nothing.Or erase remotely, from SmartThings Find
On another device or a computer go to smartthingsfind.samsung.com, sign in with the Samsung account on the phone, select it and choose
Erase data. The phone must be on and online. After the erase it asks for the Samsung account and the Google account from before.One UI 7Erase dataAll data on this device will be permanently erased and cannot be recovered.
CancelErasePhone screen: Erase data. All data on this device will be permanently erased and cannot be recovered. [Cancel] [Erase]
Or from recovery, with buttons
Power the phone off. On recent models connect it by USB cable to a running computer, then hold Volume up + Power until the recovery menu appears — always in English. With the volume keys go to
Wipe data/factory reset, confirm withFactory data reset, thenReboot system now. Step by step in the recovery guide.- 1Hold until the Recovery menuVolume upPower10 s
Press the phone's physical buttons in the numbered order. 1. Hold until the Recovery menu (Volume up + Power, 10 s)
Note· Remote unlock no longer exists
On Pixel, Motorola and near-stock Android, Google is blunt: if you can't unlock it, you erase it — remotely or with the buttons — and set it up again.
Erase remotely, from Find Hub
Open google.com/android/find or the Find Hub app on another Android device, sign in with the Google account on the phone, select the phone, open
Settingsand tapFactory reset. It works only if the phone is on, online, has Find Hub enabled and is visible on Google Play.Android 15Factory reset device?All personal data will be permanently deleted from this device.
CancelErasePhone screen: Factory reset device?. All personal data will be permanently deleted from this device. [Cancel] [Erase]
Or with buttons, through recovery
Power the phone off. Hold Power + Volume down until the fastboot screen appears — an English menu between arrows. With Volume down go to
Recovery Modeand confirm with Power.No command- 1Hold until the fastboot menuPowerVolume down12 s
- 2Go to “Recovery Mode”Volume down
- 3Confirm with PowerPower
Press the phone's physical buttons in the numbered order. 1. Hold until the fastboot menu (Power + Volume down, 12 s). 2. Go to “Recovery Mode” (Volume down). 3. Confirm with Power (Power)
Past “No command” to the wipe
The fallen Android robot with
No commandappears — that's normal, nothing's broken. Hold Power and, while holding it, press Volume up once: theAndroid Recoverymenu opens, in English too. There, move with the volume keys toWipe data/factory reset, confirm with Power, thenFactory data resetand finallyReboot system now.No command- 1Hold the Power buttonPower4 s
- 2Press Volume up once, release bothPowerVolume up
Press the phone's physical buttons in the numbered order. 1. Hold the Power button (Power, 4 s). 2. Press Volume up once, release both (Power + Volume up)
Note
On Xiaomi, Redmi and POCO the official route is recovery. Important: if a Mi account was signed in on the phone and you didn't sign out, it asks for that account's password after the erase, as proof.
If it's online: remote erase
With the Mi account from the phone, go to i.mi.com, open
Find device, select the phone and choose to erase the data. Google's Find Hub works too, if enabled. Either way, the phone must be on and online.HyperOS 2Erase device?All data on this device will be permanently erased. This action cannot be undone.
CancelErasePhone screen: Erase device?. All data on this device will be permanently erased. This action cannot be undone. [Cancel] [Erase]
If not: enter Recovery
Power the phone off, then hold Volume up + Power until it vibrates and the Mi Recovery menu appears — in English too.
- 1Hold until Recovery appearsVolume upPower8 s
Press the phone's physical buttons in the numbered order. 1. Hold until Recovery appears (Volume up + Power, 8 s)
Choose Wipe Data and reboot
With the volume keys go to
Wipe Data, confirm with Power, thenWipe All DataandConfirm. At the end chooseReboot. After the restart, if a Mi account was signed in, the phone asks for its password — if you forgot it, reset it throughForgot Password, with the account's phone number or email (also on id.mi.com).HyperOS 2Mi RecoveryMain MenuVolume = move • Power = confirmPhone screen: Mi Recovery Main Menu. Reboot, Wipe Data, Connect with MIAssistant. Volume = move • Power = confirm
On iPhone, Apple gives you a lossless way out if you changed the passcode recently — and two erasing variants if you didn't: on the phone itself or through a computer.
Passcode changed within 72 hours? Get in with the old one
On the lock screen enter the wrong passcode until iPhone Unavailable appears, then tap Forgot Passcode? in the bottom corner and Enter Previous Passcode. Type the old code and set a new one — losing nothing. The Passcode Reset feature exists since iOS 17 and keeps the old code for only 72 hours.
Not the case? Then reset from the phone
From the same iPhone Unavailable / Security Lockout screen: tap Forgot Passcode?, then Start iPhone Reset. Enter your Apple Account password and tap Erase iPhone. It works only if Find My was on and the phone is on Wi-Fi or cellular — and it erases everything.
On iOS 15.2–16 the on-screen button is
Erase iPhonedirectly. On an eSIM with iOS 16 or earlier, talk to your carrier first — after the erase the eSIM is set up again with a QR code.iOS 18Erase This iPhone?This action cannot be undone. All data and settings will be erased.
CancelErasePhone screen: Erase This iPhone?. This action cannot be undone. All data and settings will be erased. [Cancel] [Erase]
No Find My or no internet: reset with a computer
Power the iPhone off: on Face ID models hold side + volume down until the slider appears, on Home-button models hold the side (or top) button — then drag the slider. Connect the cable to the computer, then to the phone while holding the button down: the side button on Face ID iPhones or iPhone 8/SE, volume down on iPhone 7, the Home button on iPhone 6s/SE 1. Don't release it until you see the image of a computer and a cable. In Finder (Mac) or Apple Devices (Windows) choose
Restoreand wait — up to an hour.If the iOS download takes more than 15 minutes, the iPhone leaves recovery mode on its own — let the download finish and enter it again.
iOS 18support.apple.com/iphone/restorePhone screen: Recovery mode. support.apple.com/iphone/restore
Note
After the erase: the account that asks for proof
This is where many get locked out a second time: after the erase, the phone doesn't start normally — it asks for the account that was on it before. On Android it's Factory Reset Protection (FRP, the Google account), on iPhone it's Activation Lock (the Apple Account), and on Samsung and Xiaomi the maker's account can join in. It's the anti-theft feature and it cannot be bypassed: without those credentials the phone stays locked even in the owner's hands.
This device was reset. Sign in with a Google Account that was previously synced on this device.
Phone screen: Verify your identity. This device was reset. Sign in with a Google Account that was previously synced on this device. [Next]
- Photos in Google Photos or iCloud reappear on their own after you sign in — let the sync finish before you panic.
- Contacts saved in the account come back; the ones kept only on the phone or the SIM do not.
- WhatsApp pulls its chats from the backup — confirm the restore on first open, don't skip it.
- Apps re-download; their data returns only if the app kept its own cloud backup.
- What does not come back: unsynced photos, SMS without a backup, files in Downloads — and banking apps, which you reactivate one by one (dedicated guide).
The account password is the key from here on: if you forgot that too, start with recovering the Google or Apple account and only then the phone. For the full erase procedure and everything around it, see the factory reset guide.
The SIM PIN and the PUK — a different lock entirely
If after a restart or after moving the card the phone asks for the SIM PIN, the phone isn't locked — the card is. It's a separate code, it belongs to the carrier and it has its own rules: three misses lead to the PUK prompt, not to an erase.
Enter the PUK code to unlock the SIM card. You can get it from your carrier.
Phone screen: SIM card is locked. Enter the PUK code to unlock the SIM card. You can get it from your carrier. [OK] [Cancel]
- Where the PUK lives: on the plastic the SIM snapped out of, or from the carrier — on Orange it's in your My Orange account (
Servicii SIMon the web,Altele→Serviciiin the app) or by calling*100#from another Orange number (it asks for your six-digit Orange password); other carriers show it in their app or via customer care. - What it does: after the correct PUK you set a new SIM PIN — write it down, the phone asks for it at every restart.
- What it doesn't do: it doesn't unlock the phone itself — if the screen lock is forgotten too, you stay on the steps above.
Warning· Ten misses and the card is dead
What a repair shop can do — and what it can't
An honest shop has no magic tools: it can perform the same reset you can, it can reinstall the system (also erasing), and it can help with a backup if the phone still opens with a fingerprint. What nobody anywhere can do: remove the lock code while keeping the data — it's encrypted with that code — or get past the account prompt after the erase.
- With proof of purchase — invoice, receipt, contract — the maker's official support can take you further; Apple, for example, can lift Activation Lock when you prove the phone is yours.
- A phone that asks for someone else's account — found, or bought second-hand — stays locked: only the previous owner or the maker opens it.
- At XGSM we don't remove locks on phones whose ownership can't be proven — and we'd advise you not to trust anyone who promises it.
- Online "unlock" tools promising intact data don't work on current phones — at best you lose the money, at worst you end up with software that steals your accounts.
Note· When something else is wrong
So it doesn't happen again
The screen lock is your friend — it protects you from exactly the reverse of what happened to you: someone else reading your phone. The trick is keeping your data saved elsewhere, so the lock never turns against you:
0 of 6 done
Tip
Frequently asked questions
Can I unlock my phone without losing data if I forgot the PIN?
Why does my phone ask for the Google account after the reset?
After how many wrong tries does the phone lock?
The phone opens with my fingerprint but asks for the code. What now?
I forgot the SIM card's PIN, not the phone's. What do I do?
*100# from an Orange number — or from customer care. After ten wrong PUKs the card is deactivated and you replace it at the carrier.Can a repair shop remove my code without erasing?
Does unlocking with the Google account still work?
Does your phone look different, or is something missing here?
Menus and buttons differ from model to model and change with updates. If these steps do not match your phone or you cannot find what you need, tell us your model and what you see on the screen: we will answer you and update the guide.
Checked against
- Apple — Dacă ai uitat codul de acces, resetează-ți dispozitivul fără un computer
- Apple — Folosirea unui computer pentru resetarea dispozitivului iPhone
- Apple — Folosește vechiul cod de acces pentru a debloca în termen de 72 de ore
- Google — Nu pot debloca dispozitivul Android
- Google — Găsește, securizează sau șterge un dispozitiv Android pierdut
- Samsung România — Nu pot debloca dispozitivul Galaxy
- Samsung România — Deblochează Galaxy cu o metodă anterioară de blocare
- Xiaomi — Phone Unlocking Q&As
- Orange — Despre codul PIN / PUK / IMEI
Related guides
Forgot your Google or Apple account password: how to recover it
The Google or Apple account is the only key after a reset — how to recover it the official way, and what makes recovery work.
20 min · Anyone can do it
Factory reset done right (and the account lock that follows)
How to reset a phone without surprises: the backup, the account it asks for, and the steps per brand.
30 min · Needs care
Full Android backup: photos, contacts, WhatsApp and SMS
Photos, contacts, WhatsApp and SMS — a complete Android backup, step by step for each brand.
20 min · Anyone can do it
Full iPhone backup: iCloud or a computer
iCloud or computer backup: what each one holds, how to start a copy now and how to check it's a good one.
20 min · Anyone can do it
Locking apps, a private folder and a SIM PIN
App locks, private folders and the SIM PIN — on every brand, step by step.
15 min · Anyone can do it
iPhone recovery mode and DFU: when and how, for each model
How to enter recovery mode on every iPhone, what to choose between Update and Restore, and when DFU or a repair shop is needed.
20 min · Better in a service
The phone won't get past the reset either?
If it stays stuck on the logo or won't start at all, the problem is already a different one — most likely hardware. Bring it in for a diagnostic and we'll tell you on the spot where it hurts.