The lock screen rejects entering the usual sequence of connections, instantly blocking access to contacts, photos and banking applications, which turns the smartphone into an inaccessible device. Although pattern key was conceived as a convenient replacement for complex passwords, an error in reproducing the pattern due to a memory failure or haste leads to a complete loss of control over the gadget.
There are several proven ways to restore access to the system, but their effectiveness directly depends on the version. Android, the presence of an Internet connection and pre-configuration of the device. Modern versions of the operating system, such as Android 14 or Android 15, have significantly complicated the process of bypassing protection for the safety of user data.
In this guide, we will look at all the current methods: from standard recovery functions to advanced tools like ADB. It is important to understand that not every method guarantees the safety of files, so the choice of strategy must be approached carefully.
Standard recovery methods via a Google account
The most humane method, which allows you to save all data on the device, is available on versions Android up to 5.0 inclusive, as well as on some custom firmware later versions. If after five unsuccessful entry attempts the “Forgot your key?” button appears on the screen. or “Forgot your pattern key?”, you’re in luck.
Click on this button and the system will prompt you to enter the login and password for your Google accountthat was linked to your smartphone. After successful authorization, the device will offer to set a new locking method or disable it completely. This method only works with an active connection to the network Wi-Fi or mobile data.
If the button does not appear automatically, try entering the wrong key several times in a row. On some models Samsung or Xiaomi this option may be hidden in the emergency call menu, which can be accessed by pressing the "Emergency call" button on the lock screen.
⚠️ Attention: On modern versions Android (starting from 6.0 and above), Google has removed the ability to reset the key through your account directly from the lock screen for security reasons. If you have a new system, this method most likely will not work.
Make sure you enter the same email address that was the primary one on the device. Sometimes users confuse accounts, especially if there are several of them. Entering incorrect data may lead to temporary blocking of the recovery option.
Using the Find My Device function
Service Find My Device from Google is a powerful tool not only for finding a lost phone, but also for remotely managing the lock. For this method to work, the device must be turned on, connected to the Internet and have the geolocation function activated.
Log in from your computer or other smartphone to the official website of the service and log in using the same Google account. The system will detect the location of your device and offer three actions: call, block or erase data. We are interested in the blocking function.
Select the “Lock device” option. You will be prompted to enter a new temporary password. After confirming the actions, this password will replace your forgotten pattern. Enter the new code on the screen of your locked smartphone to gain access.
If the “Lock” function does not change the key, try the “Wipe device” option. This will delete all data, including the key, but the phone will be like new.
Manufacturers also have similar services. For example, owners Samsung can use the service Find My Mobilethat allows you to unlock the screen without losing data if an account has been created in advance Samsung Account. For devices Xiaomi there is a service Mi Cloud with a remote unlock function.
| Manufacturer | Service name | Requirements | Data saving |
|---|---|---|---|
| Google (Any brand) | Find My Device | Internet, GPS | Reset only (deletion) |
| Samsung | Find My Mobile | Samsung account | Yes (full saving) |
| Xiaomi / Redmi | Mi Cloud | Account Mi | Depends on the MIUI version |
| Huawei / Honor | Find My Phone | Huawei ID account | Partial / Reset |
Reset via Recovery mode (Hard Reset)
If software methods do not help, there is a radical but effective method - reset to factory settings via menu Recovery. This method deletes absolutely all user data: photos, contacts, applications and settings. Use it only as a last resort.
To enter recovery mode, you must completely turn off your smartphone. Then hold down a certain combination of buttons. Most often this is the power button and the volume down button, or the power button and volume up. Combinations may vary depending on the brand.
In the menu that appears, navigation is carried out using the volume buttons (up/down), and the selection 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 Reboot system now.
☑️ Preparing for Hard Reset
⚠️ Attention: After resetting the settings on devices with Android 5.1 and higher, protection FRP (Factory Reset Protection)will work. You will definitely need to enter the username and password for the Google account that was synchronized with the phone before the reset. Without this data, the phone will remain locked.
Some manufacturers hide the Recovery menu or modify it. For example, on devices Sony or LG the interface may look different, but the essence of the operation remains the same. If standard combinations do not work, look for specific instructions for your model on the Internet.
Unlocking via USB debugging (ADB)
This method is suitable for advanced users and requires preliminary preparation. For the key reset to work via ADB (Android Debug Bridge), “USB Debugging” must be enabled on the phone in the “For Developers” menu before locking.
Connect the locked smartphone to the computer via a USB cable. Make sure that the device drivers and platform Android SDK Platform-Toolsare installed on your PC. Open a command line or terminal in the ADB tools folder.
Enter the command to delete the file that stores the pattern information. The path to this file is systemic, so superuser rights are required, which are often available in recovery mode or on rooted devices.
adb shell rm /data/system/gesture.key
Sometimes you also need to delete the file locksettings.db. After running the command, reboot your device. On the lock screen, you can enter any sequence of lines and the phone will unlock. After that, immediately set a new strong password.
What to do if ADB does not see the device?
If the adb devices command does not show your phone (unauthorized or empty status), then USB debugging was not enabled before blocking. In this case, the method will not work, and you will have to use Hard Reset.
The effectiveness of the method decreases with each new version Android. Since Android 10, access to system files via ADB without an unlocked screen is often blocked by SELinux security policies. However, on older devices, this is one of the best ways to save data.
Service codes and emergency call
There is a myth that certain service codes entered through the emergency panel can reset the settings. Indeed, the code ##7780## on some older models Samsung i LG initiated a factory reset without deleting media files, but in modern firmware this function is disabled or requires confirmation, which cannot be given on the locked screen.
However, the emergency call screen may be useful for others goals. If your phone does not have a SIM card installed, but has Wi-Fi, you can try to call up the engineering menu. Try entering ##4636##. On some devices, this opens a testing menu, from where you can theoretically go to settings, but most often access is blocked.
Be careful with codes found on the Internet. Some of them, for example *2767*3855#, perform an instant hard reset without confirmation, which will lead to data loss. Use them only if other methods have been exhausted and the data is not important.
Service codes are unstable on new versions of Android. Don't count on them as your primary solution to the problem.
Phone owners Samsung can try entering the code #0# to enter test mode. Although this will not directly remove the lock, it will confirm that the screen sensor is working, which is important if the problem is caused by “dead zones” on the display, due to which the key is not recognized.
Contacting a service center and proof of ownership
If none of the software methods help, the last option remains - contacting an authorized service center. Specialists have the equipment to flash the device at the software level, which is guaranteed to remove the lock.
To complete this procedure, you will be required to prove ownership of the device. Usually this is a cash receipt, warranty card or box containing an IMEI code that matches the code on the phone. Without these, document masters will refuse to remove the lock.
The cost of the service varies depending on the model and complexity of the protection. On flagship models with encrypted data storage, the cost may be higher, since specific software is required to bypass the encryption.
⚠️ Attention: Never contact dubious “masters” in transitions or unverified services on the Internet that promise unlocking by IMEI for money. In 99% of cases, these are scammers who will simply take an advance payment and disappear.
Before visiting the service, be sure to remove the SIM card and memory card from your phone, if any. This will protect your personal contacts and files from prying eyes during diagnostics and repairs.
Prevention and advice for the future
To prevent the situation with a forgotten key from happening again, it is worth setting up alternative unlocking methods in advance. Biometric data, such as a fingerprint or facial scanner, is faster and cannot be forgotten. Set them up in the section Settings → Security → Screen lock.
It is also recommended to write down the pattern or PIN code in a safe place: in a paper notepad that is kept at home, or in a password manager on your computer. Human memory is not perfect, especially when we use several different codes for different applications.
Regularly back up important data to cloud storage services such as Google Drive or Yandex.Disk. If you do have to do a Hard Reset, you can quickly restore contacts, photos and application settings.
Use smart locks (Smart Lock). They allow you to keep your phone unlocked in safe places, such as at home or when connected to a Bluetooth headset in the car.
Remember that the security of your device is in your hands. A complex key protects against data theft, but a combination that is too complex increases the risk that you won’t be able to remember it yourself. Find a balance between reliability and memorability.
Frequently asked questions (FAQ)
Is it possible to unlock a phone without losing data on Android 12?
Unfortunately, on modern versions of Android (10, 11, 12 and higher), it is almost impossible to unlock a phone without losing data if you forgot the key and did not set up alternative methods in advance (Smart Lock, fingerprint). The only chance is service centers with paid special equipment, but they do not provide a 100% guarantee of data preservation due to encryption.
What is FRP and why does it require an account after a reset?
FRP (Factory Reset Protection) is an anti-theft system. If the phone was reset to factory settings not through the settings menu (but through the Recovery buttons), the system considers this to be the action of an attacker. To activate the phone after a reset, you need to enter the password for the Google account that was on it previously.
Will apps like Dr.Fone or Tenorshare help?
Most of these apps work on the same principles as the methods described above (ADB, Recovery). On new phones they often only offer a hard data reset. There is no wonderful software that can crack encryption for $5 without losing files.
Is it possible to unlock a phone if the battery is completely dead?
No. For any manipulations with unlocking, entering Recovery or working with ADB, the phone must have a battery charge. Connect it to the charger and wait at least 15-20 minutes before attempting to unlock.
Does resetting the key delete files on the SD memory card?
A normal factory reset does not affect files on the external SD memory card. However, if you selected the "Clear all" option, including the internal SD card emulation, data may be lost. It is best to physically remove the card before the reset procedures.