If you forgot the password on the phone Xiaomi: what to do on Android

A situation where you pick up your Xiaomi or Redmi and the screen requires you to enter a pattern lock or a graphical key. PIN-It's a common occurrence that you can't remember, and it's a constant occurrence, when you have a long downtime on your smartphone, change your input habits, or just stress, your memory may fail. At this point, it is important not to panic and be clear about which unlock tools have been activated on your device in advance.

Modern Android security systems based on the MIUI shell or HyperOS are designed so that you can not easily bypass the protection of your personal data. However, there are several proven methods to return access to the device. The choice of the particular method depends on whether the Mi Account was tied, whether debugging is enabled by USB and whether the phone remembers your Google account details.

In this article, we will go into all possible scenarios, from soft resets through cloud services to full Hard Resets that will delete all data. We will look at the nuances of working with different versions of firmware and explain why some methods may not work on new security patches.

Using a Mi Account to Unlock the Screen

The most civilized and least painful way to regain access to your smartphone is to use the built-in password reset feature through your Mi Account, which only works if you have previously logged in to your phone’s system settings and your device has an active Internet connection (Wi-Fi or mobile data).

After five misty attempts to enter a pattern lock or digital code, a countdown timer usually appears on the lock screen, at which point, take a closer look at the bottom of the display, where a "Forgot Password" or "Forgot the pattern lock" button may appear, and when you click on it, the system will require you to enter your Mi Account login and password.

If you input the correct data, the phone unlocks and you can install a new access code, which is designed specifically for cases where the owner can regain control without losing photos and contacts, but it is worth considering that on some new versions of MIUI, this button may not appear immediately, requiring a wait for 15 minutes or even an hour.

Why does the “Forgot Password” button not appear?
The button may be missing if the “Block After Reboot” option has been forced into the security settings, or if the device does not have a permanent connection to Xiaomi servers, and the feature does not work if the phone was reset to factory settings and did not pass the initial account setting.

If the phone is in flight mode or the SIM card does not catch the network, this method, alas, will not work, and you will have to move to more radical measures.

Resetting with Recovery Mode (Hard Reset)

If you can't remember the code and the account doesn't work, the only guaranteed option is to completely reset user data through the recovery menu, a process called Hard Reset, which permanently deletes all photos, contacts, apps and settings, returning the phone to a "store-like" state. Before starting the operation, make sure that the battery is at least 40-50% so that the device doesn't turn off at a critical moment.

To enter Recovery mode on Xiaomi and Poco smartphones, you need to turn the device off completely. Then you need to press the Volume Up button (Vol+) and Power button simultaneously. Hold them until the Mi logo or menu with several items in English or Chinese appears on the screen, the navigation in this menu is done by volume buttons, and the choice is by the power button.

☑️ Preparation for Hard Reset

Done: 0 / 4

From the Recovery menu, select Wipe Data (or Wipe & Reset), then confirm the action with Wipe All Data.The system will ask for a final confirmation, often requiring you to press Confirm or select OK. After completing the process, which can take a few minutes, select Reboot -> Reboot to System.

