How to unlock the pattern lock on your Xiaomi phone: 5 proven ways

The forgotten pattern lock on Xiaomi's smartphone is a situation that thousands of users face every day. PIN-And if you have a code or a password, it seems more convenient, until you have a problem with how to play it back, and fortunately, the manufacturer has provided several official ways to restore access, without resorting to "hacking" in the classical sense of the word.

It is important to understand that the term β€œhacking” in the context of modern Xiaomi smartphones with MIUI 14/15 and current firmware does not apply. All legal methods are based on the use of built-in security features or service tools. Attempts to bypass protection through the engineering menu, ADB or third-party utilities in 90% of cases lead to a complete data reset or β€œbricking” of the device. This article will help to avoid errors and return access to the phone with minimal losses.

We’ll look at different scenarios: when you have a backup, your Mi Account is tied, the USB Debugging is turned on, and emergency measures for devices without prior preparation. We’ll focus on models with a Qualcomm Snapdragon chip (e.g. Redmi Note 12 Pro+, Xiaomi 13T) and MediaTek (Poco X5, Redmi 12C), because the unlock algorithms for them are different.

1 Unlocking through Mi Account (official method)

The most reliable way is to use a tied Mi Account, which works on all Xiaomi devices released after 2018, provided that:

  • πŸ“± The phone is connected to the Internet (Wi-Fi or mobile network)
  • πŸ”— Mi Account was tied to the device before being blocked
  • πŸ”’ The device was not reset via Fastboot after the last authorization

Instructions:

  1. On the lock screen, tap the button β€œForgot your password?” (bottom of the screen).
  2. Select β€œUnblock with Mi Account”.
  3. Enter the login (email or phone number) and password from the account.
  4. Confirm unlocking via SMS or email (if two-factor authentication is enabled).

⚠️ Warning: If after 5 failed attempts to enter the pattern, the system suggests waiting 30 minutes - do not turn off the phone (FRP), This will require you to enter your account data even after the reset.

πŸ“Š What Unlocking Method Have You Tried Before?
Mi Account
Reset via Recovery
ADB
I went to the service center.
Never blocked.

2. Reset the pattern lock via Find Device (remotely)

Find Device, which allows you to not only track your phone, but also control it remotely, is a good way to do this if you:

  • 🌐 The device is connected to the Internet
  • πŸ“ The search function has been activated in the settings (Settings) β†’ Mi Account β†’ Find Device)
  • πŸ”„ Phone is not discharged (battery charge) > 15%)

Step-by-step:

  1. Go to i.mi.com from a computer or other phone.
  2. Sign in with the same Mi Account as on the locked device.
  3. Select a locked phone from the list of devices.
  4. Click on Delete Data (this will result in a reset before factory settings).
  5. Confirm the action via SMS or email.

⚠️ Warning: This method removes all data from your phone, including photos, messages and installed apps. Use it only if your device has no critical information or backup.

β˜‘οΈ Preparing for reset via Find Device

Done: 0 / 5

3. Unlock via Fastboot (for advanced users)

The Fastboot method is suitable for bootloader devices, requiring a computer, USB-TypeC cable, and minimal ADB/Fastboot knowledge. Importantly, new Xiaomi models (e.g. Xiaomi 14 or Redmi Note 13 Pro) have the bootloader locked by default and take up to 72 hours to unlock.

Instructions for devices with unlocked loader:

  1. Turn off the phone.
  2. Press the Power button + Volume down to log into the Fastboot.
  3. Connect your phone to your PC and open the command line (CMD or Terminal).
  4. Enter the command to check the connection: fastboot devices If the device is determined, continue.
  5. Perform a protection reset: fastboot erase frp Then reset data: fastboot -w
  6. Reboot the phone: fastboot reboot

⚠️ Note: On devices with MediaTek (e.g. Redmi) 10A) The fastboot erase frp command may not work. SP Flash Tool, which is risky without experience.

What if the fastboot can’t see the device?
Make sure that Xiaomi drivers are installed USB Drivers. For Windows, download them from the official website. Also try using another one. USB-cable (original) and port USB 2.0 (not 3.0).

