How to remove a pattern lock from Xiaomi if you forget: the full guide 2026

The forgotten pattern lock on Xiaomi's smartphone is one of the most common problems users face. PIN-The pattern seems easy to remember, but this is often a cruel joke: many owners of Redmi, POCO Or Mis can't remember the combination after a month or two, and it gets complicated if the device doesn't have fingerprints or facial recognition, and access to data is critical.

In this article, we’ll look at all the current ways to unlock a pattern lock on Xiaomi in 2026, from official methods through Mi Account to technical solutions using Fastboot and ADB. It’s important to understand that some methods will lead to a complete data reset, so if there is important information on the phone, try to restore lossless access first. We’ll also explain how to avoid locking in the future and what to do if the smartphone requires key input after a firmware or MIUI update.

Why Xiaomi is blocking your phone after incorrectly entering your pattern lock

The MIUI security system is built so that after 5-10 unsuccessful attempts to enter the pattern lock, the device is blocked for 30 seconds, a minute, and then may even require data entry from the Mi Account.

On the new models Xiaomi 13/14, Redmi Note 12 and POCO F5 lock algorithm has become stricter:

  • πŸ”’ After 5 wrong attempts – lock for 30 seconds.
  • πŸ”’ After 10 attempts – lock for 1 minute + Mi Account request.
  • πŸ”’ After 20 attempts – complete lock with reset requirement.
  • πŸ”’ On some firmware (for example, MIUI 14 Global) After 30 attempts, the phone can automatically erase data (if Find Device is enabled).

If you see a message on the screen saying, "Device locked. Try again in X minutes" or "Look in to Mi to unlock," it means that the system has activated protection, in which case a simple reboot is not necessary - additional actions will be required.

⚠️ Attention: On devices with MIUI China (Chinese firmware) unlocking through Mi Account may not work if the phone was not tied to a global account, in which case only reset methods via Fastboot or Recovery remain.

Method 1: Unlocking with Mi Account (official method)

The safest and most recommended way for Xiaomi is to use a tied Mi Account.

  • πŸ“± The phone is connected to the Internet (Wi-Fi or mobile network).
  • πŸ”‘ Remember the username and password from Mi Account.
  • πŸ“² Synchronization with the account is enabled on the device (checked in Settings). β†’ Mi Account).

Step-by-step:

  1. On the lock screen, click "Forgot your pattern lock?" (or similarly written).
  2. Select "Login to Mi Account".
  3. Enter your email/phone and password from your account.
  4. Confirm your login via SMS or email (if two-factor authentication is enabled).
  5. Create a new pattern lock or disable the lock.

If the screen does not have a button "Forgot the pattern lock?", try:

  • πŸ”„ Reboot your phone (hold power) + Volume up 10 seconds).
  • πŸ“Ά Connect to another Wi-Fi network (sometimes switching the access point helps).
  • πŸ”Œ Connect charging – on some models, unlocking through an account is only available when charging >15%.

Make sure your phone is connected to the Internet |Remember the username/password from Mi Account | Check if synchronization with your account is enabled | Access to email/SMS to confirm-->

πŸ’‘

If you don’t remember the password from Mi Account, restore it through the official account.xiaomi.com. Use the linked email or phone number.

Method 2: Reset the pattern lock via Find Device (remotely)

If your phone is connected to the Internet and you have access to Mi Account, you can try unlocking it remotely via Find Device, which works even if the phone is turned off (the next time you connect to the network, the command will run automatically).

Instructions:

  1. Go to i.mi.com and log in.
  2. Select the locked device in the list.
  3. Click "Find the device" β†’ "Unlock".
  4. Confirm the action with a password from the account.
  5. Wait for a notification of successful unlocking (can take up to 5 minutes).

Advantages of the method:

  • βœ… No need for physical access to the phone.
  • βœ… It works on all Xiaomi models (including Redmi). 9A, POCO X3, Mi 11).
  • βœ… Stores all data on the device.

⚠️ Warning: If the phone has disabled Remote Control or Data Transfer in Mi Account settings, this method will not work, nor will it help if the device is in Offline mode (for example, without any data transfer). SIM-maps and wifi).

Mi Account|Find Device|Fastboot/Recovery|Talked to the service center |Never blocked-->

Method 3: Unlocking via Fastboot (for advanced users)

If the official methods don't work, you'll have to use technical solutions, one of which is Fastboot unlock, which is suitable for most Xiaomi models, but requires:

  • πŸ–₯️ Computer with drivers installed ADB/Fastboot.
  • πŸ”Œ USB-cable (preferably original).
  • πŸ”§ Unlocked loader (on some models).

Step-by-step:

  1. Turn off the phone.
  2. Press Power + Volume down until the Fastboot logo appears.
  3. Connect the phone to the PC.
  4. Open the command line (Win + R β†’ enter cmd) and execute commands: fastboot devices (should display the serial number of the device), fastboot oem unlock (some models will require confirmation on the phone) fastboot reboot

If the fastboot oem unlock command doesn’t work, try an alternative method:

fastboot erase frp


fastboot reboot

Important: Newer models (such as the Xiaomi 13T or Redmi Note 12 Pro+) may require pre-unlocking the bootloader through the official Mi Unlock Tool.

