How to unlock a Xiaomi phone if you forget the pattern lock: official and alternative methods

Forgetting a pattern lock on a Xiaomi smartphone is a frustrating situation, but it's fixable. Even if you've never set up backup unlocking methods, there are at least 5 proven methods to return access to the device. It's important to understand that some of them will lead to complete loss of data, while others allow you to save files - it all depends on the phone model, the version of MIUI and whether recovery functions were enabled.

In this article, we will discuss all the current ways to unlock for the Redmi, Poco and Mi lines, including official tools from Xiaomi and workarounds for older versions of firmware. Special attention will be paid to security: which methods will leave no trace in the system, and which can lead to blocking of the Mi Account. If you are looking for a solution for your model, use the compatibility table at the end of the section with instructions.

1 Unblocking through Mi Account (official method)

The most reliable and recommended way Xiaomi uses is to use a tied Mi Account, which works on all devices with MIUI 8 and newer if:

  • πŸ”Ή The phone is connected to the Internet (Wi-Fi or mobile network)
  • πŸ”Ή Remember the username and password from the Mi Account
  • πŸ”Ή The device did not manually delete the account through Settings β†’ Accounts.

To unlock the phone:

  1. On the lock screen, tap the button "Forgot your password?" (usually appears after 5 failed attempts to enter the pattern lock).
  2. Select the option "Unblock through Mi Account".
  3. Enter the email or phone number associated with the account, then the password.
  4. Confirm unlocking via SMS or email (if two-factor authentication is enabled).

⚠️ Note: If the phone was purchased with hands and the previous owner did not delete his Mi Account, this method will not work, in which case you will need a full reset via Fastboot or contact the service center with proof of purchase.

On some models (like the Redmi Note 10 Pro or Poco X3 Pro) after logging in, the system can request additional confirmation via SMS even if two-factor authentication is disabled. This is a Xiaomi security measure - don't be afraid, just follow the instructions on the screen.

πŸ“Š What kind of smartphone you Xiaomi?
Redmi (Note/Pro series)
Poco (F/X/M)
Mi (11/12/13 series)
Another brand

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

If your phone is connected to the Internet but you can’t enter a password on your lock screen, use Xiaomi’s Find Device, a method that allows you to delete the pattern lock remotely without erasing data from the device (unless it’s encrypted).

Instructions:

  1. Go to i.mi.com and log in to the same Mi Account as you do on your phone.
  2. Choose your device (if there are several) from the menu.
  3. Click "Unlock the device" (option will appear if the phone is online).
  4. Confirm the action via SMS or email.

After that, the pattern lock will be reset and the phone unlocked. Importantly, this method does not work if the device has enabled data encryption (option in Settings). β†’ Additionally. β†’ Encryption. In this case, after unlocking, you will need to enter PIN-Mi Account code or password for decryption.

The device is connected to the Internet|Mi Account tied to phone|The phone's decrypted.|You remember the password from the Mi Account.-->

3. Unlock through Recovery Mode (with data loss)

If previous methods didn't work, you'll have to resort to a hard reset via Recovery Mode, which will remove all data from your phone, including photos, messages and installed apps, and use it only as a last resort!

How to log in to Recovery and reset your settings:

  1. Turn off the phone (press the power button for 10 seconds if it doesn't respond).
  2. Press the button combination: πŸ”Ή For most models: Volume up + Nutrition πŸ”Ή For the Redmi Note 8/9 POCO X2: Loudness up + Loudness down + Nutrition

Mi

Recovery

Wipe Data β†’ Wipe All Data

Reboot β†’ Reboot to System

⚠️ Note: Some models (e.g. Mi 11 Ultra or Redmi) K40) After resetting via Recovery, you may need to enter your Mi Account data even if the phone has not been tied before (FRP). If you do not remember the password, you will have to contact the service center with a check about the purchase.

If the phone asks you to enter the old pattern lock after reset, the reset was incorrect, repeat the procedure or try an alternative method through Fastboot (described below).

What happens if the Recovery Mode does not open?
If the button combination doesn’t work, try: 1. Connect your phone to charge for 10-15 minutes, then try again. 2. Use another combination (for example, for Poco F1 you need to pinch Volume Down + Power). 3. If the screen doesn’t respond, the volume button may not work, in which case only the service center will help.

4. Unlock via Fastboot (for advanced users)

Fastboot is a method that is suitable for users who have access to a computer and know how to work with the command line. It allows you to reset the pattern lock without completely deleting data (on some firmware), but requires an unlocked bootloader.

What you need:

  • πŸ”Ή Computer with drivers installed ADB/Fastboot (You can download it here)
  • πŸ”Ή USB-cable (preferably original)
  • πŸ”Ή Unlocked bootloader (if not, you will have to do fastboot oem unlock, which will erase all data)

