Forgot the password on Xiaomi: how to unlock the device

When you pick up your Xiaomi or Redmi smartphone and it requires a pattern lock or a digital code that you can’t remember, it’s a panic attack.It’s one of the most common problems Android users face. Modern security systems like MIUI and the new HyperOS are designed to protect your personal data from strangers as much as possible, so it’s not easy to get around the security.

But there are proven ways to restore access to your phone, and you'll have to choose between saving data and returning to factory settings completely. In this article, we'll go through all the legal methods that will help you use your phone again if you forget your screen unlock password.

Before you start taking action, it's important to understand that most methods will result in complete deletion of information. So if you have the ability to recall code or find it in records, you better take this opportunity. If you're exhausted, below are step-by-step instructions for different scenarios.

Reset options via the recovery menu (Recovery Mode)

The most reliable and often the only working way to unlock a device if you forget your password is to reset it through Recovery mode, which works on 99% of models, whether it’s the old Redmi Note 8 or the newest Xiaomi 14. It completely clears internal memory by deleting all photos, contacts and apps, but it is guaranteed to remove the lock screen.

You don't need access to your desktop to enter this mode. You'll need to turn off your smartphone completely and then press a certain combination of buttons. Usually, this is a volume button and a power button. Hold them together until the Mi logo appears, then release the power button while you keep the volume.

⚠️ Warning: Once reset via Recovery, the phone may require you to enter a password from your Mi Account or Google account that was previously synced, which is protection against theft, and it is almost impossible to get around it without authorization data.

In the Recovery menu, you can control the volume buttons (up/down) and the confirmation of the selection is the power button. You need to find the Wipe Data or Wipe & Reset. Select it, then confirm the action by selecting Wipe All Data. The process can take a few minutes.

Once the procedure is complete, the phone will restart. The initial setup will take time, as the system will check security. Don't try to interrupt the process, even if it seems to be stuck on the logo.

☑️ Checklist before reset

Done: 0 / 4

Use the “Find Device” function from Xiaomi

If the Internet (Wi-Fi or mobile data) was turned on on on the locked smartphone and the Find Device feature is activated, you have the chance to unlock it remotely.Mi Cloud allows you to control the gadget from another device, for example, from a computer or tablet. This is the only method that potentially avoids data loss, although in recent versions of MIUI it often works only as a blocker.

Go to the official i.mi.com website from any device available to you, you must log in using the same Mi Account that was entered on the locked phone, and if you forget your account password, you can restore it through your email or phone number associated with the account.

In the service interface, select your device from a list. If you have a connection to your phone, the map will show its location. In the management menu, find the Erase device or Unlock button. Pressing this button will send a command to the phone, and it will reset or unlock.

It's worth noting that the effectiveness of this method depends on the version of the operating system, and on old firmware, unlocking was successful, on new ones - most often just a remote reset, similar to Recovery Mode, occurs.

What to do if the site says "Device offline"?
This means that the phone is not connected to the Internet or off, in which case remote unlocking is impossible. Try leaving the computer on with the Mi Cloud open site for a few hours - if the phone appears on the network (for example, connects to home Wi-Fi), the command will run automatically.

Reset the lock via Google Find My Device

An alternative to Xiaomi’s branded service is Google’s standard security feature: If you’re logged in to a Google account and geolocated, you can use Android Device Manager, which also requires an active Internet connection on the blocked gadget.

Go to android.com/find and log in to your Google account. The system will try to locate the device. From the side menu, select the option "Erase Device" (Erase Device), which initiates a complete reset to factory state.

It is important to understand the difference between locking an account and locking a screen. Google allows you to erase data, but does not always remove the pattern lock without resetting. Once the cleanup procedure is complete, the phone will restart, and you will need to reset the original Android setting.

This method is especially relevant if you do not remember the data from the Mi-account, but remember exactly the login and password from Google email, which was the main one on the device.

📊 What version? MIUI installed?
MIUI 12 and below
MIUI 13-14
HyperOS (Android 14+)
I don't know.

Unlocking through ADB (for advanced users)

