How to Reset a pattern lock to Xiaomi: The Complete 2026 Guide

Forgot the pattern lock on Xiaomi and can’t unlock your phone? This problem is familiar to many users β€” just once enter the wrong pattern five times in a row, and the device locks for 30 seconds, and then you will need to enter a Mi Account account. But what if you don’t remember your account password or backup PIN-code?

In this article, we will discuss all the working methods of resetting the pattern lock on Xiaomi, Redmi and POCO smartphones, from official methods through Find Device to technical solutions using Fastboot and Recovery Mode. Each method is illustrated with step-by-step instructions, risk warnings and tips on how to avoid data loss. Particular attention will be paid to models with a locked bootloader (for example, Xiaomi 12T, Redmi Note 11), where standard methods may not work.

Important: if the phone has Mi Data Protection enabled (found on MIUI 13+ firmware), some methods will require additional actions.

1 Unlocking through Mi Account (official method)

The most secure and recommended method for Xiaomi is to use a tied Mi Account, which works on all models, including the new Xiaomi 14 and POCO F5, but requires:

  • πŸ“± Access to another device (PC, smartphone, tablet) with the Internet.
  • πŸ”‘ Login and password from Mi Account that was tied to a locked phone.
  • πŸ“Ά Stable connection of a locked phone to Wi-Fi or mobile network.

If you have previously synced data with Mi Cloud, watch for notifications – the system can send a confirmation code to a backup email or phone number.

Step-by-step:

  1. On the locked screen, tap Forgot the password? (or Forgot pattern? on English firmware).
  2. Choose Restore through Mi Account.
  3. Enter the email or phone number associated with the account.
  4. Confirm your login via SMS or email (if two-factor authentication is enabled).
  5. Create a new pattern lock or PIN-code.

πŸ’‘

If the button "Forgot password?" does not appear, try to enter the wrong pattern 5 times in a row - the system forcedly will offer recovery.

⚠️ Attention: On phones with MIUI 14 and later after 3 failed attempts to restore through Mi Account, the device may lock for 24 hours.Do not try to pick up a password - use alternative methods from this article.

2. Reset via Find Device (remote unlock)

Find Device (similar to Find My iPhone) allows you to remotely reset the pattern lock, but only if:

  • 🌍 The phone includes geolocation services and mobile data/Wi-Fi.
  • πŸ”„ The device is tied to Mi Account and has internet access.
  • πŸ”’ Find Device has been activated in settings (Settings) β†’ Mi Account β†’ Find Device).

How it works:

  1. Go to i.mi.com from any device.
  2. Sign in with the same Mi Account as on a locked phone.
  3. Select the locked device in the list (if there are several).
  4. Click Delete Data (Erase Data).
  5. Confirm the action – the phone will be reset to factory settings, and the pattern lock is removed.

The downside is that all the data on the phone will be erased without recovery, including photos, contacts and messages. If the device is encrypted (MIUI 12+), you may need to re-enter the password from the Mi Account after reset.

What if the Device can’t see the phone?
If the device does not appear in the list on i.mi.com, check: - Is the Internet on the locked phone (try calling it - if the beep is ringing, there is a connection). - Is the Find Device function disabled in the settings (on some firmwares it can be manually deactivated). - Are network settings reset after unsuccessful attempts to unlock (in this case, geolocation is turned off automatically).

3. Recovery Mode reset (without data loss)

This method is suitable for phones that do not include data encryption (usually old models on MIUI 10-11 or custom firmware).If your Xiaomi is running MIUI 12+ with activated encryption, this method will not work – you will have to use Fastboot (see next section).

Instructions for Recovery Mode:

  1. Turn off the phone with a long press on the power button.
  2. Press the combination of Loudness up + Power and hold for 10-15 seconds until the Mi logo appears.
  3. From the Recovery menu, select the language (usually English or Chinese).
  4. Go to Wipe & Reset β†’ Wipe All Data (some firmware may call it Clear Protection Data).
  5. Confirm the reset – the phone will restart without a pattern lock.

If you don’t have Wipe All Data in Recovery, try:

  • πŸ”„ Reflash Recovery via Fastboot (instructions in the next section).
  • πŸ“± Use it. ADB (requires prior activation of the debugging USB).
πŸ“Š What Unlocking Method Have You Tried Before?
Mi Account
Find Device
Recovery Mode
Fastboot
None of the above.

4. Unlock via Fastboot (for advanced users)

This method works on all Xiaomi models, but requires a computer, USB-The main advantage is that you don’t need to know the password from Mi Account if the bootloader is unlocked. If the bootloader is locked, you will need official unlocking through the Mi Unlock Tool (can take up to 720 hours of waiting on new devices).

What you need:

  • πŸ’» Computer with Windows/Linux/macOS.
  • πŸ”Œ Original. USB-cable (better from the set).
  • πŸ“¦ Utilities. ADB and Fastboot (download from Android site).
  • πŸ”“ Unlocked bootloader (if not, read the instructions below).

Step-by-step:

1. Turn off the phone.


2.Plug Volume Down + Power to log into Fastboot Mode.




3. Connect the phone to the PC and open the command line (terminal).




4. Check the connection by the command:




fastboot devices




