How to remove the pattern lock from Xiaomi: from Mi 11 to Redmi Note 12

The forgotten pattern lock on Xiaomiโ€™s smartphone is a problem that one in five users face. According to service center statistics, 63% of unlock requests are due to a screen lock, not hardware breakdowns. The situation is complicated by the manufacturerโ€™s active tightening of security measures: starting with MIUI 14, a standard reset via Recovery requires confirmation through Mi Account, even if the device is not tied to the account previously.

In this article, we will discuss the methods for removing the pattern lock for all Xiaomi, Redmi and POCO models, including the new series with Snapdragon 8 Gen 3 and Dimensity 9200+ processors, which are relevant for 2026. We will analyze the methods from the safest (without data loss) to radical (complete reset), and also explain why, after upgrading to Android 14, the standard ADB bypass stopped working on 80% of devices. Important: some instructions require preliminary preparation - read carefully!

1 Unlocking through Mi Account (official method)

Xiaomiโ€™s most legal and recommended method is to use a tied Mi Account, which works on all devices, regardless of the MIUI version, but requires:

  • ๐Ÿ“ฑ Access to another device (PC, tablet or second phone)
  • ๐Ÿ”‘ Login and password from the Mi Account that was tied to the locked smartphone
  • ๐ŸŒ Stable Internet connection (Wi-Fi or mobile data)

Instructions:

  1. On the locked screen, tap Forgot the password? (or Forgot pattern? on English firmware).
  2. Select Sign in via Mi Account and enter your details.
  3. Confirm unlocking via SMS or email (if two-factor authentication is enabled).
  4. Create a new pattern lock or PIN-code.

๐Ÿ’ก

If the button "Forgot password?" does not appear, try to enter any key 5 times in a row - the system will offer alternative unlock options.

โš ๏ธ Note: If you have not previously linked your Mi Account or donโ€™t remember the login details, this will not work. then move on to the following methods. Also note that after 3 failed login attempts, Xiaomi may temporarily block the ability to unlock (timeout up to 24 hours).

2. reset the pattern lock via ADB (without loss of data)

The Android Debug Bridge (ADB) method is suitable for devices that previously had USB Debugging enabled. This is the only way to unblock without resetting data, but it requires pre-preparedness. If you've never activated debugging, skip this section.

Conditions required:

  • ๐Ÿ–ฅ๏ธ A computer with installed Xiaomi drivers and ADB Tools
  • ๐Ÿ”Œ USB-cable (preferably original)
  • โš™๏ธ Included debugging by USB In Settings โ†’ The phone. โ†’ Version. MIUI (7 Clicks on the Assembly Number โ†’ Developer โ†’ Debugging by USB)

Step-by-step:

1. Connect your phone to your PC via USB


2. Open the command line (Windows) or terminal (macOS/Linux) in the folder with ADB




3. Enter the commands in order:





adb devices




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

After restarting, the device unlocks, but it may be necessary to re-configure the lock screen. โš ๏ธ Attention: On devices with MIUI 13+ Android 12+ This method only works if the bootloader has been previously unlocked. ADB will not get root access.

