Forgot a pattern lock on the Xiaomi phone: how to unlock without data loss

The forgotten pattern lock on Xiaomi's smartphone is one of the most unpleasant situations users face. PIN-The pattern seems easy to remember, but this is often a cruel joke: the brain β€œautomates” the movement of the fingers, and when changing the environment (for example, after a break in using the phone), it becomes impossible to reproduce it. Worst of all, the manufacturer does not provide an official way to restore the pattern lock – it is a security measure designed to protect your data from outsiders.

In this article, we’ll look at all the current ways to unlock Xiaomi phones (including Redmi, POCO and Mi), from the safest to the radical, with their pros, cons and potential risks. Importantly, not all methods guarantee data security β€” some lead to a complete reset. We’ll also explain why models with a MediaTek chip (such as the Redmi Note 11) are more likely to unlock without losing data than on Snapdragon.

1 Unblocking through Mi Account (official method)

If your Xiaomi phone is tied to your Mi Account, it’s the most secure and secure way to unlock, and works on most models released after 2018, but there are some nuances:

  • πŸ”Ή The phone must be connected to the Internet (Wi-Fi or mobile network).
  • πŸ”Ή You should remember the username and password from your Mi Account (or have access to your linked mail/phone for recovery).
  • πŸ”Ή On some firmware (e.g, MIUI 14) after 5 failed attempts to enter the key, the button β€œForgot the password” will appear?Β».

Instructions:

  1. On the lock screen, enter the wrong pattern lock 5 times in a row.
  2. You'll see the message, "Try again in 30 seconds," and the button, "Forgot pattern?"
  3. Enter the data from your Mi Account (email or phone number + password).
  4. Follow the system instructions to create a new pattern lock.

⚠️ Warning: If your phone is not connected to the network, the "Forgot Password?" button may not appear, in which case try connecting to Wi-Fi via the Quick Settings Panel (swipe your finger down from the top of the screen, even if the phone is locked).

πŸ“Š Your Xiaomi phone is tied to your Mi Account?
Yeah, and I remember the password.
Yeah, but the password's forgotten.
No, not tied.
I don't know.

2. Unlock through ADB (for power users)

The method is suitable if the phone is enabled debugging by USB (USB Debugging) and there's access to a computer. It's rare, but if you've previously set up a phone to develop or connected it to a PC, there's a chance. MIUI All versions, but require drivers installed ADB and Fastboot.

Step-by-step:

  1. Connect your phone to your PC through USB-cable.
  2. Open the command line (Win + R β†’ enter cmd) and execute the commands:
adb devices

(Your device should be displayed. If not, install the driver or check the cable.)

adb shell


su




rm /data/system/gesture.key

Then restart the phone and the pattern lock will reset. If the su command is not working (no root rights), try an alternative method:

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

This will open the lock change menu where you can set a new PIN or pattern lock.

Install the drivers ADB and Fastboot|Enable debugging on USB on the phone (if possible)|Connect the original USB-cable|Check the visibility of the device in ADB

-->

⚠️ Note: New Xiaomi models (e.g. Xiaomi 13 or Redmi Note 12) are debugging USB It turns off when you lock the screen, and if you don't turn it on before, it won't work.

3. Recovery Mode reset (data loss)

If previous methods failed, the radical way is to reset hard through recovery mode, which will delete all data on the phone, including photos, contacts and apps, which works on all Xiaomi models, but requires physical access to the device.

Instructions:

  1. Turn off the phone (press the power button for 10-15 seconds).
  2. Press the button combination to enter Recovery: For most models: Power button + Volume up. For older Redmi (until 2019): Power button + Volume up + Volume down.

Wipe Data

Wipe All Data

Confirm the reset and wait for the reset.

Xiaomi modelCombination for RecoveryNotes
Redmi Note 10/11/12Food + Volume upMIUI 13/14 may require confirmation via Mi Account after reset.
POCO X3/X4/X5Food + Volume upIn Recovery menu in English.
Xiaomi 12/13Food + Volume upOn some firmware, the reset is blocked without entering the Mi Account password.
Redmi 9/9A/9CFood + Volume up + Volume downThe old combination is relevant for the budget models of 2020.

πŸ’‘

If the phone requires you to enter an old pattern lock after reset, try connecting to Wi-Fi and using the Mi Account unlock (see section 1).

4. Unlock via Fastboot (for advanced)

The method is suitable if Recovery Mode is locked with a password or does not allow you to reset.Requires a computer and installed tools Fastboot.The method does not guarantee the safety of data, but sometimes allows you to bypass the lock without a complete reset.

Instructions:

  1. Turn off your phone and press the Power button + Volume down to log into Fastboot Mode.
  2. Connect your phone to your PC and open the command line.
  3. Enter a command to check the connection:

In all other cases, the data will be lost.

What to do if you forget your Mi Account password?
Restore it through the official account.xiaomi.com. You will need access to your linked mail or phone number. If recovery is not possible, contact Xiaomi with proof of purchase.
Will the phone flashing help?
Flashing over Fastboot or TWRP will remove the pattern lock, but it will also erase all data, the equivalent of resetting through Recovery, but with a greater risk of the phone being β€œbricked” if it makes a mistake.
Why does the phone ask for an old pattern lock after reset?
This is a feature of MIUI protection. Once reset via Recovery, the system may require you to enter the old key or Mi Account data. Solution: Connect to Wi-Fi. Click "Forgot your password?" and log in to Mi Account. If it doesn't work, swipe your phone through Fastboot erase userdata.
Can I unlock Xiaomi through my Google Account?
Unlike older Android phones, Xiaomi doesn't support unlocking through Google Account. The only official way is Mi Account.