How to Remove Your Xiaomi Password Without Losing Data: The Complete Guide

It is common for a Xiaomi, Redmi or POCO smartphone owner to forget a security code that has been installed before, and users often install complex combinations for security reasons but are unable to reproduce them in a hurry or after a long break, the main problem is that the standard Android security policy offers a complete resetting of settings with several failed input attempts, leading to the irretrievable loss of photos, contacts and correspondence.

Fortunately, there are loopholes and official services in the MIUI and HyperOS ecosystem that allow you to bypass screen locking by saving user files. The effectiveness of the method depends on the version of the operating system, the presence of a Mi Account and pre-enabled debugging settings. In this article, we will discuss all the current ways, from simple actions through the cloud to using specialized software.

Before you start taking action, you need to evaluate the situation. If the device just locked for 30 seconds or a minute after you entered it wrong, you better wait. However, if you remember that critical data is not synced with the cloud and access to the phone is urgent, you will have to try workarounds. It is important to understand that modern versions of Android (11, 12, 13, 14) have greatly enhanced data encryption, so the old methods may not work on new models.

Using the Mi Cloud service for remote unlocking

The most reliable and official way to remove a password without losing data is to use the Mi Cloud cloud service, which works only if the locked device logs in to a Mi Account and activates the Find Device function, and the phone must be connected to the Internet via Wi-Fi or a mobile network.

You first have to go to the official cloud storage site from any other device, whether it's a computer or another smartphone, and you enter your credentials, you get access to the control of the gadget, in the interface, select "Find the device", and then find your model in the list, and if the geolocation is correctly determined, the control menu will appear on the screen.

So what we're interested in is a lock function, and if you click on it, it will suggest you enter a new password that will replace the current forgotten code, and if you confirm the actions on the locked smartphone screen, you'll be asked to enter a new code, and if you enter it, you'll gain access to the system, and the old data will remain in place.

  • 🔑 It only works if the “Find Device” function is enabled in the Mi Account settings in advance.
  • 📡 Requires an active Internet connection on a blocked gadget to receive commands from the server.
  • 🔄 The new password will replace the old one, so you must remember or write it down.

⚠️ Note: If the device has not signed in to the Mi Account or the search function is disabled, this method will not work.Do not try to guess the password repeatedly, as this can increase the lock time or lead to a reset requirement.

📊 Do you use Mi Cloud for backup?
Yeah, all the time.
Only a photo.
Rarely.
I don't use it at all.

Smart Lock and Trusted Devices

In Android, including the shells from Xiaomi, there is a useful feature called Smart Lock, which allows the device to remain unlocked in certain secure situations. If you have previously set up trusted places, Bluetooth devices or voice recognition, this can be a salvation.

Check if your smartphone is connected to a trusted Bluetooth device, such as headphones, smartwatches or a car stereo. If this pairing has been installed before and the function is active, the phone can unlock automatically when you connect. Also try to move to a place that has been marked as a “trusted place”, such as home or work.

Another option is to use the Voice Recognition feature. If it was set up, just say the unlock command. However, it is worth considering that on modern versions of MIUI, this feature often requires pre-unlocking at least once after a restart, so that after completely turning off the phone, it may not work.

How to check Smart Lock settings without accessing the menu?
Unfortunately, you can't check the active settings of Smart Lock without logging in. However, if you have a paired Bluetooth headphone, try connecting them to your phone. If the screen lights up and lets you on your desktop without asking for code, you're lucky it worked.

This method is more suitable for preventive measures or situations where the lock occurred accidentally, and the background services continue to work. If the phone was rebooted, the Smart Lock settings are reset before the first successful authorization.

Unlocking the lock through debugging via USB and ADB

For advanced users who have pre-installed debugging USB In the “For Developers” menu, there is a powerful tool – the command line. ADB (Android Debug Bridge: This method allows you to delete system files that store lock keys without affecting user data.

To implement this method, you will need a computer with drivers installed ADB and USB-Connect your smartphone to your PC. If you're debugging and your computer is authorized (always allowed from this computer) you can send commands. Open the command line in the folder with ADB and enter a command to delete gesture.key or password.key file.

adb shell rm /data/system/gesture.key


adb shell rm /data/system/password.key

Once you have completed the commands, you need to restart the device. On some versions of Android, the lock screen may remain after the reboot, but you can enter any combination - the system will let you through. It is important to note that on Android 10 and above, this method often does not work due to changes in the security structure and encryption of the /data/system partition.

  • 💻 Requires a PC and installed Platform Tools (ADB).
  • ⚙️ Function “Debugging by” USB» It must be activated before blocking.
  • 📱 On new versions of Android (11)+) This method may be useless due to encryption.

