How to Reset Your Password on Xiaomi Phone If You Forgot It: Without Losing Data

The situation when you pick up a Xiaomi smartphone and the screen meets you with a requirement to enter PIN-A code that is suddenly out of your mind can stunt even an experienced user, and panic is a natural reaction, because there are hundreds of important photos, work documents and correspondence inside the device that can not be recovered just by default. However, do not rush to look for instructions for a full reset, as this is guaranteed to lead to the loss of all user data.

Modern MIUI shells and the new HyperOS have a multi-stage protection system, but the developers have left several loopholes for legitimate owners. In this article, we will discuss the current methods for 2026, the methods of bypassing the locking of the screen. It is important to understand that the success of the operation depends on what settings were activated on the device before the locking, and on the version of the operating system.

We will look at both software methods through service accounts and specific methods that work on certain versions of firmware. Carefully study each item to choose a strategy that is suitable for your Redmi, Poco or Mi model. Remember that chaotic attempts to enter the wrong code can only aggravate the situation by locking the device for a long time.

Using a Mi Account to unlock

The most reliable and regular way to return access to the device is by linking to the manufacturer's cloud service. If your smartphone has logged in to Mi Account and enabled the "Find Device" function, the process of restoring access becomes trivial. You will need access to the Internet from any other gadget (computer, tablet or phone of a friend).

Go to the official Xiaomi cloud service website and log in to your credentials. In the device management interface, select a locked smartphone from the list. The system will offer several actions, among which we are interested in unlocking the screen, not completely erasing, this method only works if the device is on the network.

⚠️ Note: Remote unlocking does not work on all versions MIUI. In some regions and new versions of HyperOS, this option can be replaced solely by remote locking or erasing data to improve security.

If the feature is active, the system will send a command to the phone and the lock screen will be removed or replaced with a new temporary code.This is the only official way that is guaranteed to keep all your files, applications and settings intact. After a successful procedure, it is strongly recommended to set a new, easily remembered password and check sync.

πŸ’‘

The success of unlocking through Mi Account depends on an active internet connection on the locked device and the search function enabled in advance.

Google Find My Device and Access Management

An alternative route for devices with pure Android or global firmware is Google’s service, which operates similarly to Xiaomi’s cloud, but relies on the Google account that was the main one on the phone, and requires that the smartphone be enabled with GPS and data transfer.

Go to Google's device search site and log in to your account. If your phone is seen online, you can select the "Block" option, paradoxically, this feature allows you to set a new password that replaces a forgotten graphical key or a new password. PIN-If you enter it on your phone screen, you'll gain access to the system.

  • πŸ”‘ Make sure your device is connected to Wi-Fi or mobile network.
  • πŸ“± Use a computer or other smartphone to log into your Google account.
  • βš™οΈ The β€œBlock” feature should be active in Android security settings.

It is worth noting that in the latest Android security updates, Google is gradually eliminating the ability to change the password remotely, leaving only the lock and erase function. Therefore, this method should be considered as an auxiliary method. If the code change option is not available, do not try to use third-party scripts that promise to β€œhack” the Google service – this will lead to the loss of your account.

Smart Lock Method and Trusted Devices

Smart Lock is a smart security system that allows you to bypass the lock screen in certain, user-friendly situations. If you set this option up in advance, unlocking your phone will not require you to enter a password.

For example, if your home or office was chosen as a trusted location, when you connect to your home Wi-Fi network or when you are in a geolocation zone, the phone must unlock itself. Also popular is the use of Bluetooth devices. If you have a paired smartwatch, fitness bracelet or car headset that is nearby, the phone can automatically unlock.

πŸ“Š Are you using a smart lock on your Xiaomi?
Yeah, all the time.
Sometimes I forget to turn it on.
Never set up.
I don't know what it is.

Try activating Bluetooth on another device and searching. If the phone sees a trusted device, the lock may disappear. It's not a bug, it's a feature designed to make life easier for the owner in the usual environment. However, if you've never set up trusted devices or places, this method, alas, will not help.

Use of USB and ADB debugging (for advanced ones)

For tech-savvy users, there is a method that uses the Android Debug Bridge (ADB) debugging protocol, which allows you to delete a file that stores password hashes, but it only works under one critical condition: USB debugging had to be included in the Developer Menu before locking, and the computer already had permission to access the device.

If the conditions are met, connect the phone to your PC, install Xiaomi drivers and the SDK platform. Through the command line, you can try to delete the system key file. The command looks something like this: adb shell rm /data/system/gesture.key or adb shell rm /data/system/password.key. After completing the command, you need to restart the device.

adb devices