Step-by-step:

  1. Turn off the phone and press Volume Down + Power to log into Fastboot Mode.
  2. Connect the phone to the computer.
  3. Open the command prompt (Win + R β†’ cmd) and type: fastboot devices If the device is identified (the serial number appears), continue. If not, install the driver.
  4. Enter the command to reset the pattern lock: fastboot erase gesture.key or (for newer versions of MIUI): fastboot erase locksettings
  5. Reboot the phone: fastboot reboot

Once the reboot is done, the pattern lock will be reset, but all the data will remain in place. Importantly, on some models (like the Redmi Note 11), this method may not work due to changes in the /data partition structure, in which case only a complete reset will help.

πŸ’‘

If fastboot erase gesture.key doesn't work, try unlocking the bootloader first via fastboot oem unlock. But remember, it will delete all the data from the phone!

5. bypass the pattern lock through ADB (if debugging is enabled)

If the phone previously had USB debugging enabled (Settings β†’ About Phone β†’ MIUI β†’ 7 taps by build number β†’ Developer Settings β†’ USB debugging), you can delete the pattern lock through ADB without losing data.

Instructions:

  1. Connect your phone to your computer (even if it is locked).
  2. Open the command line and type in: adb shell rm /data/system/gesture.key or for newer versions of MIUI: adb shell rm /data/system/locksettings.db rm /data/system/locksettings.db-wal rm /data/system/locksettings.db-shm
  3. Reboot your phone: adb reboot

If the commands are executed without errors, the pattern lock will be reset after the reboot.This method works on MIUI 10-14, but may not work on Android 13/14 due to security changes.

⚠️ Attention: If debugging is on USB It wasn't enabled in advance, it won't work. Don't try to activate debugging on a locked phone, it can lead to a full lockdown of the bootloader.

6. Contact the Xiaomi Service Center

If none of these methods worked, the last option is to contact an authorized Xiaomi service center.

  • πŸ”Ή The phone was bought with hands and the previous owner did not delete the Mi Account.
  • πŸ”Ή Device locked after failed reset via Recovery.
  • πŸ”Ή The phone has encryption enabled and you don’t remember the password.

What will be required to unlock:

  • πŸ“„ Check or warranty card confirming the purchase.
  • πŸ“„ Passport (for proof of identity).
  • πŸ”‹ Phone with a charge of at least 50% (the service may require you to leave it for several days).

The cost of unlocking official Xiaomi services varies from 500 to 2000 rubles, depending on the model and the reason for the lock. in informal workshops, the price tag may be lower, but there is a risk of losing the warranty or getting a phone with faulty software.

Unlocking methodData retentionPC requiredDifficultyIt's working on MIUI 14.
Through the Mi Account.βœ… Yes.❌ No.β­βœ… Yes.
Find Deviceβœ… Yes (unless there is encryption)❌ No.β­βœ… Yes.
Recovery Mode❌ No.❌ No.β­β­βœ… Yes.
Fastboot⚠️ Partially (depending on the model)βœ… Yes.⭐⭐⭐❌ No, on some models)
ADBβœ… Yes.βœ… Yes.⭐⭐⭐❌ No (requires debugging)

πŸ’‘

If the phone was purchased after 2021, it is likely to have Factory Reset Protection (FRP) enabled, which means that even after a Recovery reset, you will need to enter your Mi Account data.

Frequently asked questions

Can I unlock Xiaomi without losing data?
Yes, if: πŸ”Ή The phone's debugging on. USB (ADB). πŸ”Ή The phone is connected to your Mi Account and you remember the password. πŸ”Ή The device is not encrypted (checked in Settings) β†’ Additionally. β†’ Encryption: In all other cases, the data will be lost.
What if the phone asks for an old pattern lock after reset?
This means that the reset was incorrect. Try: Re-reset via Recovery by selecting Wipe All Data (not just Wipe Cache); Use Fastboot and fastboot erase userdata (deletes all data); if nothing helps, carry it to the service (perhaps the /data partition is corrupted).
Does Google Find My Device work on Xiaomi?
No. Google's Find My Device service allows you to only lock or erase your device, but not reset the pattern lock. For Xiaomi, use only Find Device from Mi (i.mi.com).
How to avoid blocking in the future?
So that you don't have to face the problem again: πŸ”Ή Set up a backup. PIN-code β†’ Screen locking β†’ Reserve password. πŸ”Ή Link your Mi Account and enable synchronization. πŸ”Ή Make backups regularly through Settings β†’ System system β†’ Backup. πŸ”Ή Write the pattern lock to a secure location (for example, in the password manager).
Can I unlock Xiaomi through the Engineering Menu (##...)?
No. Codes like ##7780## or ##3646633## on Xiaomi don't work to reset the pattern lock. These commands are designed to test hardware and don't affect the locking of the screen.