Why can't ADB see the device?
If the team `adb devices` returns an empty list, check: - Are drivers installed (for Windows download) [Mi Phone Manager](https://pcsuite.mi.com/)) - Is File Transfer Mode Enabled When Connected USB - Does the antivirus block the connection (turn it off temporarily) - try another USB-port (preferably) USB 2.0).

3. Unlock via Fastboot (for advanced users)

If USB debugging wasnโ€™t enabled but you have a bootloader unlocked, you can use Fastboot mode.This method is suitable for most Xiaomi models, except for the new flagships (Xiaomi 14, Mix Fold 3), where the manufacturer has increased protection.

What you need:

  • ๐Ÿ–ฅ๏ธ PC with Mi Unlock Tool installed and ADB
  • ๐Ÿ”ง Unlocked bootloader (if not, see Section 5)
  • ๐Ÿ“ฑ Battery charge of at least 50%

Instructions:

  1. Turn off the phone and press Volume Down + Power to log in to Fastboot.
  2. Connect the device to the PC and check its detection by the command: fastboot devices
  3. Download the.tgz firmware suitable for your model from MIUI Downloads.
  4. Unpack the firmware and find the non-hlos.bin file (for models with Snapdragon) or boot.img.
  5. Fastboot flash boot.img or for Snapdragon: fastboot flash modem non-hlos.bin
  6. Reboot the device: fastboot reboot

Download Mi Unlock Tool from the official website|Check the version. MIUI customized|Connect the original USB-cable|Disable antivirus on PC|Charge the phone to 60%+

-->

โš ๏ธ Attention: Incorrect firmware in Fastboot can lead to a "brick" (complete failure) of the device. If you are not sure about your actions, you should contact the service center. MIUI 14 and later, this method may require authorization through Mi Account even in Fastboot mode.

4. Hard reset via Recovery (data loss)

If other methods fail, you can completely reset your settings through Recovery mode, which erases all data on your device, including photos, contacts, and apps, and only use it as a last resort.

How to reset:

  1. Turn off the phone.
  2. Press the combination of Loudness up + Power and hold for 10-15 seconds until the MI logo appears.
  3. In the Recovery menu, select the language (volume buttons for navigation, power to select).
  4. Go to Wipe Data โ†’ Wipe All Data.
  5. Confirm the action and wait for the process to be completed (5-10 minutes).
  6. Choose Reboot. โ†’ Reboot to System.

New devices (MIUI 13+) may require:

  • ๐Ÿ” Data entry from Mi Account that was previously linked
  • ๐Ÿ“ถ Connect to Wi-Fi to verify your account
  • โณ Wait 72 hours if an account has been recently created (theft protection)

Recovery|Mi Account|ADB|Fastboot|Tryed to service |Nothing tried-->

โš ๏ธ Note: If you bought the phone with your hands and the previous owner did not untie his Mi Account, after resetting the device can remain locked forever (the so-called "Mi Cloud Lock").In this case, unlocking is possible only through the official Xiaomi service with the provision of a purchase check.

5. Unlock bootloader for advanced methods

Many ways to bypass the pattern lock require an unlocked bootloader; by default, it is locked on all Xiaomi devices to protect against unauthorized access. Unlocking takes up to 720 hours (30 days) of waiting on new accounts.

How to unlock bootloader:

  1. Connect the device to Mi Account in settings (Settings โ†’ Xiaomi Account).
  2. Enable OEM Unlock in the developer menu (Settings โ†’ About Phone โ†’ MIUI Version โ†’ 7 Clicks โ†’ Developer โ†’ Unlock OEM).
  3. Download the Mi Unlock Tool and log in.
  4. Connect your phone in Fastboot mode and follow the program instructions.
  5. Wait for the confirmation SMS (can come in 1-30 days).
Xiaomi modelWaiting time to unlock (2026)Is binding required SIM-map
Xiaomi 14 / 14 Pro720 hours (30 days)Yes.
Redmi Note 12 / 13168 hours (7 days)No.
POCO F5 / X572 hours (3 days)No.
Xiaomi 12T / 11T336 hours (14 days)Yes.

โš ๏ธ Note: Once the bootloader is unlocked, all data will be deleted from the device and Xiaomiโ€™s warranty will be canceled.In addition, some banking applications (such as SberBank Online or Tinkoff) may stop working due to a system integrity breach.

6. Alternative methods (for specific cases)

If standard methods don't work, you can try lesser-known options, they're suitable for specific situations and they don't guarantee 100% results.

Circumvention through emergency call (for older versions of MIUI)

On devices with MIUI 10 and below, an emergency screen bug sometimes triggered:

  1. On the lock screen, tap the emergency call.
  2. Enter any number and press the call.
  3. During the call, quickly go to Contacts โ†’ Settings โ†’ Import / Export.
  4. Choose the export of contacts to SD-card (if any).
  5. Return to the main screen via the Home button.

This method is closed in newer versions of MIUI, but it can work on the Redmi 4X, Redmi Note 5 and other older models.

6.2. Use of TWRP (for hardwired devices)

If your Xiaomi has custom TWRP recovery installed, you can manually delete the lock files:

  1. Boot in TWRP (usually Volume Up + Power).
  2. Go to Advanced โ†’ File Manager.
  3. Delete files: /data/system/gesture.key /data/system/locksettings.db /data/system/locksettings.db-wal /data/system/locksettings.db-shm
  4. Reset the device.

๐Ÿ’ก

Installation TWRP Cancellation of the warranty and may cause problems with OTA-Use this method only if you understand the risks.

6.3. Contact the Xiaomi Service Center

If nothing helps, the official Xiaomi service can unlock the device if you have:

  • ๐Ÿ“„ Check of purchase (or warranty card)
  • ๐Ÿ†” Identity document
  • ๐Ÿ“ฑ Serial number of the device (on the box or under the battery)

The cost of the service is from 1,500 to 5,000 rubles depending on the model, and in some cases, you may need to send the device to a central service center (for example, for Xiaomi 13 Ultra or Mix Fold 2).

Frequent Mistakes and How to Avoid Them

When trying to unlock, users often face typical problems, and here are the most common ones and ways to solve them:

Mistake.Reason.Decision
Couldn't unlock the Mi Unlock Tool72/168/720 hours of waitingWait for the specified time or use another account
ADB does not see the deviceNot installed drivers or not included debuggingInstall Mi PC Suite and check USB settings
This device is locked in FastbootThe bootloader is not unlockedUnlock bootloader with Mi Unlock Tool
After reset, you need an old Mi Account.The device is tied to the previous ownerContact the service with proof of purchase

โš ๏ธ Warning: If you see a message saying โ€œThis device is associated with a Xiaomi accountโ€ after a reset, it means that the device is in the Mi Cloud Lock. The only legal way to unlock is to contact Xiaomi with purchase documents. Buying โ€œdisconnectionsโ€ on third-party sites often leads to fraud!

Can I remove the pattern lock without losing data?
Yes, but only if USB debugging was enabled and the bootloader unlocked, in which case the ADB method will help (Section 2). If debugging is not enabled, data storage is impossible, you will need a complete reset.
Why does the phone ask for an old Mi Account after resetting via Recovery?
This is the Mi Cloud Lock protection feature, which is activated if the device was tied to a Xiaomi account. Even after a reset, the system requires proof of ownership. If you are not the original owner, unlocking is only possible through a service center with a check of purchase.
Does the emergency call method work on Xiaomi 12?
No. The emergency screen vulnerability was closed in MIUI 11 (2019). On newer devices (Xiaomi 11 and later), this method does not work. Use official unlock methods.
What to do if you forget your Mi Account information?
Restor access through the recovery page. If you have a phone number or email attached, follow the password reset instructions. If you do not restore your account, you can only unlock it through the service center.
Can I unlock Xiaomi without a computer?
Yes, but only through Mi Account (section 1) or Recovery (section 4). All other methods require a PC. If you don't have access to a computer, contact a service center or friends/acquaintances.