⚠️ Attention: Incorrect use of commands ADB This can cause system instability, and make sure you delete the key files, not the system configurations.

💡

If the ADB command fails, try first entering "adb devices" and confirming the resolution on the phone screen (if you can see the image).

Comparison of Xiaomi Unlocking Methods

To make it easier for you to navigate the right way, we have prepared a summary table that will help you quickly assess the chances of success depending on your specific situation and the preliminary preparation of the device.

MethodConditions requiredRisk of data lossDifficulty
Mi CloudMi Account, InternetNo.Low.
Smart LockConfigured trusted zones/devicesNo.Low.
ADB CommandsIncluded debugging USB, PCNo (but there is a risk of error)Tall.
Safe ModeThird-party screen blockerNo.Medium
Hard ResetAccess to volume buttonsTotal loss of dataLow.

As you can see from the table, the most versatile and secure is the Mi Cloud service. However, it requires pre-configuration. ADB methods are only suitable for a small percentage of tech-savvy users. If none of the gentle methods are suitable, the last but radical option remains.

Safe mode to remove third-party blockers

Sometimes the problem isn't with the system blocker, but with a third-party application you recently installed, which could be a memory cleaner, an antivirus, or a parental control app that has seized the rights to lock the screen, and then downloading into Safe Mode will help.

To enter this mode, you usually need to press the turn off button on the screen (if you have access to the menu) or use a combination of volume buttons when booting. On different Xiaomi and Redmi models, the algorithm may differ. In Safe Mode, only system applications are loaded. If the culprit was a third-party program, the phone will start without a password.

Once on the desktop, immediately remove newly installed applications or those that may have received device administrator privileges. After that, restart the phone as normal. Often this completely solves the problem without any interference with system files.

☑️ Pre-reset check

Done: 0 / 4

What to do if nothing works: Hard Reset

Unfortunately, Google and Xiaomi’s current security standards are designed to protect user data from theft as much as possible, which means that if the password is forgotten, the Mi Account is not tied, and the USB debugging is off, it is almost impossible to bypass the lock without losing data, in which case the only way out is a full reset (Hard Reset).

To perform the reset, you need to turn off the phone and pinch the button combination (usually Volume Up + Power) to enter Recovery mode. Select the language, then "Wipe Data" and confirm the action. The device will return to factory condition.

Once reset, the phone will request data from a Google account or Mi Account that was previously synced, which is FRP. If you don't remember that data, it will be extremely difficult to unlock the device, you will need to contact the service center with a check for purchase.

⚠️ Warning: After reset, all data (photos, contacts, apps) will be deleted, and the only way to get it back is to have a fresh backup in Google Drive or Mi Cloud.

💡

Hard Reset is a last resort, and only use it if you are sure that backups exist or that the information on your phone is of no value.

Frequently Asked Questions (FAQ)

Can I unlock Xiaomi without losing data if my phone is turned off?
No, to remotely unlock via Mi Cloud or transmit ADB commands, the phone must be turned on and connected to the internet. If the device is turned off, turn it on first. If it requests a password immediately after turning on, try the methods with Smart Lock or Safe Mode if they have been configured.
Will it work with ADB on Android 13 and HyperOS?
The probability of success is extremely small. Starting with Android 10, encryption keys are stored in a secure partition that is not accessible without unlocking the screen, deleting key files via ADB on new versions of the OS often does not work or requires root rights that cannot be obtained without an unlocked screen.
What if your phone requires a code from your Mi Account after a reset?
This is a theft protection feature, and you need to enter the username and password from the account that was synced to the device before the reset, and if you forget your account password, use the recovery procedure at i.mi.com or account.xiaomi.com.
Will third-party programs help to unlock?
Most of the software that promises “guaranteed unlock without loss of data” is either fraudulent or only runs on very old versions of Android. Be careful when downloading such software, as it may contain viruses.
Can I remove my password through the Xiaomi Service Center?
Xiaomi’s official service centers, as a rule, do not deal with software unlocking forgotten passwords, as this is contrary to the privacy policy, they can only offer flashing the device, which is equivalent to a complete data reset.