How to unlock Xiaomi phone through your computer: the full guide

When Xiaomi is locked, it can be for a variety of reasons, from the banal loss of password to the desire to access hidden features of the system for installing custom firmware. Unlocking through the computer is the most reliable and often the only possible way to bring the device back to life. Unlike resetting through the menu, which may not be available, working with the PC allows you to interfere with low-level download processes.

However, it is worth noting that unlocking the bootloader and resetting the forgotten password are technically different procedures, although they use similar tools. If you forget the pattern lock, you will most likely need to reset data via Recovery or Fastboot. If your goal is to modify the system, then you need a formal process of unbundling your account through the company's servers.

Before taking action, you need to assess the risks. Any interference with the shell carries the potential threat of data loss or, in rare cases, turning the device into a brick. Windows must be functional and the device must be in good condition. USB-cable - original or qualitative analogue, capable of transmitting data, not only current.

⚠️ Note: Unlocking the bootloader in an official way through Mi Unlock leads to the complete removal of all data from the device.

The process requires attention to detail, as an error in the stage of setting up an account or selecting a firmware version can lead to locking the device using IMEI or the occurrence of authorization errors.

Preparation of the Mi Account and setting up the smartphone

The foundation of the whole procedure is to link the device to your Mi Account. Without this step, Xiaomi servers will not give permission to unlock, and the Mi Unlock utility will give an error. You need to log into your account in the phone's settings menu and make sure that it is active and confirmed via SMS or email.

Then activate the hidden menu for developers. Go to Settings β†’ About Phone and quickly click 7-10 times on the MIUI Version (or HyperOS Version). After the notification β€œYou became a developer” return to the main settings menu, select Additional β†’ For developers.

