How to restore Xiaomi if you forgot your password: all ways to unlock

When you pick up your Xiaomi to answer an important call or check a message and suddenly realize you have forgotten your pattern lock or digital pin code, it can cause panic. This is a common problem faced by owners of Redmi and POCO smartphones around the world. Modern Android security systems and the MIUI or HyperOS shell reliably protect data, but sometimes this protection turns against the user, blocking access to the device.

Fortunately, there are several proven methods to restore access to the gadget, and the specific method depends on whether the Mi Account was enabled, whether the debugging is activated via USB, and how critical it is for you to save personal data stored in the phone's memory. In some cases, you can do without losing information, in others, a complete reset will be the only way out.

In this article, we will take a look at all the current algorithms for 2026-2026. We will look at the standard recovery tools, working with Recovery mode, as well as the nuances associated with protection against theft. Remember that most methods associated with password resetting will lead to the complete removal of all user data from the device if you do not have an up-to-date backup.

Standard ways to unlock through Mi Account

The most civilized and safe way to restore access to Xiaomi is to use the “Forgot Password” function, which is built into the screen locking system. This method only works if the device has a Mi Account login and the smartphone has an active Internet connection (Wi-Fi or mobile data). If you enter the wrong pattern lock or pin code several times in a row, the system will prompt you to wait a certain time, after which the corresponding inscription may appear on the screen.

Click on Forgot Password or Forgot the pattern lock. The system will redirect you to the login page in your Mi Account. You will need to enter your username (phone number or email) and password from your account. Once you have successfully logged in, the phone will suggest resetting the current locking code and installing a new one, which is an ideal scenario, since it does not require deleting personal files.

But if the Internet on the phone is off, it won't work directly, and then you can try sending it to a locked phone. SMS-This requires you to enable "Find Device" in the cloud settings beforehand. From another phone or computer, send a message with the text #reset# to the number of the locked smartphone. The device will receive a command and reset the screen lock password.

⚠️ Attention: Resetting function through SMS It only works if it has been pre-activated in the security settings and the phone has the ability to receive messages even in a locked state.

With the update of Google and Xiaomi’s security policies, the ability to unlock through an account is becoming increasingly limited on new versions of Android, and if the options don’t work, you’ll have to move to more radical measures related to memory cleanup.

💡

Always keep the Find Device feature in Mi Cloud enabled – this is the only chance to unlock your phone without losing data in the event of a forgotten password.

Resetting settings via Recovery (Hard Reset)

If standard methods fail, the only remaining option is a forced factory reset, known as Hard Reset, which is performed through a dedicated Recovery Mode menu that downloads independently of the operating system, and it’s important to understand that this process will completely remove all photos, contacts, apps and files from the phone’s internal memory, returning it to a “store-like” state.

To enter recovery mode, you need to turn off your smartphone completely. Then press the volume button and the power button at the same time. Hold them until the Mi logo appears, then release the power button, but continue holding the volume button until the main Recovery menu appears. This menu is controlled by volume buttons (up and down), and the choice is confirmed by the power button.

☑️ Preparation for Hard Reset

Done: 0 / 4

From the menu, select a language (usually English), then go to Wipe Data. Then select Wipe All Data and confirm the action. The formatting process can take several minutes. Once complete, the phone will prompt you to return to the main menu (Back to Main Menu) and select Reboot -> Reboot to System. When you first start, the system will be configured again.

⚠️ Warning: Once you reset your phone, you will need to enter a password from a Mi Account or Google account that was previously synced to your device).

Do not interrupt the reset process or turn off the phone until it is fully restarted. Interrupting the formatting can damage the file system and prevent the operating system from booting further.

Using the Mi Cloud service for remote resetting

An alternative to direct interaction with the phone is using the Mi Cloud cloud service. This method is effective if the phone is connected to the network, but you can't unlock the screen to enter the Wi-Fi password if it's not saved.

Go to i.mi.com and log in to the same Mi Account that was used on the locked device. Search the Find Device function in the cloud interface to try to locate your gadget. If the device is online, you will have a range of activities available, including blocking, playing back audio and cleaning up data.

