How to Reset a Graphic Password on Xiaomi: An Expert Guide

The situation when Xiaomi smartphone suddenly locks because of a forgotten pattern lock is one of the most stressful for the owner: the device turns into a “brick”, access to contacts, photos and banking applications is completely blocked. Unlike older versions of Android, modern shells MIUI and HyperOS have a serious level of protection, making it impossible to easily reset a password without losing data or exploiting special vulnerabilities.

There are several proven ways to restore access to the system, but their effectiveness depends on the version of the operating system, the status of the Mi Account and the pre-installed debugging settings. Some methods allow you to save files, others require full formatting of internal memory.

In this guide, we will take a detailed look at all the current unlocking methods, from standard Google and Xiaomi features to advanced tools like ADB. It is important to act consistently and carefully, as one error can lead to locking the device over IMEI (Mi Cloud Lock).

Standard Recovery Methods through Mi Account

The most civilized and secure way the developers envisage is to use the “Forgot Password” function directly on the lock screen, which only works if the smartphone is connected to the Internet (Wi-Fi or mobile network) and logs into the Mi Account. Xiaomi security system allows you to log in remotely to confirm the rights of the owner.

To activate the process, you need to enter the wrong graphics five times in a row, and then the countdown timer and the button "Forgot the password" or "Forgot the pattern lock" will appear on the screen, and you click on it, you will be taken to the authorization window, and you will need to enter the username and password from your Mi Account.

If the data is entered correctly, the system will suggest creating a new unlock key or completely removing the old one, which does not require a connection to the computer or delete personal files, but if the Internet is disabled or the account was not linked in advance, this path will be closed.

⚠️ Note: If you don’t remember the password from your Mi Account, you won’t be able to restore access through this method.

Often users ignore account binding when they first set up their phone, which creates problems in the future. Make sure that Settings → Mi Account displays your email or phone number. This is a critical element of protection and recovery.

📊 How do you normally protect your smartphone?
pattern lock
PIN-code
Fingerprint.
Face ID
Nothing.

Resetting with Recovery Mode (Hard Reset)

If standard methods don't work, you have to resort to a forced reset known as Hard Reset, which returns the phone to factory status by completely erasing all user data, including photos, contacts and apps, a radical but often the only measure to access the system.

To enter recovery mode, you need to turn off your smartphone completely. Then press the button combination: usually it's Volume Up + Power. On some models without physical volume buttons (such as the Xiaomi Mix), the procedure may be different and require a PC connection. Hold the buttons until the Mi logo appears, then release the power button, continuing to keep the volume.

In the Recovery menu, you can control volume (up/down) and power button (select). You can find Wipe Data and select Wipe All Data. The system will alert you to data loss. Confirm the action by selecting Confirm.

☑️ Checklist before reset

Done: 0 / 4

Once the process is complete, the phone will restart, and if the device has enabled Find Device, the system will require you to enter the Mi Account password to activate, which is a theft protection that can't be avoided by a simple reset.

Use of Find Device from Xiaomi

Xiaomi provides a powerful cloud service for remote device management. If the Internet was turned on on on a locked phone and the Find Device function is activated, you can unlock it remotely through a browser on a computer or other smartphone.

Go to the official i.mi.com website and log in under the same Mi Account that is used on the blocked gadget. In the service interface, select your device from the list. You will have three main functions: Search, Sound and Lock.

It's the lock function that allows you to reset the current pattern lock, you can set a new password to replace the old one, and after you change it, the phone has to get a command over the network and unlock it with the new code, and this method works even if the phone's screen is off, the main thing is that you have a network.

Service functionRequirementsThe result
Remote lockdownInternet, Mi AccountChange password without losing data
Clearing the dataInternet, Mi AccountFull reset (similar to Hard Reset)
Searching deviceGPS, InternetDisplaying location on the map
Loss regimeInternetBlocking the interface with the message

⚠️ Warning: Remote data cleanup via the site will also activate Mi Cloud Lock protection.Without a password from your account, the phone will remain a useless piece of plastic and metal.

Unlocking through debugging via USB and ADB

