The forgotten pattern lock on Xiaomi's smartphone is a situation that thousands of users face every day. PIN-If you have a code or a password, the lock pattern seems more convenient until you have a problem with playing it. Unfortunately, the manufacturer did not provide a universal button "Forgot the key?" on the lock screen, but this does not mean that the device has turned into a "brickΒ».
In this article, weβll look at all the current ways to unlock, from official methods using a Mi Account to technical workarounds for devices without a tied profile. Importantly, the effectiveness of the method depends on the smartphone model (Redmi Note 12, POCO X5, Mi 11, etc.), the version of MIUI and the availability of root rights. Some solutions will save your data, others will require a complete reset β we honestly warn about the risks in each section.
Before you start, check:
- π Do you have access to a Mi Account linked to your phone?
- π± Is the device enabled debugging by USB (Section "For DevelopersΒ»)?
- π Is there a computer with installed Xiaomi drivers?
If the answer to one of the questions is yes, the chances of successfully unlocking without losing data are greatly increased, starting with the safest methods.
1 Unlocking through Mi Account (official method)
This is the first and most reliable method if you have previously linked your device to your Mi Account, which works on all Xiaomi, Redmi and POCO models with MIUI 10 and later, including the latest updates in 2026, and the main condition is that the phone must be connected to the Internet (via Wi-Fi or mobile network).
Algorithm of action:
- On the lock screen, enter the wrong pattern lock 5 times in a row.
- The message will appear βForgot the password?β β click on it.
- Enter the username and password from your Mi Account (the same as used in the Mi Cloud app).
- Follow the system instructions to create a new lock key.
β οΈ Note: If you changed your Mi Account password after your last phone sync, this method wonβt work, and account lock may be temporarily unavailable if the device has been overflashed by an unofficial firmware.
What if you don't remember the Mi Account? Restore your account.xiaomi.com using a linked email or phone number. If you don't recover your account, move to the next method.
2. Reset the pattern lock via Recovery Mode (without loss of data)
This method is suitable for devices on which debugging is enabled USB set up ADB-It allows you to delete a file with a lock key (gesture.key or password.key) without completely resetting the settings. MIUI.
Step-by-step:
- Connect your phone to your computer through the original USB-cable.
- Download the device to Fastboot mode: Turn off the smartphone, then press the Power Button + Volume down for 10 seconds.
- On the computer, open the command line (Win) + R β Type cmd and execute the commands: adb shell rm /data/system/gesture.key
- Reboot your phone with the reboot command.
Install Xiaomi drivers on PC|Enable debugging on USB phone-on|Download ADB Tools (Platform Tools)|Prepare original USB-cable-->
β οΈ Attention: On devices with MIUI 12 and later, this method may not work because of the enhanced protection of the system partition:
adb shell
rm /data/system/locksettings.db
rm /data/system/locksettings.db-wal
rm /data/system/locksettings.db-shmCritical detail: if USB debugging has been disabled, this method will not work, in which case proceed to reset via Recovery.
3 Hard Reset via Recovery Mode
If previous methods failed, it will delete all data from the device, including photos, contacts and apps, which works on all Xiaomi models, regardless of MIUI version or account status.
Resetting instructions:
- Turn off the phone.
- Press the Power Button + Volume up until the Mi logo appears.
- From the Recovery menu, select the language (usually English by default).
- Go to Wipe Data β Wipe All Data and confirm the action.
- After reset, select Reboot to reboot.
| Xiaomi model | Combination for Recovery | Does the reset support data loss without data loss |
|---|---|---|
| Redmi Note 10/11/12 | Food + Volume up | No (full reset only) |
| POCO X3/X4/X5 | Food + Volume up | Yes (via ADB, if there was debugging) |
| Mi 11/12/13 | Food + Volume up | No (MIUI 13+ defense) |
| Redmi 9/9A/9C | Food + Volume up | Yes (via gesture.key removal) |
β οΈ Attention: On devices with MIUI 14 and later, after a hard reset, you may need to enter data from Mi Account, which was previously tied. If you do not remember the username / password, the phone will turn into a βbrickβ β this is protection against theft (Mi Cloud Lock).
π‘
Remove before resetting SIM-card and memory card, if installed, which will speed up the process and eliminate random formatting of the external drive.
4 Unlocking through Xiaomi Service Centers
If you don't succeed, go to the official service center, Xiaomi has a program to support users who have lost access to the device.
- π Passport or other identity document.
- π Check or warranty card (if the phone is guaranteed).
- π Data from the Mi Account linked to the device (if you remember).
The cost of the service varies from 500 to 2000 rubles depending on the model and region, and in some cases, service engineers can unlock the phone without losing data using Xiaomiβs internal tools.
πΉ How to Find the Nearest Service Center?
- Go to mi.com/global/service/location.
- Choose a country and a city.
- Filter the centers by the type of service "Unlock".
What if the phone is bought from hands and tied to someone elseβs Mi Account?
5. Alternative methods (for advanced users)
If the standard methods don't work, you can try informal solutions, but they require technical knowledge and carry risks.
Method 1: Fastboot firmware
Suitable for devices with unlocked bootloader.
- π₯οΈ Computer with Mi Flash Tool and drivers installed.
- π₯ Official firmware for your model (download from the official website).
- π§ Unlocked bootloader (if not, unlock through Mi Unlock Tool).
Firmware process:
- Download the phone to Fastboot (Power + Volume Down) mode.
- Connect to your PC and start the Mi Flash Tool.
- Select the downloaded firmware and press Flash.
- Wait for completion (5-10 minutes).
Method 2: Using the EDL mode
Extreme Download Mode (EDL) is a firmware emergency mode that bypasses all locks.
- π Special cable (EDL cable) or circuits of the circuit board.
- π» QFil or Mi Flash Pro Programs.
- π Firmware file in.mbn format.
β οΈ Attention: Incorrect actions in the mode EDL This method is recommended only for experienced users or specialists in service centers.
π‘
Firmware via Fastboot or EDL deletes all data from the device, including Mi Account. After the procedure, the phone will be like new, but loses the warranty if it was.
6.How to avoid pattern lock problems in the future
To avoid getting blocked again, follow the simple rules:
- π Link your phone to your Mi Account and remember the login details.
- π± Put the debugging on. USB in the developer settings (Settings) β The phone. β Version. MIUI β Press 7 times, then return to the Additional Settings β For developers).
- π Regularly back up through Settings β System and device β Backup.
- π Write down the pattern lock in a secure location (for example, in a password manager).
It's also useful to know:
- On Xiaomi MIUI 13+ can be set up for backup PIN-code to unlock the screen (in lock settings).
- When using a Smart Lock (location or device unlock), the risk of forgetting the key is reduced.
If you often forget passwords, consider alternative methods of blocking:
- π Fingerprint scanner (available on most Xiaomi models).
- π€ Facial recognition (works even in the dark on IR camera devices).