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

Why Xiaomi smartphones are blocked with a pattern lock and what to do

The pattern lock on Xiaomi is not just a way to protect, but a real trap for forgetful users. According to service center statistics, one in five people will have a problem unlocking because of the loss of a password or pattern. The reasons are several: from banal forgetfulness to failures after a MIUI update, when the system requires you to enter the key after a reboot. But worst of all, on models with a Qualcomm processor (for example, Redmi Note 10 Pro or POCO X3 Pro) after 5 failed attempts, the device can lock for 24 hours, and on MediaTek (Redmi 9A) – immediately offer a reset to the factory.

In this article, we will analyze all the current ways of bypassing the pattern lock - from official (via Mi Account) to technical (using the use of the pattern lock). ADB And Fastboot. Importantly, not all methods will save your data, like resetting through Recovery will erase everything except the files on your data. SD-map, and unlocking through Find Device can only work with active Internet. β†’ Additionally. β†’ Encryption, chances of saving files tend to zero.

Method 1: Unlocking with Mi Account (official method)

The safest and most legal way to use a tied Mi Account is to use it on all Xiaomi, Redmi and POCO models released after 2018, provided that:

  • πŸ“± The phone is connected to the Internet (Wi-Fi or mobile network).
  • πŸ”‘ You have access to email/phone-linked.
  • πŸ”„ Synchronization is not disabled on the device (checked in Settings) β†’ Accounts. β†’ Mi Account).

Instructions:

  1. On the lock screen, click Forgot Password? (or Forgot Pattern? on English firmware).
  2. Select Sign in via Mi Account.
  3. Enter your login (email or phone number) and password. If two-factor authentication is enabled, confirm the login via SMS or the Mi Security app.
  4. Create a new pattern lock or PIN-code.

⚠️ Note: If the phone was bought with hands and the previous owner did not untie his Mi Account, this method will not work, in which case you will need to contact the service center with proof of purchase (check, contract).

πŸ“Š What kind of smartphone you Xiaomi?
Redmi Note
POCO
Mi
Black Shark
Other

Method 2: Using Recovery Mode (Reset to Factory Settings)

If Mi Account is not tied or you don't remember the login details, the radical method is Recovery Mode reset, which is guaranteed to unlock the phone, but will delete all data, including photos, messages and installed applications, except for the files on the removable memory card (if it is not encrypted).

Step-by-step instructions for Xiaomi:

  1. Turn off the phone with a long press on the power button.
  2. Press the Power Button + Volume combination up and hold for 10-15 seconds until the Mi logo appears.
  3. From the Recovery menu (English or Chinese), select Wipe Data β†’ Wipe All Data.
  4. Confirm the action by selecting Confirm.
  5. After reset, click Reboot β†’ Reboot to System.
Xiaomi modelCombination for RecoveryFeatures
Redmi Note 11/12, POCO X4 ProFood + Volume upMenu in English, sensor support.
Mi 11 Ultra, Mi 12Food + Volume upConfirmation via Mi Account is required even after resetting.
Redmi 9A/9CFood + Volume up + Volume downMenu in Chinese, volume button control.

Turn off the phone from charging.

Extract. SIM-Card (not required, but recommended)

Make sure the battery is at least 30% charged.

Prepare a backup of important files (if you have access to a PC)

-->

Some models (like the Redmi K50 or POCO F4) may require a reset of the Mi Account that was previously tied, part of Factory Reset Protection (FRP) protection, which means that if you don’t remember your account details, the phone will turn into a brick β€” you can only unlock it through a service center.

Method 3: Unlocking through ADB (for advanced users)

If the phone has USB debugging enabled (Settings β†’ About Phone β†’ MIUI β†’ 7 times press to unlock Developer Mode, then Settings β†’ Additional β†’ Developer β†’ USB debugging), you can try bypassing the pattern lock via ADB (Android Debug Bridge).

What you need:

  • πŸ–₯️ A computer with installed Xiaomi drivers and ADB (download from the official website).
  • πŸ”Œ USB-cable (preferably original).
  • πŸ“± Phone with debugging enabled USB (If not activated in advance, the method will not work!).

Instructions:

  1. Connect your phone to your PC via USB.
  2. Open the command line (Win + R β†’ enter cmd).
  3. Enter the commands in order: adb devices (should display your phone) adb shell su rm /data/system/gesture.key reboot
  4. After rebooting, the pattern lock will be reset.

⚠️ Attention: On new versions MIUI 14+ The path to the key file may be different, for example, for Redmi Note. 12 Try to remove gesture.key instead. /data/system/locksettings.db. If the SU command is not working, then there is no root license on the phone.

