Xiaomi Smartphone Firmware Through TGZ-A file is one of the most reliable ways to update or restore a system when standard methods (via Settings) are used. β About phone doesn't work. This is a method for power users who want to install official or custom firmware with full control over the process (OTA), Fastboot firmware avoids errors related to damaged partitions or version incompatibility.
But the process requires care: wrong actions can turn your Redmi, POCO, or Mi into a brick. In this article, weβll take you through the steps from preparation to final installation, and weβll also explain how to avoid common mistakes. If youβre a beginner, we recommend that you first learn the basics of working with ADB and Fastboot.
What is it? TGZ-firmware and when it is needed
TGZ-A firmware is an archive with a system image packaged in.tgz (or.tar.gz) format. OTA-With updates that are installed on top of the existing system, Fastboot firmware rewrites all partitions of the device, including boot, recovery and system. This makes it indispensable in several cases:
- π Downgraid version MIUI β If the new firmware is unstable, and the rollback is OTA blocked.
- π οΈ Recovery after a crash β when the device does not boot or hovers on the Mi logo.
- π Installation of global firmware on the Chinese model (for example, from Mi 11 to Mi 11 Global).
- π Unlock additional features β some firmware modifications (e.g. Xiaomi.EU) add features not available in official builds.
It is important to understand that the firmware via Fastboot erases all data on the device, including photos, messages and installed applications.
β οΈ Note: Fastboot firmware requires an unlocked bootloader.If you haven't done this procedure before, the device will refuse to accept commands. Unlocking bootloader on Xiaomi is officially supported, but takes up to 7 days (due to checking your Mi Account).
Preparation for firmware: what will be needed
Before you start the firmware, gather everything you need. Here's the full list:
- π± Xiaomi smartphone with a battery charge of at least 60% (better than 100%).
- π» Computer running Windows 10/11, macOS or Linux (for macOS or Linux) Mac/Linux Additional drivers will be required).
Pay special attention to the choice of firmware. The official Fastboot firmware for Xiaomi can be downloaded on the sites:
- Official MIUI portal (select the Fastboot version for your model).
- Xiaomi Firmware Updater (alternative source with firmware archive).
β οΈ Warning: Never use firmware from unknown sources! Fake.tgz files may contain malware or be collected with errors, which will cause the device to fail.
Unlocking the bootloader: a mandatory step
Without an unlocked bootloader, it is impossible to flash the device through Fastboot. Xiaomi blocks the bootloader on all devices by default, and unlocking it requires binding the Mi Account and waiting for confirmation (usually 3-7 days).
The unlocking process:
- Link your Mi Account to your device in the settings (Settings β Mi Account).
- Include OEM Unlock in the developer menu (Settings β About phone β Tap MIUI version 7 times β Developer options β OEM Unlocking).
- Download the Mi Unlock Tool and run it on PC.
- Connect your phone in Fastboot mode (press Power + Vol Down when the device is off).
- If you receive a message about the need to wait, wait for SMS or push notification from Xiaomi.
Once you successfully unlock, you'll see Unlocked at the bottom of the Fastboot screen, and you can start with the firmware.
What if the Mi Unlock Tool canβt see the device?
Step-by-step: Firmware via Mi Flash Tool
When the bootloader is unlocked and the firmware is downloaded, you can start installing it. We will use the Mi Flash Tool, the official tool from Xiaomi for firmware through Fastboot.
Loader unlocked|The right firmware downloaded TGZ|Drivers installed ADB/Fastboot|Battery charge > 60%|Data backup made.
-->
Step 1 Installation of the Mi Flash Tool
- Download the Mi Flash Tool (Windows version).
- Unpack the archive and launch XiaoMiFlash.exe on behalf of the administrator.
- Install drivers if the program offers to do so.
Step 2: Preparation of firmware
- Unpack the downloaded.tgz archive in a folder (for example, C:\miui_ROM).
- Inside should appear folder with firmware files (for example, images with extensions.img).
Step 3: Firmware of the device
- Turn off your smartphone and turn it into Fastboot mode (press Power + Vol Down).
- Connect the device to the PC.
- In the Mi Flash Tool, click Select and specify the path to the unpacked firmware.
- At the bottom of the window, select firmware mode: Clean all β complete cleaning (recommended for changing the version of MIUI), Clean all and lock β cleaning + lock the bootloader (use if you want to return the official status), Save user data β data retention (not always working correctly!).
Flash
5-15 minutes
Once the firmware is successful, the device will automatically restart. The first run can take up to 10 minutes - don't interrupt the process!
1. Reconnect. USB-cable.
2. to run the program on behalf of the administrator.
3. Install drivers manually through Device Manager (select Android Bootloader Interface).
-->
Common mistakes and their solutions
Even with the correct following of the instructions, errors can occur, and we have collected the most common problems and ways to fix them:
| Mistake. | Reason. | Decision |
|---|---|---|
| Invalid image format | A damaged or incomplete firmware archive. | Download the firmware again and check the checksum (MD5). |
| Device not found | The PC does not recognize the device in Fastboot mode. | Check the cable, the USB port, the drivers. Try another computer. |
| Flash not done (error: 0x80070002) | Incompatibility of the Mi Flash Tool and the firmware version | Update the Mi Flash Tool or use an older version. |
| The device hung on the Mi logo | Incorrectly selected firmware mode or damaged boot.img. | Repeat the firmware with a full clean (Clean all). |
If the device does not turn on after firmware or gives a DM-Verity error, try:
- π Re-switch with Clean All and Lock.
- π₯ Install a different firmware version (for example, an older one).
- π οΈ Use it. EDL-Mode (requires an authorized Xiaomi account).
π‘
If the firmware is interrupted in the middle, DO NOT DISTRIBUTE the device! Wait 10-15 minutes, sometimes it continues in the background. If nothing happens after that time, reconnect the phone and start again.
Fastboot Firmware Manually (without Mi Flash Tool)
If the Mi Flash Tool doesnβt work or you prefer more control, you can manually flash the device through the Fastboot using commands in the terminal.This method requires knowledge of the basics of ADB/Fastboot, but allows you to manage the process flexibly.
Step 1: Preparation
- Unpack the firmware.tgz in the folder (for example, C:\fastboot_rom).
- Open the Command Prompt (CMD) or PowerShell in this folder.
- Connect the device in Fastboot mode.
Step 2. Check the connection
Enter the command:
fastboot devicesIf the device appears in the list, you can continue.
Step 3: Firmware by section
Use commands of the type:
fastboot flash boot boot.img
fastboot flash system system.img
fastboot flash vendor vendor.img
fastboot flash dtbo dtbo.imgFor convenience, you can use the script. flash_all.bat (If it's in the firmware archive).
Step 4: Cleaning and restarting
After the firmware, do:
fastboot erase userdata
fastboot erase cache
fastboot rebootβ οΈ Note: With manual firmware, it is easy to skip critical partitions (e.g. modem or bluetooth). Always check the file list in the firmware and the documentation for your model!
Firmware custom ROM (Xiaomi.EU, LineageOS)
If the official firmware doesnβt suit you, you can install custom, for example, Xiaomi.EU (an optimized version of MIUI without Chinese restrictions) or LineageOS (pure Android), the process is similar to firmware through Fastboot, but has nuances:
- π Requires an unlocked bootloader (as well as for official firmware).
- π You need to install custom recovery (for example, TWRP) for firmware via zip file.
- β οΈ The risk of loss of warranty β custom firmware is not officially supported.
Instructions for Xiaomi.EU:
- Download the firmware from the site Xiaomi.EU (choose the version for your model!).
- Unpack the archive and follow the instructions (usually you need to flash through TWRP or Fastboot).
- For TWRP: Install TWRP Recovery via Fastboot: fastboot flash recovery twrp.img Download to TWRP (Power + Vol Up) and run a.zip file.
After installing custom firmware, additional configuration may be required (for example, installing GApps for LineageOS).
What to do after the firmware
Successful firmware is only half the battle, so to keep the device running smoothly, follow a few steps:
- βοΈ System setting: Go through the initial setup MIUI (Choose a language, connect to Wi-Fi. Update all apps through Google Play.
- π Check for updates: Go to Settings β About phone β System update and install the latest security patches.
- π± Data recovery: If youβve backed up with Mi Cloud or Google Account, restore contacts, photos, and notes.
- π Security: Enable Find My Device and set a strong password.
If there are bugs after firmware (for example, the camera or mobile network does not work), try:
- π Refuse the device with full cleaning (Clean all).
- π₯ Install a different firmware version (e.g., older or newer).
- π οΈ Reset the settings to factory (Settings) β About phone β Factory reset).
π‘
Once you have been firmwareed through Fastboot, the bootloader remains unlocked. If you want to return to official status (for example, for warranty repairs), swipe the device with the Clean all and lock option in the Mi Flash Tool.