How to put firmware on Xiaomi via PC: full instruction with unlocking the bootloader

Why is firmware over PC the best choice for Xiaomi?

Installing firmware on Xiaomi via a computer is not just an alternative OTA-Updates, and often the only way to bring your device back to life after crashes, is to get a fresh version. MIUI Before the official release or switch to custom firmware like LineageOS or Pixel Experience. Unlike the update "over the air", the method through the PC gives full control over the process: You choose a specific version of the software, you can roll back to a stable build or even unlock hidden manufacturer features.

But there are pitfalls here. Mistakes lead to a device blinking, a loss of warranty, or an IMEI lock. For example, running a global ROM on a Chinese version of a smartphone without first unlocking the bootloader turns the phone into a brick 90 percent of the time, and this guide will help avoid typical errors and conduct the process as safely as possible, from preparing drivers to the final restart.

Preparation for firmware: what to do before the start

Before you connect Xiaomi to your computer, follow the mandatory steps, which can lead to data loss or inability to complete the firmware.

  • πŸ“± Save all data: Fastboot firmware erases internal memory. Use Mi Mover or manual copying on PC.
  • πŸ”‹ Charge the battery to at least 60%. Upon discharge during the process, the device may shut down and stop responding to charging.
  • πŸ”— Check the device model: type ##4636## in the dialer or look at Settings β†’ The phone, the firmware from another model. = blitz.
  • πŸ–₯️ Install drivers: Download Mi Phone Manager or official Xiaomi drivers for Windows.

Pay special attention to unlocking the bootloader. Without it, Fastboot firmware is impossible. It takes up to 72 hours (due to Xiaomi policy) and requires you to link your Mi Account to your device. If you miss this step, MiFlash will give you an error "This device is locked."

πŸ“Š What tool do you plan to use for the firmware?
MiFlash
Fastboot + ADB
TWRP
Other

Unlocking the bootloader: step-by-step guide

Xiaomi blocks the bootloader on all devices to protect against unauthorized changes. To unlock it, follow the following steps:

  1. Activate Developer Mode: Go to Settings β†’ About Phone and click on MIUI Version 7 times.
  2. Enable OEM unlocking and USB debugging in the Settings menu β†’ Additional β†’ For developers.
  3. Link your Mi Account to your device: Settings β†’ Mi Account β†’ Sync.
  4. Download the official unlock tool and log in to it.
  5. Connect your phone in Fastboot mode (click Volume Down + Power when the device is off) and follow the program instructions.

⚠️ Warning: Once unlocked, the factory reset will work, all data, including photos and apps, will be deleted, and Xiaomi can block the ability to unlock for 30 days if you interrupt the process.

Mi Account linked to device | USB|Device enabled Download official unlock-tool|Battery charge > 60%|Data backup made-->

Selection of firmware: official vs custom

The type of firmware depends on the functionality of the device and the risks of installation. Official firmware from Xiaomi comes in three types:

Type of firmwareDescriptionDownload linkRisks.
Stable (Stable)The official version of MIUI with minimal bugs is suitable for daily use.mi.comNot if the model matches.
Developer (Developer)Weekly builds with new features, but bugs are possible.xiaomi.euInstable operation of modules
FastbootFull image for installation via MiFlash, suitable for recovery of bricks.miuirom.orgThe wrong model error
Castomium (TWRP)Third-party firmware (LineageOS, Pixel Experience) requires an unlocked bootloader and TWRP.XDA DevelopersLoss of warranty, possible bugs

For beginners, we recommend starting with a stable official firmware. Castom builds give more freedom (for example, support for Google Camera on unofficial ports), but require deep knowledge and often deprive the device of the Widevine L1 certification (there is no HD on Netflix).

What is Anti-Rollback?
Anti-Rollback is Xiaomi's protection against rollbacks on older firmware versions. If you sew an older version, the device will lock. Check the list of supported versions for your model on the Xiaomi.EU forum.

Install firmware through MiFlash: detailed instructions

MiFlash is Xiaomi’s official Fastboot firmware tool, suitable for installing full images (e.g., when recovering from a crash) or upgrading to a new version of MIUI.

  1. Download and install the MiFlash Tool (version 2020 or later).
  2. Unpack the downloaded.tgz archive with firmware in a folder without Cyrillic characters (for example, C:\MiFlash\rom).
  3. Launch MiFlash on behalf of the administrator, click Select and specify the path to the firmware folder.
  4. Connect the phone off in Fastboot mode (clip Volume Down + Power).
  5. In MiFlash, select firmware mode: Clean all – complete cleaning (recommended when changing the version of MIUI); Clean all and lock – cleaning + lock the bootloader (only for official firmware!); Save user data – data storage (not always working correctly).

Press Flash and wait until it is completed (usually 5-10 minutes).

If the process is 99% frozen or there is an error "critical partition flashing is not allowed", then you are trying to flash the incompatible version.

πŸ’‘

If MiFlash doesn’t see the device, try reinstalling drivers manually through Windows Device Manager. To do this, in Fastboot mode, select β€œUpdate Driver” β†’ β€œSearch on this computer” β†’ specify the driver folder from Mi Phone Manager.

Fastboot and ADB Firmware: An Alternative Method

If MiFlash is not working or you need flexibility (e.g., flashing only individual partitions), use Fastboot commands manually, which requires knowledge of the core commands, but gives you more control.

Download Google's Platform Tools and unpack it into a handy folder.

  1. Open the command line (Win + R β†’ enter cmd) and go to the folder with platform-tools: cd C:\platform-tools
  2. Connect your phone in Fastboot mode and check the connection: fastboot devices should show a serial number of the device.
  3. Sweep each section separately (example for Redmi Note 10 Pro): fastboot flash boot.img fastboot flash recovery.img fastboot flash system system.img
  4. After completion, execute: fastboot reboot

If the phone has turned into a brick (it doesn't turn on, doesn't respond to buttons), try the emergency mode of EDL. This will require a box (for example, a UFi Box) or help from a service center. Self-recovery attempts through EDL without experience often lead to a complete loss of IMEI.

πŸ’‘

Always check firmware compatibility with the device model and the Anti-Rollback version before firmware is installed. An error at this stage leads to an irreversible breeze.

Can I use Xiaomi without unlocking the bootloader?
No, to install firmware through Fastboot, unlocking is mandatory.Exception is an update via Recovery (if the firmware is signed by Xiaomi), but this only works for official ones. OTA-packet.
How to return the official firmware after custom?
Download the Fastboot firmware for your model from miuirom.org, unblock it, and run it through MiFlash in Clean All and Lock mode, which will return stock recovery and block the bootloader.
Why is the mobile network not working after the firmware?
This is a typical problem when installing firmware from another regional version (e.g. Chinese firmware). ROM Solution: Check out the global model. IMEI through *#06#. If IMEI No, no, restore it through QCN-file (requires backup) Fastboot flash modem partitions NON-HLOS.bin).
How to get around the wait of 72 hours when unlocking?
Xiaomi has introduced this restriction to protect users from random activities, informal methods (such as resetting time through ADB) can lead to account locking, it is better to wait or use a second Mi Account.
Can I use Xiaomi on Mac or Linux?
Yes, but with caveats: The Mac needs ADB/Fastboot + drivers for MiFlash (via Homebrew). Linux requires manual installation of udev rules to recognize the device in Fastboot. The official MiFlash only works on Windows, but Fastboot commands are cross-platform.