How to unlock a graphical password on a Xiaomi smartphone: from Mi Account to Hard Reset

The forgotten pattern lock on Xiaomi is one of the most common problems users face. PIN-When you look at a code or fingerprint, a pattern often seems "easy to remember" until you have to type it in after a reboot or a long downtime, and it gets complicated if you don't have a linked Mi Account or if you have a disconnected Internet connection.

In this article, we’ll look at all the current ways to unlock, from official (via Xiaomi or Find Device) to technical (Fastboot, Recovery, and even disassembling the EDL reset device). Importantly, not all methods will save your data, so before you start, assess the risks. If the phone synced with Google Account or Mi Cloud, the chances of recovery without loss are higher.

Note: the instructions are suitable for most Xiaomi, Redmi and POCO models (including Redmi Note 10/11/12, Xiaomi 12/13/14, POCO F4/F5, etc.), but may differ for devices with custom firmware or locked bootloader. If your smartphone is released before 2018, check for Mi Account Unlock support - some older models require mandatory authorization via PC.

1 Unlocking through Mi Account (official method)

The safest method is if you remember the data from your Mi Account and the phone is connected to the Internet. Xiaomi allows you to reset your graphical password through the Find Device web interface or directly on the lock screen.

How it works:

  • πŸ”— On the lock screen, tap Forgot the password? (or Forgot pattern? on English firmware).
  • πŸ“± Enter the username and password from the Mi Account linked to the device.
  • πŸ”“ Confirm the unlock through SMS or email (if two-factor authentication is enabled).
  • βœ… Install a new pattern lock or PIN-code.

If the buttons forgot the password?

  1. Go to the Mi Account website from another device.
  2. Log in and select Find Device β†’ find your smartphone in the list.
  3. Press Unlock and confirm the action.

⚠️ Note: If the phone is not connected to the network (Wi-Fi/This method will not work, and Xiaomi can request proof of ownership of the device through the Internet. SMS number-bound.

πŸ“Š What Unlocking Method Have You Tried Before?
Mi Account
Fastboot/Recovery
Reset via EDL
I went to the service center.
Never blocked.

2. Reset graphical password via Fastboot (without data loss)

This method is suitable for devices with an unlocked bootloader. If you have previously activated OEM Unlock in the developer settings, you can delete the password file through Fastboot without completely resetting.

What you need:

  • πŸ–₯️ Computer with installed Xiaomi drivers and tool ADB/Fastboot.
  • πŸ”Œ USB-cable (preferably original).
  • πŸ“± Phone with a charge of at least 30%.

Step-by-step:

  1. Turn off the phone and press Volume Down + Power to log into the Fastboot.
  2. Connect the device to the PC and check the connection command: fastboot devices (should display the serial number of the phone).
  3. Enter the command to delete the file with a password: fastboot erase gesture.key or PIN-code: fastboot erase password.key
  4. Reboot the phone: fastboot reboot

Once the system is restarted, it will suggest installing a new pattern lock, which only works on stock MIUI firmware without data encryption (FBE), and if the device is encrypted, a full reset will be required.

Install ADB/Fastboot PC-only|Download the drivers for Xiaomi|Check the phone's charge (>30%)|Connect the original USB-cable|Disable antivirus (can block commands)-->

3. Hard Reset via Recovery (full reset)

If previous methods failed, the radical method remains to reset to factory settings via Recovery mode, and all data on the phone will be deleted, including photos, messages and installed apps.

How to log in to Recovery:

  • πŸ”„ Turn off the phone.
  • πŸ”˜ Hold the Loud up. + Power and hold for 10-15 seconds until the Mi logo appears.
  • πŸ“± Release the buttons when you see the Recovery menu (may be in Chinese or English).

Resetting instructions:

  1. Use volume buttons for navigation and power for selection.
  2. Select Wipe Data β†’ Wipe All Data (or Factory Reset)
  3. Confirm the action (Confirm).
  4. After reset, select Reboot β†’ Reboot to System.
Xiaomi modelCombination of buttons for RecoveryLanguage
Redmi Note 10/11/12, POCO F3/F4Volume up + NutritionEnglish/Chinese
Xiaomi 12/13/14, Mi 11Volume up + Nutrition (hold until vibration)English
Redmi 9/9A/9C, POCO M3Volume up + Food (menu in Chinese)Chinese
Xiaomi Mi A1/A2 (Android One)Loudness down + NutritionEnglish

⚠️ Note: On some models (Redmi 9, POCO M2) After the reset, you may need to enter data from the Mi Account, which was previously associated with the device).

4. Unlock through EDL (for advanced users)

EDL (Emergency Download Mode) allows you to flash your phone directly through the Qualcomm 9008 port, bypassing locking, a method that requires disassembling the device or a special cable, as well as knowledge of working with tools like Mi Flash or QFil.