For advanced users who have pre-installed USB Debugging in the Developer Menu, there is a way to reset a password without losing data.This method requires a computer with the ADB and Fastboot drivers installed. The essence of the method is to delete the system file that stores the access keys.

Connect the locked smartphone to the PC via the original cable. Open the command line on your computer in the ADB tool folder. Enter the adb device command to check the connection. If a permission request window appears on the phone screen, this method, alas, will not work, since you can not press "Allow".

If the connection is established, follow the following commands to delete the lock files:

adb shell rm /data/system/gesture.key


adb shell rm /data/system/password.key




adb shell rm /data/system/locksettings.db




adb shell rm /data/system/locksettings.db-wal




adb shell rm /data/system/locksettings.db-shm

After you execute the commands, restart the device with the command adb reboot. When turned on, the phone may ask you to enter any pattern lock or password - the system will miss any input, since the hashes have been deleted. Immediately set a new password in the security settings.

Why can't ADB work?
On modern versions of Android (11, 12, 13, 14), access to system files through ADB without root permissions is limited. The rm command can issue a "Permission denied" error, in which case this method is useless without first obtaining superuser rights, which is impossible to do on a locked screen.

Bypassing blocking through Google account (FRP)

In older versions of Android, it was possible to reset a pattern lock through a Google account, a mechanism called FRP (Factory Reset Protection), but on modern Xiaomi smartphones with updated security, this method hardly works to unlock the screen without resetting data.

However, if you have done Hard Reset but forgot the password from your Mi Account, you will have to go through a Google check of an account that was synced to the device before.This is anti-theft protection: Once reset, the phone will require you to enter the email and Google password that were used on the device before locking.

There are complex bypasses through special applications and interface vulnerabilities, but they require a second phone (for Wi-Fi or OTG distribution) and constant updates to instructions, as Google quickly closes such holes.

If the phone requires a Google account after a reset, and you don't remember it, you can't officially unlock the device, and you'll need to contact the service center with a check to prove ownership.

💡

Save the check about buying a smartphone electronically or take a photo of the box with the IMI-This is the only document that the service may need to remove the account lock.

Prevention and adjustment of biometrics

To make sure that the problem of “how to reset your graphical password to Xiaomi” never comes up again, it’s worth rethinking the security approach. The pattern lock is convenient, but it’s easy to forget or “grease” with greasy fingers, leaving traces on the screen. The best solution is to use biometric data.

Set up fingerprint unlock or Face ID. You can add multiple fingerprints to your password and security settings, and not only does it speed up access, it also serves as a reliable backup, and even if you forget the digital code, the finger is always with you.

It is also recommended to regularly back up important data to the Mi Cloud or Google Photos cloud. In the case of a forced reset, you will only lose the application settings, but personal photos and contacts will remain intact.

⚠️ Warning: Do not use simple graphic keys (e.g., a letter "G" or a square) that are easy to pick up by pumping or by following the tracks on the screen. Combine the key with a key that is not a simple key. PIN-code.

Check regularly to see if you remember your Mi Account password. Periodic login with i.mi.com will help you avoid a situation where access is lost forever. Smartphone security is the balance between convenience and data protection.

💡

The most reliable way to avoid problems is to link your Mi Account, enable debugging over USB and regularly back up your data.

Frequently Asked Questions (FAQ)

Can I reset my password without losing my photos?
Yes, this is only possible in two ways: through the “Forgot Password” function on the lock screen (if you have an Internet and Mi Account) or through the ADB command (if you have pre-bugging on USB).
What is Mi Cloud Lock and How to Avoid It?
This is anti-theft protection. If the phone has enabled "Device Search", after resetting, it will request a password from the Mi Account, which can only be avoided by knowing the password, or by first turning off the device search in the settings (which is impossible on a locked screen).
Will a Find Me Phone reset work if the phone is turned off?
No. To perform a remote lock or reset command, the phone must be turned on and connected to the Internet, and if the phone is turned off, the command will be executed when it is turned on and logged in.
Will the phone flashing help?
Official flashing through the Mi Flash Tool will also require an unlocked bootloader, which requires access to an account. Unofficial firmware can delete the system, but will not remove the Mi Cloud lock tied to the motherboard.