(Serial number of the device must be displayed).




5. To reset the pattern lock, enter:




fastboot erase frp




fastboot erase userdata




6.Reset the phone:




fastboot reboot

After the reboot, the pattern lock will be reset, but all data on the internal memory will be deleted. If the phone was encrypted, you may need to re-authenticate to Mi Account.

⚠️ Note: Some models (Xiaomi 13 Pro, Redmi) K60) After the command fastboot erase userdata phone can hang on the logo. In this case, you need firmware through the Mi Flash Tool.

Install drivers ADB/Fastboot|Download Platform Tools|The loader is unlocked (if necessary)|Backup of data (if possible)|Prepare original USB-cable-->

5. Use of ADB (if USB debugging was enabled)

If the phone has been pre-activated debugging by USB (Settings β†’ About Phone β†’ MIUI β†’ 7 times tap to unlock the developer mode, then Settings β†’ Additional β†’ For developers β†’ Debugging by USB), you can reset the pattern lock without losing data.

Instructions:

  1. Connect your phone to your PC via USB.
  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
  3. After rebooting, the pattern lock will be reset.

If the su command doesn't work, you don't have root rights on the phone.

adb shell


cd /data/data/com.android.providers.settings/databases




sqlite3 settings.db




update system set value=0 where name='lock_pattern_autolock';




update system set value=0 where name='lockscreen.lockedoutpermanently';




.quit




reboot

This method does not delete user data, but requires pre-setting debugging. MIUI 14 may not work due to enhanced protection.

6. Alternative methods (for specific cases)

If none of the above methods worked, try these options:

MethodSuitable forRisks.Instructions
Reset via EDL ModePhones with Qualcomm (most Xiaomi/Redmi)Requires special cable, the risk of "bricking"Needed. EDL-cable and firmware via Mi Flash Tool.
Bypassing through Safe ModeIf the key is installed by a third-party application (for example, AppLock)It does not work on the standard MIUI pattern lock.Press Volume Down + Power when turned on, remove the app.
Contacting the service centerAll models, if other methods do not helpPaid service, possible loss of dataA check or confirmation of purchase is required.

EDL Mode is the last resort that you use when your phone doesn't respond to other ways.

  • πŸ”§ EDL-cable (or a jumper on the motherboard).
  • πŸ’Ύ Firmware for your model (download from the official website).
  • πŸ–₯️ Mi Flash Tool Programming.

⚠️ Attention: Use EDL Mode on phones with a blocked bootloader (MIUI 13+) This can lead to a complete locking of the device (requires authorization through Mi Account even after firmware is installed).

How to unlock a bootloader on Xiaomi (for Fastboot-method)

If you see a message Device is locked when you try to use Fastboot, it means that the bootloader is locked. Unlocking takes from a few minutes to 30 days (on new devices, Xiaomi introduces a limit of 720 hours of latency).

Step-by-step:

  1. Download Mi Unlock Tool from the official website.
  2. Sign in to the program under the same Mi Account as on the phone.
  3. Transfer your phone to Fastboot Mode (Loudness Down + Power).
  4. Connect to the PC and press Unlock in the program.
  5. If a waiting message appears, wait for the time specified (usually 168 or 720 hours).

Once the bootloader is unlocked, methods from Section 4 can be used.

πŸ’‘

Unlocking the bootloader resets all the data on the phone.If you need to save files, try the methods first via Mi Account or ADB.

FAQ: Frequent questions about resetting a pattern lock

Can I reset the pattern lock without losing data?
Yes, but only if: The phone has USB debugging enabled and ADB access. Uses MIUI 11 or older without encryption. You remember the Mi Account password and the phone is connected to the Internet (for synchronization). On MIUI 12+ with encryption, the data will be deleted when any reset.
What to do if you forget your Mi Account password?
Restor access via: Official recovery page: account.xiaomi.com. Backup email or phone number (if tied). Support Xiaomi with confirmation of purchase (check, box). If the account is not restored, unlocking is possible only through the use of the device. Fastboot/EDL data-lost.
Why does the phone ask for a password from Mi Account after a Fastboot reset?
This is Factory Reset Protection (FRP) that is activated on MIUI 12+ when: Encrypt data, link Mi Account to the device, use official firmware (FRP may not work on custom firmware). Solution: enter the password from the associated Mi Account. If you do not remember, restore access (see previous question).
Can I bypass the pattern lock through service codes (##)?
No. Service codes like ##7780## or *2767*3855# on Xiaomi don't work to reset the pattern lock. These codes are designed to test hardware and reset network settings, but they don't affect screen locking. Using these codes can lead to: Network resets (loss of stored Wi-Fi networks); phone restarts without unlocking; in rare cases, software failure.
How can you protect yourself from loss of access in the future?
Not to have a blocked phone problem: πŸ” Use it. PIN-code instead of a pattern lock (it is easier to remember). πŸ“ Write down the backup. PIN to unlock (set when creating a pattern lock). ☁️ Regularly sync data with Mi Cloud (photos, contacts, messages). πŸ”§ Put the debugging on. USB (It will help to unlock the phone through ADB). πŸ“± Link Mi Account to backup email and phone number. MIUI 14 also came the function Emergency access – you can add a trusted number to unlock.