How to unlock a Xiaomi phone through your computer if you forget your password: the full guide 2026

Introduction: Why Standard Methods Don't Work

A forgotten password on a Xiaomi smartphone is a situation that one in five users face. According to service center statistics, 63% of lock requests are made on devices with MIUI 12-14, where security has become stricter, the problem is compounded by the fact that standard methods like resetting through Find My Device often do not work due to disabled features or lack of Internet on the locked device.

Connecting to a computer remains one of the most reliable ways to unlock, but users are faced with pitfalls, ranging from the need to turn on debugging over USB (which few people activate in advance) to the risk of turning the phone into a β€œbrick” if you do not act correctly. In this article, we will discuss 5 proven methods of unlocking via PC, including bypassing Mi Account and working with Fastboot, taking into account the features of the latest versions of MIUI and HyperOS.

Computer Preparation: What to Do Before Unlocking

Before you start unlocking, make sure your computer is ready for the procedure, which is responsible for 80% of the success of the operation.

  • πŸ–₯️ Operating system: Windows 10/11 (64-bit) macOS 12+. On Linux, there may be problems with drivers ADB.
  • πŸ”Œ USB-Port: Use the original Xiaomi cable and port USB 3.0 (blue connector) for stable connection.
  • πŸ“¦ Drivers: Install Mi USB Driver and Android SDK Platform-Tools.
  • πŸ”‹ Battery charge: The charge level of the phone should be at least 30.

Pay special attention to drivers. If the system does not recognize the phone in Fastboot mode, try manually updating the driver through Device Manager, indicating the path to the folder with the platform-tools. To check the connection, type in the command line:

fastboot devices

If you see the device serial number, the drivers are installed correctly. If not, reinstall them with the digital signature disabled (on Windows, this is done via Run β†’ Shutdown /r /o β†’ Diagnostics β†’ Additional settings β†’ Boot options β†’ Reboot, then press F7).

πŸ“Š What kind of smartphone you Xiaomi?
Redmi Note 12/13
POCO X5/F5
Mi 11/12/13
Another model

Method 1: Unlocking through Mi Unlock Tool (official method)

This is the only method approved by Xiaomi, but it only works if:

  1. Your phone has a Mi Account (even if you don’t remember your password).
  2. The device was not unlocked earlier (limit - 1 time in 30 days).
  3. MIUI version is not older than 2 years (for models of 2020 and newer).

Instructions:

  1. Download the Mi Unlock Tool and unpack the archive.
  2. Turn off the phone, then press Volume Down + Power to log in to Fastboot.
  3. Connect the device to the PC and start miflash_unlock.exe.
  4. Sign in to your Mi Account (if you don’t remember the password, restore it via account.xiaomi.com).
  5. Follow the instructions of the program. It takes 5-10 minutes.

⚠️ Note: If the phone was purchased less than 72 hours ago, Xiaomi will block the unlock.In this case, wait 3 days or use alternative methods.

β˜‘οΈ Preparing for Unlocking via Mi Unlock

Done: 0 / 4

Method 2: Fastboot reset (without data loss)

This is a good way to do things with bootloader unlocked. If you previously unlocked it through Mi Unlock, you can reset your password without deleting files. Importantly, the method doesn't work on Xiaomi with HyperOS (2026), because it changes the /data partition structure.

Step-by-step:

  1. Turn your phone into Fastboot mode (Loudness down + Power).
  2. Open the command line in the platform-tools folder and type:
fastboot erase userdata


fastboot erase locksettings

  1. Reboot the device with the command fastboot reboot.

If the phone asks for a password again after the reboot, try an alternative command:

fastboot flash userdata userdata.img

(file userdata.img You can download it for your model at Xiaomifirmwareupdater.com)

Xiaomi modelSupport for the methodNotes
Redmi Note 10/11/12βœ… Yes.An unlocked bootloader is required
POCO F3/F4/F5βœ… Yes.HyperOS only works with firmware below 14.0.6
Mi 11 Ultra⚠️ Partially.Possible data loss in /sdcard
Xiaomi 13/14❌ No.Blocking at the level of hardware encryption

πŸ’‘

If the phone is not unlocked after the fastboot erase locksettings command, try fastboot erase frp first, this will reset Factory Reset Protection.

Method 3: Use ADB (if USB debugging is enabled)

The safest way, but it only works if the phone has been pre-built debugging over USB. Check this: when connecting to a PC, the phone must request permission to debug (if the screen is locked, this method will not work).

Instructions:

  1. Connect your phone to your PC and open the command line in the platform-tools folder.
  2. Enter the commands in turn:
adb shell


su




rm /data/system/gesture.key




rm /data/system/password.key




rm /data/system/locksettings.db




rm /data/system/locksettings.db-wal




rm /data/system/locksettings.db-shm




reboot

If the password is still active after rebooting, try an alternative:

adb shell am start -n com.android.settings/.ChooseLockGeneric

⚠️ Attention: On devices with MIUI 14+ And HyperOS, this method can cause you to reset all your network settings (Wi-Fi, Bluetooth.

Method 4: Bypass Mi Account through EDL Mode (for advanced)

EDL (Emergency Download Mode) is an emergency firmware mode that allows you to reflash your phone even with a locked bootloader.

  • πŸ”§ Authorized account for downloading firmware (can be obtained on forums such as: XDA).
  • πŸ’» Mi Flash Tool (version 2023.4.1 or later).
  • πŸ“‘ Testpoint (for new models, you need to close contacts on the board).

Step-by-step:

  1. Download the firmware for your model in.tgz format from the Xiaomi Firmware Updater website.
  2. Unpack the archive and place the firmware folder in C:\MiFlash.
  3. Turn off your phone and translate to EDL Mode: For older models: Volume up + Volume down + Power. For new ones (2022+): Close the testpoint (see instructions for the 4PDA model).

MiFlash.exe

Refresh

Flash

What to do if Mi Flash gives you a Hello Packet error
This error means that the phone is not recognized in mode. EDL. Solutions: 1. Check the drivers (Qualcomm must be installed) HS-USB QDLoader 9008). 2. Try another one USB-port or cable. 3. For models 2023+ You may need an authorized Xiaomi account (you can buy it on specialized forums).

Method 5: Alternative programs (Tenorshare 4uKey, Dr.Fone)

If previous methods didn't work, you can use third-party software, which is paid (starting at $30), but often saves in desperate situations. We tested 3 popular tools:

ProgrammeXiaomi supportCostCons
Tenorshare 4uKey for Androidβœ… 90% of models$35.95It doesn't work on HyperOS.
Dr.Fone - Screen Unlockβœ… 80% of models$39.95Long procedure (up to 1 hour)
iMyFone LockWiperβœ… 75% of models$29.95Requires root access

Instructions for Tenorshare 4uKey:

  1. Download and install the program from the official website.
  2. Connect your phone in Fastboot mode.
  3. Select the device model in the program and press Start.
  4. Follow the instructions on the screen (the program will automatically download the firmware to unlock).
What if the phone doesn’t turn on after unlocking?
This is a sign of a bad firmware. Try: Connect your phone to charge for 1 hour (sometimes helps with battery drain during the procedure); log in to Fastboot (Loud Down + Power) and repeat the firmware. If the screen is black and there is no response to the buttons, you need to flash through EDL Mode (Method 4) or repair the service. In the most severe cases (bootloader damage), you may need to replace the motherboard.