When you need an EDL:

  • πŸ”§ The phone does not respond to other unlock methods.
  • πŸ”’ Mi Account is Forgotten and the device is locked after being reset.
  • πŸ“± Device with Qualcomm processor (most) Xiaomi/Redmi/POCO).

Step-by-step:

  1. Download the firmware for your model from the Xiaomi Firmware Updater website.
  2. Install Qualcomm HS-USB QDLoader 9008 drivers (can be found via DriverPack or manually).
  3. Connect your phone to your PC in mode EDL: πŸ› οΈ Method 1: Disassemble the phone and close the contacts EDL on the board (for each model the scheme is its own). πŸ”Œ Method 2: Use a special cable EDL (It's sold on AliExpress).

Mi Flash Tool

Flash

Wait for the firmware to be completed (10-15 minutes).

What happens if you interrupt the firmware in EDL?
Interrupting the firmware process in EDL mode can lead to the β€œbricking” of the phone – the device will stop turning on and will not be detected by the computer, and it can only be restored in a service center using a programmer (for example, UFi Box or EasyJTAG).

Important: Firmware through EDL removes all locks, but requires a precise match between the firmware version and the model. A mistake in choosing a file can make the phone inoperable.

5. Alternative methods (for specific cases)

If the standard methods didn’t work, try these options:

A. Unblocking through Google Account (for older versions of MIUI)

On Xiaomi with firmware up to MIUI 10, after 5 failed attempts to enter a password, a button appeared, Forgot the pattern lock?, offering to log in via Google Account. In new versions, this feature is removed, but on some devices it can be returned:

  1. Connect your phone to Wi-Fi.
  2. Enter the wrong password 5 times.
  3. Slip Forgot the pattern lock? and select the login via Google.

B. Delete gesture.key via TWRP (for rooted devices)

If custom Recovery is installed on the phone (such as TWRP), you can manually delete password files:

  1. Sign in to TWRP (button combination depends on the model).
  2. Go to Advanced β†’ File Manager.
  3. Delete files: /data/system/gesture.key /data/system/password.key /data/system/locksettings.db
  4. Reboot the phone.

B. Contacting the service centre

If none of the methods worked, and the data on the phone is critical, contact the official Xiaomi service.

  • πŸ“„ Check or box with serial number.
  • πŸ†” Passport (for proof of identity).
  • πŸ“§ Access to email linked to Mi Account.

πŸ’‘

Before resetting your phone, check if sync with Mi Cloud or Google Photos is enabled. Your data (contacts, photos) may already be stored in the cloud and can be restored after unlocking.

6.How to avoid blocking in the future

To avoid the problem of forgotten passwords again, follow these tips:

  • πŸ” Use it. PIN-code instead of a pattern lock, it is more difficult to forget.
  • πŸ“± Attach Mi Account and enable data synchronization in Settings β†’ Accounts. β†’ Mi Cloud.
  • πŸ”„ Regularly back up through Settings β†’ Additionally. β†’ Backup and reset.
  • πŸ“ Write your password to a secure location (for example, Bitwarden or KeePass password manager).
  • πŸ›‘οΈ Enable Find Device in Mi Account settings – this will make it easier to unlock.

It’s also worth turning off automatic screen locking in public places (such as through Smart Lock in security settings) if you often forget to unlock your phone.

πŸ’‘

Even if you unlock your phone, set up data backup immediately. 60% of the time, users lose photos and contacts due to lack of backups (Xiaomi data for 2023).

FAQ: Frequent questions about unlocking Xiaomi

Can I unlock Xiaomi without losing data?
Yes, but only if: You have Mi Account attached and confirmed. The phone is unencrypted (most new models have default encryption enabled), you can log in to Fastboot and delete gesture.key (unlocked bootloader required). In all other cases, the data will be erased.
What to do if you ask for an old Mi Account after a reset?
This is a feature of Mi Cloud Lock, anti-theft. To unlock: Enter the details from the Mi Account that was tied to the phone. If you don't remember the password, restore it through the Mi site. If the account is not yours (for example, the phone is bought with hands), contact the previous owner or the service center with proof of purchase.
Does Google Unblocking Work on the New Xiaomi?
No. Since MIUI 11 (2019), Xiaomi has removed the ability to unlock through Google Account, and now this method only works on very old models (e.g. Redmi 4X, Mi A1).
Can I unlock Xiaomi through a computer without Fastboot?
Yes, but only if the phone is debugging. USB (USB Debugging, and it's connected to the PC as a trusted device, and you can use it. ADB To delete password files: adb shell rm /data/system/gesture.key If the debugging is not enabled, this method will not work.
How much does it cost to unlock in the service center?
Cost depends on the model and the reason for blocking: Reset via Mi Account: free (if you remember the data). Unlock EDL: 1 500–3 000 β‚½ (Removal of Mi Cloud Lock: 3000–5,000 β‚½ (Xiaomi official services can refuse to unlock without a check or box.