The situation when you pick up your smartphone Xiaomi, Redmi or Poco, and the lock screen greets you with a requirement to enter a forgotten code, can knock you out tracks of any user. There is no need to panic at this moment, since modern Android security systems provide several scenarios for restoring access to the device. The choice of a specific method depends on whether synchronization with the cloud has been pre-configured, whether USB debugging is enabled and how critical it is for you to save personal files.

In this article we will analyze in detail all the existing methods on how reset password on Xiaomi devices, starting from the standard tools of the Mi ecosystem and ending with radical methods through Recovery. It is important to understand that some methods are guaranteed to completely delete data, while others allow you to save photos and contacts. Before taking active steps, you need to soberly assess the risks and choose a strategy that suits your current situation.

It is worth noting that Google and Xiaomi security algorithms are constantly being improved, closing vulnerabilities that were used in older versions of Android. Therefore, methods that worked a couple of years ago may be useless today if the system was not specifically prepared for such a scenario in advance. We will consider only current and working options applicable to modern MIUI and HyperOS shells.

Using a Mi account to unlock

The most civilized and safe way to restore access to the device is to use the built-in service Mi Account. If you have previously linked your smartphone to your Xiaomi account and enabled the Find Device function, then you have an excellent chance to unlock the gadget without losing data. This method only works if there is an active Internet connection on the locked phone, be it a mobile network or Wi-Fi.

First, you need to go to the official website of the i.mi.com cloud service from any other device with Internet access. Enter your credentials (login and password for your Mi account) in the appropriate authorization fields. After successfully logging in, find the “Find Device” or “Find Device” section in the menu. The system will try to determine the location of your locked smartphone.

⚠️ Attention: If the Internet was not turned on on the device or the search function was deactivated, this method will not work. In this case, the system will not be able to transmit the unlock command remotely.

After the device is found, several control options will appear on the screen. You will need to select the "Unlock" function. The system will warn you that all data on the device will be deleted, however, in some older versions of MIUI firmware, it was possible to reset only the lock screen. In modern versions of HyperOS and MIUI 14/15, this process is most often equivalent to a full reset.

💡

Make sure that you remember the password for the Mi account, and not for Google. These are different services, and restoring access to them occurs through different procedures.

Reset via Google Find My Device

An alternative option that may work if a Mi account is not configured is to use Google services. The method is similar to the previous one, but is tied to a Gmail account, which must be present on any certified Android device. To implement this method, it is also required that the smartphone is connected to the network and geolocation is active on it.

Go to android.com/find from a computer or tablet. Log in using the Google account that was used on the locked phone. If there are several devices, select the one you need from the list on the left. The interface will offer you three actions: call, block or erase the device.

Select the "Erase Device" option. This action initiates a command to perform Factory Reset (factory reset). After executing the command, the phone will reboot and the lock screen will be deleted along with all user data. You will receive the device out of the box, ready for new settings.

  • 🔒 The method requires prior authorization in Google Play on the phone.
  • 📡 A stable Internet connection is required at the time the command is sent.
  • 🗑️ All data (photos, contacts, applications) will be irrevocable deleted.
What to do if the phone is offline?

If at the time the command was sent the phone was turned off or did not have access to the network, the command will be executed automatically as soon as the device comes online. The status of the action can be monitored in the site interface.

Resetting settings via Recovery Mode

If remote methods are not available, the only option is to use Recovery Mode. It is a built-in software tool that allows you to perform low-level system operations, including a hard reset. On Xiaomi smartphones, this mode is entered using a combination of physical buttons, which allows you to bypass the lock screen.

To enter Recovery mode, turn off the smartphone completely. Then simultaneously hold down the volume up button (Volume Up) and the power button (Power). Hold them until the logo Mi or Redmiappears, then release the power button while continuing to hold the volume button. After a few seconds, the main recovery menu will open.

⚠️ Attention: The touch screen does not work in the Recovery menu. Navigation is carried out using the volume buttons (up/down), and the selection of an item is confirmed with the power button. Be careful when choosing so as not to launch unnecessary processes.

In the menu that opens, the default interface language is often Chinese. You need to find the item corresponding to data clearing. This is usually the second or third line from the bottom. If the menu is in Chinese, be guided by the icons or remember the order: often it is the button in the center (Wipe Data). After selecting, confirm the action by clicking "Confirm" or "Clear all data".

The reset process may take from 1 to 5 minutes. Upon completion, the system will notify you of success (“Data wiped successfully”). After that, select the option "Reboot" -> "Reboot to System". The phone will start up as new, requiring initial setup.

☑️ Reset algorithm via Recovery

Done: 0 / 4

Unlocking via ADB (for advanced users)

The method using Android Debug Bridge (ADB) is one of the few that theoretically allows you to delete a file with a lock key without losing user data data. However, its use is possible only in one case: if the “For Developers” menu was previously enabled on the phone and USB debugging was activated.

