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

Forgotten pattern lock on Xiaomi is one of the most common problems faced by users of smartphones Redmi, POCO and the Mi line. Unlike the PIN-The problem is that after 5 failed attempts, the system locks the device for 30 seconds, and then may require input from the Mi Account account β€” which is also not always at hand.

In this article, we will discuss all the current ways to unlock a graphical password on Xiaomi in 2026 – from official methods using an account to technical solutions through Fastboot and ADB. Importantly, not all methods save data on the phone, so before you start, assess the risks. If the device is encrypted, the chances of saving files are minimal.

Let’s start with step-by-step instructions – choose the method depending on your situation: is there access to Mi Account, is debugging enabled via USB, is the touch screen working, etc.

1 Unlocking through Mi Account (official method)

The easiest and most secure way to do this is to use a tied Mi Account, which works on most Xiaomi devices released after 2018 if:

  • πŸ“± The phone is connected to the Internet (Wi-Fi or mobile data).
  • πŸ”‘ You remember the username and password from Mi Account (or you can restore them).
  • πŸ”„ The device was not reset to factory settings after the last authorization.

If after 5 failed attempts to enter the pattern, a window appeared with a suggestion to enter Mi Account data, follow the instructions:

  1. Click Forgot your password? (if you don’t remember the data) or enter your email/phone and password.
  2. Confirm your login via SMS or email (if two-factor authentication is enabled).
  3. After successful authorization, the system will prompt you to create a new pattern lock or PIN-code.

Important: If you have previously untied your Mi Account or reset your Fastboot account, this may not work, and on some models (such as the POCO F1 or Redmi Note 7), after several failed attempts, the lock may become permanent, in which case you will need to connect to the Mi Cloud to unlock.

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

2. Reset your graphical password via Find Device (Mi Cloud)

If you don't have physical access to your phone, but it's connected to the Internet and linked to your Mi Account, you can use Find Device, which allows you to remotely unlock your screen or erase your data if other options are not available.

Instructions:

  1. Go to i.mi.com and log in.
  2. Select the locked device in the list (if there are several).
  3. Click Find Device β†’ Unlock (or Erase Data if Unlocking is Unavailable).
  4. Confirm the action via SMS or email.

⚠️ Note: Unlock is not available on all models. If it is not available, you only have to erase the data, which will lead to a complete reset of the phone. Also note that after a remote reset, you may need to re-authorize to Mi Account on the first turn on.

πŸ’‘

If you have Mi Cloud sync enabled, your contacts, photos and notes will automatically be restored once you unlock them. Check this in your i.mi.com account settings.

3. Unlock via ADB (if USB debugging is enabled)

The method for advanced users who had USB debugging enabled in advance (Settings β†’ About Phone β†’ MIUI Version β†’ 7 taps β†’ Additional β†’ For developers β†’ USB debugging). If this item is completed, the chances of unlocking the phone without losing data are high.

What you need:

  • πŸ–₯️ A computer with installed Xiaomi drivers and ADB (You can download from the official website).
  • πŸ”Œ USB-cable (preferably original).
  • ⚑ At least 30% charge (so that the phone does not turn off during the process).

Step-by-step:

1. Connect the phone to the PC via USB.


2. Open the command prompt (Windows) or terminal (macOS/Linux) in the folder with ADB.




3. Enter the command:




adb devices




(Your device should be displayed).




4. Perform:




adb shell rm /data/system/gesture.key




5.Reset the phone:




adb reboot

After the reboot, the graphical password will be reset, but other data (photos, apps) will remain intact. Please note that on new versions of MIUI 14+, this method may not work due to changes in the structure of system files.

Install Xiaomi drivers on PC|Download Platform Tools (ADB and Fastboot)|Enable debugging on USB on the phone (if you have access)|Connect the original USB-cable|Charge your phone at least 30 times%-->

4.Reset via Fastboot (without data loss on some models)

If USB debugging is not enabled, but the phone is determined by the computer in Fastboot mode, you can try a partial reset, which is suitable for devices with an unlocked bootloader or those that previously performed manipulations via Fastboot.

⚠️ Note: Most modern Xiaomi smartphones (e.g. Redmi Note 12, POCO X5) This method results in a complete reset, but on older models (up to the previous one). MIUI 12) user data can sometimes be saved.

Instructions:

  1. Turn off the phone, then press the Power button + Volume down to log into the Fastboot.
  2. Connect the device to the PC and check its availability with the command: fastboot devices
  3. Run the command to reset the pattern lock (only for unlocked bootloader!): fastboot erase gesture
  4. Reboot the phone: fastboot reboot

If the fastboot erase gesture doesn’t work, try an alternative:

fastboot erase userdata

But in this case, the data will be erased.

What if the Fastboot can’t see the device?
If the team `fastboot devices` If you do not show your phone, check: 1. Are drivers installed (try Mi Flash Tool for automatic installation). 2. Are you using the original cable (poor cables may not transmit data). 3. Is Fastboot on the phone enabled (a screen with a rabbit and the words "Fastboot"). 4. Try another one. USB-port (preferably) USB 2.0).

