A forgotten pattern on an Android smartphone is a situation familiar to many. According to statistics, about 30% of users have at least once encountered their device being blocked due to a forgotten password or pattern. Fortunately, there are several official and unofficial unlocking methods that do not require special skills. In this article we will analyze all the current methods of removing a pattern key, from the simplest to the most radical, taking into account the characteristics of different versions of Android and smartphone models.
It is important to understand that some methods lead to complete data loss on the device. Therefore, if you have critical files stored on your phone, try methods to restore access without resetting first. Also keep in mind that manufacturers (for example Samsung, Xiaomi, Huawei) can modify standard Android procedures by adding their own protection mechanisms. We will note such nuances in the appropriate sections.
1. Unlocking via Google account (for Android 4.4 and older)
This is the easiest method that works on devices up to Android 9 Pie inclusive. On newer OS versions, the โForgot your pattern key?โ function. often absent due to tightened security policies. The method is suitable if the phone is connected to the Internet (via Wi-Fi or a mobile network) and you have access to the linked account Google.
Instructions:
- ๐น On the lock screen, enter the wrong pattern 5 times in a row.
- ๐น The message โForgot your pattern?โ will appear. or "Forgot your password?" Click on it.
- ๐น Enter the login and password for the account Googlethat was linked to the device.
- ๐น Follow the system instructions to create a new pattern key.
โ ๏ธ Attention: On some devices (for example Xiaomi with MIUI or Huawei with EMUI) after entering Google data, confirmation via SMS or backup email may be required. If two-factor authentication was enabled, but access to backup channels is lost, the method will not work.
If, after a successful login, the system prompts you to create a new PIN code instead of a pattern, do not be alarmed: this is standard behavior. You can return the pattern later in the security settings.
2. Resetting the pattern key via Recovery Mode (Hard Reset)
Method guaranteed to work on all devices, but it leads to complete deletion of data from the internal memory (photos, contacts, messages and installed applications). Use it if other methods have not helped or if there is no important information on your phone. The procedure differs depending on the smartphone model, but the general scheme is as follows:
How to log in Recovery Mode:
- ๐ง Turn off the phone (press and hold the power button for 10-15 seconds).
- ๐ง Press the combination buttons:
- For Samsung:
Volume up + Power + Home(orVolume up + Bixby + Poweron new models). - For Xiaomi/Redmi/Poco:
Volume up + Power. - For Google Pixel and most others:
Volume down + Powerthen selectRecovery Modevia the volume buttons.
- For Samsung:
- ๐ง Release the buttons when the brand logo or recovery menu appears.
Next in the menu Recovery:
- Use the volume buttons to navigate and the power button to select.
- Select item
Wipe data/factory reset(on some devices it may be calledClear eMMCorErase all data). - Confirm the action (usually item
YesorConfirm). - After resetting, select
Reboot system now.
| Brand | Combination for Recovery | Features |
|---|---|---|
| Samsung (2018โ2026) | Volume up + Bixby + Power |
On new models, confirmation may be required via Samsung Account after the reset. |
| Xiaomi/Redmi/Poco | Volume up + Power |
In MIUI Recovery in Chinese firmware, the menu may be in Chinese. |
| Google Pixel | Volume down + Power โ Recovery Mode |
After selection Wipe data you will need to confirm with your Google account password. |
| Huawei/Honor | Volume up + Power |
On some models, the reset is blocked without entering the password from Huawei ID. |
โ ๏ธ Attention: On devices with data encryption (enabled by default on Android 6.0+), after resetting via Recovery, the phone may require you to enter the old pattern key for decryption. If you do not remember it, the device will become inoperable (โbrickโ). In this case, only flashing will help. data-i="93">data encryption
โ๏ธ Preparing for Hard Reset
3. Using ADB (Android Debug Bridge) to reset the key
The method is suitable for users who have on their phone USB debugging mode is enabled (USB Debugging) and there is access to a computer with installed drivers ADB. This is a rare case, since debugging is usually disabled for security purposes, but if it is activated, you can delete the file with the pattern without losing data.
Step-by-step guide:
- Connect your phone to the computer via a USB cable.
- Open the command line (
cmdon Windows orTerminalon macOS/Linux). - Enter the commands in order:
adb shellsu
rm /data/system/gesture.key
rm /data/system/locksettings.db
rm /data/system/locksettings.db-wal
rm /data/system/locksettings.db-shm
reboot - After a reboot, the pattern will be reset, but the data will be saved.
If the command su does not work (no root access), try an alternative method:
adb shellcd /data/data/com.android.providers.settings/databases
sqlite3 settings.db
update system set value=0 where name='lock_pattern_autolock';
update system set value=0 where name='lockscreen.lockedoutpermanently';
.quit
reboot
โ ๏ธ Attention: On Android 10+ access to lock files via ADB is limited even with root access. Also, some manufacturers (for example, Samsung with Knox) block such manipulations at the kernel level.
What to do if ADB does not see the device?
Make sure that the drivers for your model are installed (download from the website). manufacturer). Check if debugging mode is enabled in the developer settings (Settings โ About phone โ Build number - press 7 times). Try a different USB cable or port.
4. Unlocking through manufacturer services (Find My Device) data-i="122">Large brands offer their own services for remote device management. For example,
Major brands offer their own services for remote device management. For example, Samsung has Find My Mobile, Xiaomi โ Mi Cloud, Google โ Find My Device. These tools allow you to unlock your phone remotely, but require:
- ๐ฑ A linked manufacturer account (Samsung Account, Mi Account etc.).
- ๐ฑ An active Internet connection on the phone.
- ๐ฑ The "Find device" function is enabled in the settings.
Example for Samsung Find My Mobile:
- Go to the website
findmymobile.samsung.comand log in. - Select a blocked device in the list.
- Click "Unlock" (
Unlock) and confirm the action. - The phone will be unlocked, but may require you to enter a PIN code from account Samsung.
For Google Find My Device:
- ๐ Go to
google.com/android/find. - ๐ Select the device and click "Lock device" (
Secure Device). - ๐ Set a temporary password (it will replace the pattern key).
โ ๏ธ Attention: After unlocking via Find My Device a temporary PIN code may remain on the phone. You will need to reset it manually in the security settings.
If you have contact synchronization enabled with Google, after unlocking they will be restored automatically. For photos, check your backups in Google Photos or the manufacturer's cloud.
5. Reset via Safe Mode (if the key was installed by a third-party application)
If the pattern key was installed not by the Android system, but by a third-party application (for example, AppLock, Norton App Lock), you can try to remove it via Safe Mode. In this mode, all third-party apps are disabled, which allows you to access the settings.
How to enter Safe Mode:
- Turn off the phone.
- Turn it on by holding the button
Volume downuntil the logo. - Release the button when "Safe Mode" appears at the bottom of the screen.
Next:
- ๐ก๏ธ Go to
Settings โ Applications. - ๐ก๏ธ Find the application that installed the lock (for example, AppLock).
- ๐ก๏ธ Click "Uninstall" or "Stop".
- ๐ก๏ธ Restart your phone in normal mode.
On some devices (for example, Samsung with One UI) in Safe Mode you cannot delete applications without entering a password. In this case, only resetting via Recovery will help.
6. Alternative methods (for advanced users)
If the standard methods do not work, you can try more complex solutions. They require technical skills and can lead to loss of warranty or device malfunction.
Methods for experienced users:
- ๐ง Flashing via Odin/SP Flash Tool: Suitable for Samsung (Odin) or Mediatekdevices (SP Flash Tool). Requires downloading official firmware and drivers.
- ๐ง Using TWRP: Custom recovery allows you to delete lock files without a full reset. An unlocked bootloader is required.
- ๐ง Exploitation of vulnerabilities: On older versions. Android (up to 7.0) there are bugs that allow you to bypass blocking through an emergency call or other loopholes. On new versions they are closed.
Example commands for deleting a key via TWRP:
adb shellmount /data
rm /data/system/locksettings.db*
reboot
โ ๏ธ Attention: Flashing via Unofficial tools (for example, for Odin For Samsung) reset the counter, which will void the warranty. On devices with a locked bootloader (for example, for Knox, which will void the warranty. On devices with a locked bootloader (for example, Xiaomi With Mi Accounts) may be required official unlocking.
Before using alternative methods, check whether you will lose the warranty. Official service centers may refuse repairs after unauthorized manipulations with the firmware.
Frequently asked questions
Is it possible to unlock the phone without losing it? data?
Yes, but only if:
- You have USB debugging enabled (
ADB), - Or the phone is synchronized with the manufacturer's account (Samsung, Xiaomi etc.),
- Or the pattern is installed by a third-party application (can be deleted in
Safe Mode).
In all other cases, the data will be lost.
What to do if, after resetting, the phone asks for the old pattern key?
This means that the device was turned on data encryption. Without the old key, it is impossible to unlock the phone - a flashing will be required via Odin, SP Flash Tool or Fastboot (depending on the model).
Does the method work with a Google account on Android 11/12/13?
No. c Android 10, the "Forgot the pattern key?" function has been removed for security reasons. On new versions of the OS, unlocking is only possible through Find My Device (with data loss) or manufacturer services.
Is it possible to bypass the pattern key via a call or SMS?
On Android 5.0โ7.0 there were vulnerabilities that allowed you to bypass the blocking through an emergency call or special SMS. On modern versions (8.0+), these bugs are closed. Do not trust videos on YouTube that promise โsecret codesโ - this is a scam.
How to avoid data loss in the future?
Recommendations:
- ๐ Enable backup in
Settings โ System โ Backup(Google Drive). - ๐ Use Smart Lock to automatically unlock in safe places (for example, at home).
- ๐ Write the pattern key in the password manager (Google Password Manager, 1Password).
- ๐ Set up remote unlocking via Find My Device or the manufacturer's service.