Method of using debugging USB (USB Debugging and tool ADB (Android Debug Bridge is considered one of the most technically sophisticated, and its main advantage is that it theoretically allows you to delete lock files without losing user data. USB" It should be included in the Developer Menu before you forget your password.

If debugging is enabled, connect the phone to the computer via USB-The PC needs drivers installed. ADB. Open the command line or terminal in the tool folder ADB. Enter a command to check the connection:

adb devices

If a message about debugging permission appears on the phone screen (and you can confirm it, for example, through OTG-You can then try to delete the files that store the lock keys, which are usually files with the.key extension in the directory. /data/system/.

The removal commands may look like this:

adb shell rm /data/system/gesture.key


adb shell rm /data/system/password.key




adb shell rm /data/system/locksettings.db

Once the commands are completed, the device needs to be restarted. If it goes well, the phone will start without asking for a password. On modern Android versions, this method rarely works because of enhanced security measures, but on older Redmi or Poco models, it can be a salvation.

💡

Use it. OTG-If the touchscreen is partially broken or you can't enter a complex password, the mouse will make it easy to draw a pattern lock or enter numbers.

Comparison of Xiaomi Unlocking Methods

The way you choose depends on your situation: whether the Internet is on, whether you remember your accounts, whether you are willing to sacrifice data, and to organize the information, let's look at the basic methods comparison table.

MethodData retentionWe need the Internet.Difficulty
Recovery ModeNo (full reset)No.Low.
Mi Cloud (Find Device)No (most often)Yes.Low.
Google Find My DeviceNo.Yes.Low.
ADB (USB debugging)Yeah (possibly)No (PC needed)Tall.

As you can see from the table, Recovery Mode remains the most versatile solution, requiring no additional conditions other than physical access to buttons. Online services are good in that they can be launched even if the phone is lost, but they require pre-setting sync.

ADB should only be considered as a last resort if data is critical and backup is not available, but don’t expect to be 100% successful, as modern Android security patches close most of the vulnerabilities used by this method.

Frequent problems and solutions when unlocking

Users often face additional difficulties in restoring access, one of the most common is blocking Mi Account after a reset, if the phone says "This device is locked" and requires a password from an account you don't remember, the situation becomes complicated, in which case only restoring access through i.mi.com using the linked phone number will help.

⚠️ Note: Do not try to guess the password from the Mi Account repeatedly.After several unsuccessful attempts, the account may be temporarily blocked by Xiaomi security system for 24 hours or more.

Another problem is that the device will be "bricked" when the reset process is interrupted, so if the battery is dead during memory formatting, the phone may stop turning on. Always monitor the charge. If the phone does not respond, you will need to flash it through the computer using the Mi Flash Tool utility and Fastboot mode.

Also worth mentioning is the Fastboot mode. If you happen to get into it (the screen with the hare fixing the android), don't be alarmed. To exit, just press the power button and hold it for about 10-15 seconds until the device vibrates and reboots.

💡

The fastest and most guaranteed way to get back access to your phone is through Hard Reset via Recovery, but it requires knowing the password from your Mi Account after you reboot.

Preventing blocking in the future

To prevent the "forget password" situation from recurring or causing the loss of important files, you should set up several security settings in advance. First, enable automatic synchronization of contacts and photos with Google Photos and Mi Cloud, which will allow you to recover data even after a complete reset.

Second, write down your pattern lock or PIN-The human memory tends to forget information, especially if you rarely use unlocking (for example, using a fingerprint or Face). ID).

Third, add alternative unlocking methods, set it up by fingerprint, face or smartwatch, which is not only more convenient, but also serves as a backup if you forget the digital code.

Check regularly if your Mi Account is active and your current phone number is tied to it.This is a key element of Xiaomi's ecosystem, and losing access to it can make the phone a useless piece of plastic and glass if locked.

What happens if I enter the wrong password too many times?
After several failed input attempts (usually 5-10), the phone will temporarily block the input option for a certain time (30 seconds to 5 minutes).If attempts continue, the intervals will increase. In some cases, if the appropriate setting is enabled, the device may suggest resetting the data after 10-20 failed attempts.
Can I unlock Xiaomi without losing data?
There are no official ways to unlock the screen without losing data if you have completely forgotten your password and have not enabled USB debugging in advance. This is for security reasons. Any programs that promise to "hack" your phone without resetting are likely fraudulent.
How to reset my Mi Account password if I forget it?
Go to i.mi.com, click "Forgot Password" and you'll need access to a linked phone number or backup email. If your phone number is lost, recovery can take a long time and require you to contact support with a check to purchase the device.
Will the reflashing help to remove the password?
Yes, full flashing (Clean Install) through the Mi Flash Tool in Fastboot mode completely erases the device’s memory, including the password partition. However, once turned on, the phone will still require you to enter the Mi Account that was before (anti-theft protection).