Removing firmware from Xiaomi phone is a procedure that may be needed in a variety of situations: from the desire to return the factory MIUI After experimenting with custom builds before selling the device in a "pure" state, many users confuse this concept with the usual resetting or flashing. In fact, the complete removal of firmware involves cleaning all partitions of the device memory, including system, vendor and boot, followed by the installation of a new version of the software.
In this article, we will analyze all possible scenarios: how to remove custom firmware (for example, LineageOS or Pixel Experience), return the official version of the software. MIUI After a failed upgrade, or just clean the phone before selling, we will pay special attention to unlocking the bootloader - without this step, most firmware operations on Xiaomi are simply impossible, ADB), How to avoid mistakes that will turn your smartphone into a brick".
1.Preparation: What to Know Before Removing Firmware
Before you start manipulating firmware, it is important to understand a few key points:
- π Unlocking the bootloader is a must-do for most operations. On new Xiaomi models (like the Redmi Note 12 or Xiaomi 13), this process can take up to 720 hours of waiting due to the companyβs security policy.
- π± Backup β without it, you will lose all data, even if you plan to return the official firmware, some user files (for example, from a folder) DCIM) may not recover.
- π The battery charge must be at least 60%. interruption of the process due to discharge can lead to a hard brick (complete failure of the device).
- π» Windows PCs β most tools (Mi Flash Tool, XiaomiTool) officially support only this OS. On macOS or Linux, you will have to use alternative methods.
Also note that removing firmware resets all security settings, including:
- π Related Mi Accounts (re-authorization required).
- π± Google Services Framework (you may need to reconfigure Google Services).
- π Passwords and fingerprints (they will have to be reconfigured).
β οΈ Note: On devices with a Qualcomm Snapdragon chip (e.g. Poco) F5 or Redmi K60) Incorrect removal of the firmware can lead to loss IMEI. It will be very difficult to restore it later - specialized equipment will be required.
If you delete the firmware for selling your phone, keep in mind: the new owner will be able to unlock the bootloader only through his Mi Account. The binding to your profile will remain in the system, but after reset it can be deleted through Settings. β Mi Account β Remove the device.
2 Unlock the bootloader: without it anywhere
The bootloader on all Xiaomi smartphones is locked by default, a security measure that prevents unauthorized firmware changes, and to remove the current firmware and install a new one, you first need to unlock it.
The process consists of several stages:
- Linking your Mi Account to your device is impossible without it, so make sure your phone has an account you have access to.
- Request to unlock through the official Mi Unlock Tool app. On new devices, you will have to wait from 7 to 30 days after sending a request (depending on the model).
- Directly unlock through Fastboot mode.
Detailed instructions:
- Download the official Mi Unlock Tool from Xiaomi website.
- Install the drivers. ADB Fastboot (can be accessed via Minimal) ADB and Fastboot).
- On your phone, turn on Settings β About Phone β MIUI version (click 7 times to activate Developer Mode).
- Back to Settings β Additionally. β For developers and include: π§ Debugging by USB π Unlocking OEM (It may be called a factory unlock)
Mi Unlock Tool
β οΈ Note: On some models (e.g. Xiaomi) 12T Or the Redmi Note 11 Pro.+) When you unlock the bootloader, you automatically trigger an anti-rollback, which means you can't install the firmware older than the one you originally had. MIUI In Settings β The phone.
If the Mi Unlock Tool is running a "Couldn't unlock" or "Device not supported" error, try:
- π Restart your phone and PC.
- π Use the original cable USB Type-C (cheap cables may not provide stable connection).
- π₯οΈ Launch the tool on behalf of the administrator.
- π Wait for the specified time (if the system requires waiting).
Install the Mi Unlock Tool|Enable the developer mode|Activate debugging by USB|Allow unlocking OEM|Linking your Mi Account to your device-->
3. Ways to remove firmware: which one to choose?
There are several methods to remove firmware from Xiaomi, and the choice depends on your goal:
| Method | When to use | Pluses | Cons |
|---|---|---|---|
| Reset via Recovery | Delete user data without changing firmware | β Quick, no PC required.β Keeps the official MIUI | β Does not remove custom firmwareβ Does not clean the system partition |
| Fastboot + Mi Flash Tool | Complete removal and installation of official MIUI | β Clears all sections.β Suitable for "brick" devices | β Requires an unlocked bootloaderβ Risk of loss IMEI |
| Castom Recovery (TWRP) | Remove before installing another custom firmware | β Flexibility (you can selectively clean the sections)β Supports backups. | β Hard for beginners.β Not all models support all models. TWRP |
| EDL-mode (emergency mode) | Recovery after major disruptions | β It even works on bricks"β Does not require unlocking the loader | β Requires an Authorized Account EDLβ Risk of damaging the device |
For most users, the best option is the Mi Flash Tool - it allows you to completely erase the current firmware and install the official one. MIUI If you want to just return the phone to factory settings without changing the firmware, you just need to reset it through Recovery.
Letβs look at each method in more detail.
4. Method 1: Completely remove firmware through the Mi Flash Tool
This method is suitable if you want to completely erase the current firmware (both official and custom) and install clean. MIUI. It will:
- π» Windows PC.
- π Cable USB Type-C (preferably original).
- π± Unlocked loader.
- π¦ Official firmware in.tgz or.zip format for your model.
Step-by-step:
- Download the official firmware for your model. Pay attention to the region (Global, China, EEA) β It must match the current firmware, otherwise there may be problems with the modem.
- Unpack the archive into a folder without Cyrillic characters (e.g., C:\MIUI\).
- Install the Mi Flash Tool.
- Turn off the phone and press the volume down. + Power to enter Fastboot mode.
- Connect your phone to your PC and launch the Mi Flash Tool. Press Refresh, the device needs to be determined.
- In the Select field, specify the path to the unpacked firmware.
- At the bottom, select Clean All (Full Cleaning) or Clean All and Lock (Cleaning + Lock bootloader).
- Press Flash and wait until it is completed (usually takes a lot of time). 5-10 minute).
β οΈ Warning: If you choose Clean all and lock, the bootloader will lock and you will have to wait again to unlock again (up to 720 hours on new models.
Once the firmware is successful, the phone will automatically restart, and it can take up to 15 minutes to turn on the first one, which is normal. MI For more than 20 minutes, try it:
- π Remove and re-insert the battery (if it is removable).
- π Repeat the firmware with the choice of Clean All mode.
- π± Check if the firmware is right for your model (sometimes Redmi Note 11 is confused with Redmi Note 11 Pro).
π‘
If the Mi Flash Tool gives you a βflash not doneβ error, try running the program in Windows 7 compatibility mode or disabling the antivirus. Also check that there are no spaces or Cyrillic characters on the way to the firmware.
5. Method 2: Removal through Custom Recovery (TWRP)
If you have custom recovery installed on your device (TWRP), You can selectively clean partitions before you install a new firmware:
- π Transition from one custom firmware to another.
- π§Ή Removing residues of old firmware before clean installation.
- π§ Fixing Errors After Failed Update.
Instructions:
- Download the required firmware (for example, LineageOS or MIUI in.zip format and place it on internal memory or SD-map.
- Turn off your phone and press Volume Up + Power to enter TWRP.
- In the main menu, select Wipe β Advanced Wipe.
- Check the following sections with ticks: π Dalvik / ART Cache π System π Data π Cache π Vendor (if any)
Swipe to Wipe
Install
Confirm the installation and wait for completion.
If you remove the firmware for installation MIUI, After cleaning the partitions, you may need to reboot to Fastboot and use the Mi Flash Tool (as in the previous method). TWRP It is not always correct to flash official images due to the features of Xiaomi protection.
What if TWRP doesnβt see internal memory?
Method 3: Recovery Reset (without PC)
If you donβt have to remove the firmware completely, but just return the phone to factory settings (for example, before selling), you can use standard Recovery. This method does not remove the firmware itself, but only resets user data and settings.
Instructions:
- Turn off the phone.
- Hold the Loud up. + Food and hold until the logo appears MI.
- From the Recovery menu, select the language (usually English and Chinese)
- Go to Wipe Data β Wipe All Data.
- Confirm the action (it may be necessary to enter a password if it was set).
- After reset, select Reboot β Reboot to System.
This method is suitable for:
- π§Ή Cleaning the phone before selling.
- π Eliminating software glitches (for example, constant reboots).
- π Deletion of personal data without changing the firmware.
β οΈ Note: On some models (e.g. Xiaomi) 11T POCO X4 Pro) Resetting via Recovery may result in the bootloader being locked if it has been previously unlocked, in which case the phone will not turn on after the reset and will require re-unlocking via the Mi Unlock Tool.
If, after resetting, the phone asks you to enter the old password from your Mi Account, even though you deleted it, it means that the device is linked to the account via Mi Cloud, to unlink:
- Sign in to the Mi Account website.
- Go to the Devices. β Find your phone. β Delete.
- Wait 24 hours - the binding will be removed.
7.Recovery after failed firmware removal
If something goes wrong during the process of removing the firmware and the phone stops turning on (called a brick), don't panic. In most cases, the device can be restored.
| Symptoms. | Possible cause | Decision |
|---|---|---|
| The phone vibrates, but the screen is black. | Incorrect firmware or interrupted process | Repeat the firmware via Fastboot or EDL |
| Hanging on the MI logo | Partition conflict or damaged boot | Just pass it. boot.img via Fastboot |
| The Invalid Sparse File Error in Mi Flash | Damaged firmware archive | Download the firmware again, check the checksum MD5 |
| Phone is not defined in Fastboot | Problems with drivers or cable | Install Qualcomm HS-USB QDLoader 9008 (for EDL) drivers |
| Loss of IMEI after firmware | The modem or nvram partition is damaged | Restore IMEI via Engineer Mode or Maui META |
If the phone does not respond to buttons and is not detected by the PC, there is a last chance β EDL-The Emergency Download Mode (ED) is the mode for this:
- Download the firmware for EDL (usually in.mbn format).
- Install the Qualcomm driver HS-USB QDLoader 9008 (can be found on the website) 4PDA or XDA).
- Connect the phone off to the PC by clamping Volume up + Volume down (on some models you need to close the testpoints on the board).
- The device manager should have a device. QHUSB_BULK qualcomm HS-USB QDLoader 9008.
- Use the Mi Flash Tool or QFil to Firmware in EDL-mode.
β οΈ Attention: Firmware through EDL on new Xiaomi models (for example, Xiaomi 13 or Redmi Note 12 Pro)+) requires authorization through an official account EDL. Without it, tools like Mi Flash will make a mistake "SLA Auth Error, in which case you will have to contact the service center.
If you are not sure of your abilities, it is better to consult specialists. The cost of restoring a brick in service centers is usually 1,500-3,000 rubles, which is cheaper than buying a new phone.
π‘
If the phone doesn't turn on after a bad firmware, the first thing you do is check if it's detected in Fastboot. If it does, repeat the firmware. If it doesn't, try it. EDL-regime.
8. Frequent mistakes and how to avoid them
Even experienced users sometimes make firmware mistakes, and here are the most common ones and ways to prevent them:
- π Model firmware mismatch β for example, trying to flash Redmi Note 10 Pro with firmware from Redmi Note 10. Always check the exact model name in Settings β The phone. β Model.
- π‘ Ignoring the firmware region - China installation ROM Global Device Could Lead to Problems with Google Services and Modem.
- π Low battery firmware β if the phone turns off during the process, there is a high risk of hard brick.
- π Use of unoriginal cable β cheap cables can interrupt data transmission, leading to errors.
- π Forget to unlock the bootloader - without this, most operations with firmware are impossible.
Another common mistake is skipping the step of cleaning partitions before installing a new firmware, such as if you install LineageOS on top of it. MIUI Without system and data formatting, the system may not work stable or at all. Always run Wipe before installation!
If the phone is running slowly or overheating after firmware, it may be due to:
- π Wrong firmware version (for example, firmware for Snapdragon on a device with MediaTek).
- π§Ή Remains of old firmware (incomplete cleaning of partitions).
- π Failure of the core (try to stitch another one) boot.img).
In such cases, a re-firmware with full cleaning or a return to the official will help. MIUI via Mi Flash Tool.