Forgetting a pattern lock on Xiaomi is a frustrating but fixable situation. Unlike the iPhone, where unlocking without an Apple ID is almost impossible, Redmi, POCO or Mi smartphones offer several official and unofficial ways to regain access. The main thing is not to panic or try to enter combinations at random: after 5-10 failed attempts, the system can lock the device for 30 seconds, a minute or even require a hard reset.
In this article, we will discuss 7 proven methods that work on most Xiaomi models (including Redmi Note 10/11/12, POCO X3/X4/X5, Mi 11/12/13 and others). Some of them will save your data, some will require a factory reset. Choose the appropriate option depending on whether the phone is tied to the Mi Account, whether debugging is enabled by USB and whether you have a backup.
1 Unlocking through Mi Account (official method)
The easiest and safest method is to use a Xiaomi account, which works if:
- πΉ The phone is connected to the Internet (Wi-Fi or mobile network).
- πΉ Remember the username and password from Mi Account.
- πΉ The device is not disabled function Find Device (Find Device).
After 5 failed attempts to enter the pattern lock, the button Forgot the password? or Forgot pattern? will appear on the screen. Click on it and follow the instructions:
- Enter the email or phone number associated with the Mi Account.
- Confirm your identity via SMS or email (the code will be sent to the mail / phone).
- Create a new pattern lock or PIN-code.
If the buttons Forgot your password? no, try to enter the key incorrectly 2-3 times - it should appear. Some firmware (MIUI 13/14) may instead have the words "Restore access".
π‘
If you do not remember the password from Mi Account, restore it through the official website account.xiaomi.com. Use the backup email or phone number specified during registration.
2. reset the pattern lock via ADB (without loss of data)
The method is suitable if the phone is enabled debugging by USB (USB Debugging) and access to a computer.This is one of the few ways to unlock Xiaomi without a data reset, but it requires pre-preparation.
You'll need:
- π₯οΈ Computer with installed Xiaomi drivers and tool ADB (Android Debug Bridge).
- π USB-cable (preferably original).
- βοΈ Included debugging by USB developer-setting.
Instructions:
- Connect the phone to the computer.
- Open the command prompt (Windows) or terminal (macOS/Linux) in the folder with ADB.
- Enter the command to check the connection: adb devices If the device is determined, go further.
- Delete the file with the pattern lock: adb shell rm /data/system/gesture.key
- Reboot your phone: adb reboot
Once you reboot, the pattern lock will reset, and you can ask for a new one. If the command doesn't work, try the alternative:
adb shell rm /data/system/locksettings.db
adb shell rm /data/system/locksettings.db-wal
adb shell rm /data/system/locksettings.db-shmWhat if the ADB canβt see the device?
3. Unlocking through Recovery Mode (with loss of data)
If USB debugging is disabled and Mi Account is not tied, it will be hard to reset via Recovery Mode, which will delete all data on the phone, including photos, contacts and apps, but will return access to the device.
Instructions for Xiaomi:
- Turn off the phone (press the power button for 10-15 seconds).
- Press the Power Button + Volume combination up and hold for 10-15 seconds 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 button for confirmation).
- Confirm the reset, wait until it is completed and restart the phone (Reboot).
π Backup important data (if your phone is not already locked).
π Charge your phone at least 50% (reset can take 10 to 30 minutes).
π Prepare data from Mi Account β after the reset, authorization will be required.
π Make sure you have one. SIM-map or Wi-Fi access to set up.
-->
On some models (POCO X3, Redmi Note 9), instead of Wipe All Data, there may be Factory Reset, and after reset, the phone will return to factory settings, and you will have to reconfigure it.
Recovery|Mi Account|ADB| Contacted the service center |Never blocked
-->
4.Use Fastboot to unlock (advanced method)
If Recovery Mode is not available or the phone is not responsive to buttons, you can try unlocking via Fastboot.This method requires a computer and basic command line knowledge.
You'll need:
- π₯οΈ Computer with Mi Flash Tool and Xiaomi drivers installed.
- π USB-cable.
- π± Phone with unlocked bootloader (if previously unlocked Bootloader).
Instructions:
- Turn off the phone.
- Press the Power button + Volume down to log into Fastboot Mode.
- Connect the phone to the computer.
- Open the command line and check the connection: fastboot devices
- Unlock the bootloader (if not unlocked): fastboot oem unlock Attention! This will delete all data.
- Swipe the stock firmware through the Mi Flash Tool (you can download it on the official website).
π‘
Unlocking the bootloader via Fastboot erases all data on the phone and resets the settings to factory settings, a method that is only a last resort if other methods have failed.
On newer models (Xiaomi 13, Redmi Note 12), unlocking Bootloader may require a binding to Mi Account and waiting 7-15 days (Xiaomiβs security policy).
5 Unlocking through Xiaomi Service Center
If you don't succeed on your own, contact the official Xiaomi service center, which is the most reliable, but also the longest way.
- π Document confirming the purchase (check, warranty card).
- π Data from Mi Account if the phone is tied.
- π³ Payment for services (on average 1000-3000 rubles, depending on the model and region).
Service centers use special equipment to reset the lock without losing data (in some cases), however, in practice, most often offer a complete reset with flashing.
The addresses of official Xiaomi service centers in Russia can be found on the website mi.com/ru/service. Before visiting, check by phone whether they are engaged in unlocking the pattern lock β not all centers provide this service.
π‘
If the phone is warranty-free, don't try to unlock it yourself via Fastboot or Recovery.This could result in a loss of warranty.
6. Alternative methods (for experienced users)
If standard methods don't work, you can try less obvious ones, they require technical skills and they don't guarantee 100% results.
Remove gesture.key via TWRP
If the phone has a custom TWRP recap, you can manually delete the file with the pattern lock:
- Enter TWRP Recovery (usually Power + Volume Up).
- Select Advanced β File Manager.
- Go to /data/system/ and delete files: gesture.key locksettings.db locksettings.db-wal locksettings.db-shm
Reboot the phone.
6.2.Use of exploit to bypass locking
Some older models (Redmi 4X, Redmi Note 5) have vulnerabilities that allow you to bypass the pattern lock through special applications (for example, Mi Account Bypass Tool).
- β οΈ These methods often contain viruses or spyware.
- β οΈ They may not work on new versions. MIUI.
- β οΈ The risk of βbrickingβ the phone (turning into a βbrick").
List of Xiaomi models with known vulnerabilities to bypass locks
7.How to avoid blocking in the future
To avoid the problem of a forgotten pattern lock, follow the simple rules:
- π Link Mi Account to your phone and remember the login details.
- π± Enable Smart Lock in your security settings β this will allow you to unlock your phone in trusted places (home, work).
- π Regularly back up through Settings β System and device β Backup.
- π Write down a pattern lock or PIN-code in a secure location (for example, in a password manager).
- π§ Put the debugging on. USB (Settings β For developers, this will help unlock the phone through ADB.
It is also useful to configure emergency information on the lock screen. To do this, go to Settings β Screen Lock β Emergency Information and specify an alternative method of communication (for example, a second phone number).
| Unlocking method | Mi Account required | PC required | Data retained | Difficulty |
|---|---|---|---|---|
| Through the Mi Account. | β Yes. | β No. | β Yes. | β |
| ADB (debugging included) | β No. | β Yes. | β Yes. | ββ |
| Recovery Mode | β No. | β No. | β No. | β |
| Fastboot | β No, but it may be necessary) | β Yes. | β No. | βββ |
| Service centre | β Yes, perhaps) | β No. | β Depends on the case. | ββ |
π‘
The most reliable ways are unlocking through Mi Account and ADB. If they are not available, you can reset via Recovery or contact the service.
FAQ: Frequent questions about unlocking Xiaomi
π Can you unlock Xiaomi without losing data if you debug it? USB switched off?
π± Why After Recovery, Your Phone Asks for an Old pattern lock?
β³ How long does it take to unlock through Mi Account?
π» Can you unlock Xiaomi through Googleβs Find My Device?
π§ What to do if the phone does not turn on after unlocking?
If none of the methods worked, leave your phone off for 24 hours - sometimes it resets the temporary lock after multiple failed key attempts.