Forgot pattern lock on Xiaomi: 7 proven ways to unlock

Forgetting the pattern lock on Xiaomi is a bad situation, but it's not a bad one. Even if you typed the wrong pattern 5 times in a row and saw the message "Try it in 30 seconds," don't panic: the manufacturer has provided several official and informal ways to unlock. The main thing is to act consistently and not aggravate the problem with chaotic actions.

In this article, we’ll look at all the current techniques for Redmi, POCO, and Mi models (including new devices on MIUI 14/15 and HyperOS). From simple resets via Mi Account to complex manipulations with Fastboot and EDL, you’ll find a solution even if you forget your account password or turn off sync. And for those who are afraid of losing data, we’ve singled out the non-reset methods to factory settings.

Important: before starting, check the battery power - if the phone runs out during the procedure, the risk of "bricking" increases 3 times.

1 Unlocking through Mi Account (official method)

This is the safest and most recommended method by Xiaomi, but it only works if you meet three conditions:

  • πŸ”— The device is linked to your Mi Account (you have previously logged in).
  • πŸ“Ά The phone has access to the Internet (Wi-Fi or mobile network).
  • πŸ” You remember your account login and password (or you can restore them through your account). email/SMS).

If all the points are fulfilled, follow the instructions:

  1. On the lock screen, click Forgot the pattern lock? (appears after 5 unsuccessful attempts).
  2. Select Sign in to Mi Account and enter your details.
  3. Confirm your login via SMS or email (if two-factor authentication is enabled).
  4. Create a new pattern lock or PIN-code.

The advantage of the method is that it does not require resetting, all data (photos, messages, applications) will remain in place.

πŸ’‘

If you have Find Device enabled in Mi Cloud, try unlocking your phone via the web version of i.mi.com. In the Device Management section, you may have a lock reset option.

2. Reset the pattern lock via Recovery Mode (with loss of data)

If Mi Account is lost and the phone is not connected to the Internet, it will be hard reset via Restore mode, which will delete all data from internal memory (except files on the phone). SD-card, if installed), but guaranteed to unlock the device.

Instructions for Xiaomi on MIUI and HyperOS:

  1. Turn off the phone with a long press of the power button (10-15 seconds).
  2. Hold the combination: πŸ”§ For most models: Volume up + Nutrition. πŸ”§ For POCO F1/F2/F3: Loudness down + Nutrition. πŸ”§ For Mi. 11/12/13 Series: Volume up + Loudness down + Nutrition.

Mi Bunny

Recovery

Wipe Data β†’ Wipe All Data

Reboot β†’ Reboot to System

It takes 5-10 minutes, and when you reboot, it's like new, and you'll need to reset.

Make sure the battery is charged >50%|Take it off. SIM-card and memory card (if any)|Prepare a backup of important data (if you synchronized with Mi Cloud)|Remember the username/password from Mi Account to re-assign

-->

⚠️ Note: On some models (Redmi Note 8 Pro, Mi) 9T) After resetting via Recovery, you may need to enter a password from Mi Account to activate (protection) FRP). If you don’t remember it, the phone will turn into a brick".

3. Unlock via Fastboot (for advanced users)

The method is suitable if:

  • πŸ”“ You've previously included debugging on USB and unlock OEM Unlock in the Developer Settings.
  • πŸ’» You have a computer with Xiaomi drivers installed and Mi Flash Tool program.
  • πŸ“₯ You can download the official firmware for your model.

Step-by-step:

  1. Download the firmware archive for your model from MIUI Downloads (select the Fastboot version).
  2. Unpack the archive in a folder on the C:\ disk (the path should not contain Cyrillic!).
  3. Turn off the phone and put it in Fastboot mode: Volume down + Power Hold until the screensaver with a rabbit in a hat-eared.
  4. Connect your phone to your PC through USB-cable (preferably original).
  5. Launch the Mi Flash Tool, press Select and specify the path to the firmware folder.
  6. At the bottom of the program, select Clean All (full reset) and press Flash.
  7. Wait for the process to end (5-15 minutes) and the phone to restart.

This is a way to get the pattern lock removed, but it requires technical skills, and if you've never flashed your phone, you'd better go to a service center.

What to do if the Mi Flash Tool gives you a "Couldn't find device" error
Make sure that Xiaomi drivers are installed (download from the official website).|Try another one. USB-cable or port (better) USB 2.0).|Disable the antivirus – it can block the utility.|Launch the Mi Flash Tool on behalf of the administrator.

