What to do if you forget your graphical password on your Xiaomi phone

When you pick up your Xiaomi and suddenly realize you can't remember a security pattern, it can throw anyone off their tracks, and the lock screen becomes an insurmountable barrier between you and important contacts, photos, or work documents, and panic is a natural reaction, but it's often the one that prevents you from making an informed decision.

It is important to understand that modern versions of the MIUI shell and the Android operating system have a high level of protection, so simply bypassing a password without losing data will not always work, but there are several proven methods that allow you to return access to the device or, in extreme cases, reset the settings to the factory.

The next steps will depend on whether the Mi Account was tied, whether debugging is enabled over USB and what model of smartphone you have in your hands. In this article, we will examine in detail all possible scenarios, from gentle methods to full Hard Reset.

Using Mi Account to unlock the screen

The most civilized and safe way to restore access is provided by the manufacturer, but it only works under a number of preconditions: If your device has signed in to Mi Account and activated the Find Device function, the system will offer an alternative way to log in after several failed attempts to enter a pattern lock.

After five failed attempts, a waiting timer or a “Forgot password”/”Forgot the pattern lock” button may appear on the lock screen. Clicking on this option will redirect you to the Xiaomi service authorization page, where you need to enter the username and password from your account that were previously used.

Successful authorization will allow you to unlock the screen without deleting personal files, but it is worth considering that this method does not work on all versions of the firmware and often requires an active Internet connection when you try to unlock.

⚠️ Note: If you have recently changed your Mi Account password, wait 24 hours before trying to unlock. Security may view the new password as an attempt to break into the device and lock the device for a day.

💡

If you don’t remember the Mi Account password, restore it in advance through your computer on the official mi.com website before you try to unlock your phone.

Remote Unlocking with Find My Device

If direct login through the lock screen is not possible, you can use the cloud service from Google or the specialized portal Xiaomi Cloud. This method is effective if the smartphone is connected to the network (Wi-Fi or mobile Internet) and it is enabled geolocation.

To start, go from your computer or other phone to Google Find My Device or i.mi.com. Sign in to an account that is synced to the locked gadget. From the list of devices, select the desired model. The interface will suggest several actions: “Call”, “Block” and “Clear”.

The Erase feature will cause a complete reset, but it is often the only way to unblock if the password is lost. In some cases, the Lock feature allows you to set a new temporary password that will replace the forgotten pattern lock.

📊 Have you been able to remember the password from your account?
Yeah, I remember.
I remember the login, I forgot the password.
There was no account.
I don't remember what it was.

Recovery Mode (Hard Reset)

When software-based bypassing methods fail, the radical but reliable option is a complete reset via the recovery menu, which erases all user data, returning the phone to the "out of the box" state. Before starting the procedure, make sure that the battery is at least 40-50%.

To enter Recovery mode, you need to turn off your smartphone completely. Then press the volume button and the power button at the same time. Hold them until the Mi logo appears, then release the power button, but keep the volume down until the main menu appears.

Navigation in this menu is done with volume buttons (up/down), and the choice is confirmed by the power button. You need to find Wipe Data or Clear Data. In new versions of MIUI, you may need to select Wipe All Data and confirm the action by selecting Confirm.

☑️ Preparing for resetting through Recovery

Done: 0 / 5

⚠️ Note: After resetting via Recovery, modern Xiaomi phones require you to enter the password from the Mi Account that was previously tied (anti-theft protection).If you do not remember this password, the phone will turn into a brick».

Unlocking through debugging via USB and ADB

This method is only suitable for advanced users who have pre-installed the USB debugging mode in the Developer Menu and have ADB drivers installed on their computer. If these conditions are met, you can try to delete the file that stores the pattern lock.

Connect your smartphone to your PC through USB-Open the command line on your computer and type in the command to check the connection: adb devices. If the device is determined, you can try to delete the key files.

adb shell rm /data/system/gesture.key


adb shell rm /data/system/locksettings.db




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




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

Once you have completed the commands, you need to restart the device. You can enter any pattern lock or pin on the lock screen, the system must unlock. It is worth noting that on Android 10 and above, as well as in new MIUI shells, this method often does not work due to enhanced access rights to system folders.

What if the ADB can’t see the device?
Make sure that Xiaomi drivers are installed USB Drivers. Try another one. USB-cable (preferably original) and other port USB on a computer, preferably USB Also check if the phone screen is locked when you plug in the cable – sometimes you need to click “Allow” on the smartphone screen.

Comparison of Xiaomi Unlocking Methods

The right way to go depends on your specific situation, and here is a table that will help you quickly navigate the options available and their implications for data.

MethodData retentionWe need the Internet.Difficulty
Mi Account (screen)Yes.Yes.Low.
Find My DeviceNo (usually)Yes.Medium
Recovery ModeNo.No.Low.
ADB CommandYes.No.Tall.

As the table shows, the only ways to save photos and contacts are by logging in via Mi Account or using ADB, but they require pre-preparation.Hard Reset remains the most versatile but painful solution.

💡

If data is critical and none of the methods without data loss works, contact a specialized service center, although there is no guarantee of success there either.

Reset Protection and Google Account

After a successful or forced reset, Android security will start the initial setup procedure, where you may be surprised by a bad surprise in the form of a Google account check (FRP – Factory Reset Protection).

The system would require a login and password from a Google account that was synced to the device before the reset, which is designed to protect against theft: if a thief steals the phone and dumps it, he can't use it without the owner's data.

If you don't remember the Google account, you can't complete the activation process, and in such cases, you have to look for complicated workarounds that are constantly closed by security updates, or contact the service with a check to purchase a device to confirm ownership.

⚠️ Warning: Never buy a used Xiaomi phone if the seller can’t log out of your Mi Account and Google account with you.

Frequently Asked Questions (FAQ)

Can I unlock Xiaomi without losing photos and contacts?
Without data loss, you can only unlock through Mi Account on the lock screen or if you have a backup in the cloud. In all other cases, including reset via Recovery, the data will be deleted.
What if the phone says "Device locked" after resetting?
This is Mi Cloud protection, and you have to enter the username and password from the Mi Account that was linked to the phone, and without that, it's almost impossible to unlock the device legally.
Will my fingerprint work if I forget my pattern lock?
No. Once the device is restarted, or if more than 24 hours have passed since the last unlock (or 7 days on some versions), the system will require the main method of protection - a password, a pin code or a pattern lock - to be entered, and the biometrics is inactive at this point.
How to avoid blocking in the future?
Always remember your credentials. Write down your Mi Account and Google passwords to a safe place. Regularly back up important data to your computer or cloud storage.
Will the phone flashing help?
The official flashing through the Mi Flash Tool also requires an unlocked bootloader (which cannot be done without access to the menu) or an authorized account. FRP and Mi Cloud, as these anchorages are stored on the server.