How to remove the screen lock on the Xiaomi phone: from simple ways to radical

Forgot the pattern lock or PIN-Xiaomi code? Phone requires password after reboot and don't you remember it? This situation is familiar to many Redmi smartphone users, POCO Fortunately, there are several ways to remove the lock code without losing data – or with minimal consequences if other methods fail.

In this article, we will discuss all the current methods of unlocking, from official (via Mi Account) to technical (via Fastboot and ADB), you will learn how to bypass the lock on different versions of MIUI, what tools you will need, and what to do if the phone does not respond to standard methods. Importantly, some methods require preliminary preparation, for example, enabled debugging over USB or a tied account Xiaomi.

If you've never unlocked an Android device, don't worry: we give you step-by-step instructions with pictures and explanations. For experienced users, we'll give you terminal commands and nuances. EDL-Let's start with the easiest and safest way to unlock it, which is through your Mi Account.

1 Unlocking through Mi Account (official method)

The most reliable and recommended method Xiaomi uses is a tied Mi Account, which works if:

  • πŸ“± The phone is connected to the Internet (Wi-Fi or mobile data).
  • πŸ”‘ You remember the username and password from the Mi Account that was linked to the device.
  • πŸ”„ Find Device has been activated in the settings.

If these conditions are met, follow the instructions:

  1. On the lock screen, click Forgot Password? (or Forgot Password?).
  2. Select the option to Sign in via Mi Account.
  3. Enter the email or phone number associated with the account and the password.
  4. Confirm your login via SMS or email (if two-factor authentication is enabled).
  5. Create a new one. PIN-code.

⚠️ Note: If the phone is not connected to the network, this method will not work. Xiaomi can also request proof of identity through the linked number - make sure you have access to the phone. SIM-map.

πŸ’‘

If you don’t remember the Mi Account password, restore it to account.xiaomi.com before unlocking.

2. Reset the pattern lock via a call (for older versions of MIUI)

This method works on devices with MIUI 8-10 and requires a second version SIM-card or the ability to call a locked phone from another number, the idea is to access settings through the incoming call screen.

Instructions:

  1. Call the locked phone from another device.
  2. Take the call, then immediately press the Home button (or swipe up if you have gesture control).
  3. Quickly go to Settings β†’ About Phone β†’ MIUI version.
  4. Click on the firmware version 7-10 times to activate the developer mode.
  5. Return to Settings β†’ Additional β†’ For developers and enable USB debugging.
  6. Connect your phone to your PC and use ADB to reset the key (the command below).

After debugging is enabled, perform in the terminal:

adb shell rm /data/system/gesture.key

Then restart the device – the pattern lock will be reset.

Why did this method stop working in new versions of MIUI?
In MIUI 11 and higher, Xiaomi has closed a vulnerability that allows you to bypass the lock screen through a call. Now, when you receive a call, the system automatically returns the user to the unlock screen.

3 Unlocking via Fastboot (without data loss)

If previous methods failed and USB debugging was enabled before locking, you can use Fastboot mode.This method is suitable for most Redmi, POCO and Mi models, but requires drivers and the Mi Flash Tool installed.

What you need:

  • πŸ–₯️ Windows computer (or Linux/macOS fastboot-install).
  • πŸ”Œ Cable USB (preferably original).
  • πŸ“¦ Firmware archive for your model (download from xiaomifirmwareupdater.com).
  • πŸ› οΈ Mi Flash Tool (official or modified version).

Step-by-step:

  1. Turn off the phone. Press the Power button + Volume down to enter the Fastboot.
  2. Connect the device to a PC. Android Bootloader Interface should appear in the Device Manager.
  3. Unpack the firmware in a folder without Cyrillic symbols.
  4. Launch the Mi Flash Tool, select the firmware folder and press Refresh.
  5. At the bottom, choose Clean all and lock (if you want to save data) or Clean all (full reset).
  6. Press Flash and wait until it is completed (5-10 minutes).

⚠️ Note: Some models (e.g. Redmi Note 10 Pro) POCO X3 Pros have a locked bootloader. They will need to first unlock Bootloader through the official Xiaomi website (the process takes up to 72 hours).

Download firmware for your model |Install ADB/Fastboot |Check battery power (minimum 50%) |Connect the original USB |Cable Disable antivirus on PC-->

4.Use ADB to delete lock files

If the phone has been enabled to debug USB before locking, you can delete key files via ADB. This method works on MIUI of any version, but requires access to the computer.

Instructions:

  1. Connect your phone to your PC via USB.
  2. Open the command line (Win + R β†’ cmd) and check the connection:
