How to unlock Xiaomi if you forgot the pattern lock: 5 proven ways

The forgotten pattern lock on Xiaomi is a situation that one in five users encounter at least once in their lives. According to service center statistics, 38% of device locks are related to loss of access due to a graphical password. PIN-A visual pattern seems easy to remember, but its abstract nature often plays a cruel joke: the brain does not capture sequence as meaningful information.

It is important to understand that the term β€œpattern lock hacking” in the context of Xiaomi is a legal gray area.The manufacturer strictly prohibits circumvention of security systems, and any actions that violate the integrity of MIUI can lead to loss of warranty or blocking of the Mi Account. However, there are legal methods of restoration of access approved by the company, which we will discuss. This article is relevant for devices on MIUI 12-14 (including Redmi, POCO, Black Shark) and takes into account the latest security policy updates Xiaomi 2026.

Before you get to the instructions, answer the key question: is your smartphone tied to a Mi Account? 80% of unlock success depends on it. If you can't remember the linked mail, move on to the hardware reset section right away, as other methods will prove useless.

πŸ“Š Your Xiaomi smartphone is tied to your Mi Account?
Yeah, I remember the login/password.
Yeah, but I don't remember the data.
No, not tied.
I don't know what it is.

Method 1: Unlocking with Mi Account (official method)

This is the only way Xiaomi considers legitimate and does not penalize its use, and works on all devices with MIUI 10+, if:

  • πŸ“§ The smartphone is linked to your Mi Account (even if you don’t remember your password).
  • 🌐 Internet access (Wi-Fi or mobile network).
  • πŸ”„ Data synchronization is enabled on the device (activated by default).

After 5 failed attempts to enter the pattern lock, the system will offer the option "Forgot the password?". Click on it and follow the algorithm:

  1. Enter the login (email or phone number) associated with the Mi Account.
  2. Confirm your identity via SMS or backup email (if two-factor authentication is enabled, you will need a code from the Mi Security app).
  3. Create a new pattern lock or PIN-code.

⚠️ Note: If you have previously changed your Mi Account password but have not updated it on your smartphone, the system can block access for 24-72 hours, in which case only waiting or applying for Xiaomi support with proof of ownership (check or box) will help).

Make sure the device is connected to the internet

Click "Forgot your password?" after 5 failed attempts

Enter the linked email/phone

Confirm identity via SMS or backup email

Create a new pattern lock

-->

Method 2: Use the "Find the Device" function

Find Device, which is similar to Find iPhone, not only allows you to track Xiaomi’s location, but also remotely unlocks the screen, which works even if you don’t have physical access to your phone, but requires:

  • πŸ”— Pre-activation of the function in settings (Settings) β†’ Mi Account β†’ Find Device).
  • πŸ“Ά Connecting the device to the Internet (via mobile network or Wi-Fi).
  • πŸ”‹ Battery charge over 15%.

Instructions:

  1. Go to i.mi.com from any device.
  2. Sign in under the same Mi Account as on a locked smartphone.
  3. Select your device in the list (if there are several).
  4. Click "Unlock" and confirm the action.

Important: After remotely unlocking, all data on the device will remain intact, but the system will require you to create a new pattern lock or PIN-code on next inclusion.

What if the Find Device can’t see the device?
If the smartphone does not appear in the list on i.mi.com, check: 1. Internet connection – the device must be online. 2. Activation of the function – without first enabling Find Device in the settings method will not work. 3. Time synchronization – if the date / time on the smartphone is downed, the Xiaomi server does not recognize the device. 4. Update MIUI – on older versions (below MIUI 11) the function may not work stable.

Method 3: Safe Mode (for older versions of MIUI)

This is a good way to use MIUI 9-11 devices (released before 2020) and is based on a vulnerability that Xiaomi has patched in the new firmware. If your smartphone is older, try:

  1. Press the power button until the shutdown menu appears.
  2. Hold your finger on the "Switch off" item until the notification of the transition to safe mode appears.
  3. Confirm action. The device will restart.
  4. In Safe Mode, the pattern lock may not be requested – if lucky, go to Settings β†’ Lock the screen and change the password.

⚠️ Attention: On devices with MIUI 12+ This method doesn't work -- it still requires you to enter a pattern lock even in Safe Mode, and when you're out of Safe Mode, the old password can be activated again.

