The situation when a smartphone screen suddenly becomes inaccessible due to a forgotten code causes panic in any user. You try to remember the combination, but your fingers themselves enter the wrong numbers, and after several attempts the device is blocked for a long time. At this moment, it is important not to give in to emotions and not press buttons at random, as this can lead to complete blocking of the gadget or deletion of information.
There are several proven methods for restoring access to the system Android, which range from simple actions through a Google account to more complex procedures using a computer. The choice of a specific method directly depends on the version of the operating system, the availability of an Internet connection and the pre-configuration of security functions. In this guide, we will examine each option in detail so that you can regain control of your device.
Using the “Forgot Password” function through Google Account
This method is the most gentle and allows you to save all your data, photos and applications. It works mainly on older versions of Android (up to 5.0 Lollipop) or on devices where the corresponding option has been specifically activated. After five unsuccessful attempts to enter a pattern key or PIN code, a button should appear on the lock screen "Forgot your password" or "Forgot your pattern".
Click on this inscription and the system will prompt you to enter data from your Google account, which is linked to this phone. You will need to provide an email address and password. If you forgot them too, try restoring access to mail from another device through a browser. Successful authorization will allow you to set a new unlock code or disable it completely.
⚠️ Attention: On modern versions of Android (starting from 6.0 and higher), this function is often disabled by developers in order to enhance security. If the button does not appear after many attempts, this method will not work for you.
Make sure that your smartphone is connected to a Wi-Fi network or mobile data, otherwise account verification will not be possible. If there is no Internet, try removing and reinserting the SIM card or restarting the device so that it picks up the network. In some cases, it helps to enter the wrong code until the lock timer disappears and the field for entering account information appears.
If you remember your Google password, but can’t log in due to two-factor authentication, try using a backup code that you may have saved earlier.
Unlocking through the Find My Device service
Google provides an official tool for remote control of smartphones, which is called "Find device". This service allows you not only to track your phone's location, but also to change your screen lock password remotely. For this method to work, the phone must be turned on, have an active Internet connection and be linked to your Google account.
Go to the site android.com/find from any other device (computer, tablet or friend's phone). Sign in to the same Google account that you use on your locked smartphone. The system will automatically detect your device and show it on the map. In the menu on the left you will see three main options: “Ring”, “Block” and “Wipe device”.
Select an option "Lock". You will be prompted to enter a new temporary password to replace your forgotten code. Enter the new combination twice to confirm and press the lock button. After a few minutes, your phone will update the password and you will be able to log in using the numbers you just set.
It is important to understand that this method does not delete your data, but only changes the means of access. However, if the phone is turned off or in airplane mode, the command will not be executed until the network appears. It is also worth noting that on some custom firmware from manufacturers like Xiaomi or Huawei this function may not work correctly due to its own security systems.
Smart Lock function to bypass the lock screen
If you have configured the function in advance Smart Lock in the security settings of your smartphone, unlocking can occur automatically if certain conditions are met. This technology allows you to leave your phone unlocked in trusted locations, near trusted devices, or with face and voice recognition.
Check the following scenarios that you may have previously activated:
- 📍 Trusted places: If you have added your home or office to the list of safe zones, the phone will unlock itself as soon as it detects geolocation.
- 📱 Trusted devices: Go to the smart watch, fitness bracelet or car stereo with which the phone was paired via Bluetooth. Often, connecting to such a device will remove the screen lock.
- 🗣️ Voice recognition: Try saying the command “Ok Google” or the phrase that you have configured to unlock with your voice.
As soon as the phone is unlocked with one of these methods, immediately go to the security settings (Settings → Security → Screen Lock) and disable the old password or set a new one. The Smart Lock feature is convenient, but it has its risks: if someone steals your watch or is in your “safe zone,” they will gain access to the phone.
⚠️ Attention: The Smart Lock feature will not work if the phone has been completely restarted. In this case, you will need to enter the main password at least once before activating smart unlock.
Why may Smart Lock not work?
Sometimes the function is disabled by the system automatically after a software update or if the device's battery is discharged to a critical level. It also stops working if you are out of range of the Bluetooth paired device for more than 10 minutes.
Resetting settings through the Recovery (Hard Reset) menu
If none of the software methods helped, the last radical option remains - completely resetting the device to factory settings through the menu Recovery. This process will delete all data from the phone's internal memory, including photos, contacts and applications, but will return the gadget to functionality.
To enter recovery mode, you must perform a specific combination of buttons, which depends on the model of your smartphone. Typically the phone should be turned off. Press and hold the power button and one of the volume buttons at the same time (usually down, but sometimes up) and hold them until the manufacturer's logo appears.
Once in the Recovery menu, control is carried out with the volume buttons (up/down), and the choice is confirmed with the power button. You need to find the item Wipe data/factory reset and confirm the action. After the process is completed, select the option Reboot system now.
☑️ Preparing to reset via Recovery
After rebooting, the phone will be like new. However, this is where protection FRP (Factory Reset Protection)comes into force. When setting up for the first time, the system will require you to enter the login and password for the Google account that was synchronized with the phone before the reset. This is done so that stolen phones cannot simply be reflashed and used.
| Manufacturer | Button combination | Input features |
|---|---|---|
| Samsung | Volume Up + Power (or Home) | On new models need to connect a USB cable to the PC |
| Xiaomi / Redmi | Volume Up + Power | The menu can be in Chinese or English |
| Huawei / Honor | Volume Up + Power | For older models with the Home button: Home + Volume Up + Power |
| Sony | Volume Down + Power | The indicator will turn blue, then you can release |
| LG | Volume Down + Power | When the logo appears, release and hold again |
Unlocking via USB and ADB debugging
This method is only suitable for advanced users and requires preliminary preparation. If before the blocking you managed to enable "USB debugging" in the menu for developers and authorized the computer, then you can try deleting the file with passwords through console commands.
You will need a computer with the driver installed. ADB (Android Debug Bridge). Connect your phone to your PC with a cable. Open a command prompt on your computer and enter the following instructions to delete the key file:
adb shell rm /data/system/gesture.key
If your phone used a digital PIN instead of a pattern, the command will be slightly different:
adb shell rm /data/system/password.key
After completing the command, reboot your device. In some cases, the lock screen will disappear and you can set a new passcode. However, on modern versions of Android with data encryption, this method often does not work, since without unlocking the screen, access to the file system for ADB is closed.
⚠️ Attention: Interfaces and paths to system files may change depending on the firmware version. What worked on Android 7.0 may not be available on Android 13 due to enhanced security protocols.
The ADB method is only effective if debugging was enabled BEFORE losing access, otherwise the computer simply will not see the phone in debugging mode.
Specific methods for different brands
Large smartphone manufacturers often implement their own security ecosystems that allow you to unlock your device even without access to Google. For example, owners Samsung can use the service Find My Mobile, which works similar to the solution from Google, but requires a Samsung account.
For users Xiaomi there is a service Mi Cloud. If device search and Mi account were enabled on your phone, you can go to the cloud service website, select your device and click the “Unlock” button. This will remove the password, but may require verification of identity.
Devices from LG had an unlock feature through the LG Mobile website, but support for many older services has been discontinued. Owners of such phones most often have to resort to a full reset. Always check your brand's official support sites as security policies are updated regularly.
Some Chinese brands offer unlocking through service centers upon presentation of a purchase receipt. This is a legal method that guarantees the safety of the device, although it requires time to visit the office.
What to do if the FRP protection has worked after a reset?
If after a Hard Reset the phone asks for an old Google account, but you don’t remember it, there are workarounds (FRP Bypass), which change with each security update. It is often easier to contact the service by providing purchase documents.
Prevention and creation of backups
In order not to encounter a similar problem in the future, it is recommended to set up data backup to the cloud. Services Google Photos, Google Drive and contact synchronization allow you to save important information even if you completely reset your phone.
Write down your password in a safe place: in a paper notebook, in a password manager on your computer, or send a message to yourself in the messenger, which is accessible from other devices. Using a biometric such as a fingerprint or facial scanner also makes access easier, but remember that you will still need to enter a digital code after a reboot.
Check Find My Device regularly to see if it's working. Make sure geolocation is enabled and your account is active. This is your main safety net in case you lose access to the gadget.
Will a factory reset delete files on the SD memory card?
Usually, a standard reset via the Recovery menu deletes data only from the phone's internal memory. The files on the SD memory card remain untouched unless you select the option to format the SD card separately. However, for security, it is better to remove the card before the procedure.
Is it possible to unlock a phone without the Internet?
No official methods through a Google account or search services, since data verification on the server is required. Without the Internet, you can only reset via Recovery, which will delete the data, or use a previously configured Smart Lock (if the conditions match).
How many times can you enter the wrong password?
Usually, after 5-10 unsuccessful attempts, the phone is locked for 30 seconds, then for 1 minute, 5 minutes, and so on. After a certain number of errors (often 15-20), the device may prompt you to reset the data or be blocked forever until the correct account is entered.
Will calling the phone help to remove the lock?
On very old versions of Android (2.3 and below) there was a bug when during an incoming call you could go to the menu and disable the password. On modern smartphones, this vulnerability has long been eliminated, and a call will not give access to the system.
What is FRP and why does it require an old account?
FRP (Factory Reset Protection) is an anti-theft system. It links the device to the last synced Google account. If someone steals your phone and tries to reset it, they won't be able to set up the phone again without the password for that account.