How to unlock Xiaomi’s graphical password: proven ways

The situation when the smartphone Xiaomi, Redmi or POCO Suddenly blocked due to a forgotten pattern lock, PIN-It's a common occurrence, a code or a password, and the user may be in a hurry, feel bad, or simply forget the complex combination he's set up for security, and at that point the device becomes a brick, and the contacts, photos, and important apps are completely blocked. However, do not panic, as the Android operating system and shell. MIUI HyperOS provides several standard and technical ways to restore access.

Before you start taking action, it is important to understand that most effective methods of unlocking a graphical password involve completely deleting user data. This is a fundamental principle of Android security that prevents attackers from easily accessing the owner’s information. If you did not back up in the Mi Cloud cloud or on your computer, photos, correspondence and saving games can be irretrievably lost.

In this article, we will take a look at all the current methods of bypassing locks, from the simplest and safest to complex engineering manipulations. You will learn how to use the Find Device function, why you may need to reset via Recovery Mode and in which cases debugging over USB will help. We will also look at the nuances of working with Mi Account, which often becomes an additional barrier after resets.

⚠️ Warning: Hard Reset unlock process will ensure that all user data is removed from the phone's internal memory.

Use the Find Device function to remotely unlock

The most civilized and secure way that doesn’t require physical contact with the case buttons is to use the Mi Cloud service.This feature works similarly to Google’s Find Device, but is integrated deeper into Xiaomi’s ecosystem. Successful implementation of this method requires fulfilling several critical conditions that are often overlooked when you first set up a smartphone.

First, the locked device must be logged in to Mi Account. Second, the phone must be connected to the Internet via a mobile network or Wi-Fi. Third, Find the Device must be activated in the security settings before locking, and if all these conditions are met, you will need any other gadget with access to the network — a computer, tablet or phone friend.

  • 🌐 Go to the official i.mi.com website and log in using the same Mi. ID and the password that is on the locked phone.
  • 📱 In the service interface, select your device from the list of available gadgets tied to your account.
  • 🗑️ Find and click the “Erase device” button, which initiates a remote reset to the factory settings.

Once the operation is confirmed, the phone will receive a cleanup command, which can take anywhere from minutes to an hour, depending on the speed of the connection, the pattern lock will be deleted along with all the data, and the device will reboot to the initial setting state, and it is important to note that this method is only effective if the phone has managed to receive commands from the server.

📊 Do you use cloud services for backup?
Yeah, all the time.
Only a photo.
Rarely.
I don't use it at all.

Resetting with Recovery Mode (Hard Reset)

If cloud services have not been configured or the phone is in flight mode, the only option available is a forced reset via the recovery menu, which is universal and works on most Xiaomi, Redmi and POCO models, regardless of the Android version.

To enter Recovery mode, you need to turn off your smartphone completely, then you need to pinch a certain combination of buttons. On most modern models, this is a combination of Volume Up and Power buttons, which you hold until the Mi or Fastboot logo appears, after which the power button can be released, while continuing to hold the volume button.

Navigation in the Recovery menu is done with volume buttons (up/down), and the power button selects the item. You need to find the Wipe Data section and select the Wipe All Data option. The system will request confirmation, usually you need to select Confirm and then OK. After the cleaning process, select Reboot to restart.

☑️ Checklist before Hard Reset

Done: 0 / 4

And you have to remember that, after this procedure, FRP (Factory Reset Protection) protection will work, and when you first boot, you'll need to enter a password from a Google account or Mi Account that was synchronized with the device before, and this is a security mechanism against theft, so you won't be able to use the phone without knowing this data.

⚠️ Note: On some models with the updated version of security, logging into Recovery may also require entering a pattern lock or unlocking password.

Unlocking through debugging via USB and ADB

For advanced users who have previously activated the developer mode and enabled USB debugging, there is a technical way to delete lock files without completely resetting data, a technique based on the use of the ADB (Android Debug Bridge) toolkit on the computer, but its effectiveness depends heavily on the Android version and the level of access rights.

On older versions of Android (up to about 5-6 versions), there was a vulnerability that allows you to delete the gesture.key file or password.key via the command line. To do this, the phone connects to the PC, and special commands are entered into the console. On modern devices with Android 10, 11, 12, 13, 14 and above, this method is practically impossible without root rights, since the system partition is protected from writing.

If you have root rights (e.g., through Magisk), you can try to delete the lock files manually, and this is done through the terminal or ADB shell commands to delete key files in the /data/system/ directory.

adb shell


su




rm /data/system/gesture.key




rm /data/system/password.key




reboot

