How to Reset Your Password on Xiaomi Phone Without Losing Data

When you pick up your Xiaomi, Redmi or Poco smartphone, but the lock screen doesn’t respond to normal movements, it can take you by surprise. A forgotten pattern lock, a mis-entered pin code or a glitzy touch layer are all the reasons for locking the device, and the worst thing at this point is the prospect of losing all personal data, because standard instructions often offer a complete reset.

Fortunately, there are loopholes and proven ways in the Android ecosystem and MIUI shell to restore access to the system by saving photos, contacts and correspondence in messengers, and the key is to act quickly and accurately follow the algorithms until the device has gone deep into lockdown or rebooted itself.

In this article, we’ll break down all the current unlocking methods, from cloud services to engineering menus, that will help you regain control of your gadget without the dramatic deletion of files.

Using a Mi Account to Unblock

The most reliable and regular way to restore access to the device without losing data is the Mi Account, which is tied in. If you have previously logged in to your account on your phone and enabled Find Device, you have direct remote unlock, which works even if the smartphone is not near you now, but has access to the Internet.

First, you need to go to the official website of the Xiaomi Cloud service from a computer or another phone, enter your credentials (login and password) that were used on the locked device. If the data is forgotten, try to restore it through an email or phone number associated with the profile.

Once you've logged in, find the Find Device menu, and the system will show you a map and a list of all the gadgets that are tied to your account, select the smartphone you want from the list, and the unlock menu that opens will have the Unlock option.

πŸ’‘

This method will work only if there is an active Internet connection on the locked smartphone and the device search function is pre-enabled.

It should be noted that after this procedure, the system may require re-entering the password from Mi Account on the next turn on for security reasons, which is a standard protection against theft, which cannot be avoided without authorization of the owner.

Google Search for Device as an Alternative

If your Xiaomi account hasn’t been set up but your phone has a Google profile active, you can use a similar tool from the search giant, which is similar to the Mi cloud, but has its own features, depending on the Android version and security settings.

Go to Google Find My Device from any browser, log in to the Gmail account that was the main one on the locked phone, try to locate the device, and if status shows "On the Net," you'll have a set of commands available.

  • πŸ“ Geolocation: Shows the phone’s exact location on a map, which is useful if you’re not sure where it is.
  • πŸ”Š Sound: Turn on a loud signal even when the sound is turned off to find the gadget at home.
  • πŸ”’ Blocking: allows you to set a new temporary password that will replace the forgotten pattern lock or pin code.

Importantly, newer versions of Android (10 and above) often replace the direct unlock function through Google with a new code, you set a new password, type it on your phone screen, and access is restored, and then the old forgotten code can be changed in the security settings.

πŸ’‘

Make sure the locked screen displays a lock notification from Google, sometimes requiring you to click on it or go to the menu to get the system to accept a new unlock command.

If the phone is offline, the command will be executed automatically as soon as the device is online.Do not force the phone to turn off if there is a chance that it will soon receive a cellular or Wi-Fi signal.

Unlocking through Smart Lock and Trusted Devices

Smart Lock is a handy tool that many people forget at a critical time, and it lets you keep your phone unlocked in certain conditions, like when a trusted Bluetooth device is nearby or you are in a safe place.

Check to see if there's a gadget you previously labeled "Trusted Device" connected to your phone, which could be a smartwatch, a fitness bracelet, Bluetooth headphones, or even a car radio, and if it's paired with a phone and is within range, the screen can be unlocked by a simple swipe without entering a password.

It's also worth checking the "Safe Place" setting. If you've ever added your home or work address to this list, when you're in that geozone, your phone doesn't need to enter a password. Try bringing your phone to a place where you normally use it without locking it.

How to turn on Smart Lock in advance?
To help you in the future, go to Settings β†’ Passwords & Security β†’ Device Protection β†’ Smart Lock. You can add trusted devices and places here. Remember that you already need a screen lock password to set up Smart Lock.

This only works if the function was activated in advance, and if you've never configured trusted devices, it's not going to work, and you'll have to move on to more complex options.

Using ADB to remove screen lock

For advanced users who have previously enabled USB debugging on their phone, there is a powerful tool called Android Debug Bridge (ADB), which allows you to delete a file that stores data about the locking of the screen through your computer.