Xiaomi modelMaintains a safe regime?MIUI version
Redmi Note 5Yes.MIUI 9–10
Mi 8Yes (partially)MIUI 10–11
POCO F1No.MIUI 12+
Redmi 9ANo.MIUI 12–14

Method 4: Unlocking through ADB (for advanced users)

If your Xiaomi has USB debugging enabled (Settings β†’ About Phone β†’ MIUI Version β†’ 7 times tap to activate developer mode), you can try resetting the pattern lock via ADB. This method requires:

  • πŸ–₯️ Computer with installed drivers Xiaomi and Android SDK.
  • πŸ”Œ USB-cable (preferably original).
  • πŸ”§ Knowledge of working with the command line.

Step-by-step:

  1. Connect your smartphone to your PC and confirm your trust in the computer on the device screen (if you receive a request).
  2. Open the command line (Win + R β†’ enter cmd).
  3. Enter the command to check the connection: adb devices If the device is displayed – go further.
  4. Delete the file with the pattern lock: adb shell rm /data/system/gesture.key or for newer versions of MIUI: adb shell rm /data/system/locksettings.db
  5. Reboot the device: adb reboot

⚠️ Note: This method does not work on all devices, starting with MIUI 13, Xiaomi tightened the protection of system files. PIN-code SIM-cards (if any) if installed).

1. Install the driver manually through the Mi PC Suite.

2. switch USB connection mode to File Transfer (MTP).

3. Use another USB-port (preferably) USB 2.0).

-->

Method 5: Hard Reset – a last resort

If no other means have worked, it’s just a complete reset that will delete all data on the device, including photos, contacts and apps, but return access to the smartphone.

  1. Turn off the device (press the power button for 10-15 seconds).
  2. Press the button combination to enter Recovery Mode: For most models: Power button + Volume up. For POCO and some Redmi: Power button + Volume up + Volume down.

Wipe Data β†’ Wipe All Data

Confirm the action and wait for the process to be completed (5-10 minutes).

Reboot

Critical information: After a hard reset, the device may require data input from the last associated Mi Account (FRP protection).If you do not remember the username / password, the smartphone will become a β€œbrick” – it will be impossible to restore access without proof of purchase.

-->

How to avoid blocking in the future

To avoid being in this situation again, follow the following simple rules:

  • πŸ” Use it. PIN-code instead of a pattern lock – it is easier to remember, and the probability of accidentally unlocking is lower.
  • πŸ“± Link your smartphone to your Mi Account and update your password regularly (every 3-6 months).
  • ☁️ Enable automatic backup in Settings β†’ Mi Account β†’ Mi Cloud.
  • πŸ“ Write down a pattern lock or PIN-code in a secure location (for example, in the Bitwarden or KeePass password manager).

We also recommend activating the Smart Lock feature (Settings β†’ Screen Lock β†’ Smart Lock), which allows you to automatically unlock your device in trusted areas (for example, at home or at work).

Frequent questions about unlocking Xiaomi

Can I unlock Xiaomi without losing data?
Yes, but only if: The device is tied to Mi Account and you remember the username/password. Find Device enabled. USB debugging enabled on the smartphone (for the ADB method). In all other cases, the data will be lost.
What to do if you forget your pattern lock and your Mi Account data?
In this case, only a hard reset remains, but after it, the smartphone will require data input from the last associated account (FRP protection). If you do not remember the login / password, contact the Xiaomi service center with a check or box from the device to confirm ownership.
Do programs work to β€œhack” the pattern lock?
No. All programs like Mi Account Unlock Tool or Xiaomi Tool V2 that promise to bypass locks are fraudulent. They either: Install malware on your computer, demand payment for unlocking, but fail to deliver, violate Xiaomi warranty terms, and the only safe way is the official methods described in this article.
Can data be recovered after a hard reset?
Xiaomi does not provide tools to restore data after Wipe Data. However, if you have previously enabled backup in Mi Cloud, some of the data (contacts, notes, photos) can be restored after re-authorization.
Why does the Mi Account ask for a pattern lock again?
This is due to a synchronization failure between Xiaomi servers and local device settings. Solution: Connect to stable Wi-Fi. Reboot your smartphone. Re-unlock the Mi Account. If the problem persists, reset (Settings β†’ About Phone β†’ Reset), but select Save My Data (if available).