Forgetting the pattern lock on a Xiaomi smartphone is a bad situation, but it's fixable. PIN-A graphical pattern seems easy to remember, but this is often a cruel joke: users draw it automatically without thinking. When the screen is locked after several failed attempts, panic grows β especially if the phone has important data, photos or work documents.
Fortunately, the manufacturer has provided several ways to restore access, and the enthusiastic community has found workarounds for even complex cases. In this article, we will analyze all the current methods of unlocking, from official (using a Mi Account) to technical (via Fastboot or EDL).
If you're reading this article on a locked phone with another device, don't despair. Even if your smartphone requires you to enter the key after you reboot, the chances of success are high, and the main thing is to take your time and follow the instructions in order, starting with the safest methods.
1 Unlocking through Mi Account (official method)
The most reliable and recommended method for Xiaomi is to use a tied Mi Account, which works on all models, starting with the Redmi Note 3 and Mi 5, if you previously:
- πΉ I have logged into my phone account (even if itβs been a long time).
- πΉ Connected the device to the Internet (via Wi-Fi or mobile network).
- πΉ Do not turn off the function Find the device in the security settings.
To unlock the phone:
- On the lock screen, tap Forgot the pattern lock? (or Forgot pattern? on English firmware).
- Select Sign in via Mi Account.
- Enter your email/phone and password from your Mi Account.
- Confirm your login via SMS or email (if two-factor authentication is enabled).
- Create a new pattern lock or PIN-code.
β οΈ Warning: If your phone is not connected to the Internet, this method will not work. Try connecting to Wi-Fi via the Quick Settings Panel (swipe down from the top edge of the screen) or insert SIM-card.
On Xiaomi 12T, Redmi Note 11 and later, after 5 failed key attempts, the system may require you to wait 30 seconds before trying again, in which case wait for a timeout or restart the phone (press Power + Volume up for 10 seconds).
2.Use of the "Find Device" function (Mi Cloud)
If you're syncing with Mi Cloud on your phone, you can unlock it remotely via the web interface, and this is a good method, even if you don't remember the password for the pattern lock, but:
- π± The device must be on and connected to the Internet.
- π Battery charge: at least 20% (otherwise the phone may be switched off during the process).
- π Find the device must be activated in the settings (Settings) β Mi Account β Mi Cloud β Find the device).
Instructions:
- Go to i.mi.com from a computer or other phone.
- Sign in with the same Mi Account as on the locked device.
- In the Devices section, select your smartphone.
- Click Unlock the device (or Unlock).
- Confirm the action via SMS or email.
After that, the phone will unlock, but all data will remain in place β this method does not result in a reset, but on some firmware (for example, MIUI 14 for the global version), the function may be limited for security reasons.
π‘
If the phone doesn't show up in the device list on i.mi.com, check if geolocation and mobile data are enabled on the locked device. Sometimes it helps to reboot the phone (hold Power + Volume down until vibration).
3. Reset the pattern lock via Recovery Mode
If previous methods didnβt work, youβll need to use Recovery Mode, which will remove all data from your phone, so use it only as a last resort, and is suitable for most Xiaomi models, including the Redmi 9, Mi 10, POCO X3 and others.
Step-by-step:
- Turn off the phone (hold the power button for 10-15 seconds).
- Press the Power + Volume combination up until the Mi logo appears.
- From the Recovery menu, select the language (usually English or Chinese).
- Go to Wipe Data β Wipe All Data (use volume buttons for navigation, power for selection).
- Confirm the reset by selecting Confirm.
- Once completed, select Reboot to reboot.
The phone will boot as new, with factory settings, and you will need to go through the initial setup, including linking your Mi Account.
β οΈ Note: Some models (e.g. Xiaomi Mi) A1/A2/A3 With pure Android One, the Recovery menu may be different.In this case, look for Factory Reset or Erase All Data.
Turn off the phone (hold the power button)
Remember the button combination for your model
Connect the charger (the battery must be charged at least 30%)
Download the firmware for recovery (if you plan to reflash later)
-->
4. Unlock via Fastboot (for advanced users)
The method via Fastboot is suitable if:
- π§ You have access to a computer with drivers installed ADB/Fastboot.
- π₯ The phone's debugging on. USB (Settings β The phone. β Version. MIUI β 7 times tap to activate the developer mode, then turn on Debugging by USB).
- π You are ready for possible data loss (depending on the team).
Algorithm of action:
- Connect your phone to your PC through USB-cable.
- Press Power + Volume Down to Enter Fastboot Mode.
- On your computer, open the command line (Win + R β cmd) and type:
fastboot oem unlockIf the team doesn't work, try:
fastboot flashing unlockNewer models (Xiaomi 13, Redmi Note 12) may require the device to be linked to a Mi Account via the official bootloader unlock site.
Once the bootloader is unlocked, you can flash custom Recovery (e.g., TWRP) and delete a file with a pattern lock (/data/system/gesture.key or locksettings.db).
What is a breech and how to avoid it?
5. Remove gesture.key via ADB (if debugging is enabled)
If you have previously enabled USB debugging, you can delete the pattern lock file through ADB without losing data.This method works on MIUI 12/13/14 and requires:
- π₯οΈ Computer with installed ADB-driver.
- π USB-cable (preferably original).
- π± Battery-charged phone >50%.
Instructions:
- Connect the phone to the PC.
- Open the command line and enter:
adb shell
su
rm /data/system/gesture.keyIf the su command is not working (no root rights), try:
adb shell
cd /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';
.quitThen restart the phone and the pattern lock will reset.
β οΈ Attention: MIUI 14 The new path to the key file may be different. If the commands don't work, try to delete it. /data/system/locksettings.db or /data/system/locksettings.db-wal.
6. Contact the Xiaomi Service Center
If all independent attempts to unlock failed, you need to contact an authorized service center.
- π΅ Phones with a locked loader (Bootloader).
- π Devices that do not include debugging USB And no Mi Account tied up.
- π¦ Models running Android One (e.g. Mi) A3), where standard methods do not work.
What you need to unlock in the service:
- π Checks or warranty card (if the phone is guaranteed).
- π Passport of the owner (to confirm ownership).
- π³ Payment for the service (cost varies from 1000 to 3 000 rubles depending on the model).
Xiaomi service centers use official tools (Mi Flash Tool or EDL Mode) that allow you to unlock your phone without losing data 80% of the time, but some models (such as the Black Shark or POCO F4 GT) may require a complete reset.
π‘
The official service is the only legal way to unlock phones with a locked bootloader (Bootloader Locked), self-attempts to firmware in this case can lead to a complete loss of functionality of the device.
7. Alternative methods (at your own risk)
If the standard methods did not help, you can find βgrayβ methods of unlocking on the Internet, such as:
- π§ Firmware through EDL (Emergency loading mode with boxes (UFi Box, EasyJTAG).
- π‘ Exploiting vulnerabilities MIUI (For example, bypassing the lock via TalkBack on older versions).
- π Reverse firmware to an older version where vulnerabilities have not yet been patched.
These methods have serious risks:
| Method | Risks. | Chances of success |
|---|---|---|
| Firmware through EDL | Brick, loss of IMEI, cancellation of warranty | 70β90% |
| MIUI exploits | Does not work on new versions, can block the account | 30β50% |
| Firmware rollback | Data loss, possible errors during the update | 60β80% |
We do not recommend using these methods without experience, as they can lead to permanent damage to the phone. If you do decide, look for current guides on the 4PDA or XDA Developers forums, checking the publication date (methods older than 2022 will probably not work).