4.Use ADB (only if USB Debugging is enabled)

If the phone was pre-enabled debugging mode USB (USB Debugging, you can delete the file with the pattern lock through ADB. This method does not work on devices with debugging turned off or after resetting settings.

Instructions:

  1. Connect your phone to your PC via USB.
  2. Open the command line and type in: Adb shell
  3. Delete the files with the lock data: rm /data/system/gesture.key rm /data/system/locksettings.db rm /data/system/locksettings.db-wal rm /data/system/locksettings.db-shm
  4. Reboot the phone: reboot

After the reboot, the pattern lock will be reset, but all data will be saved. However, on MIUI 14/15, this method does not work stable due to the enhanced protection.

πŸ’‘

If the key is not reset after deleting the files, try to execute the command adb shell am broadcast. -a android.intent.action.BOOT_COMPLETED before restarting.

5. Contact the Xiaomi Service Center

If none of the above methods worked, you have to contact the official service center.

  • πŸ“± Devices with locked loader
  • πŸ”’ Phones that do not have a Mi Account tied
  • πŸ“΄ Models older than 2018 (e.g. Redmi 5 Plus, Mi) A1)

What will be required:

  • πŸ“„ Checks or warranty card (if the phone is guaranteed)
  • πŸ†” Passport of the owner
  • πŸ“± The charger itself > 30%

The cost of unlocking the service varies from 500 to 2000 rubles depending on the model. New flagships (for example, Xiaomi 13 Ultra) may be higher. In 2026, Xiaomi tightened its security policy: without proof of ownership, unlocking is impossible even for a fee.

Model phoneAverage cost of unlockingImplementation time
Redmi Note 12800–1200 β‚½1-2 hours
Xiaomi 13 Lite1200–1800 β‚½2-3 hours
POCO X5 Pro1000–1500 β‚½1 hour
Redmi 10C500–900 β‚½30-60 minutes

Alternative methods (risks and consequences)

On the Internet, there are often tips for β€œhacking” a pattern lock through:

  • πŸ”§ Engineering menu (#4636##) – does not work on the MIUI 12+.
  • πŸ“± Hard Reset via Recovery – Leads to Data Loss and Activation FRP.
  • πŸ’» Third-party programs (e.g. Dr.Fone, iMyFone) – often contain viruses or do not support new models.

⚠️ Note: Using unofficial firmware or tools like Mi Flash Unlock can lead to a:

  • 🚫 Block IMEI (The phone will lose communication with the networks of operators).
  • πŸ”΄ Activation of antirollback (inability to roll back on the old firmware).
  • πŸ’₯ Β«Fitting” (complete failure).

If you still decide to experiment, back up via TWRP (if installed) or Mi PC Suite (if the phone is recognized by the computer).

πŸ’‘

The only safe way to unlock without losing data is to use a tied Mi Account or ADB (if debugging was enabled in advance).

FAQ: Frequent questions about unlocking Xiaomi

Can I unlock the pattern lock without losing data?
Yes, but only if: Linked and confirmed Mi Account, USB Debugging enabled and access to ADB. In all other cases, the data will be deleted.
What to do if you forget your Mi Account password?
Restore access via: Forgot your password? at account.xiaomi.com, linked email or phone number, backup code (if saved) If the account is not restored, unlocking is possible only through the service center with proof of ownership.
Does Recovery Work on the New Xiaomi?
Yes, but: MIUI 14/15 will require Mi Account data entry (FRP protection) after reset. On older models (until 2020), the reset can pass without additional checks. Reset instruction: turn off the phone β†’ pinch Power + Volume up β†’ select Wipe Data.
Can I unlock Xiaomi through the Engineering Menu?
No. Starting with MIUI 11, the engineering menu (#4636## or #3644633##) does not contain options for resetting the pattern lock. A previously existing bug with zero pattern attempts was fixed in security updates.
How much does it cost to unblock in unofficial services?
In informal workshops, the price may be lower (from 300). β‚½), But the risks are high: use of "gray" firmware with vulnerabilities, loss of warranty, possible data theft (if the wizard copies information from the phone.