You will need a computer with drivers installed. ADB and USB-Connect your phone to your PC. If debugging is allowed, your computer will have access to the file system. Open the command line on your computer and type a special command to delete the key file.

adb shell rm /data/system/gesture.key

Once the command is executed, you need to restart the device. On some Xiaomi and Redmi models, this action completely removes the lock. On others, you may need to enter any arbitrary pattern lock or pin code, the system will accept it, since the verification file has been deleted.

β˜‘οΈ Preparation for use ADB

Done: 0 / 4

The difficulty with this method is that without USB debugging pre-on, it won't work. Modern versions of MIUI hide the developer menu by default, so the average user has a small chance of encountering debugging already on, but it's worth checking.

Specifics of unlocking Xiaomi with a fingerprint

Xiaomi smartphone owners often use fingerprint unlock. If the sensor works properly, but you forget the digital or graphical password, the situation is solved easier. After successful fingerprint unlock, immediately go to the settings and change the main lock password.

However, if the sensor is damaged, contaminated, or the system requires you to enter a password after rebooting (and you don’t remember it), biometrics won’t help, and in this case, it’s worth trying the Safe Mode method, which disables third-party applications that sometimes interfere with password entry.

The algorithm may differ from Poco to Redmi to enter Safe Mode, but most often you need to press the off button and then keep the "Stop" option on the screen for a long time until you get a prompt to go to Safe Mode. If you are successful, check if you have a third-party launcher or security application that blocks the input.

πŸ“Š What type of lock you use most often?
pattern lock
Pin code.
Fingerprint.
Facial recognition

Remember that in Safe Mode you will not be able to delete the system lock files, but you will be able to remove conflicting applications if the problem is caused by a virus or software failure.

Comparison of methods and risk table

The choice of method depends on your training and the condition of the phone, and to organize the information, let's compare the main methods by the criteria of complexity and probability of data retention.

MethodConditions requiredRisk of data lossDifficulty
Mi CloudMi Account, InternetNo.Low.
Google Find MyGoogle account, InternetNo.Low.
ADB CommandUSB debugging enabledNo.Tall.
Smart LockAvailability of a trusted deviceNo.Low.
Hard ResetAccess to buttonsTotal loss.Medium

As you can see from the table, cloud-based methods are the most secure for data, but if none of the gentler methods have worked, the last option is a full reset.

⚠️ Warning: Executing Hard Reset via Recovery Mode will remove all photos, contacts and apps from the phone’s internal memory. Use this method only as a last resort when data retention is impossible.

Turn off the phone to perform the reset, then press the volume and power buttons at the same time (the combination may differ for different Xiaomi models). From the Recovery menu, select "Wipe Data" β†’ "Wipe All Data." Once you reboot, the phone will be as new and you can adjust it again by logging into your Google account.

πŸ’‘

Once the settings are reset, the phone will request a password from a Google account (FRP Lock) that was synced to the device before locking.

Preventing blocking and maintaining access

To prevent the situation with the forgotten password from recurring or its solution becoming a disaster, it is important to set up a backup in advance.

Set up an automatic upload to Google Photos or Xiaomi’s cloud. Regularly back up your contacts and messages, in which case even a complete reset of the device will not be a tragedy, since you can recover all the data in a couple of minutes.

Also, make a habit of writing complex passwords to a secure place, such as a paper notebook or password manager on another device, and don’t rely on memory alone, especially if you use different codes for different services.

What to do if your phone is blocked by your Mi Account after a reset?
If after Hard Reset the phone requires a password from Mi Account, which you do not remember, you will have to restore access through the official procedure of account recovery on the site i.mi.com. Without this, you will not be able to legally unlock the device due to FRP protection.
Can I unlock my phone without the internet?
Without the Internet, remote methods (Mi Cloud, Google) will not work, in which case only Smart Lock (if it was configured) or a full reset via Recovery Mode, which does not require a network, but deletes data, helps.
Will Unblocking Through ADB Work Without Root Rights?
Yes, gesture.key removal command often works on devices without root rights, but only if USB debugging was enabled in advance in the developer menu.
How often should I change my lock password?
It is recommended to change your password or pattern lock every 3-6 months, especially if you notice that you may be peeping at your screen when you type.