⚠️ Warning: Once reset and turned on, the phone will require you to enter a password from a Google account or Mi Account that was synced to the device before locking. FRP (Factory Reset Protection: If you don't remember this, the phone will remain a brick, and unlocking it will be extremely difficult and expensive.

It is worth noting that on some models with the new firmware version, logging into Recovery may require unlocking the screen, making this method impossible without first removing the lock, in which case only flashing through the computer will help.

💡

Hard Reset is a last resort that is guaranteed to remove the password but destroys all local data on the device. Regular sync with the cloud is your only insurance.

Remotely Unlocking with Google Find My Device

Another powerful tool built into Google’s ecosystem allows you to manage a locked device remotely, Find My Device works if you have geolocation enabled, internet access and Google account login, which is especially relevant if you don’t remember your Mi Account password but remember your Gmail email.

To use the method, take any other smartphone or computer, go to the official website of the service and log in under the same Google account as on the blocked Xiaomi. In the list of devices, select your phone. In the action menu that appears, several options will be available: Call, Lock and Clear the device.

We're interested in the cleanup function. When you select the Erase Device option, the phone will receive a command to completely reset. Unlike local button reset, this method sometimes allows you to bypass some of the verification steps, although on modern versions of Android 10-14, FRP protection will still require you to enter a Google password after rebooting. However, it is a great way to erase data remotely if the phone is stolen or lost.

  • 🌐 Requires a stable Internet connection on a locked phone.
  • 📍 Geolocation should be included in the security settings.
  • 🔐 You need to know the login and password from Google account.

Sometimes the system doesn't offer a cleanup, but a new lock password, and if it's available in your region and for your version of Android, it's the perfect way to save data. Enter a new code and it will replace the old forgotten password.

Comparison of Xiaomi Unlocking Methods

To make it easier for you to navigate the way you can restore access, we've developed a comparison table that will help you assess the risk of data loss and the conditions for each method, and the strategy you choose depends on your specific situation: which is more important - save files or simply access calls.

MethodData retentionWe need the Internet.Difficulty
Mi Account (button on the screen)Yes.Yes.Low.
Google Find My DeviceNo (cleaning)Yes.Low.
Hard Reset (buttons)No.No.Medium
ADB (via PC)Depends on the settings.No.Tall.

As you can see from the table, the only way to save data is to remember your password or use a cloud reset via your Mi Account if it was set up in advance, all other methods leading to a complete cleanup of internal memory.

📊 Have you ever had a phone lock?
Yeah, I forgot my password.
No, I'm using biometrics.
Yeah, the phone was stolen.
No, I don't know any of those problems.

Unlocking through ADB and debugging via USB

For advanced users who have previously enabled the “Debugging by” mode in the developer settings USB» (USB Debugging, there is a technical way to unblock without losing data.This method does not work on all versions of Android and requires a computer with a driver installed. ADB The Android Debug Bridge Toolkit.

The essence of the method is to send a special command that deletes the file that stores the hash of the pattern lock. Connect the phone to the PC via a computer. USB-Open the command line or terminal in the folder with ADB and enter the command to check the connection: adb devices. If a window appears on the phone screen asking to allow debugging, and you confirmed it (which is difficult to do when the screen is locked, but it is possible if the “Always Allow” checkbox was previously ticked), move to the next step.

adb shell rm /data/system/gesture.key

Depending on the type of lock:

adb shell rm /data/system/password.key

Once you have completed the command, you need to reboot the device. On older versions of Android (up to 6.0-7.0), this often allowed you to log in with any password or no password. On modern Xiaomi with Android 11-14, this method works extremely rarely due to the enhanced file system protection and access rights, but it is worth a try if the data is critical.

⚠️ Note: If you have not included the debugging USB before locking, this method is useless. ADB-Drivers via the Recovery menu or special downloaders without unlocked bootloader (Unlock Bootloader) will not be successful.

FRP (Google Account Lock) and its solution

Once you successfully reset your password through Hard Reset or Google Find My Device, you may encounter an activation screen that requires you to enter your Google account password. This is FRP (Factory Reset Protection) protection, which is designed to make it impossible for a stolen phone to simply be reset and sold. If you don't remember the Google password, the device becomes a useless piece of plastic.

The official path is to restore access to your Google account via your computer or other phone, go to Google, select Forgot Password, and follow the recovery instructions via backup email or phone number, the only legal and secure way.

There are many informal methods of circumvention. FRP (via TalkBack, special APK-files, diagnostics, but they are:

  • 🚫 Often closed by manufacturers in new security patches.
  • 🚫 Requires deep technical knowledge and the risk of “bricking” the device.
  • 🚫 May contain malicious code.

We strongly recommend against using “gray” bypass schemes, as they can disrupt the security system Xiaomi, it is better to spend time to restore access to your account through Google support than risk the health of the smartphone.

💡

Keep screenshots or important account records in a safe place (notebook, cloud storage) where you can access even without a phone, which will save you nerves in a critical situation.

Frequently Asked Questions (FAQ)

Can I unlock Xiaomi without losing data if I forget my password?
The only real way is to enter the correct password from your Mi Account through the Forgot Password button on the lock screen. All other methods, including resetting through Recovery or Google Find My Device, involve completely deleting user data.
What if the phone says “Device locked” after resetting?
This is FRP protection. You need to enter the login and password from the Google account that was synced to the phone before the reset. If you had multiple accounts, try everything. Without this data, it is officially impossible to unlock the device.
Will Hard Reset work if the phone is turned off?
Yes, to enter Recovery mode, the phone must be turned off. However, for the reset process itself and subsequent activation, the battery must be sufficient. If the phone is discharged to zero, first put it on charge (even when it is off), otherwise it may turn off during the firmware process, which will damage the system.
How often do I need to change my password so I don’t forget it?
Paradoxically, frequent password changes increase the risk of forgetting, preferably using biometrics (fingerprint, Face ID) for daily unlocking, and a complex digital or pattern lock to keep in memory as a backup option, periodically entering it for verification.