How to Undo the pattern lock on Xiaomi Phone: The Complete 2026 Guide

Forgot the pattern lock combination on Xiaomi and can't unlock your phone? this problem is familiar to many Redmi users, POCO Or Mi. Graphic password is a convenient alternative PIN-And if you forget it, you get blocked from accessing the device, and fortunately, there are several formal and informal ways to reset the pattern lock without losing data or with minimal consequences.

In this article, we will analyze all current methods of unlocking: from recovery through the Mi Account to using the Recovery mode and the use of the system. ADB-It's important to remember that the efficiency of the method depends on the model of the phone, the version. MIUI And backups, for example, on new devices with MIUI 14+ Some life hacks have stopped working, but alternative solutions have appeared.

If you're looking for a way to get around the lock without resetting, you can immediately go to the Xiaomi account section. If your phone isn't connected to the Internet or you don't remember the Mi Account data, you'll have to consider hard reset or Fastboot. Don't worry, we'll explain each step in detail, including the possible risks and nuances for specific models.

Why is Xiaomiโ€™s phone locked with a pattern lock?

A pattern lock is not just a lock screen decoration, it's a full-fledged security mechanism, and in MIUI, it's tied to system encryption, so getting the input wrong can have serious consequences.

  • ๐Ÿ”ข Repeated mistyping: After 5-10 failed attempts, the system can lock the device for 30 seconds, then increase the waiting time to 5 minutes.
  • ๐Ÿ“ฑ Resetting without turning off protection: If you reset your phone via Recovery but didnโ€™t disable the pattern lock in advance, it may need to be rebooted again after you reboot.
  • ๐Ÿ”„ Update MIUI Error-prone: Sometimes, after updating the firmware, the system asks for an old graphical password, even if you have changed it.
  • ๐Ÿ‘ถ Children or Accidental Pressing: A frequent cause is a child or pet accidentally activating the lock.

On devices with MIUI 12 and later, Factory Reset Protection (FRP) has been added, which means that even after a Recovery reset, the phone may require you to enter data from the Mi Account that was previously linked, and if you don't remember the username/password, unlocking becomes more difficult.

