Installing firmware via USB on Xiaomi smartphones is a powerful tool for power users to update the system manually, restore the device after a crash, or even install custom firmware. However, by default, this feature is blocked by the manufacturer due to security risks. In this article, we will discuss in detail how to properly activate the installation mode via USB, what pitfalls can meet on the way, and what to do if the smartphone refuses to see the boot file.
The process differs from the standard air-to-air update (OTA) and requires pre-preparedness: unlocking the bootloader, creating the right file structure on the flash drive and even occasionally using a PC. We will look at official methods for MIUI and alternative solutions for devices with a locked bootloader. Particular attention will be paid to the Redmi Note 12, POCO X5 and Xiaomi 13 models, where the algorithm may differ from older smartphones.
It's important to understand that doing the wrong thing can lead to a device being "bricked," so every step comes with warnings and recovery tips, and if you're a beginner, we recommend that you learn the theory of the types of firmware (Fastboot, Recovery) first and then start practicing.
Why Xiaomi is blocking USB installation and how to get around it
The manufacturer limits the ability to install firmware via USB for two key reasons: security and ecosystem control. Unlike Google Pixel or Samsung, where unlocking the bootloader takes minutes, Xiaomi requires a Mi Account binding and waiting up to 720 hours (30 days) for new devices.
Bypassing the lock is possible through:
- π Official unlocking of the bootloader through the Mi Unlock Tool (requires waiting and account confirmation).
- π± Hidden engineering menus (e.g. ##4636## for testing or fastboot oem edl for switching to mode) EDL).
- π» Use of third party utilities like XiaomiTool V2 MiFlash (Risky for Beginners).
- π Exploiting vulnerabilities in older versions MIUI (For example, bypassing waiting through downgrade firmware).
Since 2023, Xiaomi has tightened its policy on new models (for example, Xiaomi 14 or Redmi Note 13 Pro).+) It is impossible to unlock the bootloader without the phone number tied to the Mi Account. This complicates the process for users who bought the device with or without the original device. SIM-map.
β οΈ Note: If you bought a smartphone on AliExpress or Avito without an attached account, unlocking the bootloader may not be possible. Check the lock status through the command fastboot oem device-info - if in the response Device unlocked: false, you need to contact the previous owner.
Preparation of the smartphone: unlocking the loader
The first and most important step is to unlock the bootloader, without which the smartphone will simply ignore any attempts to install the firmware via USB.
- Linking your Mi Account to your device (required via the official Mi Unlock app).
Detailed instructions:
- Download the official Mi Unlock Tool (the version must match your MIUI).
- Turn on the smartphone developer mode: go to Settings β About Phone β MIUI version and tap 7 times on the line with the version.
- Back to Settings β Additionally. β For developers and activate: π§ Debugging by USB π Unlocking OEM (It may be called a factory unlock)
Mi Unlock Tool
Mi
Added account successfully. Waiting for {X} hours
After the waiting period expires, reconnect to the PC. The utility should show the Unlock button. Press it, the smartphone will restart, and the bootloader will be unlocked. Attention: after unlocking, there will be a full reset (wipe)!
What if the Mi Unlock Tool canβt see the device?
Creating a bootable flash drive for Xiaomi
To install the firmware via USB, you will need a properly formatted flash drive (up to 64 GB of USB 3.0 is recommended) and the correct file structure, and errors at this stage are the most common cause of failure.
Requirements for the flash drive:
- π Format: FAT32 (not exFAT or NTFS!).
- π Cluster size: 4096 bytes (default when formatting).
- π« No encryption or record protection.
- π Charge of the smartphone battery: at least 50% (when installing firmware, discharge can lead to a breeze).
The structure of files on the flash drive depends on the type of firmware:
| Type of firmware | Files on the flash drive | Folder (if needed) | Example of file name |
|---|---|---|---|
| Recovery (through stock recovery) | One. ZIP-archive | No (file root) | miui_BLOCKNAME_V14.0.5.0.TKLCNXM_1234567890_12.0.zip |
| Fastboot (via MiFlash) | Plenty IMG-file | Yeah (unpacked folder) | images/boot.img, images/system.img |
| Castomium (TWRP) | ZIP + IMG (core) | No. | twrp-3.7.0_12-raphael.img + Magisk-v26.1.zip |
Where to download the firmware:
- π Official firmware: Xiaomi website (choose version for your model!).
- π§ Custom firmware: XDA Developers (e.g. Pixel Experience or LineageOS).
- β οΈ Check the hashes of the files (MD5/SHA1) β The downloaded firmware must match the official data.
βοΈ Preparation of the flash drive for firmware
Installation of firmware via USB: a step-by-step process
Once the bootloader is unlocked and the flash drive is ready, you can start installing it. Let's look at two scenarios: through stock recovery and through Fastboot.
Method 1: Installation through Recovery (for ZIP-firmware)
This method is suitable for official firmware in.zip format and custom assemblies.
- Turn off your smartphone.
- Press Volume Up + Power to Enter Recovery Mode.
- Select a language (if you have a choice) and go to Install update.zip to System (the name may vary).
- Connect the flash drive through OTG-Adapter (or insert into your smartphone if supported).
- Select the firmware file and confirm the installation.
- Wait until the end (usually 5-15 minutes) and restart.
Method 2: Installation via Fastboot (for IMG-firmware)
This method requires a PC and MiFlash or fastboot utility.
- Unpack the firmware in a folder on the PC (for example, C:\miui_fastboot).
- Transfer the smartphone to Fastboot mode (Loudness down + Power).
- Connect to your PC and check for detection by the command: fastboot devices must display the serial number of the device.
- For full installation, run: fastboot flash all Or for selective (e.g. system only): fastboot flash system.img
- Reboot the command: fastboot reboot
π‘
If MiFlash gives an error critical partition flashing is not allowed, try selecting clean all and lock mode in the utility settings (but this will block the bootloader again!).
Common mistakes and their solutions
Even with the correct instructions, errors can occur, and here are the most common ones and how to correct them:
| Mistake. | Reason. | Decision |
|---|---|---|
| Couldn't mount USB in Recovery | Incorrect format of the flash drive or OTG-adapter | Reformat the flash drive to FAT32 with a cluster size of 4096. Try another adapter. |
| E: Footer is wrong or E: Signature verification failed | Damaged. ZIP-firmware | Download the firmware again and check it out. MD5-Turn off signature verification in TWRP (if used). |
| fastboot: error: Failed to boot into fastbootd | bootloader locked or drivers not installed | Check the fastboot oem device-info. Install Qualcomm or MediaTek drivers. |
| Smartphone got stuck on the MI logo after firmware | Incompatible firmware or interrupted process | Try to reflash through Fastboot with a full reset (fastboot erase userdata). |
Critical error: if after firmware smartphone does not turn on and does not respond to buttons, do not panic - in 90% of cases it is a "soft breeze", which is treated by transferring to EDL (Emergency Download Mode) mode through test points or a special cable.
β οΈ Note: On Xiaomi models with MediaTek processor (e.g. Redmi) 10C or POCO M5) enter EDL You may need an authorized Mi Account with service center rights!
Alternative ways to install firmware without USB
If unlocking the bootloader or working with USB is difficult, consider alternative methods:
- π Local Update via Updater: Download ZIP-Firmware. Go to Settings. β The phone. β Updating the system β Three points. β Select a firmware file. Select the downloaded file and wait for the installation.
- π± ADB Sideload: installation ZIP via adb sideload filename.zip Recovery mode (requires an unlocked bootloader).