Trying to use this method on a rootless firmware is likely to lead to an access error. However, for enthusiasts who have modified their devices, it can be a data saver. Always check the compatibility of commands with your particular version of the software.

What is ADB and where to get it?
ADB (Android Debug Bridge) is a universal command-line tool that allows you to interact with an Android device. It is part of the Android SDK Platform Tools package, which can be downloaded from the official Google developer website.

Features of unlocking different versions of MIUI and HyperOS

Access recovery can vary significantly depending on the version of the shell installed. Xiaomi is constantly improving security by closing vulnerabilities that were used to bypass locks. Owners of devices with MIUI 12, 13, 14 and the latest HyperOS should be prepared for more stringent checks.

Recent firmware versions have enhanced account binding. Even after a successful Hard Reset, if the phone can't connect to the Internet to check the activation servers, it can remain locked during the welcome phase. This phenomenon is known as Activation Lock. In addition, the number of password attempts is now strictly limited by a timer that exponentially increases latency.

Also worth mentioning are the differences between global (Global) and Chinese (CN) firmware versions: Chinese versions often lack Google's default services, which can make it harder to recover through a Google account, making Mi Account the only key to saving.

MIUI/HyperOS versionInternet Requirement for ResettingBlocking Mi AccountsDifficulty breaking
MIUI 10-11Preferably.Rarely.Low.
MIUI 12-13I'll be sure.OftenMedium
MIUI 14I'll be sure.Always.Tall.
HyperOSI'll be sure.Always + Server CheckingVery high.

💡

If the phone says “Device connected to your account” after reset, don’t try to reflash it right away – this can lead to a hard brick due to anti-rollback protection.

What to do if you forget the password from the Mi Account

This becomes more complicated if the phone needs to log in to Mi Account after resetting, and the password is also lost or forgotten, in which case the device can become completely useless, since it is almost impossible to circumvent the binding to the account by legal means, but there is a procedure to restore access to the account itself.

You need to go to account.xiaomi.com from your computer or other device, select the Forgot password option, and the system will offer several recovery options: through a linked phone number, through a backup email address, or through answers to secret questions if they were asked during registration.

If a phone number or email is not available, the recovery process is complicated, and in such cases, you may need to contact Xiaomi Support with a receipt for the purchase of the device (proof of ownership), the check must show the IMEI or Serial Number of the device, which is the only legal way to remove the activation lock without a password.

⚠️ Warning: Never buy an "unlock" IMEI" In 99% of cases, it is fraud or the use of stolen accounts, which can lead to the device being re-locked at any time.

Prevention of blocking and backups

To avoid the problem of lost access in the future, it is recommended to set up backup and access control systems in advance. Modern smartphones offer convenient alternatives to complex graphic keys that are easier to forget. Using biometrics - a fingerprint scanner or facial recognition - greatly simplifies everyday use.

Be sure to set up synchronization of important data. Mi Cloud provides free storage for contacts, notes, photos and voice recordings. Also, do not neglect to regularly copy heavy files (video, documents) to your computer or to third-party cloud storage such as Google Drive or Yandex Disk.

Write your passwords and graphic keys down to a safe place, such as a paper notebook or password manager (like Google Password Manager or Bitwarden). Storing passwords only in your brain memory is a unreliable method, because human memory tends to fail in stressful situations. Regularly checking the health of backups will also help make sure that you can recover data at a critical time.

💡

A graphical password is just one layer of protection, and the reliability of your data depends on a comprehensive approach: biometrics + cloud redundancy + knowledge of passwords from accounts.

Can I unlock a Xiaomi phone without losing data?
In most cases, if the phone is locked with a pattern lock and does not have USB debugging enabled with previously installed access rights, it is impossible to unlock it without losing data. This is done specifically to protect user information. The only chance is to use the "Find Device" function with pre-setting, but it also most often leads to a reset.
How many times can I enter the wrong password?
Android typically allows you to enter the wrong password 5 times, then the lock timer for 30 seconds is turned on. With each successive series of unsuccessful attempts, the wait time increases (1 minute, 5 minutes, 15 minutes, 1 hour).
What is FRP and how to get around it?
FRP is reset protection, which is activated when you try to log in to a device after you have forced a reset, and you can legally circumvent FRP only by knowing the password from a Google account or a Mi Account that was synced to your phone before locking. There are no official ways to bypass FRP without a password.
Will the phone flashing help?
Fastboot or Recovery will also delete all data, as will a normal reset. Moreover, if the device is enabled lock bootloader (Locked Bootloader), the official firmware reflash may not be possible without unlocking, which again requires access to the account.