โš ๏ธ Note: Some models (e.g. Redmi Note 10 Pro) POCO X3 Pro) after 30 failed attempts to enter the pattern lock, the phone can automatically erase all data (Auto-Wipe function.

๐Ÿ“Š What kind of Xiaomi phone is you?
Redmi (Note, K-series)
POCO (F, X, M-series)
Mi (11, 12, 13)
Black Shark
Other

Method 1: Unlocking through Mi Account (without data loss)

The safest method is to use a Xiaomi account, which works if:

  • ๐Ÿ“ถ The phone is connected to the Internet (Wi-Fi or mobile data).
  • ๐Ÿ”‘ Remember the username and password from Mi Account.
  • ๐Ÿ“ฑ The device is enabled synchronization with the account.

Instructions:

  1. On the lock screen, enter the wrong pattern lock 5 times in a row.
  2. The message will appear โ€œForgot the password?โ€ โ€“ click on it.
  3. Select "Unblock with Mi Account".
  4. Enter your email/phone and password from your Xiaomi account.
  5. Confirm unlocking via SMS or email (if two-factor authentication is enabled).

โš ๏ธ Note: If you have previously disabled sync with Mi Account in settings (Settings) โ†’ Accounts. โ†’ Mi Account โ†’ Synchronization, this way won't work, and also on some firmware (e.g. Global). ROM for POCO F3) Additional confirmation may be required through SMS.

Check your internet connection|Make sure you remember the information from your Mi Account.|Have access to email/telephone 2FA|Charge your phone at least to the minimum. 30%-->

If your phone is not connected to the network, try:

  • ๐Ÿ”Œ Connect to Wi-Fi via the Quick Settings Panel (if available on the Lock screen).
  • ๐Ÿ“ถ Insert SIM-card with active tariff (mobile data can be turned on automatically).
What if you donโ€™t get an SMS with a code?
If the SMS with the confirmation code does not come, check: 1. Phone balance is probably not enough funds for SMS. 2. Account region - if the account is registered in another region (for example, China), SMS may not come to the Russian number. 3. Alternative methods - try to get the code through email or backup phone (if it is tied). 4. Problems on the Xiaomi side - sometimes SMS servers fail. Wait 10-15 minutes and request the code again.

Method 2: Reset the pattern lock via Recovery (with loss of data)

If you can't unlock your Mi Account, you'll have a hard reset, which will delete all the data on your phone, including photos, contacts and apps, and only use it as a last resort!

Step-by-step:

  1. Turn off the phone (press the power button for 10 seconds).
  2. Press the button combination to enter Recovery Mode: ๐Ÿ“ฑ For most models: Power button + Loudness up. ๐ŸŽฎ For Black Shark: The Power Button + Loudness up + Loudness down.

Recovery

Wipe Data โ†’ Wipe All Data

Factory Reset

Confirm the action and wait for the reset to be completed.

Reboot

โš ๏ธ Attention: On devices with MIUI 13+ After the reset, you may need to enter data from the Mi Account that was previously linked (FRP-If you don't remember your username/password, the phone will turn into a brick. FRP.

๐Ÿ“Œ Important: On some models (e.g. Redmi) 9A or POCO M3) After resetting through Recovery, the pattern lock can be saved, in which case you will have to repeat the procedure or use the method. ADB.

| Method | Data loss | Mi Account | Required | Works without internet | Difficulty |

|----------------------|---------------|----------------------|------------------------|------------|

| Through the Mi Account. | No. | Yes. | No. | โญ |

| Recovery Mode | Yes. | Maybe (FRP) | Yes. | โญโญ |

| ADB | No. | No. | Yes. | โญโญโญ |

| Fastboot | Yes. | No. | Yes. | โญโญโญโญ |

| Service centre | Maybe. | No. | Yes. | โญโญโญโญโญ |

-->

Method 3: Delete the pattern lock via ADB (for advanced)

If you have debugging enabled USB (USB Debugging) and the phone is recognized by the computer, you can delete the pattern lock through ADB (Android Debug Bridge: This method saves data, but requires preparation.

What you need:

  • ๐Ÿ–ฅ๏ธ Computer with Windows/Linux/macOS.
  • ๐Ÿ”Œ USB-cable (preferably original).
  • ๐Ÿ› ๏ธ Installed drivers Xiaomi and ADB Tools.

Instructions:

  1. Connect the phone to the computer.
  2. Open the command prompt (cmd on Windows or Terminal on macOS/Linux).
  3. Enter the command to check the connection: adb devices If the phone appears in the list, go further.
  4. Delete the file with the pattern lock: adb shell rm /data/system/gesture.key or for newer versions of Android: adb shell rm /data/system/locksettings.db
  5. Reboot your phone: adb reboot

โš ๏ธ Attention: MIUI 14 and later, this method may not work because of the changed key storage structure:

adb shell su -c "rm /data/system/locksettings.db"

(It requires root rights, which are not available on all devices.)

If ADB does not see the device:

  • ๐Ÿ”„ Reinstall Xiaomi drivers.
  • ๐Ÿ”Œ Try another one. USB-cable.
  • ๐Ÿ“ฑ Turn on Debugging. USB Developer settings (if the phone is not already locked).

๐Ÿ’ก

If you donโ€™t have access to your computer but have another Android smartphone, you can try using the app. ADB AppControl from Google Play, which allows you to send ADB-commands directly from the phone OTG-cable.

Method 4: Bypassing FRP-blocking after reset

If after resetting via Recovery, the phone requires data from a Mi Account you don't remember, it's called FRP-There are a number of ways to get around it, but they require technical skills.

๐Ÿ”ง Method 1: Through the test menu (for the MIUI 12 and below)

  1. On the Mi Account Enter screen, click "Emergency Call".
  2. Dial ##4636## and the test menu will open.
  3. Go to Usage Statistics and select Settings.
  4. In the settings, turn off Factory Reset Protection (if there is one).
  5. Go back and restart the phone.

๐Ÿ”ง Method 2: Fastboot (requires an unlocked bootloader)

  • ๐Ÿ–ฅ๏ธ Install the Mi Flash Tool.
  • ๐Ÿ“ฅ Download the firmware for your model from the Xiaomi website.
  • ๐Ÿ”ง Transfer the phone to Fastboot mode (clip the power supply) + Loudness down).
  • ๐Ÿ–ฑ๏ธ In Mi Flash Tool, select the downloaded firmware and press Flash.

โš ๏ธ Attention: Bypass FRP On new devices (Redmi Note 12, Xiaomi 13), these methods are often blocked at the firmware level.

Method 5: Contact Xiaomi Service Center

If all of these methods didn't work, the official way to do this is to go to Xiaomi Service Center, which is the most reliable, but also the longest way.

  • ๐Ÿ“„ Documents: Take your passport and check/guarantee card (if the phone is guaranteed).
  • ๐Ÿ’ฐ Cost: Unlocking a pattern lock without data reset can cost from 1000 to 3000 rubles (depending on the model).
  • โณ Timeline: On average, 1-3 days (unless you need to order parts).
  • ๐Ÿ”’ Warranty: If the phone is warranty, unlocking is usually free.

๐Ÿ“ Where to look for service centers:

  • ๐ŸŒ Official website: mi.com/global/service.
  • ๐Ÿ“ฑ Mi Community appendix (Service Centres section").
  • ๐Ÿ›’ Partner shops (for example, Svyaznoy, M. Video).

โš ๏ธ Warning: Avoid "gray" workshops that promise to unlock your phone in 5 minutes.Unqualified intervention can cause a memory module to break or lock IMEI, After that, the device will become unusable.

๐Ÿ’ก

An official service center is the only legal way to unlock if you do not remember the data from Mi Account and do not want to risk the data.

How to avoid pattern lock problems in the future

To avoid getting blocked again, follow these tips:

  • ๐Ÿ” Use the backup. PIN-code: B MIUI When creating a pattern lock, the system asks to set a backup PIN. Write it in a safe place (for example, in Google Keep or notebook).
  • ๐Ÿ“ฑ Link Mi Account: Even if you donโ€™t use Xiaomi, create an account and link it to your phone.
  • ๐Ÿ”„ Make backups regularly: Use Settings โ†’ System system โ†’ Backup or third-party services (Google Drive, Mi Cloud).
  • ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ Set up Child Mode: If children use the phone, turn on Parental Controls in the settings.

๐Ÿ’ก Useful life hack: In MIUI 14, you have Smart Unlock, which allows you to automatically disable the pattern lock in trusted places (such as at home or work). โ†’ Lock screen โ†’ Smart unlocking.

If you often forget passwords, consider alternative unlocking methods:

  • ๐Ÿ‘† Fingerprint or facial recognition (available on most Xiaomi models).
  • ๐Ÿ”‘ Password of letters and numbers (more reliable than pattern lock).

FAQ: Frequent questions about the pattern lock on Xiaomi

๐Ÿ”น Can I remove the pattern lock without resetting the data?
Yes, if: You remember the data from Mi Account and the phone is connected to the Internet, you have USB debugging enabled and you have access to your computer (ADB method), otherwise you have to reset your settings, which will lead to data loss.
๐Ÿ”น Why After Recovery, Your Phone Asks for an Old pattern lock?
This is due to the reset protection (FRP) feature, which is that on some Xiaomi models, the pattern lock is saved even after Wipe Data. Solution: Repeat the reset again. Use the Fastboot for full flashing.
๐Ÿ”น Does the method work with ADB on MIUI 14?
On the new versions MIUI (14 and above) standard ADB-gesture.key removal commands often don't work because of a changed key storage mechanism. Alternatives: Use root access command (if the phone is rooted).
๐Ÿ”น Can I unlock Xiaomi phone with Google Account?
No. Unlike older versions of Android, MIUI doesn't support unlocking through Google Account. The only official way is Mi Account.
๐Ÿ”น What to do if after unlocking the phone asks "Confirm identity"?
This is an additional protection Xiaomi from unauthorized access. Solutions: Enter the data from Mi Account, which was tied to the phone. If the account is not yours, contact the service center with documents on the phone. โš ๏ธ Attempts to cheat the system (e.g., through an engineering menu) can lead to a lockdown. IMEI.