Forgot a pattern lock on Xiaomi: 7 proven ways to unlock your smartphone

Forgetting the pattern lock on a Xiaomi smartphone is a bad situation, but it's fixable. PIN-A graphical pattern seems easy to remember, but this is often a cruel joke: users draw it automatically without thinking. When the screen is locked after several failed attempts, panic grows β€” especially if the phone has important data, photos or work documents.

Fortunately, the manufacturer has provided several ways to restore access, and the enthusiastic community has found workarounds for even complex cases. In this article, we will analyze all the current methods of unlocking, from official (using a Mi Account) to technical (via Fastboot or EDL).

If you're reading this article on a locked phone with another device, don't despair. Even if your smartphone requires you to enter the key after you reboot, the chances of success are high, and the main thing is to take your time and follow the instructions in order, starting with the safest methods.

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 models, starting with the Redmi Note 3 and Mi 5, if you previously:

  • πŸ”Ή I have logged into my phone account (even if it’s been a long time).
  • πŸ”Ή Connected the device to the Internet (via Wi-Fi or mobile network).
  • πŸ”Ή Do not turn off the function Find the device in the security settings.

To unlock the phone:

  1. On the lock screen, tap Forgot the pattern lock? (or Forgot pattern? on English firmware).
  2. Select Sign in via Mi Account.
  3. Enter your email/phone and password from your Mi Account.
  4. Confirm your login via SMS or email (if two-factor authentication is enabled).
  5. Create a new pattern lock or PIN-code.

⚠️ Warning: If your phone is not connected to the Internet, this method will not work. Try connecting to Wi-Fi via the Quick Settings Panel (swipe down from the top edge of the screen) or insert SIM-card.

On Xiaomi 12T, Redmi Note 11 and later, after 5 failed key attempts, the system may require you to wait 30 seconds before trying again, in which case wait for a timeout or restart the phone (press Power + Volume up for 10 seconds).

πŸ“Š What kind of smartphone you Xiaomi?
Redmi (Note/Pro/K-series)
Mi (11/12/13)
POCO (F/X/M)
Black Shark
Other

2.Use of the "Find Device" function (Mi Cloud)

If you're syncing with Mi Cloud on your phone, you can unlock it remotely via the web interface, and this is a good method, even if you don't remember the password for the pattern lock, but:

  • πŸ“± The device must be on and connected to the Internet.
  • πŸ”‹ Battery charge: at least 20% (otherwise the phone may be switched off during the process).
  • 🌐 Find the device must be activated in the settings (Settings) β†’ Mi Account β†’ Mi Cloud β†’ Find the device).

Instructions:

  1. Go to i.mi.com from a computer or other phone.
  2. Sign in with the same Mi Account as on the locked device.
  3. In the Devices section, select your smartphone.
  4. Click Unlock the device (or Unlock).
  5. Confirm the action via SMS or email.

After that, the phone will unlock, but all data will remain in place – this method does not result in a reset, but on some firmware (for example, MIUI 14 for the global version), the function may be limited for security reasons.

πŸ’‘

If the phone doesn't show up in the device list on i.mi.com, check if geolocation and mobile data are enabled on the locked device. Sometimes it helps to reboot the phone (hold Power + Volume down until vibration).

3. Reset the pattern lock via Recovery Mode

If previous methods didn’t work, you’ll need to use Recovery Mode, which will remove all data from your phone, so use it only as a last resort, and is suitable for most Xiaomi models, including the Redmi 9, Mi 10, POCO X3 and others.

Step-by-step:

  1. Turn off the phone (hold the power button for 10-15 seconds).
  2. Press the Power + Volume combination up until the Mi logo appears.
  3. From the Recovery menu, select the language (usually English or Chinese).
  4. Go to Wipe Data β†’ Wipe All Data (use volume buttons for navigation, power for selection).
  5. Confirm the reset by selecting Confirm.
  6. Once completed, select Reboot to reboot.

The phone will boot as new, with factory settings, and you will need to go through the initial setup, including linking your Mi Account.

⚠️ Note: Some models (e.g. Xiaomi Mi) A1/A2/A3 With pure Android One, the Recovery menu may be different.In this case, look for Factory Reset or Erase All Data.

Turn off the phone (hold the power button)

Remember the button combination for your model

Connect the charger (the battery must be charged at least 30%)

Download the firmware for recovery (if you plan to reflash later)

-->

4. Unlock via Fastboot (for advanced users)

The method via Fastboot is suitable if:

  • πŸ”§ You have access to a computer with drivers installed ADB/Fastboot.
  • πŸ“₯ The phone's debugging on. USB (Settings β†’ The phone. β†’ Version. MIUI β†’ 7 times tap to activate the developer mode, then turn on Debugging by USB).
  • πŸ”“ You are ready for possible data loss (depending on the team).

Algorithm of action:

  1. Connect your phone to your PC through USB-cable.
  2. Press Power + Volume Down to Enter Fastboot Mode.
  3. On your computer, open the command line (Win + R β†’ cmd) and type:
fastboot oem unlock

If the team doesn't work, try:

fastboot flashing unlock