adb devices

If the device is displayed, do:

adb shell


su




rm /data/system/locksettings.db




rm /data/system/locksettings.db-wal




rm /data/system/locksettings.db-shm




rm /data/system/gesture.key




rm /data/system/pattern.key




rm /data/system/password.key




reboot

After the reboot, the phone unlocks, but it may need to be re-set. PIN-code.

⚠️ Note: Some models (e.g. Xiaomi) 12T or Redmi K50) Lock files are stored elsewhere. If the command doesn't work, try:

rm /data/system/locksettings.xml

Mi Account|Fastboot|ADB|Reset via Recovery|None of the above.-->

5. Hard reset via Recovery (data loss)

If no other method has worked, it's hard to reset through Recovery Mode, which will remove all data from your phone, including photos, messages and apps, and only use it as a last resort!

How to reset:

  1. Turn off the phone.
  2. Press the Power button + Volume up to enter Recovery.
  3. Select the language (if there is such a clause).
  4. Go to Wipe Data β†’ Wipe All Data.
  5. Confirm the action (usually you need to enter Yes or press the power button).
  6. After reset, select Reboot.

⚠️ Note: On some models (e.g, POCO F3 or Redmi Note 11) after reset, you may need to enter data from Mi Account if you have enabled Find Device!

Xiaomi modelDoes Recovery support resetting without a Mi Account?Is it necessary to unlock the loader?
Redmi Note 8/9/10Yes (if Find Device is disabled)No.
POCO X3/X3 ProNo (Mi Account required)Yes (for Fastboot)
Mi 11/12 SeriesNo (required account binding)Yes.
Redmi 7A/8AYes.No.

6. Unlock through EDL-The mode (for experienced users)

EDL-Emergency Download Mode is a service mode that allows you to flash your phone even with a locked bootloader (EDL-cable or Deep Flash Cable and knowledge of QFil or Mi Flash commands.

⚠️ Attention: Misuse of the right EDL This method is recommended only for those who have already dealt with the firmware of Qualcomm devices.

Instructions:

  1. Download the firmware for your model in.mbn format.
  2. Install the Qualcomm HS-USB QDLoader 9008 drivers.
  3. Put the phone in. EDL-mode (usually close test points on the board or use a cable).
  4. Run the Mi Flash Tool and select the firmware.
  5. Press Flash and wait until it is completed.

Important: Newer models (such as Xiaomi 13 or Redmi Note 12) require an authorized manufacturer account to log in to EDL.

πŸ’‘

EDL-The mode is the last chance to unlock the phone if other methods fail, but it requires technical skills and risks "killing" the device if it fails.

7 What should I do if nothing helps?

If you’ve tried all of these methods and your phone remains locked, there are three options:

  • πŸ”§ Contact Xiaomi Service Center (you will need a check or confirmation of purchase).
  • πŸ“ž Contact Mi support via the official website and provide proof of device ownership.
  • πŸ’° Buy special unlocking services from trusted masters (for example, through DC-Unlocker or Octoplus).

⚠️ Warning: Avoid "miracle programs" on the Internet that promise to unlock in 5 minutes. Most of them are fraud or viruses. Also don't trust the wizards who ask to send a phone by mail - the risk of losing the device is too high.

If the phone is relatively new (released after 2020), the chances of unlocking without losing data are minimal. Xiaomi has tightened up protections, and now even a Fastboot reset can require confirmation via Mi Account.

FAQ: Frequent questions about unlocking Xiaomi

Can I unlock Xiaomi without losing data?
Yes, but only if Mi Account or USB debugging was enabled. In the first case, use the official account recovery method; in the second case, connect to your PC and delete the lock files via ADB (see section 4).
The phone asks for a password after resetting through Recovery.
This means that the device has activated the Find Device feature.Without data from the Mi Account attached to the device, it is impossible to unlock it. Contact Xiaomi support with proof of purchase.
Can I get around the lock through Safe Mode?
No. Safe Mode on Xiaomi does not disable the lock screen; it only temporarily deactivates third-party apps, but system settings (including the lock screen). PIN-code) remain active.
How to unlock Xiaomi if you forget your password and Mi Account?
In this case, you only have a hard reset via Fastboot or EDL, but it will delete all the data, and if you have backups on your phone that have been enabled with Mi Cloud, you can recover some of the information once you unlock it.
Do you have a program called the Mi Account Unlock Tool?
No, most of these programs are deception, they either don't work or they contain viruses, and the only legal means is through official methods, through Mi Accounts or service centers.