Guide to unlocking the bootloader and installing custom ROMs on Xiaomi

Last update: 14 April 2026
  • It is essential to use Xiaomi's official method with Mi Unlock Tool and a verified Mi account to unlock the bootloader.
  • The process includes a waiting phase (often 168 hours) and erases all data from the phone, so a backup is mandatory.
  • Once unlocked, the device allows flashing custom ROMs and recoveries using ADB and Fastboot, also from Linux.
  • Unlocking increases customization freedom, but reduces certain security guarantees and requires caution when installing third-party ROMs.

Xiaomi bootloader

If you've made it this far, it's because you want to unlock the bootloader and start installing custom ROMs on your Xiaomi (for example, a Redmi 9C) or another similar Android device. It's a powerful and entertaining world, but it also has its challenges: there are waiting periods, strange Xiaomi errors, issues with Windows drivers, and countless questions about the security of your data.

Before you begin, it's important to keep in mind that unlocking the bootloader involves real risks : you could lose all your data, render your phone unusable if you make a mistake, or lose certain security features. The purpose of this guide is to ensure you understand the entire process, why Xiaomi locks the bootloader, how to perform the official unlock, what you can do with Linux, and what common problems you might encounter.

What is the boot manager and why does Xiaomi block it?

In Android, the bootloader is the component that decides which operating system loads when you turn on your device. If it's locked, it only allows you to boot operating systems signed and approved by the manufacturer; if it's unlocked, you can load custom ROMs, modified kernels, and recoveries like TWRP or similar.

Xiaomi decided to lock the bootloader on virtually all of its phones since 2016 (Mi 4c, Redmi Note 3, Mi Note Pro, Redmi 3, Mi 4S, Mi 5 and all subsequent models) for several very specific reasons:

  • Avoid counterfeit phones or phones with ROMs modified by resellersIn many countries where Xiaomi does not sell officially, users bought from unauthorized stores and received devices with ROMs full of bloatware, spyware, or junk apps that damaged the MIUI experience and could endanger personal data.
  • Improve security against theft or lossWithout a locked bootloader, anyone with a little know-how could flash a ROM via Fastboot and bypass systems like account verification after a full wipe. Xiaomi also adjusted the "Find My Device" logic in Mi Cloud to give legitimate owners more control and make it harder for thieves.
  • Better control of user experience and supportBy locking by default and offering an official unlocking method, Xiaomi is trying to prevent unauthorized vendors from flashing unstable third-party ROMs and then having the user blame MIUI.

The bootloader lock doesn't affect normal OTA updates , but it does affect actions like flashing Fastboot ROMs with Mi Flash or enabling root access. If you want root access or a custom ROM, you'll first need to unlock the bootloader using the official method.

android takes a long time to turn on-2
Related articles:
How to make your Android phone boot faster: causes, solutions, and key tips

Basic requirements before unlocking the bootloader

Before you touch anything, make sure your device and computer meet certain minimum requirements , or you'll be frustrated by silly errors:

  • The mobile phone should turn on and function normallyNo bootloops, soft bricks, or states where it just enters recovery mode without any issues. If it's semi-bricked, the wisest course of action is to take it to an official service center before even considering linking an account or unlocking it.
  • Have an official MIUI ROM installedIt is very important not to attempt to unlock using a custom or unfamiliar ROM. In many cases, Xiaomi will not authorize the unlock if it does not detect official firmware.
  • Have a fully configured Xiaomi account (Mi Account)You must know your username and password, have SMS verification enabled, and have your security profile 100% complete on both en.miui.com and i.mi.com (Mi Cloud).
  • Insert a SIM card into the device and have active mobile data. Account and device linking must be done using mobile connectivity, not just Wi-Fi, because Xiaomi checks the line.
  • You will need a 64-bit Windows PC, preferably with an Intel CPU.Xiaomi recommends avoiding certain AMD Ryzen chipsets, as some users have experienced issues with device detection or random errors in Mi Unlock.
  • Properly install the Mi USB drivers and ADB/Fastboot toolsWithout drivers, there is no Fastboot and no recognition from Mi Unlock or Mi Flash.
  • Back up everythingUnlock the bootloader completely erases the phone's dataPhotos, apps, chats, etc. Back up to the cloud, to Mi Cloud, to your PC… but don't assume "nothing will happen."

