How to unlock a pattern lock on Xiaomi: from Mi Account to ADB

The forgotten pattern lock on Xiaomi’s smartphone is a problem that thousands of users face every day. PIN-The pattern seems easy to remember, but this is often a cruel joke: the brain β€œautomates” the movement of the fingers, and when you try to enter the key, many are deliberately lost. Things get complicated if the phone doesn't have a fingerprint or facial recognition, and Mi Account access isn't configured.

In this article, we will discuss all the current ways of unlocking, from official methods using a Xiaomi account to technical solutions through ADB and Fastboot. Importantly, not all methods will save your data. For example, resetting through Recovery will remove all information from the device, so first try the β€œsoft” options. We will also explain how to minimize the risks of data loss in the future and what Xiaomi settings will help to avoid such situations.

If your phone is locked after failing to type in a pattern, don’t panic: most Redmi, POCO and Mi models have built-in recovery mechanisms, and the key is to act consistently and avoid using dubious programs from the Internet that promise β€œhack in 5 minutes,” which often contain malware or simply don’t work on modern versions of MIUI.

1 Unlocking through Mi Account (official method)

The most reliable and recommended method for Xiaomi is to use a tied Mi Account, which works on all devices with MIUI (including Redmi Note 10, POCO X3, Mi 11 and later) if:

  • πŸ“± The phone is connected to the Internet (Wi-Fi or mobile network).
  • πŸ”‘ Mi Account was tied to the device before being blocked.
  • πŸ“§ You remember your login (email or phone number) and password.

After 5 failed attempts to enter the pattern lock, the button Forgot the password? (or Forgot pattern? on English firmware) will appear on the screen.

  1. Choose the method of recovery: by SMS or via email.
  2. Enter the confirmation code sent to the linked number or mail.
  3. Create a new pattern lock or PIN-code.

⚠️ Note: If you have previously disabled sync with Mi Account or reset your phone to factory settings without unplugging your account, this method will not work).

πŸ“Š What Unlocking Method Have You Tried Before?
Mi Account
Reset via Recovery
ADB/Fastboot
I've been to the service.
Never blocked.

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