Newer models (Xiaomi 13, Redmi Note 12) may require the device to be linked to a Mi Account via the official bootloader unlock site.

Once the bootloader is unlocked, you can flash custom Recovery (e.g., TWRP) and delete a file with a pattern lock (/data/system/gesture.key or locksettings.db).

What is a breech and how to avoid it?
Brick: A condition of the phone that stops turning on or loads just before the logo. To avoid a blink when working with Fastboot: 1. Use only official firmware from Xiaomi. 2. Don't interrupt the firmware process (even if the phone is long hanging at one stage). 3. Check the phone model with fastboot getvar product before running.

5. Remove gesture.key via ADB (if debugging is enabled)

If you have previously enabled USB debugging, you can delete the pattern lock file through ADB without losing data.This method works on MIUI 12/13/14 and requires:

  • πŸ–₯️ Computer with installed ADB-driver.
  • πŸ”Œ USB-cable (preferably original).
  • πŸ“± Battery-charged phone >50%.

Instructions:

  1. Connect the phone to the PC.
  2. Open the command line and enter:
adb shell


su




rm /data/system/gesture.key

If the su command is not working (no root rights), try:

adb shell


cd /data/data/com.android.providers.settings/databases




sqlite3 settings.db




update system set value=0 where name='lock_pattern_autolock';




update system set value=0 where name='lockscreen.lockedoutpermanently';




.quit

Then restart the phone and the pattern lock will reset.

⚠️ Attention: MIUI 14 The new path to the key file may be different. If the commands don't work, try to delete it. /data/system/locksettings.db or /data/system/locksettings.db-wal.

6. Contact the Xiaomi Service Center

If all independent attempts to unlock failed, you need to contact an authorized service center.

  • πŸ“΅ Phones with a locked loader (Bootloader).
  • πŸ”’ Devices that do not include debugging USB And no Mi Account tied up.
  • πŸ“¦ Models running Android One (e.g. Mi) A3), where standard methods do not work.

What you need to unlock in the service:

  • πŸ“„ Checks or warranty card (if the phone is guaranteed).
  • πŸ†” Passport of the owner (to confirm ownership).
  • πŸ’³ Payment for the service (cost varies from 1000 to 3 000 rubles depending on the model).

Xiaomi service centers use official tools (Mi Flash Tool or EDL Mode) that allow you to unlock your phone without losing data 80% of the time, but some models (such as the Black Shark or POCO F4 GT) may require a complete reset.

πŸ’‘

The official service is the only legal way to unlock phones with a locked bootloader (Bootloader Locked), self-attempts to firmware in this case can lead to a complete loss of functionality of the device.

7. Alternative methods (at your own risk)

If the standard methods did not help, you can find β€œgray” methods of unlocking on the Internet, such as:

  • πŸ”§ Firmware through EDL (Emergency loading mode with boxes (UFi Box, EasyJTAG).
  • πŸ“‘ Exploiting vulnerabilities MIUI (For example, bypassing the lock via TalkBack on older versions).
  • πŸ”„ Reverse firmware to an older version where vulnerabilities have not yet been patched.

These methods have serious risks:

MethodRisks.Chances of success
Firmware through EDLBrick, loss of IMEI, cancellation of warranty70–90%
MIUI exploitsDoes not work on new versions, can block the account30–50%
Firmware rollbackData loss, possible errors during the update60–80%

We do not recommend using these methods without experience, as they can lead to permanent damage to the phone. If you do decide, look for current guides on the 4PDA or XDA Developers forums, checking the publication date (methods older than 2022 will probably not work).

FAQ: Frequent questions about unlocking Xiaomi

Can I unlock Xiaomi without losing data?
Yes, if: πŸ”‘ The phone has a Mi Account and Internet access. πŸ–₯️ Debugging is on. USB (You can remove gesture.key through ADB). πŸ“± The phone is unlocked via Mi Cloud (Find the Device function) and in all other cases, the data will be deleted.
What to do if you forget your Mi Account password?
Restore access through the recovery page: πŸ“§ Access to an email or phone linked to an account. πŸ†” Passport details (if additional protection is enabled) If recovery fails, contact Xiaomi with a photo of a check or box from your phone.
Will the phone help you remove the pattern lock?
Yeah, but: πŸ”„ Fastboot or Recovery will delete all data. πŸ”§ Firmware through TWRP It can save data if you make a backup in advance. ⚠️ Newer models (Xiaomi 13, Redmi Note 12) require unlocking the bootloader, which will reset the phone.
How much does it cost to unlock in the service center?
Cost depends on the model and complexity: πŸ’° Redmi (Note 10/11, POCO X3/X4): 1 000–1 500 ruble. πŸ’° Xiaomi (Mi 11/12/13): 1 500–2 500 ruble. πŸ’° Black Shark, flagship models: up to 3 000 Some services offer "unlock without loss of data" for 3 000–5 000 RUB, but there are no guarantees of success.
Can I unlock Xiaomi through my Google Account?
No. Since MIUI 9 (2017), Xiaomi has removed the ability to unlock through Google Account, which now only works on very old models (Redmi 3S, Mi 4) with firmware up to Android 6.0.