Many Xiaomi smartphone owners are faced with the need to reinstall the operating system when the device starts to work incorrectly or there is a desire to change the firmware region. The process, popularly called “roll the system”, requires care and strict follow the instructions so as not to turn a modern gadget into a useless piece of plastic. Before starting any manipulation, it is important to understand that you take responsibility for your device, since interference in the system partition always carries certain risks.
There are several ways to restore or install software, and the choice of the specific method depends on the current state of your Mi-smartphone. If the phone is on and running, but you want to change the version of MIUI, one algorithm will do. In a situation where the gadget has gone into a cyclical reboot or does not respond to the on button at all, you will need to use deeper loading modes such as Fastboot or Recovery.
In this article, we will take a look at all the preparation steps, tools and steps needed to successfully install a system, learn how to properly prepare files, what drivers to install on your computer, and how to avoid common errors that can lead to locking your device.
Preparation for firmware and choice of method
The first step before you roll in the system is to determine the current state of your device and select the right firmware file. Not all methods are universal: Some require an unlocked bootloader, others only work on global versions, and still others can be applied exclusively to Chinese models.A mistake at this stage can lead to the phone refusing to boot the operating system or losing the ability to accept the device. OTA-update.
You need to download the current firmware version from a trusted source, such as the official developer website or specialized forums. Files usually have the.zip extension for updating via recovery or.tgz for firmware through your computer. It is important to make sure that the Android and MIUI version is compatible with your model, as trying to install software from another device is guaranteed to bring the smartphone down.
⚠️ Warning: Before starting the procedure, be sure to back up all important data, as during the installation process, the phone memory will be completely cleared.
There are three main installation methods, each of which has its own characteristics and requirements:
- 📲 Updating via Recovery is the easiest method that doesn’t require a computer, but only works if the phone turns on.
- 💻 Fastboot (MiFlash) firmware – a deep method that requires a PC and an unlocked bootloader, allows you to completely clean the device.
- 🔄 Installation through ADB Sideload is an advanced method for cases where the standard recovery does not see the update file.
When choosing a method, evaluate your skills and availability of the necessary equipment. If you are doing this for the first time, it is better to start with less risky options that do not require disassembly of the device or complex manipulations with the command line. Remember that the stability of the system depends on the quality of the downloaded file and the correctness of the actions performed.
Required tools and drivers
To do this successfully, you'll need not only the smartphone and the computer itself, but also specific software. Without properly installed drivers, the computer will simply not see the device in the right mode, and the firmware process will interrupt initially, especially for the Windows operating system, which may not have built-in drivers for Xiaomi boot modes.
The first thing you need to install is the Mi Flash Tool if you plan to use the Fastboot method.This is the official software from Xiaomi that allows you to interact with the phone bootloader.It may also require installing ADB and Fastboot drivers, which often come bundled with the Android SDK platform tools.
USB cables play a critical role in this process: Cheap cables designed only for charging do not provide stable data transfer, which can lead to recording errors or sudden disconnection of the device. Use the original cable or a quality analog with support for high-speed data transfer.
☑️ Checklist of preparations
Check for free space on your computer's hard drive. Firmware archives can take anywhere from 3 to 5 GB, and when unpacked, require even more space. Also, make sure that antivirus software doesn't block firmware utilities, as they make changes to the system partitions of the device.
Unlocking the bootloader (Bootloader)
One of the most important and difficult stages is unlocking the bootloader. By default, all Xiaomi devices come with Bootloader locked, which prevents unofficial software installation and modification of system partitions. Without unlocking, you will be able to update the phone only with official methods through the settings menu, but you will not be able to “roll” the custom system or global firmware on the Chinese version.
The unlocking process requires you to link your Mi Account to your device and wait for a certain time, which can be from 7 to 168 hours (week to month), a security measure introduced by the manufacturer, and it is almost impossible to circumvent it by legal means. You will need to download the Mi Unlock Tool utility to your computer and log in to it under the same account as on your phone.
To enter unlock mode, you need to put your phone into Fastboot mode. This is usually done with a key combination: press the volume button and connect the USB cable to your computer. The smartphone screen will show an image of a rabbit fixing an android, which indicates a successful transition to the desired mode.
⚠️ Warning: Unlocking the bootloader automatically performs a full Wipe Data reset. All photos, contacts and apps will be deleted without recovery unless you backed up in advance.
After waiting for the time set by the Xiaomi server, you can start unlocking through the utility on the PC. The process takes a few seconds, after which the phone will restart, and the download icon will appear on the open lock. From now on, the device is ready to install any compatible versions of the software.
Installation of firmware through Recovery Mode
Recovery is the safest method for beginners, as it does not require a computer connection or complex utilities, which is suitable if your phone turns on, but you want to change the firmware region (for example, from China to Global) or roll back to an earlier version of MIUI. The main condition is that the firmware file must be in.zip format and is designed specifically for updating via the Recovery.
The downloaded firmware file needs to be renamed update.zip and placed in the root folder of the device's internal memory. Don't put the file in folders with other data, the system must find it immediately when the recovery mode starts. After that, the phone turns off, and you enter Recovery mode, holding the power button and the volume button at the same time.
In the Recovery menu, the navigation is done with volume buttons, and the choice is confirmed by the power button (although many new models already have a touch screen), you need to select a language (usually available in English and Chinese) and go to the installation point.
The algorithm of actions in the Recovery menu is as follows:
- 🔘 Select Wipe Data to clear your memory (required when changing region).
- 📂 Click Install Update or Choose Update Package.
- 📁 Find the file. update.zip in the list and confirm the installation.
- ⏳ Wait until the process is over, the phone will automatically restart.
It is important to note that if you are trying to downgrade the Android version (for example, from Android 13 to Android 12), standard Recovery can block installation.
Firmware via Fastboot and MiFlash
Fastboot is considered a clean installation because it completely overwrites all partitions of the device’s memory, and it’s the best way to get rid of software bugs, viruses, or the consequences of failed experiments with the system. It requires a firmware file in.tgz format that needs to be unpacked on the computer.
Once you unpack the archive, you'll see a lot of files and folders, including an executable file with the.bat extension or a script for Linux/Mac. However, for Windows users, the most convenient way to use the MiFlash graphical shell is to run the program on behalf of the administrator to avoid access rights issues.
Connect your phone in Fastboot mode (down volume button + USB cable). In MiFlash, press the Refresh button and your serial number device should appear on the list. If you see the path to the device or the status of "Waiting" instead of the number, check the drivers.
| Firmware mode | Description of action | Data retention |
|---|---|---|
| clean_all | Complete cleaning and installation of the new system | No (all removed) |
| save_user_data | Installation of the system with file saving | Yes (data remains) |
| clean_all_and_lock | Cleaning, installation and locking of the loader | No (all removed) |
At the bottom of the MiFlash window, there are three mode select buttons. For a complete system reinstallation (roll clean), choose clean_all. If you want to simply upgrade without losing data, choose save_user_data, But remember, when you change region, this method can cause errors. clean_all_and_lock returns the device to factory state with a locked bootloader, which is important when preparing the phone for sale.
Press Flash and be patient. It takes 100 to 300 seconds. You can't turn off the USB cable or interrupt the program at this time. When you're done, you'll see "Success" in status, and the phone will automatically reboot.
Error Resolving and (FAQ)
There are various bugs that can occur in the firmware process, from drivers to hardware failures. One of the most common problems is the MiFlash “Missmatching image and device” error, which means you’re trying to flash firmware from another model. Always check the device’s code name (e.g., cepheus for Mi 9 or ursa for Mi 8 Explorer), which must match the firmware folder name.
If your computer stops seeing your phone during firmware, try changing it. USB-Port (better to use ports) USB 2.0 on the back of the system unit) or replace the cable. Sometimes it helps to reinstall drivers through Windows Device Manager, where you need to manually specify the path to the folder with the drivers of Qualcomm or Xiaomi.
If the phone has gone into a brick (black screen, charging only reaction), EDL (Emergency Download Mode) mode may be required, which often requires disassembling the phone and closing special contacts on the board, and the firmware itself is only possible through an authorized service center account.
⚠️ Note: If your fingerprint or camera is not working after the firmware, you probably missed the step to clear the data or flashed the wrong region. clean_all.
Below are answers to the most popular user questions that will help solve problems without contacting the service.