Flashing Xiaomiβs smartphone through a computer is a daunting task for many users, while the right approach and step-by-step implementation of instructions allow you to update or completely replace the deviceβs software without going to the service center. In this article, we will discuss all the steps of the process, from tool preparation to the final configuration of the phone after firmware.
Itβs important to understand that PC firmware offers more options than standard air updates (OTAs), which can include custom firmware (like LineageOS or Pixel Experience), factory-fabricated device or upgrade to the latest version of MIUI if the official update hasnβt yet been released for your model, but with the benefits comes risks ranging from data loss to phone failure when errors occur.
We will focus on two main methods: firmware through the MiFlash Tool (the official Xiaomi tool) and manual installation through the Fastboot. Both methods require unlocking the bootloader, but are suitable for most models - from the Redmi Note 10 Pro to the flagship Xiaomi 14 Ultra. If you have never engaged in such manipulations, we recommend you to carefully study each step and be patient.
1. Firmware Preparation: What to Do Before Starting
Before you start firmware, make sure all the prerequisites are met, and ignoring this step is the main reason for βbrickingβ phones when the device stops turning on or loads only in Fastboot mode.
First, check your phone model and its current version of MIUI. This can be done in the Settings β About phone menu. Write down the exact model name (e.g. Redmi Note 12 Pro+ 5G, not just "Redmi Note 12") - this depends on the choice of firmware. Also pay attention to the region: firmware for global (Global), Chinese (China) and European (EEA) versions are not interchangeable!
Second, prepare the computer:
- π₯οΈ Install Xiaomi drivers (you can download from the official website or through Mi). PC Without them, the PC will not recognize the phone in Fastboot mode.
- π Use the original. USB-The cable (better the one that came with the kit) can interrupt data transmissions with cheap cables.
- π Charge the phone to at least 60 percent. The firmware can take up to 30 minutes, and the battery will run out in the process.
- π Back up your important data. Fastboot firmware erases all user files!
β οΈ Note: If your phone is purchased in China and runs on China firmware ROM, Google services (Play Market, Gmail, etc.) may stop working after firmware is installed on the global version).
2 Unlocking the bootloader: a mandatory step before the firmware
Xiaomi locks the bootloader on all its devices to protect against unauthorized changes.To flash the phone through a PC, it must be unlocked.This process requires linking the Mi Account account to the device and waiting for permission from Xiaomi servers (usually takes 3 to 7 days).
Instructions for unlocking:
- Activate Developer Mode: Go to Settings β About Phone and click on MIUI Version 7 times.
- Return to Settings β Additional β For developers and enable OEM Unlock and USB Debugging.
- Download and install the Mi Unlock Tool from Xiaomiβs official website.
- Connect your phone to your PC in Fastboot mode (clip Volume Down + Power when your phone is off).
- Launch the Mi Unlock Tool, log in to your Mi Account and follow the program instructions.
If the program gives you a "Couldn't unlock" error, check:
- π Is the phone connected to the Internet (via mobile data or Wi-Fi).
- π± Is Mi Account Linked to Your Device (Your Phone Should Show in Your Account Settings).
- β³ Has it been 168 hours (7 days) since the first account was linked.
What if the Mi Unlock Tool can't see the phone?
3. firmware selection: official MIUI vs custom builds
Not only does the firmware type affect the functionality of the phone, but also the stability of its operation. Xiaomi offers several types of official firmware:
- π¦ Stable ROM β stable-version MIUI with minimal bugs, recommended for everyday use.
- π§ͺ Developer ROM β It's a test version with new features but possible errors.
- π Global/China/EEA ROM β Global version includes Google services and support for multiple languages.
To download official firmware, use the resources:
- The official MIUI website (select the version for your model!)
- Xiaomi Firmware Updater is a firmware archive with easy search.
If you want to install custom firmware (like LineageOS or ArrowOS), consider:
- β οΈ Lack of official support from Xiaomi (probable camera issues, NFC sensory).
- π§ Need for installation TWRP Recovery (alternative recovery).
- π± Loss of warranty (if the device is warranty, it is better to use official firmware).
| Type of firmware | Advantages | Deficiencies | Recommendations |
|---|---|---|---|
| Official Stable ROM | Stability, support OTA-Updates, maintaining the guarantee | Long wait for new features, regional restrictions | For most users |
| Official Developer ROM | New features, weekly updates | Possible bugs, unstable work | For experienced users |
| Castom firmware (LineageOS, etc.) | Clean Android, advanced settings, long-term support | Loss of warranty, possible problems with iron | For enthusiasts and old models |
π‘
Before downloading the firmware, check its hash amount (MD5) using HashMyFiles, which will help to avoid installing a corrupted file.
4. Firmware through MiFlash Tool: step-by-step instructions
MiFlash Tool is Xiaomi's official Fastboot firmware utility, suitable for installing official firmware and recovering from crashes. Here's how to use it:
Step 1: Download and install the MiFlash Tool (the latest version can be found on the XDA Developers or 4PDA forums). Also download the firmware in.tgz or.zip format and unpack it into a folder without Cyrillic characters in the way (for example, C:\Xiaomi\ROM).
Step 2. Connect your phone to your PC in Fastboot mode:
- Turn off the phone.
- Press the Loudness Down + Power buttons and hold them for 10 seconds.
- The screen will show the image of a hare in a hat-eared β this is a sign that the device is in Fastboot mode.
Step 3. Launch the MiFlash Tool:
- π Click Select and point the way to the folder with unpacked firmware.
- π At the bottom of the program, select firmware mode: clean all β complete cleaning (removes all data). clean all and lock β cleaning + bootloader lock (use if you want to return the phone to factory state). save user data - saving user data (does not always work correctly).
- β‘ Press Refresh β the program must identify your device (it will appear). COM-port).
- π Press Flash and wait until the process is complete (usually takes a lot of time). 5-15 minute).
βοΈ Preparing for firmware through MiFlash
β οΈ Note: If the MiFlash Tool gives an error in the firmware process, βcritical partition flashing is not allowed,β it means that you are trying to flash the inappropriate version. MIUI (For example, Chinese firmware on the global model!
5. Fastboot Firmware Manual: For Power Users
If the MiFlash Tool is not suitable (for example, for custom firmware), you can flash your phone through Fastboot manually using ADB and Fastboot commands, which requires knowledge of console commands, but gives you more control over the process.
Step 1: Install ADB and Fastboot on your PC:
- Download the Google Platform Tools.
- Unpack the archive to the root of the disk (e.g., C:\platform-tools).
- Add the path to the folder to the PATH environment variables (to make commands work from any directory).
Step 2. Connect your phone in Fastboot mode and check for detection:
fastboot devicesIf the device is determined (its serial number will appear), you can proceed to firmware.
Step 3. Run the phone over the commands. Example for official firmware:
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img
fastboot flash vendor vendor.img
fastboot flash userdata userdata.img
fastboot flash cust cust.img
fastboot rebootFor custom firmware (like LineageOS), the commands may differ, usually in the instructions for a particular build. It is important to monitor the order of the partition firmware - an error can lead to a bootloop.
π‘
Fastboot firmware manually avoids the limitations of the MiFlash Tool, but requires exact adherence to the sequence of commands.A mistake in the file name or a missed partition will cause the phone to fail.
Possible errors and their solutions
Even with strict adherence to the instructions, problems can arise, and let's look at the most common mistakes and ways to correct them:
| Mistake. | Reason. | Decision |
|---|---|---|
| "Waiting for device" at MiFlash | Drivers not installed or phone not in Fastboot mode | Reinstall drivers, check the connection, try another USB-port |
| "Invalid sparse file format at header" | A firmware file or incompatible version is damaged | Download the firmware again, check it out. MD5-hash |
| Phone stuck on MI logo | Incorrectly stitched the boot or system section | Repeat the firmware with full cleaning (clean all) |
| "This device is locked" on Fastboot | The bootloader is not unlocked | Unlock the bootloader through the Mi Unlock Tool |
If the phone does not turn on after firmware or boots to bootloop (infinite reboot), try:
- Download to Recovery Mode (clip Volume Up + Power) and make Wipe Data.
- Repeat the firmware with another ROM file.
- Contact the forums XDA Developers or 4PDA β there are often posted rescue firmware for βbrickβ devices.
How to restore IMEI after firmware?
7.Setting up the phone after firmware
After successful firmware, the phone will boot as new.
- π Go through the initial setup (language selection, Wi-Fi connection, Mi Account login).
- βοΈ Update all applications through the Play Market (if you have flashed global firmware).
- βοΈ Recover data from backup (if you did backup via Mi Cloud or Google Drive).
- π Check the operation of sensors (camera, GPS, fingerprint scanner) and, if necessary, install drivers.
If you have a custom firmware, you may need to:
- π± Install GApps (Google Service Package) through TWRP Recovery.
- π― Set up root access (if you need superuser rights).
- π Check for custom firmware updates (usually released weekly).
β οΈ Note: After the customization ROM Banking applications may stop working (due to lack of SafetyNet certification) To fix this, install the Magisk module and activate MagiskHide.