Removing firmware on Xiaomi devices is a procedure that may be necessary when switching to custom firmware, rolling back to the factory version or eliminating critical system errors. However, many users confuse this concept with a normal settings reset or software update. In fact, removing firmware involves completely cleaning the /system partition and rewriting it with a new version of the OS - whether it is an official MIUI or an alternative build like LineageOS.
In this article, we will discuss 5 working ways to remove firmware on Xiaomi, Redmi or POCO β from standard tools like Fastboot to manual formatting via TWRP. Special attention will be paid to the risks of βbrickβ (complete failure of the device) if you do not act correctly with the boot or modem partition, as well as legal methods of unlocking the bootloader, without which most operations are impossible. If your goal is simply to return the phone to a factory state, you may need to reset via Recovery (the instructions are in one of the sections below).
1.When to remove firmware on Xiaomi: 3 good reasons
Before you start manipulating the system, make sure that they are really necessary. Firmware removal is not a panacea, and in most cases, the problem can be solved with less radical methods.
- π Reverse to the old version MIUI. The new firmware is unstable, drains the battery quickly, or contains critical bugs (e.g., a com.android.phone error on the Redmi Note 10 Pro after upgrading to a newer version of the new device). MIUI 14).
- π οΈ Install custom firmware. To switch to Pixel Experience, ArrowOS or other AOSP builds, you need to completely clear the partition /system.
- π¨ Recovery after failure: The device loads into an infinite bootloop, produces a dm-verity corruption error, or does not respond to the power button at all.
It is important to distinguish firmware removal from other procedures:
| Procedure | What's he doing? | Does the unblocking of the loader require? |
|---|---|---|
| Resetting (Factory Reset) | Deletes user data but leaves the system intact | β No. |
| Update via OTA | Replaces system files with a new version, saving data | β No. |
| Remove the firmware through Fastboot | Completely erases /system partition and rewrites it | β Yes. |
| Formatting through TWRP | Cleans /system, /data, /cache for custom firmware installation | β Yes. |
β οΈ Attention: If your goal is to simply free up space in memory, removing the firmware won't help. /system It's protected from change, and cleaning it without flashing it again will make the device inoperable. β Memory. β Cleanup.
Preparation of the device: unlocking the loader
Most firmware removal methods on Xiaomi require an unlocked bootloader. Without this, you wonβt be able to flash the device through Fastboot or install TWRP. The exception is a reset via standard Recovery, but it doesnβt delete the firmware itself, only user data.
The official way to unlock is through the Mi Unlock Tool, which takes up to 720 hours (30 days) of waiting due to Xiaomiβs anti-theft policy.
- Link your Mi Account to your device in Settings β Xiaomi Account.
- Enable USB debugging and OEM unlocking in Settings β About Phone β MIUI version (click 7 times, then return to Additional β For Developers).
- Download Mi Unlock Tool, log in to your account and connect your phone in Fastboot mode (clip Volume Down + Power).
- Start the unlock process. If you see a message called Couldn't unlock. Wait 168/720 hours, wait for the time specified.
Once the bootloader is unlocked, a warning will appear on the screen when turned on: This device is unlocked. This is normal and does not affect the operation of the device.
π‘
If you bought the device with your hands, make sure that the previous owner untie your Mi Account in Settings β Xiaomi Account. Otherwise, after the reset, the phone will require you to enter its data (Mi Cloud Lock protection).
Method 1: Remove the firmware via Fastboot (official method)
The most reliable way to completely remove the firmware and install a new one is to use Fastboot and official images from Xiaomi, a method that is suitable for rolling back to the old version of MIUI or recovering from a crash.
You'll need:
- π₯οΈ Computer with Windows/Linux and installed drivers ADB/Fastboot.
- π Cable USB (preferably original).
- π¦ Official firmware in.tgz format for your model (you can download it on the official website).
- π Unlocked loader.
Step-by-step:
- Unpack the archive with the firmware in the folder with fastboot.
- Turn off the phone and press Volume Down + Power to log into the Fastboot.
- Connect the device to your PC and execute a command to check the connection: fastboot devices Must appear serial number of the device.
- Run the firmware script: flash_all.bat (for Windows or./flash_all.sh (for Linux/Mac).
- Wait for the finish (10-15 minutes) and the device will restart automatically.
β οΈ Note: If you are using Redmi Note 9 Pro (joyeuse) or POCO X3 NFC (surya, use flash_all_except_storage.bat, Not to lose data in the section /data. For complete cleaning, only suitable flash_all.bat.
βοΈ What to check before running through Fastboot
Method 2: Formatting via TWRP (for custom firmware)
If you plan to install custom firmware (like LineageOS or Pixel Experience), a standard Fastboot wonβt be enough. Youβll need TWRP, a custom recovery that allows you to format partitions and install unofficial images.
Warning: misuse of TWRP can lead to a "brick" (total device failure).For example, formatting the modem partition on Xiaomi Mi 11 (venus) results in a loss of IMEI.
Instructions:
- Install. TWRP For your model, Fastboot: Fastboot Flash Recovery twrp-3.7.0_9-0-joyeuse.img (Replace joyeuse with your deviceβs codename).
- Boot into TWRP: Turn off the phone, then press Volume Up + Power.
- Go to Wipe. β Advanced Wipe and mark: π Dalvik / ART Cache ποΈ System π§Ή Data π Cache
Don't touch it.
Modem
EFS
Persist
Swipe for formatting.
Install
What if TWRP doesnβt see internal memory?
5. Method 3: Recoil through the Mi Flash Tool (for "bricks")
If the device doesnβt turn on (hung on the Mi logo or flashes a red indicator), the Mi Flash Tool, the official firmware utility for emergency cases, will help.
Algorithm of action:
- Download the full firmware image (select the Fastboot version, not Recovery).
- Unpack the archive in a folder without Cyrillic characters.
- Start the Mi Flash Tool, connect the device to the PC (clip Volume Down + Power for 10 seconds).
- In the utility, click Select, specify the path to the folder with the firmware.
- Select Clean All (Full Cleaning) or Clean All and Lock (Cleaning + Lock bootloader).
- Press Flash and wait until it is completed (up to 20 minutes).
π‘
Clean all and lock mode will lock the bootloader back. Use it only if you plan to stay on the official firmware. Choose Clear all for custom builds.
6. Method 4: Recovery reset (without removing firmware)
If your goal is to simply return the phone to factory settings without removing the firmware itself, resetting through standard Recovery is enough.This method does not require unlocking the bootloader and is suitable for eliminating software glitches.
How to do this:
- Turn off the device.
- Press Volume Up + Power before the Mi Recovery logo appears.
- Choose a language (if you have a choice).
- Go to Wipe Data β Wipe All Data.
- Confirm the action and wait for the completion.
This method does not remove the firmware, but only:
- π§Ή Clears user data (photos, apps, settings).
- π Resets network and account settings.
- π± Leaves. MIUI intact.
β οΈ Note: On some models (Xiaomi Mi) A2, Mi A3) Recovery reset may result in a device being locked if Factory Reset Protection was previously enabled (FRP). To avoid this, untie your Google account in the settings before resetting.
7. Risks and how to avoid the "brick" of the device
Firmware removal is a high-risk procedure to turn your phone into a brick. Here are the 3 most common bugs and how to avoid them:
- For example, trying to install MIUI 14 for Redmi Note 10 (mojito) on Redmi Note 10 Pro (sweet) will result in a bootloop. Solution: always check the model's codename in Settings β About Phone β MIUI version (for example, surya for POCO X3 NFC).
- Critical partition formatting: Removing modem, persist, or efs disrupts network, camera, and sensors. Solution: In TWRP, format only system, data, and cache.
- Interrupt. If the firmware on the Fastboot is interrupted by 50 percent, the device may stop turning on. Solution: Use a laptop with a charged battery or UPS.
Symptoms of "brick" and methods of recovery:
| Symptoms. | Probable cause | Decision |
|---|---|---|
| The device vibrates when turned on, but the screen is black. | The boot or dtbo section is damaged | Swipe through Fastboot with flash boot and flash dtbo tick |
| Hanging on the Mi logo (bootloop) | MIUI version conflict or corrupted files in /system | Clean all in the Mi Flash Tool |
| No network (IMEI missing) | The modem or nvram partition is damaged | Restore via TWRP (EFS backup) or flash the original firmware |