How to unlock Xiaomi if you forgot your password: the full guide

The situation when Xiaomi smartphone stops letting you into the system because of the forgotten PIN-The current Redmi and Poco series of devices are equipped with robust security systems that block access to data after five failed attempts to enter. This is done for security, but often becomes a problem for the owner, especially if the code was installed long ago and successfully weathered from memory.

There are several proven methods to restore access to the device, depending on the version of the MIUI or HyperOS operating system, whether you have a Mi Account attached, and USB debugging enabled, in some cases you can save personal photos and contacts, in others you will need a complete data reset.

Before you get into action, it’s important to understand that bypassing a screen lock is a process that requires care. Mistakes can lead to a device locking on your Mi Account. Below are the current and working methods for 2026 that will help you regain control of the gadget.

Use the “Forgot Password” function through your Mi Account

The easiest and safest way to do this, available on older versions of the MIUI shell (typically before version 9-10) or under certain security settings, is to use the built-in recovery function. If your smartphone is connected to the Internet (Wi-Fi or mobile network), the lock screen may display a link “Forgot password” or “Forgot pattern lock” after several incorrect attempts to enter.

Clicking on this link will redirect you to the Mi Account login page, you will need to enter the username and password from the account that was previously associated with the device, and after successful authorization, the system will prompt you to reset the current lock key, which allows you to save all data on the phone, including photos and applications.

⚠️ Note: On the modern versions MIUI 12/13/14 And HyperOS, this feature is often not available directly from the lock screen for security reasons. If the Forgot Password button is not available, this method will not work, and you will have to use a data reset.