Select the "Wipe Device" option. Once confirmed, the phone will receive a command to reset completely. This will remove the lock password along with all the data. The method is similar to Hard Reset, but it is performed remotely. It is especially useful if the buttons on the phone itself are faulty or the screen does not respond to touch, but the sensor is partially working.

📊 What Users Most Often Forget?
pattern lock
Digital. PIN-code
Password from Mi Account
Unlocking pattern

It's important to take into account the latency of the signal. The command from the server may not come instantly. Make sure that the phone has a battery charge, otherwise it will not be able to receive the command and perform the reset.

Unlocking through debugging via USB and ADB

For advanced users who have pre-installed USB Debugging in the Developer Menu, there is a method to delete password files via a computer that doesn’t require resetting all data, but only works on older versions of Android (usually up to version 6-7) and requires ADB drivers installed on a PC.

Connect your phone to your computer through USB-Open the command line on your computer in the tool folder. ADB. Enter the command to check the connection: adb devices. If the device is identified and has the status of a device, you can try to delete files that store information about the lock key.

adb shell rm /data/system/gesture.key


adb shell rm /data/system/password.key




adb shell rm /data/system/locksettings.db

Once you have completed the commands, restart your phone. On current versions of MIUI and Android, this method often doesn't work because of the system's enhanced security, but it's worth trying if you don't want to lose data. There are also specialized utilities from third-party developers, but they carry the risk of infecting your computer with viruses.

⚠️ Warning: Using third-party unlocking software may violate warranty and cause system instability.

If the phone requests permission to debug when connected, and you can’t press “OK” on the screen because of locking, this method, alas, will not work.

Comparison of Access Restoration Methods

To make it easier for you to choose the right option, we have prepared a summary table comparing the methods described above on key parameters: data safety, complexity of execution and pre-preparation requirements.

MethodData retentionWe need the Internet.I need a Mi Account.Difficulty
Through Forgot the Password.Yes.Yes.Yes.Low.
Hard Reset (Recovery)No.No.No (for menu entry)Medium
Mi Cloud (remotely)No.Yeah (on the phone)Yes.Low.
ADB teamYes.No.No.Tall.

As you can see from the table, data retention techniques require a pre-requisite (enabled account, debugging) and if you haven’t taken care of it beforehand, Hard Reset remains the most reliable, albeit radical, solution.

💡

The choice of method depends on the preliminary preparation: without the Mi Account enabled or USB debugging, it is almost impossible to save data.

Always assess the importance of data on your device. If there is nothing critical, it is easier and faster to do a complete reset than to spend hours looking for security vulnerabilities.

Protection against theft and Activation Lock

Once you reset (Hard Reset or through the cloud), you will encounter an activation screen, an Activation Lock security mechanism designed to protect the owner’s data in the event of a phone being stolen or lost, and require you to enter a password from a Google account or Mi Account that was synced to the device before being locked.

If you remember your account information, just enter it and the phone unlocks. Problems arise if you forget your account password too, in which case restoring access to the phone becomes a complex procedure, requiring you to contact Xiaomi support with receipts for the purchase of the device to prove ownership.

What to do if you forget your Mi Account password?
Go to i.mi.com, click Forgot Password, and follow the recovery instructions via a linked phone number or backup email, which is extremely difficult to restore without access to.

Don’t try to buy account debunking services from unsavory online masters, often as fraud or illegal methods that can turn your phone into a brick after the next firmware update.

The security of your data depends on your awareness: Regularly back up important files to your computer or to the cloud, so that if blocked, you lose only time to set up, but not valuable memories.

Can I unlock Xiaomi without losing data?
Without data loss, you can unlock your phone only if you have previously enabled Mi Account and the "Find the device" function, or if you have enabled debugging via USB and you know how to use ADB. In other cases (90% of situations), the data will be deleted.
What to do if the phone says "Device locked"?
So that means that the theft protection is working, so you need to enter the username and password of the Mi Account that was on that phone, and if you don't remember them, try to re-establish access through the Mi Account site.
Will the password be reset if you just decharge the phone?
No, full battery discharge and subsequent charging will not reset the lock password, and the security system stores this information in non-volatile memory.
Will the phone flashing help?
Official flashing through the Mi Flash Tool often requires an unlocked bootloader that is closed if the phone is locked with a password, and after firmware, the account request (Activation Lock) is likely to remain.