Forgot the pattern lock on Xiaomi: 7 ways to unlock your phone (including saving data)

Have you entered the wrong pattern lock on Xiaomi for the fifth time, and the phone requires you to wait 30 minutes? Or the screen is completely locked with the words "Too many pattern attempts"? The situation is familiar to many β€” according to statistics, every third owner of Redmi or POCO at least once faced with a forgotten password. But do not rush to carry the device into the service: 80% of the time, you can unlock yourself, and sometimes even without losing data.

In this article, 7 proven methods for Xiaomi models on MIUI 12-14 (including Redmi Note 10/11/12, POCO X3/X4/X5, Mi 11/12, etc.) We will discuss how to bypass the lock through Mi Account, ADB, Fastboot, and what to do if the phone is not tied to a Xiaomi account and debugging by USB is disabled. Important: some methods require preliminary preparation (for example, enabled debugging), so read carefully!

1 Unlocking through Mi Account (official method)

The easiest and safest method is to use a Xiaomi account, which works if:

  • πŸ“± The phone is connected to the Internet (Wi-Fi or mobile network).
  • πŸ”‘ You remember the username/password from Mi Account (or you can restore it).
  • βš™οΈ The "Find the device" function was activated in the settings.

After 5 failed attempts to enter the key, the button "Forgot pattern?" will appear on the screen.

  1. Enter the email/phone associated with the Mi Account.
  2. Confirm the entry via SMS or email.
  3. Reset the pattern lock and install a new one.

⚠️ Note: If the phone is not connected to the network, this method will not work, POCO F3 on MIUI (13) may require additional confirmation through SMS even with the right password.

πŸ“Š Your phone 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, I haven't.

2. reset the pattern lock via ADB (without loss of data)

The method works if the phone is enabled debugging by USB (USB Debugging, and there's access to the computer. It's the only way to save all the data (photos, messages, apps) when you unlock it.

You'll need:

  • πŸ–₯️ Computer with Windows/Linux/macOS.
  • πŸ”Œ USB-cable (original, undamaged).
  • πŸ“¦ Established ADB and Fastboot.

Instructions:

  1. Connect the phone to the PC.
  2. Open the command line (cmd) in the adb folder.
  3. Enter the commands in order adb shell su rm /data/system/gesture.key reboot
  4. After restarting, enter any pattern lock – the phone will unlock.

⚠️ Attention: On new versions MIUI (13+) You may need root access because the su command is blocked. If you enter su with a "Permission denied" error, move to the next method.

β˜‘οΈ Preparation for unblocking through ADB

Done: 0 / 4

3. Unlock via Fastboot (reset to factory settings)

If USB debugging is disabled and Mi Account is not tied, then you have a hard reset via Fastboot mode, which deletes all data but is guaranteed to unlock the phone.

Suitable for models:

  • πŸ“± Redmi Note 8/9/10/11/12
  • πŸ“± POCO X3/X4/X5
  • πŸ“± Mi 10/11/12 etc.

Instructions:

  1. Turn off the phone.
  2. Press the Power button + Volume down before the Fastboot logo appears.
  3. Connect your phone to your PC and open the command line.
  4. Enter the command to reset: fastboot erase userdata fastboot erase frp fastboot reboot

After the reboot, the phone will be like new – you will need to re-set.

πŸ’‘

After the team `fastboot devices` Phone doesn’t show up, install Mi Phone Manager drivers or use universal Google USB Driver.

4.Use of Recovery Mode (Fastboot alternative)

If Fastboot is not available (for example, on some POCO M3/M4), try resetting via Recovery Mode.This method also erases data, but does not require a connection to a PC.

How to get in to Recovery:

  1. Turn off the phone.
  2. Press the Power button + Volume up.
  3. From the menu, select Wipe Data β†’ Wipe All Data (manage volume buttons, confirm – power button).

⚠️ Note: Some firmware (e.g. Xiaomi.eu) may call the Wipe All Data item differently – look for options with Factory Reset or Erase All".

MethodPC requiredData retainedIt works without a Mi Account.
Mi Account❌ No.βœ… Yes.❌ No.
ADBβœ… Yes.βœ… Yes.βœ… Yes.
Fastbootβœ… Yes.❌ No.βœ… Yes.
Recovery❌ No.❌ No.βœ… Yes.

5 Unlocking through Xiaomi Service Centers

If the independent methods did not work, contact the official service center. Xiaomi has an unlock program for confirmed owners.

  • πŸ“„ Check or box IMEI (proof).
  • πŸ†” Passport (for proof of identity).
  • πŸ’³ Payment for services (from 500 to 2000) β‚½ model-wise).