If these conditions are met, connect the smartphone to the computer via a USB cable. ADB drivers must be installed on the PC. Open the command line (CMD) or PowerShell in the platform tools folder and enter the command to test the connection:

adb devices

If a device with the status "device" appears in the list, then the connection is established. Next, you need to obtain superuser rights (root) or take advantage of a vulnerability in a specific version of Android to delete system lock files. The command to delete the key file is as follows:

adb shell rm /data/system/gesture.key

After executing the command, you must reboot the device. In some cases, this allows you to log in without entering a password. However, on modern versions of Android with data encryption enabled, this method is often useless, since the system requires unlocking to access the user partition.

💡

ADB is only effective if USB debugging was enabled BEFORE locking. Otherwise, the computer will not have access to the phone’s file system.

Comparison of methods and risks of data loss

When choosing an unlocking method, it is important to clearly understand the consequences of each action. Some methods guarantee a return to a working state, but at the cost of complete loss of information, others can leave the data intact, but require specific conditions. Below is a table to help you navigate the effectiveness and risks of various approaches.

Method Data storage Availability of the Internet Complexity
Mi Account No (usually) Required Low
Google Find My Device No Required Low
Recovery Mode No Not required Average
ADB Command Yes (possibly) Not required High

As can be seen from the table, the most universal, but radical method is resetting via Recovery. It does not rely on internet access or debugging presets, but guarantees file loss. Methods that save data work only in a narrow range of cases when the user has prudently configured the system in advance.

If the data was critical and did not have a backup copy, after the reset you can try to restore it through Google Photos or Google Contacts, if synchronization of these services was enabled. It is also worth checking the "Trash" folder in cloud storages, where deleted files could have ended up.

📊 Did you manage to restore access to the phone?
Yes, through Mi account
Yes, by resetting via Recovery
No, the phone is locked forever
I use third-party software

Protection from Factory Reset Protection (FRP)

After performing a Hard Reset using any of the methods described above, modern Xiaomi smartphones activate the FRP (Factory Reset Protection) protection mechanism. This is a Google security feature that requires you to enter the password for the Google account that was synced with the device before the reset.

The purpose of FRP is to protect the device from theft. If an attacker steals a phone and tries to reset it via Recovery, he will still not be able to use it without knowing the password of the Google account owner. During the first setup after the reset, the system will ask for an email and password.

⚠️ Attention: If you do not remember the password for your Google account, restoring access to your phone will be more difficult. You will have to go through the account recovery procedure through the Google website, which may take time and require access to a backup email or phone number.

It is important to distinguish between a screen lock and an account lock. Resetting the screen password does not remove the link to your Google account. Therefore, before performing a Hard Reset, try to remember or restore access to your Gmail. Otherwise, the phone may turn into a “brick”, available only for emergency calls.

Prevention and creation of backups

To prevent the situation of a forgotten password from becoming a disaster, it is necessary to regularly create backup copies of data. In the Xiaomi ecosystem, this can be done in several ways. The most reliable is to use the Mi Cloud or Google One cloud service.

Set up automatic synchronization of contacts, calendar, notes and photos. To do this, go to Settings → Mi account → Mi Cloud and activate the necessary items. It is also recommended to periodically make a complete copy of the system to a computer or external drive, especially before updating the firmware.

  • 📸 Enable auto-upload of photos to Google Photos or Mi Cloud.
  • 📞 Synchronize contacts with SIM card or cloud regularly.
  • 💾 Make backups of important documents to a flash drive or cloud storage.

It is also considered good form to record passwords in a password manager (for example, Google Password Manager or third-party applications) so as not to rely on memory. Write down your PIN code or pattern on paper and keep it in a safe place if you are afraid of forgetting complex combinations.

Frequently asked questions (FAQ)

Is it possible to unlock Xiaomi without losing data?

Without losing data, it is possible to unlock your phone only through a Mi account (function "Unlock" on the website i.mi.com), if it is available for your model and firmware version, or via ADB if USB debugging was enabled. In all other cases, including a reset via Recovery, the data will be deleted.

What to do if the phone says “Device is locked” after a reset?

This is FRP protection. You need to enter the login and password for the Google account that was added to the phone before the reset. If you recently changed your Google password, wait 24 hours before trying to sign in. If the account is unknown, it is almost impossible to officially restore access.

How many times can you enter the wrong password?

After 5 unsuccessful attempts, the phone will be locked for 30 seconds. With each series of unsuccessful entries, the blocking time increases (up to 1 minute, 5 minutes, 30 minutes). After many errors, the device may require you to enter a PIN code from your Google account or perform a data reset.

Will flashing the phone help?

Flashing via Fastboot mode (Mi Flash) will also lead to complete deletion of data. In addition, on modern Xiaomi phones the bootloader is often locked, and flashing the firmware requires unlocking the bootloader, which is impossible without access to the phone's settings menu. Therefore, this method is not a solution to the blocking problem.