Removing firmware from a Xiaomi device is a procedure that requires not only technical skills but also understanding the consequences. Unlike a conventional factory reset, removing the firmware completely involves cleaning the system partition, which can lead to a device failure if you do something wrong, most often when you switch to custom firmware (such as LineageOS or Pixel Experience), removing viruses embedded in system files, or returning to the original MIUI after unsuccessful experiments.
It's important to understand that the term "firmware removal" is often misused. It's actually about flashing -- replacing the current version of Android with another (stock or custom) -- completely erasing the firmware without installing it again will make the smartphone a "brick" -- a device that won't be turned on or defined by the computer, so in this article we'll look at safe ways to replace the firmware, not permanently delete it.
Before you start, answer three questions:
- Why do you need it? (Castom firmware, removal of bloatware, recovery after failure?)
- Is there a backup of the data?
- Are you ready for a possible loss of warranty?
If at least one of them is answered βnoβ β it is better to stop and study alternative methods (for example, disabling system applications without removing firmware).
Preparation of the device: unlocking the loader
The first and mandatory step is to unlock the bootloader, without which no firmware will install, and attempts to bypass the lock will lead to errors like Anti-Rollback or Invalid Image, which Xiaomi officially supports, but has nuances:
- π Link your Mi Account to your device in Settings β Xiaomi account β Mi Cloud.
- π± Enable Developer Options (7 times tap on the Version) MIUI In Settings β The phone).
- π Activate Unlocking. OEM and debugging. USB developer-menu.
- π₯οΈ Install Mi Unlock Tool on PC (Windows only!).
The unlocking process takes between 72 and 720 hours (depending on Xiaomiβs model and policy), and once you send a request through the Mi Unlock Tool, the device will be tied to your account, and then you can start running the firmware. Without the unlocked bootloader, any firmware manipulation will lead to a device blink.
β οΈ Note: Some models (e.g. Redmi Note 10 Pro) POCO F3) When you unlock it, you reset the encryption, and if you don't backup, the files will be lost!
Is the Mi Account linked to the device?|Is debugging on-line USB?|Drivers installed ADB/Fastboot?|Is the data backup done?|Is the device charged at least to 60%?-->
2. Firmware removal methods: what really happens
As mentioned, firmware removal is a conventional term, and three approaches are used in practice:
| Method | What's going on? | Risks. | When to apply |
|---|---|---|---|
| Fastboot firmware | Complete rewriting of system partitions (system, boot, vendor) | Low (with the right actions) | Return to stock MIUI, installation of global firmware |
| Castom Recovery (TWRP) | Deletion of sections through TWRP post-installation ZIP-firmware | Medium (risk of data damage) | Install custom firmware (LineageOS, Pixel Experience) |
| EDL-regime | Low-level firmware via Qualcomm HS-USB QDLoader 9008 | High (risk of blinking when mistaken) | Recovery after a "soft" breech or antirollback |
The safest way for beginners is fastboot firmware, which requires no in-depth knowledge and is suitable for returning to the original MIUI. The method with TWRP is more flexible but risky: improper partition formatting can lead to loss of IMEI or problems with the NFC module.
EDL-Mode is the last chance to save a device if it doesnβt turn on or gets stuck on the Mi logo. However, it requires an authorized Xiaomi account (or workarounds that are often blocked by security updates).
What is Anti-Rollback and why is it dangerous?
3. Step-by-step instruction: remove firmware through Fastboot
This method is suitable for most Xiaomi models (except for devices on MediaTek with a locked bootloader).
- π₯οΈ Computer with Windows/Linux and established ADB/Fastboot.
- π Official firmware in.tgz format (download from the official website).
- π Cable USB (preferably original).
Step 1. Unpack the firmware in the fastboot folder. The path must not contain Cyrillic.
Step 2. Transfer the device to Fastboot-mode:
adb reboot bootloaderOr manually: press the Power. + Volβ off-phone.
Step 3. Run the firmware script:
fastboot -w update name file firmware.tgzThe -w flag will clear user data (the equivalent of Wipe Data in TWRP).
It takes 5-15 minutes. The device will automatically restart when it's finished. If you have an Invalid sparse file format at header error, download the firmware again (the file may be corrupted).
π‘
If the device is stuck on the Mi logo after you have firmware, try going to the Recovery (Power + Vol+) and making Wipe Data, which often solves the problem without re-routing the firmware.
4. Firmware removal via TWRP: risks and nuances
TWRP (Team Win Recovery Project) is a custom recovery that allows you to format partitions and install informal firmware, but improper use can lead to:
- π¨ Poose. IMEI (if you format modem).
- π Cyclical reboot (bootloop).
- π΅ Unworkable. Wi-Fi/Bluetooth (If you damage a vendor).
How to minimize the risks:
- Install. TWRP specifically for your model (for example, twrp-3.7.0_9-0-lmi.img for Redmi K30 Pro).
- Do not format modem, efs, persist sections.
- Use only verified firmware (for example, from the XDA-Developers forum).
Example of cleaning commands before installing custom firmware:
fastboot boot twrp.img
TWRP:
adb shell
mke2fs -t ext4 /dev/block/bootdevice/by-name/system
Install ZIP- firmware via Install β Select ZIPβ οΈ Note: On dynamic partition devices (e.g. Xiaomi 12), standard formatting commands do not work. Use fastboot erase system and fastboot erase userdata instead of manual formatting.
5.Recovery after failed firmware removal
If the device stops turning on or gets stuck on the boot, don't panic. 80 percent of the time, it can be restored.
- Check the charging response. If the indicator is on, it's a software problem.
- Try Fastboot (Power + Volβ). If you can, repeat the firmware.
- Use it. EDL-To do this, turn off the device. Close the test points (for each model, look for a circuit on the device). 4PDA). Connect to a PC β should be defined as Qualcomm HS-USB QDLoader 9008.
For firmware in EDL, you will need the Mi Flash Tool and an authorized Xiaomi account (or a patched version of the program). Without authorization, you can only flash to EDL devices until 2019.
If nothing helps, contact the service center. In most cases, even the soft brik is repaired by soldering an eMMC chip (cost ~ 3-5 thousand rubles).
π‘
90% of the βbricksβ after a failed firmware fixable through EDL-The key is not to try to flash the device again without diagnosing the cause of the failure.
6.Alternatives to removing firmware: when it is not necessary
Before you risk a device, assess whether you really need to remove the firmware. Often, goals can be achieved in safer ways:
- π§Ή Removing Bloatware: Use ADB to disable system applications without root rights: adb shell pm uninstall -k --user 0 com.miui.analytics
- π Reset to factory settings: Settings β Additionally. β Recovery and discharge.
- π‘οΈ Virus Removal: Programs like Malwarebytes or Dr.Web can handle most threats.
- π± Installation of the second firmware: On some devices (for example, POCO F1) supported by MultiROM.
If the goal is to improve productivity, try:
- Disable animation in Developer Options.
- Use Greenify to hibernate background applications.
- Install Magisk to fine-tune the system without completely flashing.
7. Frequent mistakes and how to avoid them
Even experienced users make firmware mistakes, and here are the most common ones:
| Mistake. | Reason. | Decision |
|---|---|---|
| Anti-Rollback Error | Reverse to the old version of MIUI | Switch only a new or the same version of the firmware |
| Invalid Image | A damaged firmware file or an incompatible model | Download the firmware again, check the model |
| Brick after data formatting | Incorrect encryption or damage to the partition label | Sweep to EDL or restore via OrangeFox Recovery |
| Loss of IMEI | Formatting modem or efs | Restore the nvram backup or flash in EDL |
To minimize the risks:
- π Always check. MD5 scallop.
- π Do not flash a charge below 50%.
- π Check out the reviews on the forums (4PDA, XDA).