Forgot the password on Xiaomi: what to do and how to unlock

The situation when the owner of a smartphone suddenly finds that he forgot the password on Xiaomi, is one of the most stressful in the world of mobile technology. the lock screen turns into an insurmountable barrier, hiding inside important contacts, photos and working documents. Modern security systems Android and shells MIUI or HyperOS are designed to protect personal data from outsiders, so you can not get around them in a simple way.

However, you shouldn’t panic prematurely, as there are several proven methods to restore access to the device. The choice of the specific method depends on which security settings were activated earlier and whether you have access to the Mi Account associated. In this article, we will discuss all possible scenarios in detail, from simple recovery through the cloud to a complete reset.

It’s worth noting that some methods can lead to a complete memory cleanup of a smartphone.That’s why it’s critical to understand the difference between resetting a pattern lock and a full Hard Reset. Below are the instructions to help you regain control of the device, whether it’s the old Redmi Note or the flagship Xiaomi 14.

Using a Mi Account to Unblock

The most civilized and safe way to restore access is to use the Forgot Password feature, which is built into Xiaomi’s security system, which only works if the device has previously logged in to the Mi Account and enabled the Find Device function. If these conditions are met, you are the luckiest.

You start by typing the wrong pattern lock or digital code five times in a row, and after the fifth attempt, the system will block the input for 30 seconds, but the additional button "Forgot the password" or "Forgot the pattern lock" will appear on the screen, and you click on it, you will see the authorization window.

The window that opens will need to enter the username and password for your Mi Account. Importantly, this must be exactly the data that was used on the locked smartphone. If you enter the data of another account, unlocking will not occur. Once you have successfully logged in, the system will suggest resetting the current lock key.

⚠️ Note: If you have forgotten your password and your Mi Account, you will not be able to restore access through this method.You will have to use the procedure for restoring access to your account through the i.mi.com website, which requires the presence of a linked phone number or mail.

📊 Did you have the “Find Device” function enabled before locking?
Yeah, it's on.
I don't remember, I guess.
No, never did.
I don't know what it is.

Note that once unlocked through Mi, your smartphone may require you to re-enter your account password the next time you reboot, which is a standard FRP (Factory Reset Protection) protection measure that prevents you from using stolen devices. Make sure you remember the login details before you start taking action.

Resetting through Google account

Some versions of the Android operating system, especially older models or custom firmware, have the option of unlocking through a Google account, a method less reliable than using Xiaomi services, but in a critical situation, it is worth trying it.

The mechanism of action is similar to the previous one: after several unsuccessful attempts to enter a password, the screen may appear the words "Forgot the pattern lock" or similar. When clicked, the system will prompt you to enter the username and password from the Google account, which was the main one on this device.

However, on current versions of MIUI and HyperOS, this feature is often hidden or completely removed for security reasons, and if you don’t see the restore button through Google after five incorrect attempts, then your version of the software has blocked this channel from the manufacturer.

  • 🔑 Enter only the main account used in the Play Market Store.
  • 📶 To verify the password, the device will need an active Internet connection via Wi-Fi or mobile network.
  • ⏳ After entering the correct data, it may take 5 to 30 minutes to wait before unlocking.

If none of the accounts work, the only guaranteed but radical method is a complete reset, and before you go to it, we strongly advise you to try again to remember the combinations that you may have used.

Hard Reset via Recovery Mode

Hard Reset is a universal solution when other methods are exhausted, and it returns the smartphone to factory status by removing all user data, including forgotten passwords, photos, apps and contacts, a “nuclear option” that solves the access problem but requires the device to be configured from scratch.

To enter Recovery Mode, Xiaomi smartphones use a combination of physical buttons. The device must be completely turned off. Press both the volume button and the power button at the same time. Hold them until the Mi logo appears, then release the power button, while continuing to keep the volume.

Volume button up + Power button

When the Recovery menu comes up, the volume buttons (up/down for moving) are used, and the power button confirms the choice. You need to find Wipe Data or Clear Data. Some versions of the menu may be in English, so focus on the item names.

☑️ Checklist before reset

Done: 0 / 4

Once you select the reset point, the system will ask you to confirm the action, often requiring you to type in the word "yes" or select "Confirm." The cleaning process takes anywhere from 10 seconds to several minutes. Once completed, the smartphone will reboot, and you will see the screen of the initial setting, as when you buy a new device.

⚠️ After Hard Reset, Google will protect you FRP. When you first set up the phone, you'll need to enter the username and password of the Google account that was synced to the device before the reset.