Xiaomi modelDoes it support fastboot oem unlock?You need a Mi Unlock Tool?
Redmi Note 10/11βœ… Yes.❌ No.
POCO X4/F4βœ… Yes.⚠️ Sometimes.
Xiaomi 12/13❌ No.βœ… Yes.
Redmi 9A/9Cβœ… Yes.❌ No.
What if the Fastboot can’t see the device?
If the fastboot device command doesn’t show your phone, check it out: 1. Drivers installed ADB/Fastboot (You can download it on the Android website). 2. Are you using the original? USB-cable (cheap cables often don't transmit data). 3. Is the debugging mode on? USB (If the phone is turned on at least once). 4. Try another one. USB-port (preferably) USB 2.0 back-panel).

Method 4: Recovery Mode (complete data cleanup)

If no other method has worked, the last option is hard reset via Recovery Mode, which erases all data on the phone, including photos, messages and installed apps, but is guaranteed to unlock the device.

Instructions for MIUI Recovery:

  1. Turn off the phone.
  2. Press Power + Volume up until the Mi logo appears.
  3. Select the language (if the menu appears).
  4. Go to Wipe Data β†’ Wipe All Data.
  5. Confirm the reset (a password from Mi Account may be required).
  6. After restarting, set your phone as new.

Some models (e.g. POCO F3 or Redmi K50) have TWRP instead of the standard MIUI Recovery.

  1. In the TWRP menu, select Wipe.
  2. Swipe to Factory Reset.
  3. Reboot (Reboot β†’ System)

⚠️ Attention: On devices with MIUI 13/14 After resetting via Recovery, you may need to re-activate via Mi Account. If you do not remember your account details, the phone will turn into a brick (will not turn on beyond the welcome screen).

πŸ’‘

Recovery resets are a last resort: If there is important data on the phone, try unlocking through Mi Account or Find Device first.

Method 5: Use ADB (if debugging was enabled)

If the phone has previously been activated debugging via USB (Settings β†’ About Phone β†’ MIUI β†’ 7 times tap β†’ Additional β†’ For developers β†’ USB debugging), you can try to remove the pattern lock through ADB.

Instructions:

  1. Connect the phone to the PC.
  2. Open the command line and type in: 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

If the commands don’t work, try an alternative:

adb shell am start -n com.android.settings/.ChooseLockGeneric

This method doesn’t work on all versions of MIUI, but it can help if debugging has been enabled.On newer firmware (MIUI 14), access to su is often blocked.

What to do if nothing helps: contact the service center

If all of these methods do not work, there are two options:

  1. The official service center of Xiaomi, which provides a check or a box from the phone, will speed up the unlocking process. The cost of the service: from 1000 to 3000 rubles (depending on the model).
  2. Unofficial workshops. Many services offer unlocking through EDL-mode (emergency firmware), but it is risky: you can lose IMEI Or get a brick. Average price: 1500-5000 rubles.

Before the service visit:

  • πŸ“„ Bring your phone ID (if you have one).
  • πŸ”‹ Charge the device to at least 50%.
  • πŸ“± Check by phone if they work with your model (e.g. Xiaomi 13 Ultra or Redmi). K60 They may require special equipment).

Important: On MIUI China phones (bought in China), unlocking in Russian services may not be possible due to regional restrictions, in which case only contacting a Chinese service center or using specialized boxes (for example, UFi or Octoplus) will help.

How to Avoid pattern lock Blocking in the Future

To avoid the problem of a forgotten pattern lock, follow these tips:

  • πŸ” Use it. PIN-code instead of a pattern lock, it is more difficult to forget.
  • πŸ“ Write down the backup unlock code (in) MIUI It is proposed when creating a pattern).
  • πŸ”„ Regularly sync data with Mi Cloud (photos, contacts, messages).
  • πŸ‘† Set up unlocking by fingerprint or face (in Settings) β†’ Screen locking).
  • πŸ”§ Enable Find Device in Mi Account Settings.

It's also useful to know:

  • On MIUI 14, you can set up automatic unlocking in trusted networks (e.g., at home).
  • In the Smart Lock settings (Settings β†’ Screen Lock β†’ Smart Lock), you can add secure devices (for example, the Mi Band smartwatch).

πŸ’‘

If you often forget passwords, use a password manager (like Bitwarden or KeePass) to store backup unlock codes.

FAQ: Frequent questions about unlocking Xiaomi

Can I unlock Xiaomi without losing data?
Yes, if you have Mi Account attached and confirmed, use Find Device unlocking or login to your account on the lock screen, and if you don't have an account attached, you can't save it, you'll need a reset.
Why does the phone ask for an old pattern lock after resetting via Recovery?
This happens if the phone has been enabled with Reset Protection (FRP), in which case Wipe Data will require input from the Mi Account that was tied to the device. If you do not remember the password, you can only unlock the phone through Fastboot (fastboot erase frp command) or at the service center.
Does the ADB unlock work on MIUI 14?
On newer versions of MIUI 14, access to system files via ADB is restricted. The method of removing gesture.key only works if: The phone is debugging over USB. The device is rooted (Magisk or SuperSU). Uses custom Recovery (such as TWRP). On stock firmware without root rights, this method is likely not to work.
How much does it cost to unlock in the Xiaomi service center?
The cost depends on the model and the reason for the lock: Redmi Note 10/11, POCO X3/X4: 1000-1500 rubles. Xiaomi 12/13, Redmi K50: 1500-2500 rubles. Devices with damaged firmware: 2000-5000 rubles. In informal services, the price may be lower, but there is a risk of losing the warranty or IMEI.
Can you unlock Xiaomi with ## code?
No, there are no universal engineering codes (e.g. #7780##) for resetting a pattern lock to Xiaomi, which were used on old Samsung or Nokia, but they are blocked in MIUI, the only working ways are Mi Account, Fastboot, Recovery or a service center.