adb shell




cd /data/system




rm gesture.key




rm password.key




reboot

Once rebooted, the system can suggest entering any password or skipping this step altogether. However, on current versions of MIUI 14 and HyperOS, this method often doesn't work because of enhanced access rights and /data partition encryption. If the phone requests debugging confirmation on the screen (which you can't see because of the password), the method is powerless.

⚠️ Attention: Inept use ADB-This method can cause a system malfunction or a cyclical reboot. Use this method only if you understand what you are doing.

Specific vulnerabilities and workarounds

Interface bugs are periodically detected in various firmware versions to allow access to settings or calls through the lock screen. Although Xiaomi quickly closes such holes in security updates, some older versions of MIUI are still vulnerable. One known method is to call an emergency number and use the About Phone menu to navigate to the browser or setup.

The method often involves activating the Google Assistant voice assistant or launching the browser through the emergency call menu and then going to the system settings, for example, trying to add a contact or send a message sometimes opens up access to the interface, but this is not a good idea, since security patches from 2026-2026 effectively block such loopholes.

Vulnerability Details Through Voice Assistant
On some versions of Android, when you call Google Assistant from a locked screen, you can say "Open Settings," which would throw the user into the system menu.

There are also locker apps that install on top of the standard lock. If you use third-party software to protect your screen, try removing it through Safe Mode or finding a specific master password on the developer's website. Xiaomi's standard methods do not apply here.

What to do if nothing helps: the table of methods

If none of the sparing methods worked, we have to admit that the data is probably lost. Modern Android encryption algorithms are designed so that without a key (password) access to the file system is impossible, and this is done to protect your data in the event of a device being stolen.

Below is a table that summarizes the chances of success depending on the situation. Analyze your conditions to see whether it is worth continuing to try or easier to perform a reset.

SituationMi Account includedUSB Debugging is includedChance without data loss
Access to the Mi Cloud is availableYes.No.High (90%)
Setting up Smart LockWhatever.No.Average (50%)
ADB activated previouslyWhatever.Yes.Low (30%)
Nothing's tuned up.No.No.0% (Reset needed)

In the case of no chance, the only way out is Hard Reset via Recovery Mode. To do this, turn off the phone and pinch the button combination (usually Volume Up + Power). In the Recovery menu, select Wipe Data. Remember that after turning on the phone will require you to enter the password from the Mi Account to which it was previously associated (anti-theft protection).

β˜‘οΈ Checklist before reset

Done: 0 / 4

Prevention of blocking and expert advice

To avoid getting caught off guard in the future, you need to adopt a regular backup habit: Google One or Xiaomi Cloud lets you automatically save contacts, calendar, notes, and even home screen layouts, and if you lose access completely, you can restore your digital life in minutes.

It is also recommended to write complex passwords to a secure place, such as a paper notebook or password manager on another device. Using biometrics (fingerprint, face scanner) speeds up access, but does not replace the need to remember the digital code, since after a reboot the system always requires it.

πŸ’‘

Make a rule: when you change your password on your phone, write it down immediately on your computer or in a paper diary. Human memory is prone to errors, especially when you change security codes frequently.

Be careful installing apps from unknown sources that promise to β€œcrack” any password, at best they will be useless, at worst they contain ransomware that will steal your data from other devices. Xiaomi’s security is built on the user’s trust in official tools.

πŸ’‘

Regular sync with the cloud is the only 100% guarantee that you will not lose important data when you have problems accessing your device.

Frequently Asked Questions (FAQ)

Can I unlock Xiaomi through my computer without losing data?
Independently, without the use of special paid services or pre-configured debugging over USB, it is impossible to unlock a modern smartphone through a computer. Official Mi Unlock tools are only designed to unlock the bootloader, which leads to complete deletion of data.
Will a password reset work if the phone is not connected to the internet?
No, to remotely unlock through Mi Account or Google Find My Device, the device must be online, and if there is no Internet, commands from the server simply won't reach the phone, in which case only Hard Reset will help.
What is FRP Lock and How is it Related to a Forgotten Password?
FRP is reset protection. If you make a Hard Reset, the phone will require you to enter a Google account or Mi Account that was synced earlier, which is anti-theft protection, and you can't legally get around it without the owner's passwords.
Will the phone reset the password?
Yes, full Fastboot flashing will clear all data, including password, but it requires an unlocked bootloader (which requires a 7-day wait and an account) or the use of paid authorized service tools.
Is there a universal code for resetting Xiaomi password?
There are no universal codes (like ##...) for resetting a user's forgotten password. All engineering codes are used for diagnostics, but not to bypass the protection of user data.