How to unlock a Xiaomi phone if you forget your pattern lock: the full guide 2026

The forgotten pattern lock on Xiaomi's smartphone is a situation that even experienced users face. PIN-If you use a code or a password, it seems easy to remember, but that's what's often a cruel joke: your brain automates your finger movement, and you consciously make mistakes when you try to enter it. If you're in front of a locked screen, Redmi, Poco or Mi, don't panic. There are at least 5 working ways to get back access to your device.

It’s important to understand that unlocking methods vary in complexity and consequences, some of which save data (e.g., through a linked Mi Account), others lead to a full Hard Reset, and in this article we’ll look at all the current ways, from the safest to the most radical, and explain why some β€œpeople’s” tips (like repeatedly entering the wrong key) don’t work on modern MIUI firmware. If your phone is synchronized with the cloud, the chances of successful unlock without losing data are much higher.

Before you start, check:

  • πŸ”„ Do you have access to a Mi Account that was linked to your phone?
  • πŸ“± Is the device enabled debugging by USB (if so, the method with ADB work out).
  • πŸ”Œ Is the phone at least 30% charged (so as not to interrupt the reset process).

1 Unlocking with Mi Account (the safest way)

If your Xiaomi is tied to a Mi Account, it’s the most reliable and quickest way to get back access without losing data, and works on all models, including the Redmi Note 12, Poco X5, and Mi 11, provided that:

  • πŸ“§ The phone is connected to the Internet (via Wi-Fi or mobile network).
  • πŸ” Remember the username and password from Mi Account.
  • πŸ“± The device is not disabled function Find the device in the account settings.

Instructions:

  1. On the lock screen, enter the wrong pattern lock 5 times in a row. You will see a message Forgot your password? or Unblock through Mi Account.
  2. Click on this label and enter details from your Mi Account (email or phone number + password).
  3. Confirm your login via SMS or email (if two-factor authentication is enabled).
  4. Follow the instructions on the screen to reset the pattern lock.

⚠️ Note: If you previously disabled Find Device in Mi Account settings, this method will not work. MIUI for the Chinese market (China) ROM) They can block the unlock through the account.

πŸ“Š Your Xiaomi is tied to your Mi Account?
Yeah, and I remember the password.
Yeah, but the password's forgotten.
No, not tied.
I don't know, I haven't.

2.Use of Fastboot Mode (for advanced users)

The method through Fastboot is suitable if debugging is USB (USB Debugging) was enabled before blocking, or if you are ready to reset.This method requires a computer with Xiaomi drivers installed and the Mi Flash Tool or fastboot tool from Android. SDK.

What you need:

  • πŸ’» Computer with Windows/Linux/macOS.
  • πŸ”Œ USB-cable (preferably original).
  • πŸ“¦ Mi Flash Tool (download from the official website).
  • πŸ“± Firmware for your model (e.g. Redmi Note 10 Fastboot) ROM).