⚠️ Warning: Unofficial services can offer "unlock without loss of data" for 3000-5000 β‚½, But it's often a scam. Xiaomi's official centers don't guarantee file safety when you reset hardware!

What to do if the phone is bought with hands?
If you don't have a check, but your phone is tied to your Mi Account, the chances of unlocking the service are higher, and if the previous owner's account, his consent to unblock the device through account.xiaomi.com will be required.

6.How to prevent future blocking

To avoid the problem again:

  • πŸ” Use a PIN instead of a pattern lock – it’s harder to forget.
  • πŸ“± Attach Mi Account and enable Find the device in the settings (Settings) β†’ Xiaomi Account β†’ Find the device).
  • πŸ–₯️ Activate Debugging on USB (Settings β†’ The phone. β†’ Version. MIUI (press 7 times) β†’ Additionally. β†’ For developers β†’ Debugging by USB).
  • πŸ“ Write the key to a secure location (e.g., Google Keep with encryption).

πŸ’‘ Useful advice: On Xiaomi phones with MIUI 14 the function "Reserve" appeared PIN" β€” It allows you to unlock the pattern lock with a preset digital password. β†’ Screen locking β†’ Standby PIN.

πŸ’‘

Even if you use a graphical key, always set up a backup unlock method (PIN, fingerprint or Face ID) that will save data 90% of the time!

7. Frequent mistakes and how to avoid them

When unlocking, users often make critical errors:

  • ❌ Interrupting the process during a reset via Fastboot or Recovery – can lead to a β€œbrick” (phone not turned on).
  • ❌ Using unofficial firmware (e.g. Xiaomi.eu) without knowing the consequences – some custom builds block unlocking through Mi Account.
  • ❌ Introduce commands ADB/Fastboot error-prone – for example, a typo in gesture.key will not reset the key, but will delete another system file.

πŸ”§ If the phone freezes after a failed reset:

  1. Turn off the battery for 10 seconds (if removable).
  2. Try going to Fastboot and repeat the procedure.
  3. If the screen is black, plug it into charging for 30 minutes, then try turning it on.

FAQ: Answers to Frequent Questions

❓ Can you unlock Xiaomi without losing data if you debug it? USB switched off?
No. Without USB Debugging or a tied Mi Account, you can't save your data, and the only way is to contact Xiaomi's service center with proof of purchase.
❓ Why After Fastboot Reset, Your Phone Asks for an Old pattern lock?
This is because of FRP, or Factory Reset Protection, where if the phone was tied to the Mi Account, you'll need to reset that account, and if you don't remember that, you'll need to restore access.
❓ Does unlocking through Google Account work on Xiaomi?
No. Since MIUI 9 (2017), Xiaomi has removed the ability to unlock through Google Account, and now only Mi Account or methods like ADB/Fastboot work.
❓ Can you hack a pattern lock with software like Dr.Fone?
Programs like Dr.Fone, iMyFone LockWiper or Tenorshare 4uKey don’t work on modern Xiaomi (MIUI 12+) and can only help on older models (like Redmi 4X), but often require payment and do not guarantee the result.
❓ How to know if the debugging is included USB, if the phone is blocked?
Directly, no. Indirect signs: You've previously connected your phone to a PC to transfer files over MTP. The developer's settings have enabled "Debug over USB." The lock screen has a notification "Debug over USB connected" (rarely). If none of this applies to you, debugging is likely disabled.