In the list that opens, find and activate the following switches:

  • πŸ“± Factory unlocking (OEM unlocking – allows unlocking the bootloader.
  • πŸ’» Debugging by USB β€” Allows the computer to interact with the Android system.
  • πŸ”— Mi Unlock status – a point for linking an account to a device.

Click on the last paragraph and follow the instructions on the screen. The system will warn about the risks and require a mobile Internet connection (Wi-Fi at this point often does not work or causes errors). Once the status is successfully associated, the account will be indicated that the account is associated with this device.

β˜‘οΈ Checking before unlocking

Done: 0 / 5

It is important to know that once an account is linked to a device, it is often necessary to wait a certain time (7 to 168 hours) before the server allows unlocking, a security measure to prevent device theft.

What to do if the timer is not going?
Sometimes the waiting timer may freeze or not start, try logging out of your Mi Account on your phone, rebooting your device, logging back in, and re-assigning to the Mi Unlock Status menu, and changing your network from Wi-Fi to a 4G/5G mobile also helps.

Necessary software and installation of drivers on PC

The main tool is the Mi Unlock Tool, which can only be downloaded from the official website miui.com/unlock. Using third-party versions can lead to data leakage or virus infection.

Windows 10 and 11 often automatically find the underlying drivers, but Fastboot and ADB mode may require specific files. It is recommended to install the universal ADB Driver Installer package or drivers that come with the Mi PC Suite.

After installing the software, connect the phone to your computer by holding the volume button. The screen should show a picture of a hare repairing an android and the inscription FASTBOOT. In the Windows Device Manager, the Android Bootloader Interface should appear in the section "USB Controllers" or "Android Device".

If you see a β€œUnknown Device” with a yellow exclamation point instead, the drivers are not installed correctly, in which case you will need to manually specify the path to the drivers through the Device Manager by selecting the model of your processor (Qualcomm or MediaTek).

πŸ’‘

Use it. USB-port 2.0 (black) on the back of the system unit if port 3.0 (blue) causes connection errors. USB 2.0.

Unlocking process with Mi Unlock Tool

Once the drivers are installed and the phone is ready, you can start the process by running the Mi Unlock Tool on behalf of the administrator and log in to the same Mi Account that is attached to the smartphone.

If done correctly, the Unlock button will become active. Click on it and confirm the action in the window that appears. The unlock process will begin, which will take from a few seconds to a few minutes, during which time the phone can restart, and the progress bar on the PC screen will fill up.

The table below shows the main statuses you can see in the process:

Status on the programmeMeaningUser actions
Connecting...Searching deviceCheck the cable and Fastboot mode
Unlocking... 0-99%The unlocking processDo not turn off the cable, wait for the end
Unlocked successfullySuccessful unlockingYou can close the program and restart the phone.
Error 10006Server/network errorCheck the Internet, change the DNS or time

Once completed, the phone will automatically restart.The first boot may take longer than usual (5-10 minutes) and a warning may appear on the screen that the bootloader is unlocked, which will disappear after a few seconds.

πŸ’‘

Successful completion of the process is confirmed by the inscription "Unlocked successfully" and automatic restart of the device with the cleaning of all user data.

Alternative method: resetting password through ADB

If your goal is not to unlock the bootloader for firmware, namely, to remove the forgotten pattern lock or PIN-code, and at the same time on the phone was pre-enabled debugging USB, You can try it from the command line, and it doesn't work on all Android versions because of the security enhancement, but it's worth a try.

You'll need a folder with Platform-tools (ADB) installed. Open the command prompt (CMD) in this folder. Connect your phone in normal mode (not Fastboot).

adb devices

If the device is identified, try to delete the files that store the access keys. Enter the following command:

adb shell rm /data/system/gesture.key

Or, for older versions:

adb shell rm /data/system/password.key

Once you have completed the command, restart your phone. The lock screen should disappear or allow any password to be entered. However, on modern versions of HyperOS and new MIUIs, this method is often blocked by security.

πŸ“Š Have you ever been blocked by Xiaomi?
Yeah, I forgot my password.
Yeah, I want to do custom.
No, I'm just planning on buying.
I have an iPhone.

Common mistakes and ways to solve them

The unlocking process rarely goes perfectly smoothly for all users, and the most common problem is an authorization or timer error, and if a program says "Unable to unlock (10008)," it often means that the required time has not passed since the account was linked.

Another common problem is a 99% freeze or a β€œCouldn’t verify device” error, which may indicate an unstable Internet connection or a lockdown of Xiaomi servers by your provider, and in such cases, using mobile Internet (distribution from your phone) instead of Wi-Fi helps, as it is a problem that is not easily accessible to you. IP-Mobile operators’ addresses are less likely to be blocked.

Also worth mentioning is the driver problem: If the computer sees the phone as a charger, but not as a data transfer device, try:

  • πŸ”Œ Replace USB-cable to the original (PowerBank cables are often only charged).
  • πŸ’» Use the other USB-port, preferably directly on the motherboard.
  • πŸ›‘οΈ Temporarily disable Windows antivirus and firewall that can block the connection.

⚠️ Warning: If, after unlocking, the phone requires you to enter a password from your Mi Account when you turn it on, and you don't remember it, it will be extremely difficult to restore access.

Security and Consequences of Unblocking

The unlocked bootloader changes the security status of the device, and some banking applications and services (such as Google Pay or Mir Pay) may stop working or require additional manipulation to hide root rights, because the unlocked Bootloader is considered a vulnerability.

In addition, when unlocking, the Widevine L1 section is erased, which is why streaming services (Netflix, Disney+) can reduce the playback quality to HD (480p) instead of Full HD or 4K. Returning the L1 level after official unlocking is almost impossible without soldering the chips.

On the other hand, you get full control of the device, you can install customized recaps (TWRPs), make full backups of the system, remove system debris and change the visual shell beyond recognition, a choice between maximum security out of the box and complete freedom of customization.

Can I lock the bootloader back?
Yes, you can do this through the command in Fastboot: "fastboot oem lock." However, you need to do this extremely carefully: if the phone is custom firmware or changed the system partition, locking the bootloader will lead to complete failure of the phone (hard brick).

Frequently Asked Questions (FAQ)

How long do I have to wait after the account is linked?
The standard waiting time is 168 hours (7 days), however, in some cases, especially for new accounts or regions, the timer can be extended to 30 days.
Will the warranty be reset after unlocking?
Officially unlocking through the Mi Unlock Tool is not a reason to refuse warranty service in authorized service centers, unless the breakdown is caused by your actions (for example, a failed firmware).
Can I unlock my phone without having to attach to my Mi Account?
Officially, no. This is Xiaomi's top security requirement, and there are paid services that promise to unlock without an account or waiting, but they exploit vulnerabilities in processors, cost money, and carry high risks to system stability.
What if the phone gets into a reboot cycle after unlocking?
Try to log into Recovery (clamp Volume+ and Power) and do Wipe Data/Factory Reset. If that doesn't work, you'll need to flash the device through the Mi Flash Tool in Clean All mode.