How to reflash Xiaomi phone through your computer: detailed instructions for beginners and experienced users

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.

πŸ“Š What is your experience with Xiaomi firmware?
Never stitched.
I stitched through TWRP.
Used MiFlash.
He put in custom firmware.

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:

  1. Activate Developer Mode: Go to Settings β†’ About Phone and click on MIUI Version 7 times.
  2. Return to Settings β†’ Additional β†’ For developers and enable OEM Unlock and USB Debugging.
  3. Download and install the Mi Unlock Tool from Xiaomi’s official website.
  4. Connect your phone to your PC in Fastboot mode (clip Volume Down + Power when your phone is off).
  5. 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?
Make sure the drivers are installed correctly (check in Windows Device Manager). Try running the program on behalf of the administrator or using another one. USB-port (preferably) USB If the phone is not detected in Fastboot, try rebooting it in this mode again.

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 firmwareAdvantagesDeficienciesRecommendations
Official Stable ROMStability, support OTA-Updates, maintaining the guaranteeLong wait for new features, regional restrictionsFor most users
Official Developer ROMNew features, weekly updatesPossible bugs, unstable workFor experienced users
Castom firmware (LineageOS, etc.)Clean Android, advanced settings, long-term supportLoss of warranty, possible problems with ironFor 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:

  1. Turn off the phone.
  2. Press the Loudness Down + Power buttons and hold them for 10 seconds.
  3. 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

Done: 0 / 5

⚠️ 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 devices

If 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 reboot

For 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 MiFlashDrivers not installed or phone not in Fastboot modeReinstall drivers, check the connection, try another USB-port
"Invalid sparse file format at header"A firmware file or incompatible version is damagedDownload the firmware again, check it out. MD5-hash
Phone stuck on MI logoIncorrectly stitched the boot or system sectionRepeat the firmware with full cleaning (clean all)
"This device is locked" on FastbootThe bootloader is not unlockedUnlock the bootloader through the Mi Unlock Tool

If the phone does not turn on after firmware or boots to bootloop (infinite reboot), try:

  1. Download to Recovery Mode (clip Volume Up + Power) and make Wipe Data.
  2. Repeat the firmware with another ROM file.
  3. Contact the forums XDA Developers or 4PDA – there are often posted rescue firmware for β€œbrick” devices.
How to restore IMEI after firmware?
If it's gone after the firmware. IMEI (no network), try to restore it through the engineering menu. Enter in dial ##4636##, select Phone Information and click Select SIM. If IMEI empty, you will need to enter it manually through QCN-File (instructions are available on thematic forums).

7.Setting up the phone after firmware

After successful firmware, the phone will boot as new.

  1. 🌐 Go through the initial setup (language selection, Wi-Fi connection, Mi Account login).
  2. βš™οΈ Update all applications through the Play Market (if you have flashed global firmware).
  3. ☁️ Recover data from backup (if you did backup via Mi Cloud or Google Drive).
  4. πŸ”’ 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.

8. Frequently Asked Questions (FAQ)

Can I use Xiaomi without unlocking the bootloader?
No, official and most custom firmware require an unlocked bootloader, except for the Recovery update (if you already have custom firmware with TWRP installed).
How to return the official firmware after custom?
Download the official Fastboot ROM for your model and run it through the MiFlash Tool in clean all and lock mode, which will return the phone to factory status and lock the bootloader.
Why can't MiFlash see my phone?
The reasons may be: Drivers are not installed (check in Device Manager). USB-Phone is not in Fastboot mode (reset it by clamping Volume down) + Power. Port. USB 3.0 is incompatible - try it USB 2.0.
Can I use Xiaomi on Mac or Linux?
Yes, but the process is more complicated than Windows. You'll need to: Install ADB and Fastboot via Homebrew (Mac) or Package Manager (Linux); use alternative tools, like XiaomiTool V2 for Linux; manually stitch through the terminal (the commands are the same as for Windows); the official MiFlash Tool only works on Windows.
Will the warranty be reset after the firmware?
Yes, any firmware through Fastboot or custom ROM installation will void the warranty, but if you return the official firmware and lock the bootloader, the service center may not notice the interference (but it is not guaranteed).