Step-by-step:

  1. Turn off the phone. Press Volume down + Power for 10 seconds to enter Fastboot mode (the screen will appear a hare in a hat-eared).
  2. Connect your phone to your computer. Make sure the drivers are installed (Android Bootloader Interface should be displayed in Device Manager).
  3. Download and unpack the firmware for your model. flash_all.bat (for Windows or flash_all.sh (for Linux/macOS).
  4. Launch the Mi Flash Tool, press Select and specify the path to the firmware folder.
  5. Select Clean All (Full Reset) or Clean All and Lock (Reset) mode. + Lock the bootloader. Press Flash.
  6. Wait for the process to be completed (5-10 minutes) and the phone will reboot with factory settings.

Download the Mi Flash Tool|Install Xiaomi drivers|Download the firmware for your model|Charge your phone at least 50 times%|Prepare. USB-cable-->

⚠️ Note: Fastboot removes all data on your phone, including photos, messages and apps, if the device has been encrypted (Security settings) β†’ Encryption, after resetting the phone may require the entry of the old password - in this case, only flashing through the phone will help. EDL (emergency).

3. Unlock via ADB (if USB debugging is enabled)

If your Xiaomi has been activated before the lock USB (USB Debugging in the developer settings, you can delete the file with the pattern lock through ADB It works on most models, including Poco. F4, Redmi K50 Mi 11 Lite.

Instructions:

  1. Connect your phone to your computer via USB. The lock screen will see a request for debugging permission β€” confirm it (if the phone requests unlock, this method will not work).
  2. Open the command prompt (Windows) or terminal (Linux/macOS) and type:
adb shell


su




rm /data/system/gesture.key




rm /data/system/locksettings.db




rm /data/system/locksettings.db-wal




rm /data/system/locksettings.db-shm




reboot

  1. The phone will reboot. Once turned on, the pattern lock will be reset, but the data will remain intact.

πŸ”Ή Note: On some firmware MIUI 14 The path to the key files may be different. If the command doesn't work, try it:

rm /data/system/lockpattern.key

⚠️ Note: If the phone is encrypted, deleting the key files can damage user data (photos, messages and apps will become unavailable.

πŸ’‘

Before use ADB Check if the device in the system is determined by the adb device command. If the list is empty, install drivers or try another one. USB-cable.

4.Reset via Recovery Mode (Hard Reset)

Hard Reset is a universal unlocking method that works on all Xiaomi devices, but results in complete data loss.It is worth using if other methods are not available (for example, there is no tied Mi Account or debugging over USB is disabled).

How to reset:

  1. Turn off the phone. Press the button combination: For most models: Volume up + Power. For Poco X3, Redmi Note 9: Volume up + Volume down + Power.

Mi

Recovery Mode

Wipe Data

Yes

Reboot

Xiaomi modelCombination for RecoveryFeatures
Redmi Note 11/12Volume up + NutritionThe menu is in English and supports sensory input.
Poco F3/F4Volume up + NutritionRecovery may require you to enter a Mi Account password.
Mi 10/11 (China)Volume up + Volume down + NutritionThe menu is in Chinese, use volume buttons to navigate.
Redmi 9A/9CVolume up + NutritionThere may be delays in selecting menu items.

⚠️ Note: Some models (e.g. Xiaomi) 12T or Redmi K60) Recovery reset may require you to enter data from Mi Account even after reset (FRP), which locks the phone after reset if it was linked to the account.

πŸ’‘

Hard Reset deletes all data, including photos, contacts and apps, and if the phone has been encrypted, you may need a password from your old account after reset.

5 Unlocking through Xiaomi Service Center

If the independent attempts have not been successful, the official service center of Xiaomi can help unlock the device.

  • πŸ” You don’t remember the data from your Mi Account.
  • πŸ“± Phone locked after failed firmware.
  • πŸ”§ The device has broken screen or buttons (not possible to enter the key).

What will be required:

  • πŸ“„ Documents confirming the purchase (check, warranty card).
  • πŸ†” Passport of the owner (to confirm ownership).
  • πŸ’³ Payment for the service (on average 1000-3000 rubles, depending on the model and the reason for the lock).

πŸ”Ή How to Find a Service Center:

  1. Go to the Xiaomi Service website.
  2. Choose a country and a city.
  3. Check the reviews about the center (some informal services may offer "unlock" with a loss of warranty).

⚠️ Note: Unofficial workshops often use the method EDL (Emergency mode) which may result in the blocking of a Mi Account or loss of a Mi Account IMEI. Xiaomi’s official centers guarantee the safety of data (if possible) and do not violate the warranty.

What if the service center refuses to unlock the phone?
If you don’t have a check or a phone bought with your hands, some service centers may refuse the service. In this case, try: 1. Contact another official center (policies may differ). 2. Provide any proof of purchase (emails, money transfer screens). 3. Contact Xiaomi support via Twitter or Telegram – sometimes they help in controversial situations.

Alternative methods (with limitations)

There are dozens of β€œfolk” ways to unlock online, but most of them are either outdated or only work on older versions of MIUI.

Method 1: Calling a locked phone

  • πŸ“ž Call the locked phone from another device.
  • πŸ“ž Take the call, then quickly go to Settings. β†’ Security β†’ Lock the screen and disable the pattern lock.

πŸ”Ή Does it work? MIUI 12/13/14 This method is blocked - during the call access to settings is limited.

Method 2: Emergency call mode

  • 🚨 On the lock screen, press the emergency call.
  • πŸ”’ Enter any number (e.g. 112) and quickly press the Back button 5-10 times.
  • πŸ“± Sometimes this opens up access to the system interface for 1-2 seconds (you need to have time to go to the settings).

πŸ”Ή Does it work? New firmware doesn't work. MIUI 10 and older could work on some models.

Method 3: Delete files via TWRP

If the phone has a custom TWRP recap, you can manually delete the key files:

  1. Sign in to TWRP (button combination depends on the model).
  2. Go to Advanced β†’ File Manager.
  3. Delete files: /data/system/gesture.key /data/system/locksettings.db

Reboot the phone.

πŸ”Ή Does it work? Yes, but only if it works? TWRP It's already installed. It's not applicable on stock firmware.

Frequently Asked Questions (FAQ)

Can I unlock Xiaomi without losing data?
Yes, if: πŸ“§ The phone is tied to Mi Account and you remember the password. πŸ”Œ The debugging was included. USB (help then ADB). ☁️ The data is synchronized with Mi Cloud (it can be restored after unlocking.
What to do if you forget your Mi Account password?
Restore access via: Forgot your password? on the Mi Account website. Linked email or phone number (you will be sent a confirmation code). If the email is also not available, contact Xiaomi with proof of account ownership (checks, device serial number).
Why does a Hard Reset phone ask for an old password?
This is the case with Factory Reset Protection (FRP) β€” Reset protection. It activates if: πŸ“± The phone was tied to the Mi Account. πŸ”’ Encryption enabled. Solution: enter the data from the Mi Account that was tied up before the reset. If you don't remember, contact the service center.
Can I unlock Xiaomi through my Google Account?
No. Since MIUI 9 (2017), Xiaomi has removed the ability to unlock through Google Account, which now only works on very old models (e.g. Redmi 3S or Mi 4).
How to avoid blocking in the future?
Follow these recommendations: πŸ” Use it. PIN-code instead of a pattern lock (it is easier to remember). ☁️ Enable sync with Mi Cloud (photos, contacts and other features) SMS will be preserved). πŸ“§ Link Mi Account and record data in a secure location. πŸ”§ Activate debugging on USB (In the developer settings, so that in the future it can be used ADB.