Find Device (similar to Google's Find Phone) not only allows you to track Xiaomi's location, but also manage some settings remotely. If you have this option enabled on your device, you can reset the pattern lock via the web interface:

  1. Go to i.mi.com and log in to your Mi Account.
  2. Select the locked device in the list.
  3. Click Delete Data β†’ Reset the lock screen password.
  4. Confirm the action via SMS or email.

πŸ”Ή Limitations of method:

  • 🌐 Requires an active internet connection on your phone.
  • πŸ”„ It only works if the Find Device has been activated before the lock.
  • πŸ“΅ Not available on custom firmware devices (e.g. LineageOS).

If the option to Reset the lock screen password is not on the menu, then your Xiaomi model does not support this feature.

πŸ’‘

Before using Find Device, check if geolocation is enabled on your phone – this will speed up your search for the device in the list.

3. Unlock through ADB (for power users)

The Android Debug Bridge (ADB) method is suitable if the phone is debugging over USB and has access to a computer. This is the only way to unlock the pattern lock without losing data, but it requires preliminary preparation:

  • πŸ–₯️ A computer with installed Xiaomi drivers and ADB.
  • πŸ”Œ USB-cable (preferably original).
  • πŸ”§ Included debugging by USB In Settings β†’ The phone. β†’ Version. MIUI (7 times to activate the developer mode).

If the conditions are met, follow the instructions:

  1. Connect the phone to your PC and open the command line (Win + R β†’ enter cmd).
  2. Check the device connection command: Adb devices should appear serial number of your Xiaomi.
  3. 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
  4. Reboot your phone: adb reboot

After the reboot, the pattern lock will be reset, but all data (photos, messages, applications) will remain in place. ⚠️ Note: On some models (Redmi 9, POCO M3 This method may not work due to increased protection. MIUI 12+. In this case, try an alternative team:

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

Install Xiaomi drivers on PC|Download ADB Tools (platform-tools)|Enable debugging on USB phone-on|Prepare original USB-cable|Check the battery charge (minimum 30%)-->

4. Recovery Mode (Universal Method)

If previous methods failed, it will remove all data from the phone, including photos, contacts and apps, but will return access to the device, which is suitable for all Xiaomi models, including the Redmi Note 8 Pro, Mi A3 and others.

Instructions:

  1. Turn off the phone.
  2. Press the button combination: For most models: Volume up + Power. For older devices (e.g. Redmi 4X): Volume up + Volume down + Power.

Mi

Recovery

Wipe Data

Wipe All Data

Reboot

Reboot to System

⚠️ Note: On some devices with MIUI 13+ After reset, you may need to enter the Mi Account data associated with the phone. If you do not remember the username / password, contact Xiaomi support to restore access.

Xiaomi modelCombination for RecoveryDo you need a Mi Account after a reset?
Redmi Note 10/11Volume up + NutritionYes (if tied up)
POCO X3/X4Volume up + NutritionYes.
Mi 11/12Volume up + NutritionYes.
Redmi 9/9AVolume up + NutritionNo (on some firmware)

5. Unlock via Fastboot (for advanced)

The method through Fastboot is suitable if Recovery Mode is not available or the phone β€œhangs” on the Mi logo. It requires an unlocked bootloader, which is important for users who have previously installed custom firmware. On devices with a locked bootloader (by default on all Xiaomi), this method will not work without an anlock.

Instructions:

  1. Turn off your phone and put it in Fastboot mode: Volume down + Power
  2. Connect your device to your PC and check for detection: fastboot devices
  3. Delete the file with the pattern lock: fastboot erase userdata or (for new versions): fastboot erase locksettings
  4. Reboot the phone: fastboot reboot

Xiaomi service centers in Russia and CIS usually unlock the device within 1-3 days, but be prepared for the fact that data from the phone will be deleted. In some cases (for example, if you steal), unlocking may not be possible without proof of ownership.

πŸ“ How to find an official service:

  1. Go to the Xiaomi support website.
  2. Choose a country and a city.
  3. Check the reviews about the service center (some β€œunofficial” workshops may offer unlocking at the risk of damage to the device).

πŸ’‘

Official service is the only legal way to unlock if all software methods are exhausted. Avoid artisanal workshops promising undocumented hacking, which can lead to IMEI blocking.

7.How to avoid blocking in the future

To avoid the problem of a forgotten pattern lock again, set up Xiaomi for these recommendations:

  • πŸ” Add a backup. PIN-Code: In the lock settings (Settings) β†’ Lock screen β†’ Password) set a spare PIN. You will need it after rebooting or if you forget the pattern.
  • πŸ‘€ Link Mi Account: Without an account, unlocking through Find Device or resetting your password will not be possible.
  • πŸ“± Set up biometrics: Fingerprint or facial recognition speeds unlocking and reduces reliance on the pattern lock.
  • πŸ”„ Enable Find Device: Activate the feature in Settings β†’ Mi Account β†’ Find Device.
  • πŸ“ Save Backup: Create Backups Regularly through Settings β†’ System and device β†’ Backup.

πŸ”Ή Additional advice:

  • Do not use too simple patterns (such as the letter "L" or a square).
  • Periodically enter the pattern lock manually so as not to forget it.
  • If you plan to sell the phone, first untie the Mi Account and make a reset.

On devices with MIUI 14, the β€œSecret Password in the Cloud” feature has been introduced, which syncs lock data with Mi Account. Activate it in the security settings to make it easier to restore access.

FAQ: Frequent questions about unlocking Xiaomi

Can I unlock Xiaomi without losing data?
Yes, but only if the phone is debugging over USB and has access to ADB. In this case, you can delete the file with the pattern lock without reset (see section 3). If debugging is disabled, the data will be lost.
What to do if you forget your Mi Account login/password?
Restore access through the recovery page, require access to the email or phone number associated with the account, if the data is lost irretrievably, contact Xiaomi with proof of ownership of the device (checks, box).
Why does the phone ask for an old Mi Account after resetting via Recovery?
This is Factory Reset Protection (FRP) that is activated on all Xiaomi with MIUI 9+, and to get around it, you need to enter the Mi Account data that was tied to the phone before the reset, and if the account is not restored, the device will remain locked.
Do you have a pattern lock cracker (such as Mi Account Unlock Tool)?
No, most of these programs are frauds, they either don't work on modern versions of MIUI, or they contain viruses, and the only legal ways are official methods (Mi Account, ADB, Fastboot) or accessing the service.
Can you unlock Xiaomi through Google Account like on older Android?
No, since MIUI 8 (2016), Xiaomi has removed its unblocking support through Google Account, now only possible through Mi Account or data reset.