Xiaomi smartphone owners often face the need to return the stock core after experimenting with custom firmware, root rights or modified cores. the reasons can vary from bugs in the system to the inability to update. MIUI through OTA. However, the process of restoring the original kernel requires strict adherence to instructions β an error at any stage can lead to a device βbrickβ or data loss.
In this article, we will analyze all the current ways to return the stock core to Xiaomi, Redmi and other companies. POCO, including architecture devices A/B (for example, Xiaomi 12T or Redmi Note 11 Pro+). We will pay special attention to the nuances of unlocking the bootloader, choosing the right version of the firmware and solving typical errors such as Invalid image format or Anti-rollback protection.
Before you start, make sure you have a backup of the data β kernel recovery often requires a hard reset. Also check the battery (at least 60%) and prepare the cable. USB Type-C with data support (not all charging cables are suitable!).
1. Why do we need to return the stock core?
Modified cores (such as KernelSU, Perseus or FrancoKernel) offer additional features such as processor overclocking, improved battery management, or support for new features, but they also have critical disadvantages:
- π« Lockdown OTA-update: MIUI refuses to install official updates if it detects changes in the boot section.
- π SafetyNet problems: banking applications (Sberbank, Tinkoff) and games (PokΓ©mon GO) stop working due to trigger on the modified core.
- π Unstable work: Accidental reboots, overheating or getting stuck are frequent satellites of custom cores, especially on new Snapdragon chipsets 8 Gen 2/3.
- π Anti-Rollback Protection: on some models (for example, Xiaomi 13 Ultra) an attempt to roll back on the old firmware with a custom core leads to an irreversible brik.
Another good reason is warranty repairs: Xiaomi service centers check the integrity of the boot partition and can refuse free repairs if they find traces of modifications, and even if you delete the root rights, the original kernel often remains changed.
β οΈ Note: On Dynamic Partition devices (all Android 12 models)+) kernel recovery via fastboot can result in data loss in the userdata and vendor partitions.Always do backup through TWRP Mi Flash Tool before the procedure.
2.Preparation: Unlocking the bootloader and tools
Without an unlocked bootloader, you canβt flash the stock core. Xiaomi officially lets you unlock the bootloader, but the process involves waiting (usually 72β168 hours) and binding your Mi Account.
What you need:
- π± Smartphone Xiaomi/Redmi/POCO chargeable β₯60%.
- π» Computer on Windows 10/11 (for Mi Unlock Tool or Linux/macOS (fastboot).
- π The original cable. USB Type-C (Important for a stable connection).
- π Mi Account linked to the device (required to have a confirmed phone number!).
- π Tools: Mi Unlock Tool, Platform Tools (ADB/Fastboot).
Step-by-step unlocking:
- Enable Developer Options: Go to Settings β About Phone β MIUI version and tap 7 times.
- Activate USB Debugging and OEM Unlock in Settings β Additional β For Developers.
- Connect your phone to your PC, launch the Mi Unlock Tool and log in to your Mi Account.
- Follow the instructions. At the stage of testing the device, the phone will reboot to Fastboot.
- Wait for a successful unlock (usually 3-7 days wait).
What if the Mi Unlock Tool gives you a "Couldn't unlock" error?
Once the bootloader is unlocked, the device will be reset to factory settings. All data will be deleted, so copy important files to your PC or cloud beforehand.
3. Download stock firmware: where to get and which version to choose?
To restore the stock core, you need official firmware from Xiaomi, corresponding to your model and region. MIUI lead to a brik!
Where to download:
- π Official website MIUI β Choose the Fastboot section ROM (not recover ROM!).
- π Xiaomi Firmware Updater β an alternative source with firmware archives.
- π XDA Developers β for rare models or beta versions (use with caution!).
How to choose the correct version:
- Check the exact phone model in Settings β The phone. β Model (e.g, 2201116TI For the Redmi Note 11 Pro+ 5G).
- Find out the current version MIUI In Settings β The phone. β Version. MIUI (for example, V14.0.4.0.TKCCNXM).
- Download the same or newer firmware version. A rollback to the old version can cause an Anti-rollback error!
- For devices with A/B-partitions (e.g. Xiaomi) 12/13 series) select firmware marked AB.
| Model | Code name | Type of firmware | Download link |
|---|---|---|---|
| Redmi Note 11 Pro+ 5G | veux | Fastboot (A/B) | Download |
| Xiaomi 13 Pro | nuwa | Fastboot (A/B) | Download |
| POCO F4 GT | ingres | Fastboot (A-only) | Download |
| Xiaomi Pad 6 | pippa | Fastboot (A/B) | Download |
β οΈ Note: If your device supports Dynamic Partition (all Android 12 models)+), Download firmware in.tgz or.tar format. firmware in.zip format is not suitable for such devices!
Download the official Fastboot firmware for your model|Unpack the archive in a folder without Cyrillic characters|Install drivers ADB/Fastboot PC-only|Disable Antivirus and Firewall|Connect the phone to the back. USB-port (2.0)-->
4. Methods of firmware of the stock core
There are three main methods of restoring the stock core on Xiaomi:
- Fastboot (recommended for most models)
- Through TWRP (if a custom Recovery is installed).
- Through the Mi Flash Tool (for full flashing of the device).
Let us examine each method in detail.
Firmware via Fastboot (universal method)
This method works on all models, including devices with A/B-It'll take a computer and a cable. USB.
Instructions:
- Unpack the downloaded firmware in the folder (for example, C:\miui_fastboot).
- Open the command line (Win) + R β cmd) and go to the firmware folder: cd C:\miui_fastboot
- Connect your phone in Fastboot mode (clip Volume Down + Power when the phone is off).
- Check the connection: fastboot devices must display the serial number of the device.
- Start the kernel firmware (for A-only devices): fastboot flash boot boot.img fastboot flash dtbo dtbo.img For A/B Use the device: fastboot flash boot_a boot.img fastboot flash boot_b boot.img fastboot flash dtbo_a dtbo.img fastboot flash dtbo_b dtbo.img
- Reboot the device: fastboot reboot
If after firmware the phone is stuck on the logo MI, perform a reset via fastboot:
fastboot erase userdata
fastboot reboot4.2. Firmware through TWRP (power-user)
If you have installed it on your device TWRP, You can flash a stock kernel without a computer, but this method is not recommended for devices with Dynamic Partition, because there is a high risk of damage to the partition super.
Instructions:
- Download the official firmware in.zip format (not Fastboot!).
- Rename the file to update.zip and transfer it to a memory card or internal memory.
- Boot to TWRP (click Volume Up + Power).
- Choose Install. β update.zip and snip without ticking the Reboot after installation.
- After the firmware, run the Wipe β Format Data (this will delete all data!).
- Reset the device.
β οΈ Note: On some models (e.g. Xiaomi) 12S Ultra) firmware through TWRP may result in loss IMEI. Always backup the modem partition before starting!
Full firmware via Mi Flash Tool
This method is guaranteed to restore the stock kernel and all partitions, but requires a complete reset of the device, suitable for devices that do not load or have damaged partitions.
Instructions:
- Download and install the Mi Flash Tool.
- Unpack Fastboot firmware in a folder without spaces and Cyrillic.
- Launch the Mi Flash Tool, press Select and specify the path to the firmware folder.
- Connect your phone in Fastboot mode.
- Select Clean All (full reset) or Clean All and Lock (reset + lock bootloader).
- Press Flash and wait until it is completed (usually 5-10 minutes).
Once the firmware is in place, the device will automatically restart. The first run can take up to 15 minutes - don't interrupt the process!
π‘
If the phone doesn't turn on after firmware, try booting into Fastboot and repeating the process. If that doesn't work, it may not be right for your model or version. MIUI.
5. Solving typical errors in kernel recovery
Even if you follow the instructions accurately, you can get errors, and let's look at the most common ones and how to fix them.
| Mistake. | Reason. | Decision |
|---|---|---|
| Invalid sparse file format at header magic | The file is damaged. boot.img or dtbo.img. | Download the firmware again and check the checksum (MD5). |
| Anti-rollback protection | Trying to roll back to an older version of MIUI. | Sweeve a newer version of the firmware or use the bypass tool (risk of a breeze!). |
| Device is locked | The bootloader is not unlocked. | Repeat the unlocking procedure through the Mi Unlock Tool. |
| Fastboot command not allowed in locked state | Trying to flash the kernel on a locked bootloader. | Unlock the bootloader or use the Mi Flash Tool with the Clean all and lock option. |
| The phone vibrates and turns off after the firmware | Incompatibility of the kernel with the version MIUI or damaged the vendor section. | Sweep through the full firmware through the Mi Flash Tool in Clean All mode. |
If your error is not listed in the table, try:
- π Find a solution on Xiaomi EU forum 4PDA.
- π Check the firmware logs through the command: fastboot getvar all
- π§ Try flashing the kernel from another computer (sometimes the driver problem).
adb shell su -c "resetprop ro.boot.verifiedbootstate green"This will temporarily trick the system, but after the restart, the effect will disappear.-->
6. Testing the result: how to make sure that the kernel is stock?
After the firmware is installed, you need to check that the kernel is indeed restored.
6.1. via the Fastboot menu
Connect your phone to your PC and execute the command:
fastboot getvar current-slotThen check the kernel hash:
fastboot getvar boot-sha256Compare the received hash with the original from the file boot.img (You can check it through an online service).
6.2. Through the annex "CPU Info"
Install from Google Play app CPU Info and check it out:
- The Kernel Version field should contain the official version from Xiaomi (e.g., the official version of the box, 4.19.157-perf+).
- No mention of KernelSU, Magisk or other modifications.
6.3 Through ADB
Connect your phone to your PC and do:
adb shell getprop ro.boot.kernelversionor
adb shell cat /proc/versionThe conclusion should not include mention of custom kernels.
If all the tests were successful, congratulations -- your device is now running on a drain core!
- π± Install OTA-Update through Settings β Updating the system.
- π³ Use banking applications without SafetyNet errors.
- π Return the device to the service center without the risk of denial of warranty.
7. Frequent questions and myths about kernel recovery
There are many myths surrounding the process of restoring the stock core at Xiaomi, and we'll look at some of the most popular questions.
Can I return the stock core without unlocking the bootloader?
Myth 1: βFirmware through the Mi Flash Tool always blocks the bootloaderβ
In fact, the lock only happens if you select the Clean all and lock option. In Clean all mode, the bootloader remains unlocked.
Myth 2: βYou can flash the kernel from another model if the chipset is the same.β
This is extremely dangerous, even on devices with the same processor (for example, the Snapdragon 870 in the computer). POCO F3 redmi K40) The kernels may differ due to different device tree configurations and drivers.
Myth 3: βSafetyNet will automatically go away once the kernel is restored.β
It's not always the case. Sometimes you need to do some extra tuning, like:
- Magisk Tracks Removal via Fastboot: Fastboot Erase avb_custom_key fastboot flash vbmeta vbmeta.img
- DM-Verity: Fastboot Reset --disable-verity --disable-verification flash vbmeta vbmeta.img