What if the ADB can’t see the device?
1. Check if debugging is included on USB 2. Install drivers for your Xiaomi model (you can download it on the website) MIUI Download). 3. Try another one. USB-4. Enter adb kill-server, then adb start-server, and again adb devices.

Method 4: Unlocking through Find Device (Remotely)

If you have Find Device enabled on your phone, you can try unlocking it remotely, and this only works if you:

  • 🌐 Phone's connected to the Internet.
  • πŸ“ Find Device is activated in Settings β†’ Mi Account β†’ Find Device.
  • πŸ”‹ Device charged (minimum 15%).

How to unlock:

  1. Go to i.mi.com and log in to your Mi Account.
  2. Select a locked phone from the list of devices.
  3. Press Lock Device (Clock Device)
  4. Enter a new password (PIN or pattern lock) and confirm.
  5. Restart your phone – it unlocks with a new password.

Cons of the method:

  • ❌ It does not work if the phone is off or without the internet.
  • ❌ In some models (for example, POCO F3) Confirmation is required through SMS.
  • ❌ If it's on the phone. MIUI 13+, The function may be restricted for security reasons.

πŸ’‘

Before using Find Device, check if the phone is connected to another Wi-Fi network (such as a guest network). If so, remote unlocking will not work, as the device will not be able to receive the command.

Method 5: Contact Xiaomi Service Center

If none of the methods worked, the last option is to contact the official service center of Xiaomi.

  • πŸ” The phone is blocked by the previous owner's Mi Account.
  • πŸ”§ After resetting via Recovery, it requires account data you don’t have.
  • πŸ“± The device has custom firmware installed, and standard methods do not work.

What will be required to unlock:

  • πŸ“„ Check or contract of sale (to confirm ownership).
  • πŸ†” Passport or other identification document.
  • πŸ’³ Payment for the service (cost varies from 500 to 3000 rubles depending on the model).

The average unlock time is 1 to 5 business days, and some models (such as Black Shark 5) may require a regional center because local services do not have access to specialized software.

⚠️ Warning: Avoid informal services that offer β€œunlock in 5 minutes” and often use illegal methods that can damage firmware or lead to blocking. IMEI. Xiaomi official centers operate under license and give a guarantee for the service.

Frequent Mistakes and How to Avoid Them

When trying to unlock Xiaomi, users often make critical mistakes that make things worse.

  1. Attempting to enter the key 30+ On a regular basis. MIUI 12+ After 30 failed attempts, the phone can lock permanently, requiring a Fastboot reset with data loss.
  2. Using third-party unlocking software, programs like Mi Account Unlock Tool or FRP Bypass often contain viruses or do not work on newer versions of MIUI.
  3. Resetting via Fastboot without knowing commands: The wrong command (e.g. fastboot erase userdata instead of fastboot erase frp) can result in a loss of IMEI.

How to minimize the risks:

  • πŸ”„ Always back up your data through Settings β†’ System system β†’ Backup.
  • πŸ”‘ Link Mi Account and enable synchronization.
  • πŸ“± Before selling your phone, be sure to untie your account and make a reset.

πŸ’‘

If your phone is locked after a MIUI update, try waiting 24 hours – sometimes the system automatically resets the key entry restriction.

FAQ: Answers to Frequent Questions

Can you unlock Xiaomi without losing data if USB debugging is not enabled?
No. Without USB debugging enabled or root rights, you can't bypass the pattern lock with data storage, and the only chance is if the phone is synced to Mi Account and you have access to your account.
Why does the phone ask for an old Mi Account after resetting via Recovery?
This is the work of Factory Reset Protection (FRP), which is activated if the phone has been tied to Mi Account and encryption enabled, and to remove the lock, you need to enter the account information that was on the device before the reset.
Can I unlock POCO X3 Pro through my Google Account?
No. Since MIUI 11, Xiaomi has removed the ability to unlock through Google Account. Now only Mi Account or Recovery/Fastboot reset works.
What if, after unlocking through ADB, the phone hangs on the logo?
This means that the key file was deleted incorrectly or system data was corrupted. Try: Go to Recovery and do Wipe Cache. If it doesn't work, do a full reset.
How much does it cost to unlock in the Xiaomi service center?
The cost depends on the model and the reason for the lock: Redmi 9A/10A: 800-1200 rubles. POCO X3/X4: 1500-2000 rubles. Mi 11/12: 2500-3500 rubles (due to the difficulty of unlocking FRP). The cost usually includes diagnosis and warranty for the service (1-3 months).