If the internet is off, try unlocking Wi-Fi via the emergency call menu (entering code like ##4636## sometimes allows you to get into the test menu, but on new firmware it is closed). Successful restoration of access through the account is the ideal scenario, not requiring file loss.

📊 What type of lock you are using?
pattern lock
PIN-code
Password.
Fingerprint.
Face ID

Resetting with Recovery Mode (Hard Reset)

If you can't access your account, the only option is to completely reset your device to factory settings, which removes all user data, including contacts, messages, photos and installed apps, and returns to a "out of the box" state, and you need to turn off your smartphone completely.

Once turned off, you need to press the key combination to enter Recovery mode. On most Xiaomi models, this is the simultaneous pressing of the Volume Up button and the Power button. Hold them until the Mi logo appears, then release the power button, continuing to keep the volume up until the main Recovery menu appears.

☑️ Reset algorithm via Recovery

Done: 0 / 5

In the Recovery menu, you can control the volume buttons (up/down) and the power button (select). Select English, then go to Wipe Data. Then select Wipe All Data and confirm the action by selecting Confirm. The process will take a few seconds, after which the phone will prompt you to return to the main menu (Back to Main Menu) and reboot (Reboot -> Reboot to System).

⚠️ Warning: Once reset and turned on, the phone will require you to enter a password from the Mi Account that was previously synced to the device, which is theft protection (Find Device.

This method is universal for all models, whether it is a budget Redmi Note or flagship Xiaomi Mi. It does not require a connection to the computer, but guaranteed erases information. If you have been enabled sync with Google Photos or Mi Cloud, you can recover some of the data after logging into accounts.

What happens if Recovery does not open?
If the button combination doesn't work, physical buttons may be damaged or the bootloader is locked in a special way. USB-And then you can press the buttons, and sometimes you can use the original cable and the port. USB 2.0.

Unlocking through Xiaomi’s Find Device service

Find Device, a remote control service that not only tracks the location of a lost phone, but also controls its lock, which only works if the device has the Internet enabled and the device search function is activated in the Mi Account settings.

To use the method, go from your computer or other smartphone to i.mi.com. Sign in with the same Mi Account that was used on the locked phone. In the service interface, select your device from the list of available devices.

In the device management menu, find the Lock or Unlock button. Some versions of the interface have remotely cleaned data. Clicking on the Erase button will trigger a full reset process similar to Hard Reset but initiated remotely. Once the procedure is complete, the phone will restart and the screen lock will be removed, but you will need to log in to your Mi Account when you first set up.

ParameterRequirementThe result
Internet on the phoneDefinitely (Wi-Fi or LTE)The command will be executed instantly.
Mi Account.Must be active.Necessary for authorization in the service
BatteryThe phone should be on.If the phone is down, the command will be executed when turned on
Data retentionImpossible.Complete removal of information takes place

The advantage of this method is that it does not require physical access to the buttons of the smartphone, which is convenient if the buttons are logged or the device is in a difficult place (for example, lost at home).However, if the phone is turned off or does not have access to the network, the command will queue and execute only when the connection appears.

Use of USB and ADB debugging (for advanced ones)

This method is only suitable for those users who have pre-enabled USB Debugging in the Developer Menu and the computer is previously authorized to work with this device. If these conditions are not met, the method will not work.

You'll need to download the ADB (Android Debug Bridge) platform tools to your computer. Connect the locked smartphone with a cable to your PC. Open the Command Prompt (CMD) in the ADB folder and enter a command to check the connection:

adb devices

If a device with device status appears on the list, the connection is established, then you need to enter a command to delete the gest.key file (stores a pattern lock) or password.key (stores a password):

adb shell rm /data/system/gesture.key

Or, depending on the version of Android:

adb shell rm /data/system/gesture.key && adb shell rm /data/system/locksettings.db && adb shell rm /data/system/locksettings.db-wal && adb shell rm /data/system/locksettings.db-shm

💡

After completing the commands, do not immediately try to enter a password. First, completely reboot the device, and then try to unlock the screen by any means (swipe or arbitrary code).

Once you have the commands, you need to restart the phone. When you turn on, the system will not find the lock key file and let you go to the desktop. It is important to note that on modern versions of Android (11, 12, 13, 14), access to system folders through ADB without root permissions is often limited, so the method may not work without superuser rights.

Third-party unlocking programs

There are many PC software packages that automate the process of resetting or bypassing locks. Popular tools include 4uKey for Android, Tenorshare 4uKey, Dr.Fone, and specialized utilities for Xiaomi such as Xiaomi ADB/Fastboot Tools.

Most of these programs work on a similar algorithm: they connect to a smartphone, define a model and suggest removing the lock screen. Some of them (claim) that they can save data, but in practice this rarely works and mainly on older models of Samsung or LG. For Xiaomi, the most common is forced reset.

  • 🚀 Automation: The program itself finds the right drivers and commands, which is convenient for beginners.
  • 💸 Paid basis: Almost all effective programs require a license to complete the unlocking process.
  • ⚠️ Security risk: Using unverified software can lead to data leakage or malware installation.

Use of such software is justified if standard methods do not help and you are willing to risk data for the sake of accessing the device. Always download programs only from official developers' sites to avoid viruses. Remember that there is no magic button for storing data on modern secure phones.

💡

Third-party software does no wonders: if data is encrypted (and on Android 6+ it is the standard), without a password, it can not be restored.

Prevention of blockages and important nuances

To prevent a forgotten password from happening again or causing catastrophic consequences, it is important to maintain digital hygiene, regularly check if syncing with Google Account and Mi Cloud works, which will allow you to restore contacts and notes even after a complete reset.

Write complex passwords to a secure location – a paper notebook or password manager (like Google Password Manager or KeePass) accessible from other devices. Biometrics (fingerprint, face) are convenient, but remember that they do not replace the primary password that is required after a reboot.

⚠️ Warning: Never buy an unblocking service through IMEI Often it's a scam, or they'll exploit vulnerabilities that will be closed in the next security update, leaving you with no money and a locked phone.

It is also worth considering that on some carriers (especially in the United States and some CIS countries), phones can be locked to a specific operator. Resetting the screen password will not remove this lock. If you bought the phone from your hands, make sure that the previous owner untie the device from his Mi Account, otherwise after reset you will encounter an activation screen that cannot be circumvented without his participation.

Frequently Asked Questions (FAQ)

Can I unlock Xiaomi without losing data?
Without data loss, you can only use the Mi Account “Forgot Password” function (on older MIUI versions) or if you have USB debugging enabled and you can work with ADB to delete system key files. In 95% of cases, new firmware will require a full reset (Wipe Data).
What if the phone says “Device locked” after resetting?
This is Mi Cloud (Find Device) protection, and you have to enter the username and password from the Mi Account that was on your phone before the reset, and if you don't remember the password from your account, you have to restore it through i.mi.com, and it's officially impossible to get around that protection without the owner's data.
Will Google’s Find My Device Work?
Google's Find Device service allows you to remotely lock or clear the device, but unlike older versions of Android, it no longer allows you to simply reset your screen password without deleting data.The Device Lock feature allows you to set a new temporary password, but that doesn't work on all Xiaomi models.
How to log in to Recovery if the volume buttons don't work?
If the buttons don't work, you can try using the adb reboot recovery command via your computer if USB debugging is enabled, and there's a method of connecting your phone to your PC and using special utilities to log into Recovery mode, but it's more complicated and requires drivers.
Will the photos be removed from the cloud when the phone is reset?
No, a full reset only deletes data from the phone’s internal memory. Anything that has been synced to Google Photos, Mi Cloud or Yandex.Disk will remain in the cloud and be available after logging in to your account on a new or reset device.