Forgotten PIN code for screen lock on a smartphone Android is a situation that almost every user has encountered. In a panic, many try to enter combinations at random, risking permanently losing access to the device after 10-30 unsuccessful attempts. But donโt rush to take your phone to a service center or buy a new one: in 80% of cases, unlocking is possible on your own, even without special skills.
In this article we will look at all current methods of removing a PIN code on Android in 2026, from simple (through an account Google) to advanced (with using ADB or Fastboot). We will pay special attention to methods that save data on the device - photos, messages and applications. You will also learn what actions can lead to complete loss of information and how to avoid them.
Important: the effectiveness of the method depends on the version Android, smartphone model and security settings. For example, on devices with a chip Titan M (for example, Google Pixel 6/7/8) or with the function activated Factory Reset Protection (FRP) some methods will not work. If your phone was released after 2022, first check the section about FRP bypass.
1. Unlocking via Google account (Android 4.4โ9.0)
This is the simplest method, but it only works on outdated versions of Android (up to 10th inclusive) and provided that:
- ๐น The device is connected to the Internet (Wi-Fi or mobile network).
- ๐น You remember the login and password for Google accountthat was linked to the phone.
- ๐น There is a button on the lock screen
"Forgot your password?"(it was removed on new smartphones).
If all conditions are met, follow the instructions:
- On the lock screen, enter any PIN code 5 times in a row (to activate the reset button).
- A message will appear
"Try again in 30 seconds"and a button"Forgot your pattern key?"or"Forgot your password?"- click on it. - Enter data from Google account (email and password) that was synchronized with the device.
- After successful authentication, the system will prompt you to create a new PIN code or graphic key.
Why may this method not work? Starting from Android 10, Google has removed the account unlock feature due to security vulnerabilities. Also, the method is not suitable for devices with Samsung Knox, Huawei (with HMS instead of GMS) and smartphones where network access is disabled on the lock screen.
โ ๏ธ Attention: If after entering data Google an error appears"Unable to connect to the server", check your Internet connection. On some firmware (for example, MIUI from Xiaomi), you may need to reboot the phone inSafe Mode(press the power button โ "Reboot in safe mode").
2. Using Smart Lock (if the function has been configured)
Smart Lock is a function Androidthat automatically unlocks the device in trusted conditions: for example, when you are at home, connected to a trusted device by Bluetooth or wearing a smart watch. If you set up Smart Lock previously, the chance to unlock your phone without losing data is 90%.
How to check:
- ๐ Location: Bring the phone to a place that was previously added as โtrustedโ (home, work).
- ๐ Bluetooth devices: Connect to the phone a gadget that was in the trusted list (headphones, fitness bracelet, car stereo).
- ๐ค Face recognition/voice: If configured, try unlocking the phone using an alternative method.
If Smart Lock worked, immediately go to Settings โ Security โ Smart Lock i disable all trusted devices/placesto avoid automatic unlocking in the future. Then install a new PIN code.
If you have a smart watch on Wear OS (for example, Samsung Galaxy Watch or Google Pixel Watch), try unlocking your phone through them. On some models this works even without preliminary configuration Smart Lock
What to do if Smart Lock is not configured? Unfortunately, you cannot activate this function after the fact - it must be enabled to locks. In this case, proceed to the following methods.
3. Unlocking via ADB (for users with USB debugging)
The method is suitable if on the phone USB debugging was previously enabled (USB Debugging) and you can connect it to the computer. This is one of the few ways save data on the device, but it requires minimal technical skills.
You will need:
- ๐ฅ๏ธ Computer with installed ADB drivers (you can download from the website Android Developers).
- ๐ USB cable (preferably original).
- ๐ฑ Phone with charge less than 30% (to avoid disconnection during the process).
Step-by-step guide:
- Connect the phone to the computer via USB.
- Open the command line (
Win + Rโ entercmdโEnter). - Enter command to check the connection:
adb devicesIf the device is detected (its serial number will appear), proceed to the next step. If not, install the drivers or try a different cable.
- Delete the file with the PIN code (works on Android 5.0โ11.0):
adb shell rm /data/system/gesture.keyadb shell rm /data/system/password.key
adb shell rm /data/system/locksettings.db
adb shell rm /data/system/locksettings.db-wal
adb shell rm /data/system/locksettings.db-shm - Reboot the phone:
adb reboot
After reboot, the lock screen should disappear. If not, try entering any PIN code (for example, 0000).
โ ๏ธ Attention: On Android 12+ and devices with encryption FBE (File-Based Encryption) this method can lead to data loss or complete inoperability of the phone. Before use, check the version Android in the settings (if you have access to the lock screen, the version is usually displayed when loading).
Make sure that USB debugging was enabled BEFORE locking|Download ADB drivers from the official website|Use the original USB cable|Charge the phone for at least 30%|Check commands for typos-->
4. Reset via Recovery Mode (complete data clearing)
If the previous methods did not work, it remains Hard reset via Recovery Mode. This method Deletes all data from the phone (photos, contacts, messages, applications), but is guaranteed to unlock the device. Use it only as a last resort!
Instructions for most smartphones:
- Turn off the phone (press and hold the power button for 10-15 seconds).
- Hold down the button combination to enter
Recovery Mode(depending on the model):Brand Button combination Samsung Power + Volume Up + Bixby(orHomeon old models)Xiaomi/Redmi/Poco Power + Volume UpGoogle Pixel Power + Volume Down, then selectRecovery ModeOnePlus Power + Volume downHuawei/Honor Power + Volume up(on some models you need to hold for 10+ seconds) - In the menu
Recoveryuse the volume buttons to selectWipe data/factory reset(on some phones you first need to selectAdvanced โ Wipe data). - Confirm the action (usually with the power button).
- After reset, select
Reboot system now.
The phone will reboot and offer to set it up as new. All data will be deleted, including accounts, photos and installed applications.
What to do if Recovery Mode asks for a PIN code?
On Some smartphones (for example, Samsung s Knox or Xiaomi s MIUI 13+s) may require you to enter a PIN code even in Recovery mode. In this case:
1. Try entering 0000 or 1234 โsometimes it works.
2. If this does not help, use method c Fastboot (section 5) or contact the service center.
3. On devices with a chip Titan M (for example, Pixel 6/7/8it is impossible to bypass the blocking - you will need official unlocking through Recovery impossible - you will need official unlocking via Google (section 6).
5. Unlocking via Fastboot (for advanced users)
The method is suitable for devices with unlocked bootloader (Bootloader). If you previously unlocked it (for example, to install custom firmware), you can try resetting PIN code via Fastboot without losing data. On If the bootloader is locked, this method will not work!
Instructions:
- Turn off the phone and hold down the combination to enter
Fastboot Mode(usuallyPower + Volume down). - Connect the device to computer and open the command line.
- Check the connection:
fastboot devices - Delete the file with the PIN code (does not work on all firmware):
fastboot erase locksettingsOr for older versions:
fastboot delete locksettings - Reboot the phone:
fastboot reboot
If the lock screen has disappeared after a reboot, install a new one PIN code in the settings. If not, try the methods from the section about FRP bypass.
โ ๏ธ Attention: On devices with Android 12+ and encryption FBE commandfastboot erase locksettingscan lead to loss of access to internal memory (the phone will require a PIN code even after a reset). In this case, only a full reset will help throughRecovery.
6. Bypass Factory Reset Protection (FRP) after reset
FRP (Factory Reset Protection) is protection Googlethat is activated after resetting the settings on devices with Android 5.1+. If you reset your phone via Recovery, but after turning it on it requires you to enter data from Google accountthat was linked earlier, you will need to bypass FRP.
Bypass methods depend on the phone model:
- ๐ฑ Samsung: Use Odine to flash the combination
FRP bypass file(for example,Combination ROM). Look for detailed instructions on the forums XDA Developers or 4PDA for your model. - ๐ฑ Xiaomi/Redmi/Poco: In some firmware MIUI you can bypass FRP via
Emergency Callโ dial##4636##โ go toUsage settingsโ reset settings. - ๐ฑ Google Pixel: On devices with a chip Titan M bypass FRP it is impossible without the original account. You will need to contact support Google with proof of ownership (receipts, box).
For most brands (for example, Huawei, Oppo, Vivo) there are special ones FRP tools (PC apps) that automate the process. However, they often contain viruses or require payment. Download such tools only from trusted sources!
If you bought a phone secondhand and do not know the details of the previous owner, it is legally impossible to bypass FRP. In this case, contact the service center with purchase documents or return the device to the seller.
7. Contacting the service center: when this is the only way out
If none of the methods worked, all that remains is to contact the official service center brand. This is relevant for:
- ๐ Devices with a chip Titan M (Google Pixel 6/7/8, Samsung Galaxy S22/S23/S24 s Knox).
- ๐ Smartphones where it is enabled hardware locking (for example, iPhone-similar protection on some Huawei).
- ๐ Phones purchased second-hand, where the previous owner did not unlock Google account.
What is required to unlock:
- ๐ Receipt or warranty card (proof of purchase).
- ๐ฆ Original box with serial number.
- ๐ Passport (to confirm identity).
The cost of the service varies from 1,000 to 5,000 rubles. data-i="279">72 hours to depending on the model and complexity of the blocking. In some cases (for example, on Google Pixel s Titan M), unlocking may take up to 72 hours due to the need for confirmation through Google.
โ ๏ธ Attention: Unofficial services often offer "unlocking in 5 minutes" using software. This can lead to loss of warranty, firmware damage or even IMEI blocking (on some models Samsung And Xiaomi). Official centers never guarantee the safety of data after unlocking.
FAQ: Frequently asked questions about unlocking Android
โ Is it possible to unlock the phone without losing data?
Yes, but only if:
- The phone was enabled USB debugging (method with ADB).
- You used Smart Lock and remember the trusted device/location.
- You have a backup copy in Google Drive (you can restore the data after resetting).
On devices with Android 12+ i encryption FBE the chance of saving data is minimal.
โ Why does the phone ask for the old PIN code after resetting via Recovery?
This happens because of the function Secure Startup (on Samsung) or File-Based Encryption (FBE) (on Android 10+). In this case:
- Try to enter any PIN code (for example,
0000). - If that doesnโt help, do reset again, but in
RecoveryselectWipe data/factory resettwice. - On some phones (for example, Xiaomi), firmware via Fastboot with deleting the partition will help
userdata.
โ Does the method work with calling the emergency number (112)?
No, this method stopped working after Android 5.0. Previously, through an emergency call, you could access the phone menu and disable the lock, but now this vulnerability is closed on new devices. data-i="319">or 112 or 911 only blocks other functions until the call completes.
โ Is it possible to unlock a phone through Find My Device?
Service Find My Device from Google allows erase data from the phone remotely, but not unlock it. If you forgot PIN code, this method will lead to a complete wipe of the device. To use it:
- Go to the website Find My Device.
- Select a locked device.
- Click
"Erase data".
After this, the phone will be unlocked, but all files will be deleted.
โ What to do if the phone is locked after flashing?
If you flashed the phone via Fastboot or Odine, and after that it requires PIN codewhich you did not install, the problem is:
- Incompatibilities firmware (for example, flashed Global ROM to a phone with Chinese ROM).
- Residual data from the previous firmware (you need to do
full wipeto TWRP). - FRP activation (if you flashed the firmware without deleting
FRP keys).
Solution: flash the phone again with a complete wipe (format data in TWRP or wipe in Odine).