Also, keep in mind two Xiaomi rules that many people overlook: a single Mi account can only unlock one device every 30 days , and after linking the account to the phone, you shouldn't factory reset or log out , because the waiting period will restart.

Prepare your Xiaomi account and Mi Cloud for unlocking

The most tedious part of the process is ensuring your Xiaomi and Mi Cloud accounts are fully verified . This reduces verification failures and other absurd errors during the unlock request.

Complete your security profile at en.miui.com

From a computer, open Chrome (it's useful for the built-in translation from Chinese) and:

  1. Go to en.miui.com and log in with your Xiaomi accountIf you don't have an account, create one by entering your phone number and the verification code you receive via SMS.
  2. Once inside, click on your username in the upper right and go to the “Profile Update” section (or similar, depending on the translation).
  3. In the tab related to the password and securityComplete all the requested information until you reach 100% security level. This usually involves add the recovery phone numberVerify it with an SMS and, in some cases, add a recovery email.

Completing this profile allows Xiaomi's servers to recognize you as a trusted owner , which is key when you later request the unlock.

Verify My Cloud (i.mi.com) and activate “Find Device”

The next step is to make sure that Mi Cloud recognizes the same device you are going to unlock :

  1. On the PC, enter i.mi.com (My Cloud) and log in with the same Xiaomi account.
  2. If this is your first time logging in, it may ask you again to Complete your security profile with an SMS, just like on en.miui.com.
  3. Once you're inside, check that it appears at the top “1 connected device” (or more, if you have several). Click there and check that the listed terminal is the mobile phone you are going to unlock.

On your phone, go to Settings > Mi Account > Mi Cloud and enable the "Find My Device" option . This links your device to your Mi Cloud account and is part of the ownership verification process.

Enable developer options and link account and device

With the account ready, we proceed to prepare the phone from the MIUI settings for the unlocking process.

Enable developer mode, OEM unlocking, and USB debugging

On the Xiaomi device itself (for example, Redmi 9C):

  1. Go to Settings > About phone > MIUI version.
  2. Tap repeatedly on “MIUI Version” until the message appears “Now you’re a developer!”.
  3. Go back to Settings and enter Additional settings > Developer options.
  4. Active “OEM unlocking” and confirms the safety alerts.
  5. It also activates the “USB Debugging” to allow the computer to communicate via ADB/Fastboot.

This leaves the system technically ready so that the boot manager can be unlocked with the official tool.

Link your Mi account to your unlock status

Within the developer options you will find a key section called something like “My Unlock Status” or “My Unlock Status” :

  1. Enter that option and accept the conditions when the warning appears.
  2. Tap on “Add account and device” with mobile data active (not just Wi-Fi).
  3. If everything goes well, you should see a message like this: “Added successfully. This Mi account is associated with this device.”.

From this point forward, do not sign out of your Mi account on the phone or perform a factory reset . If you do, Xiaomi will restart the waiting timer, typically at 168 hours (7 days).

Request and perform the unlock with My Unlock Tool (Windows)

boot manager and install custom ROMs on Xiaomi

Once your account and your mobile phone are properly linked, it's time to use the official Xiaomi tool to unlock the bootloader.

Download and prepare Mi Unlock Tool

From the computer (64-bit Windows):

  1. Access the official Xiaomi unlocking website, normally en.miui.com/unlock.
  2. Log in with your Mi account (the same one as on your phone) and Download My Unlock ToolIt's a small program for Windows.
  3. Unzip the ZIP file into an easy-to-find folder and run the tool as administrator.

If this is your first time, the tool will ask you to log in with your Xiaomi account . Do so and leave the session open for the entire unlocking process.

Put the phone into Fastboot mode and connect it to the PC.

With Mi Unlock now ready, proceed to put the phone into Fastboot mode :

  1. Turn off the device completely.
  2. Press and hold at the same time Volume Down + Power until you see the typical Mi Bunny character on the screen with the Fastboot text.
  3. At that moment, Connect your mobile phone to your PC using a USB cable. of good quality.

If you already have the drivers installed, Windows should recognize the phone in Fastboot mode without problems and Mi Unlock will see it as connected.

Perform the unlock and manage the waiting period

Within Mi Unlock Tool, with the device connected in Fastboot mode:

  1. The tool will check if The Mi account you entered is associated with the device.If everything is correct, it will display something similar to "Connected to phone".
  2. Click on “Unlock” and then “Unlock anyway”Xiaomi will show you various warnings about data loss and security.
  3. On On the first attempt, a waiting message almost always appears.Something like: “Unable to unlock. Please try again in 168 hours.” That’s the typical 7-day window.
  4. During that waiting period, you will be able to use the phone normallyBut you shouldn't unlink the account or perform a factory reset.
  5. Once the indicated time has elapsed, put the phone back into Fastboot mode, open Mi Unlock Tool, log in with the same account and click on “Unlock” again.

If everything goes well, the progress bar will reach 100% and the program will indicate that the bootloader has been successfully unlocked . The phone will usually restart automatically; if it doesn't, there's a button in the tool to restart the device.

From that point on, you'll notice a small open padlock icon on the screen at startup , and if you use Mi Unlock again, it will show the status as "Unlocked." Advanced users can also verify this from a PC using the command ` fastboot oem device-info` , which reports the bootloader status.

Common problems with Mi Unlock and how to solve them

Xiaomi's system isn't exactly the most user-friendly, so it's normal to encounter errors when linking an account or unlocking the device . Some of the most common errors are:

Account verification errors when adding a device

When trying to add your Mi account to the phone's "Unlock status," you may see messages such as "Verification failed. Please try adding your account and device again ," "Verification failed, please wait a minute or two and try again," or "Failed to add. Error code: 20091."

To fix it, it's usually enough to:

  1. Ir a Settings > Xiaomi Account on the phone.
  2. Click on "Leave"Enter your account password and confirm.
  3. Go back to Settings > Xiaomi Account, log in again with the same account.
  4. Access again to “My unlock status” and try adding the account and device again, always with mobile data active.

In many cases it's simply a temporary server failure, so waiting a few minutes and trying again also helps.

IP blacklist error when processing the request

Occasionally, Xiaomi's Chinese servers flag certain IPs as suspicious and return a "blacklisted IP" error when you attempt to request or unlock your device. If this happens to you, a practical solution is to use a Chinese proxy to simulate connecting from China.

A typical method consists of:

  1. Open Firefox (it's more convenient for manually configuring a proxy).
  2. Go to a website that lists Chinese proxies, such as proxynova.com/proxy-server-list/country-cn/and choose one with good speed and that is not of the "high anonymous" type.
  3. In Firefox, enter Options > Advanced > Network > Settings and select “Configure proxy manually”, entering the IP address and port of the Chinese proxy server.
  4. Save the settings and Try the unlock request again from en.miui.com with that proxy active.

It's not always necessary to go to this extreme, but if your IP is being filtered by Xiaomi's servers, it's practically the only way out until the situation changes.

Driver and controller signature problems in Windows

Another common issue is phone detection failures: Mi Unlock doesn't see it in Fastboot, Mi Flash doesn't recognize the device , or unknown errors appear during the process. Many of these cases are due to incorrectly installed ADB/Fastboot drivers or Windows restrictions on driver signatures.

An effective approach to cleaning up Windows is:

  1. On the phone, having previously activated the USB debugging from the developer options.
  2. With the mobile phone turned on and connected to the PC in MTP mode, accept the dialog that appears on the mobile phone. “Allow USB debugging from this computer”by checking the box for “Always allow from this computer”.
  3. On Windows 8.1 or 10, temporarily disable driver signature verification:
    • In Windows 10, go to Settings > Update & Security > For developers, and turn on developer mode.
    • Then restart your PC by holding down the SHIFT key while pressing “Restart” and go to Troubleshoot > Advanced options > Startup Settings.
    • Select the option that disables driver signature enforcement (usually F7) and let Windows start.
  4. Reinstall the ADB and Fastboot drivers using a reliable installation tool, and then install Mi Flash (even if you only want to use Mi Unlock) accepting all Xiaomi driver installation prompts.

After these steps, the Xiaomi should usually be recognized correctly in both ADB and Fastboot , and you shouldn't have any more strange errors.

What changes after unlocking the bootloader?

Once the bootloader is unlocked, your device will behave somewhat differently in some key areas:

  • The bootloader status remains unlocked even if you flash an official Fastboot ROM, unless in Mi Flash you expressly select the "Erase everything and lock" option.
  • Root access is disabled if you had it before.To regain root access, you'll need to install a custom recovery and flash Magisk or your preferred tool, or, for advanced users, install [the appropriate tool/tool]. Xposed Framework.
  • You will not be able to use Mi Flash to install Fastboot ROMs if the bootloader is locked again.To flash freely, it must remain unlocked.
  • Security features such as "Find Device" remain availableHowever, Xiaomi warns that an unlocked bootloader can slightly reduce the level of protection against attackers with physical access to the device.

From the manufacturer's point of view, the risks stemming from Mi Unlock are not fully controlled , and Xiaomi indicates that it will continue to adjust the system to prevent unauthorized sellers from selling phones with suspicious ROMs pre-installed.

Install custom ROMs and tools for Linux

Unlocking the bootloader is usually the first step before installing custom recoveries (like TWRP), alternative ROMs, and modified kernels . Your PC's operating system also comes into play here: many users ask for tools that work on Linux as an alternative to Mi Unlock or Odin.

There are two essential points to be clear about:

  • El Official Xiaomi bootloader unlocking is only supported by Mi Unlock Tool for WindowsThere is no official version for Linux, and unofficial alternatives are often unreliable or downright risky.
  • Once the bootloader is unlocked, Flashing ROMs, recoveries, or kernels from Linux is perfectly possible using ADB and standard Fastboot.

Linux doesn't have an official "Mi Flash Tool" or "Odin" as such, but you can use:

  • fastboot (Android platform toolset), which allows you to flash boot, recovery, system, vendor, etc. images from the command line.
  • adb to reboot into bootloader mode, transfer files, and debug.

Samsung devices use Odin on Windows, but on Linux the alternative is usually Heimdall for flashing firmware (and for MediaTek devices, SP Flash Tool is typically used ). For Xiaomi and other Android devices with Fastboot, the usual procedure is:

Install and Manage Magisk Superuser Permissions
Related articles:
Magisk: What it is and how to use it on Android
  1. With the bootloader now unlocked, boot into Fastboot.
  2. From Linux, run commands like fastboot flash recovery recovery.img to install a custom recovery.
  3. Reboot into that recovery and from there Install the custom ROM in ZIP format following the instructions of its developer.

The key is that the most critical and closely monitored step by Xiaomi is unlocking , for which using Mi Unlock on Windows remains essential. For the rest of flashing custom ROMs, you can use Linux without issue, provided you know how to use ADB/Fastboot and configure alternative stores like Aurora Store.

Safety recommendations and common sense

Although Xiaomi provides the official tool, the company itself insists that not everyone should unlock the bootloader . If you're not familiar with Android, flashing ROMs, recoveries, backups, and restores, the risk of doing something wrong is high.

Some guidelines to minimize scares are:

  • Get well informed before each stepDon't flash a ROM just because "you got it from a group" without checking the developer's official thread, instructions, and any known bugs.
  • Monitor the origin of custom ROMsAlways download from trusted forums and repositories (XDA, official repositories of well-known projects, etc.) to avoid malware or strange modifications.
  • Maintain regular backupsOnce you get into the ROM game, it's a good idea to maintain frequent backups, whether with TWRP, desktop tools, or in the cloud.
  • Assuming that some security features are weakened with the bootloader unlocked. If your absolute priority is protecting the device from theft, unlocking it might not be the best idea.

If at any point you find yourself overwhelmed by error messages, bootloop states, or drivers that are impossible to install, it's not a bad idea to go to an official service center before the situation worsens.

Unlocking the bootloader of a Xiaomi and installing custom ROMs might seem complicated with 168-hour waits, verified accounts, and different tools for Windows or Linux, but ultimately the process boils down to a few key principles: properly configuring your Mi account and Mi Cloud, correctly associating the account with the device, using the official Mi Unlock Tool even if you have to use Windows, ensuring the drivers are set up correctly so Fastboot detects the phone, and only when everything is in order, starting to experiment with recoveries and ROMs from ADB/Fastboot.

If you follow these steps and don't underestimate the risks, you'll have much more freedom to customize your Android device without turning it into a paperweight. Share this information so other users can learn about it.