Forgot the pattern lock or PIN- code on Xiaomi smartphone, and access to the Mi Account is lost? The situation is familiar to many β according to statistics, one in five users at least once blocked their device. Fortunately, unlocking through a PC remains one of the most reliable methods, even if the phone does not respond to touch or requires confirmation through an account to which there is no access.
In this article, weβll look at all the current ways to unlock, from official tools (Mi Unlock Tool) to alternative solutions for devices with a damaged screen or USB- debugging disabled. Importantly, the methods are different for devices on MIUI and HyperOS (the new Xiaomi firmware with 2026 of the year), so weβll give you nuances for each system. Youβll also learn how to bypass Mi Account lock without losing data β this may not be possible on all models, but there is a chance.
We warn you right away: some methods require a full hard reset, which will delete all data on the device. If the phone is encrypted, it will not be possible to restore files after the reset, so before you start, check if the phone is connected to the Mi Cloud, you may be able to return some data later.
1.Pc and Device Preparation: What to Do Before Unlocking
Before you start unlocking, make sure your computer and phone are ready for the procedure, and neglecting these steps can lead to data loss, firmware damage, or even IMEI blocking (on some Redmi Note and POCO models).
Here are the minimum requirements:
- π₯οΈ Windows PC 7/10/11 (64-bit is required!) On macOS and Linux, Xiaomi's official tools are unstable.
- π Original USB- cable (preferably from the kit) cheap cables don't have to transmit data, just charging.
- π Battery charge of at least 50%. If the phone runs out during the process, it may result in the inability to recover through standard methods.
- π₯ Drivers for your Xiaomi model. Without them, the PC won't recognize the phone in Fastboot or EDL mode.
Pay special attention to drivers. For most devices, the Mi PC Suite will work, but for EDL (emergency firmware) mode you will need Qualcomm drivers. These can be downloaded from the official QPST website or through the XiaoMiTool V2 tool (links below in the table).
| Tool. | Appointment | Download link | Notes |
|---|---|---|---|
| Mi Unlock Tool | Official unlocking of the loader | en.miui.com/unlock | Requires a Mi Account Account Account Link |
| XiaoMiTool V2 | Universal tool for firmware and unlocking | xiaomitool.com | Supports Fastboot and EDL |
| QPST (Qualcomm) | Drivers for EDL mode | qpsttool.com | Needed for devices on Snapdragon processors |
| Mi Flash Tool | Firmware via Fastboot/EDL | c.mi.com/miuidownload | Official tool from Xiaomi |
β οΈ Warning: If your device was purchased in China (the domestic version), unlocking through the Mi Unlock Tool may be blocked by the manufacturer, in which case you will need to use alternative methods, such as firmware via EDL using XiaoMiTool.
2. Method 1: Unlocking through Mi Unlock Tool (official method)
This is the safest and most recommended method, but it only works if:
- π The device has a Mi Account (you remember the username/password).
- π± Phone is not blacklisted (not stolen, not blocked by operator).
If these conditions are met, follow the instructions:
- Connect your phone to your PC. In Mi Unlock Tool, press Unlock and wait for the process to complete (usually 5-10 minutes).
If the program is running a "Couldn't unlock" or "Device not supported" error, it means:
- π« The device is not tied to the account (confirm ownership via SMS).
- π 168 hours (7 days) have not passed since the last account was linked.
- π The phone has already been unlocked (check in the developer settings).
β οΈ Warning: On new HyperOS devices (e.g. Xiaomi 14, Redmi Note 13 Pro+), unlocking via the Mi Unlock Tool may require additional confirmation via SMS to the number associated with the account. If the number is lost, this method will not work.
Mi Account tied to phone|Phone's not on the blacklist|On the PC installed drivers Qualcomm|Battery charge >50%|USB-cable-->
Method 2: Unlocking via Fastboot (without data loss)
If you donβt remember the Mi Account password, but the phone is debugging enabled USB (USB Debugging, you can try unlocking the device through ADB (Android Debug Bridge. This method works MIUI 12-14 HyperOS, but requires prior preparation.
You'll need:
- π₯οΈ Installed Android SDK Platform Tools (download from Google website).
- π§ Included debugging according to USB (if not enabled, the method will not work!).
- π± Phone in Fastboot mode (clamp Volume down + Power).
Instructions:
- Connect your phone to your PC and open the Command Prompt in the Platform Tools folder (press Shift + PCM β Open the PowerShell window here).
- Enter the command to check the connection: fastboot devices If the device is displayed, continue. If not, install the drivers.
- Reset the pattern lock (MIUI only): fastboot erase gesture.key To reset the PIN- code: fastboot erase password.key
- Reboot the phone: fastboot reboot
If the phone needs a password again after rebooting, try entering any code β sometimes the system resets the lock after the first failed attempt.
β οΈ Warning: On HyperOS devices (e.g., Xiaomi 13T, POCO F5), this method may not work due to the changed system file structure, so move on to the next method.
π‘
If USB debugging has been enabled, but the phone is not defined in fastboot devices, try reinstalling drivers through Device Manager (select "Update Driver" β "Follow Driver Search on This Computer" β specify a folder with Platform Tools).
4 Method 3: Unlocking through EDL Mode (for power users)
EDL (Emergency Download Mode) is a firmware emergency mode that allows you to restore a device even with a damaged system. It works at the processor level and does not require an unlocked bootloader. However, using EDL without official permission can lead to IMEI blocking (on some Redmi and POCO models).
When to use EDL:
- π The phone is not turned on or stuck on the logo MI.
- π Password is forgotten and Mi Account is not tied.
- π± The device is not detected in Fastboot mode.
Step-by-step:
- Download the firmware for your model from the Xiaomi Firmware Updater website. Choose the version of Fastboot (file with the extension.tgz or.zip).
- Unpack the firmware in a folder without Cyrillic characters (for example, C:\Xiaomi_Flash).
- Turn off the phone. Press Volume up + Volume down + Power for 10-15 seconds at the same time to enter the EDL. The screen must remain black.
- Connect your phone to a PC. Open the Mi Flash Tool, select the firmware folder, and press Refresh. The device should be identified as COM-port.
- Press Flash and wait until it's finished (10-20 minutes).
| Model | Supports EDL? | Risk of blocking IMEI |
|---|---|---|
| Redmi Note 10/11/12 | β Yes. | β No (if the firmware is official) |
| POCO F3/F4/F5 | β Yes. | β οΈ Possible (on Chinese versions) |
| Xiaomi 12/13/14 | β Yes. | β οΈ Possible (requires authorization) |
| Redmi 9/9A/9C | β Yes. | β No. |
β οΈ Warning: On devices with a MediaTek processor (e.g., Redmi 10A, POCO M4 Pro), the EDL mode may be blocked. In this case, use the SP Flash Tool instead of the Mi Flash Tool.
What if the Mi Flash Tool doesnβt see the device in EDL?
5. Method 4: Unlocking through Recovery Mode (reset to factory settings)
If previous methods didnβt work, itβs hard to reset through Recovery Mode, which will delete all the data on the phone, but unlock it, and works on all Xiaomi models, including the new ones with HyperOS.
How to log in to Recovery Mode:
- Turn off the phone.
- Press Volume Up + Power and hold for 10-15 seconds until the Mi logo appears.
- Release the buttons and you will be taken to the recovery menu (in English or Chinese).
Further action:
- Use volume buttons for navigation and power button for selection.
- Select Wipe Data β Wipe All Data (on some Factory Reset models).
- Confirm the reset (usually you need to choose Confirm or Yes).
- Once you have finished, select Reboot β Reboot to System.
If the phone requires Mi Account entry after reset, the "Find Device" function has been activated.
- π§ Try to restore access to your account via account.xiaomi.com.
- π If a phone number is linked, request SMS to reset the password.
- π¬ Contact Xiaomi with proof of purchase (check, box).
π‘
Recovery Mode reset is the most reliable way to unlock, but it deletes all data, and if the phone has been encrypted, it will be impossible to recover files after the reset.
Method 5: Alternative methods (for devices with damaged screen)
If the phone screen is broken or doesn't respond to touch, but the device is turned on, you can try unlocking it with a mouse or keyboard over USB (USB OTG).
- π±οΈ The phone is debugging on USB.
- π There is a USB OTG- adapter (or cable with a USB-C/Micro-USB connector β USB-A).
- π₯οΈ The computer recognizes the device in ADB mode.
Instructions:
- Connect your phone to your PC and check if it is defined in ADB: Adb devices
- If the device is visible, enter the command to unlock (MIUI only): adb shell rm /data/system/gesture.key For HyperOS: adb shell rm /data/system/locksettings.db
- Reboot your phone: adb reboot
If the screen is completely out of order, but the phone is turned on, you can try control via scrcpy (a program for dubbing the screen on a PC):
- Download scrcpy from GitHub.
- Connect your phone and start scrcpy: scrcpy
- Use your mouse on your PC to enter a password or perform a reset.
β οΈ Warning: On HyperOS devices (e.g., Xiaomi 14, Redmi Note 13 Pro+), scrcpy control may be blocked due to new security restrictions, leaving only firmware via EDL.
7. Frequent errors and their solutions
When you unlock Xiaomi via PC, users often encounter typical errors, and we have collected the most common ways to fix them:
| Mistake. | Reason. | Decision |
|---|---|---|
| Couldn't unlock the Mi Unlock Tool | The account is not tied to the device | Wait 7 days after binding or use another method |
| fastboot: unknown command | No driver is installed or the path to ADB is not spelled out | Install Platform Tools and add path to environment variables |
| Device not found in Mi Flash Tool | Phone is not in EDL mode or no drivers | Check the connection, reinstall Qualcomm drivers |
| Invalid IMEI after the firmware | The firmware is not for your model or region | Scroll down the official firmware for your device |
| Phone asks for Mi Account after reset | Find Device feature enabled | Restoring access to your account or contacting for support |
If you see the error "This device is locked" when you try to flash the device through Fastboot, then the bootloader is locked.
- Use the Mi Unlock Tool to unlock (if your account is tied).
- If your account is not tied, try flashing through EDL (but the risk of blocking IMEI is higher).
HyperOS devices may have an "Anti-rollback check fail" error, which means you're trying to flash an older version of the firmware than the one installed.
- Download the latest official firmware for your model.
- Use the Mi Flash Tool with the Clean All option.