5 Hard Reset – Last Chance

If none of the previous methods worked, you only have to reset completely to factory settings, and you erase all the data on your phone, including photos, messages and apps, and you only use this method if you:

  • πŸ” You don’t have any important information on your device (or it’s synced to the cloud).
  • πŸ“΅ The phone is not detected through ADB/Fastboot.
  • 🚫 You don’t remember the data from your Mi Account.

How to perform Hard Reset:

  1. Turn off the phone.
  2. Press the Power button + Volume up for 10-15 seconds until the Mi logo and Recovery menu appear.
  3. Use the volume buttons for navigation and the power button to select Wipe Data β†’ Wipe All Data.
  4. Confirm the action and wait for the process to be completed.

Once reset, the phone will turn on as new, and if it was linked to Mi Account, you will need to enter your account information to activate (Mi Cloud Activation Lock protection).

πŸ’‘

Hard Reset is the only method that works on 100% of Xiaomi devices, but it completely erases data. If a phone is stolen, it cannot be activated after a reset without the original Mi Account data.

6. Alternative methods (for specific cases)

If the standard methods don't work, you can try lesser-known solutions, which are suitable for rare situations, such as:

  • πŸ› οΈ Touch screen is not working, but the phone responds to buttons.
  • πŸ”§ You can access another device with the same Mi Account.
  • πŸ“‘ The phone is connected to the same Wi-Fi network as before.

Method 1: Unlocking through Mi Home (for smart devices)

If your Xiaomi is tied to the Mi Home ecosystem (for example, through a smartwatch or a speaker), you can sometimes unlock it through an app.

  1. Open Mi Home on another device.
  2. Find the locked phone in the list of devices.
  3. Select the option Device Management β†’ Unlock the screen (if available).

Method 2: Use of service codes

Some models (e.g. Redmi 4X, Mi A1) have engineering codes to reset the lock.

##7780## - soft reset (retains data).)


*2767*3855# - Hard reset (erases everything).

⚠️ Warning: These codes may not work on new devices or may have irreversible consequences!

Method 3: Contacting a service center

If the phone contains critical data, and self-unlocking is impossible, contact the official Xiaomi service center.

  • πŸ“„ Check or warranty card (proof of possession).
  • πŸ†” Passport (for proof of identity).
  • πŸ”„ Ability to provide data from Mi Account (if tied).

The cost of the service varies from 1,000 to 3,000 rubles depending on the model and complexity of the work.

Comparison of methods of unlocking graphical password on Xiaomi

MethodData retentionConditions requiredDifficultySuitable for models
Mi Accountβœ… Yes.Linked account, Internet⭐Everything (except Chinese firmware)
Find Device (Mi Cloud)❌ No (or partially)Internet, Linked to Mi Account⭐⭐Everything except the old models
ADBβœ… Yes.USB debugging enabled⭐⭐⭐MIUI 12 and older
Fastboot❌ Not often.Unlocked bootloader⭐⭐⭐⭐Redmi Note 10/11, POCO F3/4
Hard Reset❌ No.No demands.⭐All models.

FAQ: Frequent questions about unlocking a graphical password on Xiaomi

Can you unlock Xiaomi without losing data if USB debugging is not enabled?
Theoretically, yes, but only if: You have access to Mi Account and the phone is connected to the Internet (method 1 or 2). The device is older than 2019 and supports engineering codes (method 6). On newer models (MIUI 13/14) without ADB or Fastboot, it is almost impossible to save data.
What to do if you forget your Mi Account information?
Restor access via account.xiaomi.com: Click Forgot Password?. Enter email or phone linked to your account. Confirm recovery via SMS or backup email. If you don't have access to email/phone, contact Xiaomi with proof of device ownership (check, IMEI).
Why does a Fastboot phone require an old password?
This is because of FRP (Factory Reset Protection) which links the device to the Mi Account after a reset. To remove the lock: Enter the data from the Mi Account that was tied before the reset. If you don't remember the data, restore it (see previous question). On Chinese firmware (China ROM) you may need additional linking to the account via SMS.
Can I unlock Xiaomi through a computer without ADB?
Yes, but only if the phone is identified in Fastboot. Use the Mi Flash Tool: Download the Mi Flash Tool from the official website. Download the firmware for your model (for example, from the Xiaomi site), connect the phone in Fastboot mode and flash the device with the Clean All option (the data will be erased). ⚠️ This method is suitable only for experienced users!
How to avoid blocking your graphical password in the future?
Follow these recommendations: πŸ” Use the backup. PIN-code (can be entered instead of a pattern lock). ☁️ Enable sync with Mi Cloud to back up data. πŸ“± Update regularly MIUI β€” In new versions, the access recovery system has been improved. πŸ”§ Write down Mi Account data in a secure location (for example, in a password manager).