4. bypass the pattern lock through EDL Mode (emergency method)

EDL (Emergency Download Mode) is a firmware mode that allows you to reflash your phone even with a locked bootloader, used when other methods don't work, but requires:

  • πŸ”§ Special cable. EDL (or the ability to seal contacts).
  • πŸ’» Mi Flash Pro or QFilm.
  • πŸ“„ Authorized Xiaomi account for downloading firmware (for new models).

Step-by-step:

  1. Download the firmware in.mbn format for your model (see 4PDA or XDA Developers forums).
  2. Connect your phone to your PC in EDL mode: For Qualcomm processors: Close the Test Point contacts (needs a circuit connector). For Mediatek: use a button combination (check for your model).

Mi Flash Pro

Flash

Wait until the process is completed (it can take up to 30 minutes).

⚠️ Attention: Incorrect actions in EDL-This method is recommended only for experienced users or service engineers.

5. Alternative methods without data loss

If you’re not ready to reset your phone to factory settings, try these methods:

5.1 Unlocking through ADB (if debugging was enabled)

If you activated USB Debugging in the developer settings before blocking, you can delete the file with the pattern lock via ADB:

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 the reboot, the pattern lock will reset, but this method only works on unencrypted devices (without data encryption in MIUI).

5.2.Use of the service "Find device" from Xiaomi

If the phone has Find the device in Mi Cloud enabled, try:

  1. Go to i.mi.com and log in.
  2. Select the locked device in the list.
  3. Click Delete Data (this will reset the pattern lock but save files to the SD-map).

We also recommend adding a fingerprint or facial recognition as an alternative method of unlocking, which will reduce the risk of losing access to the phone.

πŸ’‘

Even if you forget the pattern lock, don’t try to enter it at random more than 10 times – this can lead to a complete lock on the phone and a requirement to enter Mi Account data after a reboot.

7. Frequent mistakes and how to avoid them

When you unlock Xiaomi, users often make critical mistakes. We collected the most common:

Mistake.Effects of consequencesHow to avoid
Resetting via Recovery without detachment Mi AccountActivation of FRP-blocking (phone requires login / password after reset)Before resetting, untie your account in Settings β†’ Accounts β†’ Mi Account
Use of unofficial firmware in FastbootLoss of IMEI, network problems, brickDownload the firmware only from the official website
Interrupting the firmware processDamage to system files, cyclical rebootDon't turn it off. USB-cable and do not turn off the PC until it is completed
Trying to unlock through EDL without experienceLoader damage, irreversible brickTrust this method to professionals

If you are not sure about your actions, it is better not to experiment - contact the service center. the cost of unlocking there is usually lower than the cost of repairs after unsuccessful manipulations.

FAQ: Answers to Frequent Questions

Can you unlock Xiaomi without losing data if USB debugging has been disabled?
Unfortunately, no. Without debugging enabled and unlocked bootloader, the only way to do this is to reset via Recovery or Mi Account (if it's tied), alternative methods like ADB or TWRP require pre-setting.
What if after reset via Recovery, the phone asks for a password from Mi Account?
It's FRP-To remove it, enter the information from the Mi Account that was linked to the phone. If you don't remember the password, restore it via account.xiaomi.com. If your account is not yours (the phone is purchased by hand), contact the previous owner or service center with proof of purchase.
Does the method of removing gesture.key work on new Xiaomi models (2023-2026)?
On devices with MIUI 14+ and HyperOS, this method does not work if the data encryption is enabled (activated by default), the system stores the lock keys in encrypted form, and deleting them will not remove the protection.
Can I unlock a pattern lock through a computer without firmware?
Yes, but only if: The phone has enabled USB debugging. You can confirm root rights (you need an unlocked bootloader), in which case you can use utilities like Android Multi Tools or ADB commands to reset the key, but on new Xiaomi models this method is often blocked by the manufacturer.
How much does it cost to unlock in the Xiaomi service center?
Cost depends on the model and complexity: Basic unlock through Mi Account: 500-1000 rubles. Reset via Fastboot/EDL: 1500-3000 rubles. Recovery after a failed firmware: from 3000 rubles. In official Xiaomi service centers, the price is fixed, in informal can vary. Always specify the total amount before repair.