Remote unlocking through Mi Cloud

If physical access to the buttons is difficult or you are far from the phone, but you have a computer or other gadget, you can use the Mi Cloud service. This method is effective if the blocked device is enabled Internet and the function "Find the device".

Go to the official i.mi.com website from any browser, log in using the same Mi Account as on the locked smartphone, and search the Find Device section of the service, which will show the location of your gadget if it is online.

From the device control menu, select Unlock, the system will warn you that all data on your phone will be deleted, confirm the action, the smartphone will receive a command, reset and unlock, a method that is especially convenient when the buttons on the phone are faulty.

MethodData retentionWe need the Internet.Difficulty
Mi Account (on screen)Yes.Yes.Low.
Google AccountYes.Yes.Low.
Hard Reset (buttons)No.No.Medium
Mi Cloud (remotely)No.Yeah (on the phone)Low.

It's important to understand that remotely unlocking through the cloud also leads to complete deletion of data, the only difference is how the process is initiated: If the phone is in flight mode or off, the command will be executed as soon as it appears on the network.

What to do if your phone can’t see SIM-dump-card?
If the phone needs activation after reset, but does not see SIM-If you want to take out the tray, wipe the contacts of the card, and insert them again, make sure that the card is not locked. PIN-In a pinch, connect the device to Wi-Fi to get activated.

Unlocking through ADB (for advanced users)

There is a technical method of resetting a password through debugging USB (USB Debugging), but it only works in one case: if it was pre-installed in the Developer Menu and the computer already had permission to debug. If you didn't enable those settings in advance, it won't help you.

The essence of the method is to connect the smartphone to a PC with an ADB driver installed and a platform-tools utility. A special script is sent through the command line that deletes the gesture.key or password.key file, which stores the password hash.

adb shell rm /data/system/gesture.key


adb shell rm /data/system/password.key

Once you complete the command, you need to restart the device, and if it goes well, the phone will let you on the desktop without asking for a password, but on current versions of Android 10, 11, 12 and higher, this method often doesn’t work because of the enhanced permissions to access system files even with root rights.

  • 💻 You need a computer with Windows, macOS or Linux.
  • 🔌 It is necessary to use original or qualitative USB-cable.
  • ⚙️ The method works only with previously included debugging USB.

If debugging was not enabled, attempts to use ADB will only result in an authorization error message, so don’t waste time searching for “magic commands” online – Xiaomi’s security system will not allow you to bypass the lock screen without authorization.

Prevention and backup

To ensure that the situation “forget the password on Xiaomi” never catches you off guard again, you need to regularly take care of data backup. MIUI built-in tools allow you to automatically save contacts, SMS, call log and even place icons on your desktop in the cloud.

It is recommended to sync with Google Photos for images and videos, which will keep your memories safe even if the device is completely reset, and it is also useful to periodically make a local copy to your computer or external drive.

💡

Write down your pattern lock or complex password to a safe place (notebook, password manager app) where you will definitely remember to look when you need it.

Also, keep your account recovery data up to date: phone number and backup email, keys not only to your phone, but also to your digital identity, and regular account checks will help you avoid problems at a critical time.

⚠️ Note: Do not use simple passwords like "1234", "0000" or geometric shapes in the form of the letter "G". Such combinations are hacked by matching in seconds, nullifying all the protection of the device.

Adhering to these simple digital hygiene rules will make you feel secure, and even if you forget the access code, having a fresh backup will turn the recovery procedure from a disaster into a minor inconvenience.

💡

Regular sync with Mi Cloud and Google is the only way to ensure that losing your password will not result in losing important data.

What happens if I enter the wrong password too many times?
After several failed attempts, the phone will temporarily block the input for 30 seconds, then for 1 minute, 5 minutes, etc. After a certain number of errors (usually 10-15), the device may offer a data reset or permanently lock before logging into the owner's account.
Can I unlock Xiaomi without losing photos and contacts?
Without data loss, you can unlock a modern Xiaomi only if you activate the “Forgot Password” function through your Mi Account or Google account. In all other cases, including Hard Reset, the data will be deleted for security reasons.
Will the reset work if the phone is turned off?
No, to perform a reset command (especially remote), the phone must be on and have access to the Internet. If the phone is turned off, the command will be executed automatically when it is turned on and connected to the network.
How to bypass Google Account (FRP) after resetting?
You can't officially bypass FRP. It's anti-theft protection. You need to remember the login and password of the Google account that was on your phone. If you lose your account, you need to restore access through Google's account recovery procedures.