Introduction: Why to sew the kernel and when it really needs to
Firmware of the custom core through TWRP On Xiaomi devices, a procedure that can radically change the behavior of a smartphone, from increasing battery life to overclocking the processor for games. However, this is not a universal solution for all problems β CPU, GPU, Xiaomiβs stock cores are often optimized for the balance of performance and stability, but enthusiasts prefer alternative versions for fine-tuning.
When you think about firmware? If you notice overheating under loads, are unhappy with battery life, or want to unlock hidden CPU capabilities (e.g., overclocking support for Snapdragon 8 Gen 2), a custom core can help. It's not a magic pill. Incorrect file selection or installation error can turn a smartphone into a brick. Especially careful should be the owners of models with MediaTek (for example, Redmi Note 12 Pro).+), where the kernel firmware process has more nuances than Qualcomm.
In this article, we will look at the entire process, from prep to post-setup, with a focus on common errors and their solutions, and you will also learn which cores are better suited for specific tasks: saving charge, gaming performance or photography.
1. Device preparation: from unlocking the bootloader to backup
Before you start firmware, you have to do some critical steps, and the first is unlock the bootloader. TWRP On Xiaomi devices, this is done through the official Mi Unlock Tool, but note: the company has introduced a restriction on unlocking for new models (for example, Xiaomi 14 or Xiaomi). POCO F6). Some devices will have to wait up to 720 hours after linking your Mi Account to your phone.
The second is installation. TWRP Recovery.There are pitfalls here: there is a different version of the recovery for each Xiaomi model, and a mismatch can lead to hard brick.Only download files from trusted sources, such as the official TWRP.me website or thematic forums. XDA Developers.After installing the Recovery, be sure to check its performance by booting into it through the Power combination. + Volume Up.
β οΈ Note: On devices with Dynamic Partition (e.g. Redmi) K50 Pro or Xiaomi 13T) firmware TWRP It might not work. It would require a patched image. boot.img or special scripts to circumvent restrictions.
Stage three is backup. Use it. TWRP to create a full copy of the section /boot and /vendor. This will save you if something goes wrong, and we also recommend copying important data to your PC or cloud: kernel firmware can reset or damage user files.
- π Unlock the bootloader via the Mi Unlock Tool (link the Mi Account to the device).
- π± Install. TWRP Recovery for your model (check compatibility!).
- πΎ Create a backup section /boot and user data.
- π Charge your phone at least 70% β firmware can take up to 30 minutes.
2.Ceral selection: comparison of popular options for different tasks
Not all custom kernels are equally useful, and you can divide them into three categories:
- Performance: optimized for maximum speed CPU/GPU, But they can increase the heat and the battery consumption.
- Energy efficiency: reduce energy consumption by limiting clock speeds, popular for low-battery devices, such as Perseus.
- Universal: Balance between speed and autonomy. Often include additional features like WireGuard support or improved thermal throttle management.
For gaming smartphones (such as Black Shark 5 Pro or Black Shark) POCO F5) The best choice will be kernels with support GPU Owners of flagship Xiaomi 13 Ultra or Mix Fold 3 should pay attention to cores with improved camera support (for example, StormBreaker), as they fix bugs with shooting in the format RAW.
| The core | Supported models | Features | Complexity of installation |
|---|---|---|---|
| Kirisakura | Snapdragon 888/8 Gen 1/2 (Xiaomi 12/13, POCO F4) | Dispersal GPU, Improved cooling, support KCAL screen-tuning | Medium |
| Perseus | MediaTek Dimensity 9000/1200 (Redmi K50, POCO X5 Pro) | Energy saving, corrections for 5G-modem, reduced heating | Tall. |
| FrancoKernel | Snapdragon 778G/780G (Redmi Note 11 Pro+, POCO X4 Pro) | Optimization for games, support F2FS, customizable productivity profiles | Low. |
| StormBreaker | Snapdragon 8+ Gen 1 (Xiaomi 12S Ultra, Mix Fold 2) | Improved camera performance, fixes for MIUI Camera, support for Dolby Vision | Tall. |
Before downloading the kernel, check its compatibility with your version. MIUI (Some kernels require a specific version of Android (for example, only Android 13). Also pay attention to user reviews: if in the latest comments on the Android version, you can see the following: XDA or 4PDA have complaints about bootloop (load looping), it is better to wait for the update.
π‘
Before you run the kernel, check its hash sum (SHA-256) It's using HashMyFiles to keep corrupted files from being installed.
3. Step-by-step instruction: firmware of the kernel through TWRP
Now, let's get to the process. Make sure you have something on hand.
- π± Smartphone with unlocked loader and installed TWRP.
- πΎ kernel file in.zip format (do not unpack it!).
- π USB-TypeC Cable for PC Connection (in case of errors).
Step 1. Reset the device to TWRP Recovery. Turn off the phone, then press the Power. + Volume Up before the logo appears TWRP.
Step. 2. In the main recaveri menu, select Install and specify the path to the kernel file. If the kernel requires additional manipulation (for example, firmware). dtbo.img), These actions will be described in the instructions to it.
Step 3: Before you confirm the installation, make sure to uncheck the Zip file signature verification box (if any). TWRP They may refuse to install them.
Step. 4. After completing the firmware, run the Wipe β Advanced Wipe and select Dalvik/ART Cache and Cache. This will prevent conflicts with previous settings.
Step 5: Reboot the device. It can take up to 10 minutes to start the first one, which is normal because the system reassembles the cache.
Backup section made. /boot|
The kernel file is downloaded from the official source|
Battery charge > 50%|
Signature verification disabled in TWRP (if necessary)-->
β οΈ Note: If after the firmware core phone is stuck on the logo MIUI longer 15 Wait for the process to be completed or connect to the PC via a computer. ADB Interruption may cause damage to the partition /system.
4. Typical errors and their solutions
Even with the exact following of the instructions, there can be problems.
Error 1: Bootloop (Linking Download)
Reasons:
- π΄ Incompatibility of the kernel with the version MIUI hardware-platform.
- π΄ A damaged kernel file (incomplete download or incorrect) SHA-256).
- π΄ Conflict with installed Magisk modules.
Solution: load in TWRP, Restore the backup section /boot Or run the stock core from the official firmware.
Error 2: The phone is not turned on (hard brick)
This is the most serious consequence that requires reflashing through EDL-The regime:
- π΄ Firmware core designed for another model.
- π΄ Interrupting the installation process (e.g., battery discharge).
Solution: Connect the device to the PC, install Qualcomm drivers HS-USB QDLoader 9008 (for Snapdragon) and use the Mi Flash Tool to recover from fastboot.
Error 3: Sensor or camera problems after firmware
Some custom cores can break peripheral device drivers.
- π§ Sweep the file separately. vendor.img stock-stack.
- π§ Install a patch for the kernel (if provided by the developer).
If the error does not disappear, check the log. TWRP (Advanced β Copy Log and ask for help on the forum XDA, specifying the device model and the kernel version.
What if TWRP doesnβt see internal memory?
5. kernel setting after installation
Successful firmware is only half the battle, and to unlock the potential of the custom core, you'll need to do some extra tuning, and most cores support control through applications:
- π Kernel Adiutor β for fine tuning CPU/GPU, heat-dropping.
- ποΈ FrancoKernel Manager β optimized for FrancoKernel cores, allows you to create performance profiles.
- π Ex Kernel Manager β a universal tool with support KCAL screen-tuning.
Example of customization for game performance (based on Kirisakura):
- Open Kernel Adiutor and go to the CPU section.
- Activate the Performance profile and set the maximum frequency for all cores.
- In the section GPU turn on Simple GPU Algorithm and increase the frequency limit 10-15%.
- In Thermal, turn off temperature restrictions (but watch out for heat!).
To save charge, on the contrary, it is recommended:
- π Limit the maximum frequency CPU before 70-80% high-pitch.
- π Enable Power-saving governor (e.g. powersave or schedutil).
- π Shut down. CRC Wi-Fi and Bluetooth (this may slightly increase consumption, but reduces module heat).
β οΈ Note: Setup the kernel through Kernel Adiutor or similar applications requires root rights.If you didn't install Magisk, these tools will be useless. Also remember that excessive overclocking shortens the life of the processor and can lead to thermal throttling (automatic performance decline when overheating).
6.Compatible with Magisk and other modifications
Many users install custom cores with Magisk to obtain root rights, but there are nuances:
If you are running the kernel after installing Magisk, there may be a breach of integrity. boot.img, This will cause you to lose root access, so you can avoid it:
- Stitch the core through TWRP.
- Immediately after that (without restarting!) install Magisk again (file). Magisk.apk β Install β Install to Inactive Slot).
- Reset the device.
If you are using Magisk modules (for example, ViPER4Android Or LSPosed, they can conflict with the new kernel:
- π§ Disable all modules before kernel firmware.
- π§ After the reboot, turn them on one by one, checking for stability.
Special attention should be paid to modules that modify the system or vendor, as they most often cause bootloop. If after installing the kernel, the phone does not boot, try:
- Load in TWRP and delete the folder /data/adb/modules.
- Refuse the kernel without Magisk modules.
π‘
If you use custom firmware (like LineageOS or Pixel Experience), make sure the kernel is compatible with it. MIUI!
7. How to roll back to the drain core
If the custom core experiment didn't live up to expectations, you can always go back to the original.
Method 1: Through TWRP
- Download the official firmware for your model from the Xiaomi website (file.tgz).
- Remove the file from the archive boot.img (and dtbo.img, if there is).
- In TWRP, select Install β Install Image and specify the path to boot.img.
- Select the Boot section and confirm the firmware.
- Just like that. dtbo.img in the Dtbo section (if required).
- Clean it up. Dalvik/ART Cache and restart the device.
Method 2: Through Fastboot
If TWRP Inaccessible, can be sewn boot.img fastboot:
fastboot flash boot boot.img
fastboot flash dtbo dtbo.img
fastboot rebootAfter rolling back to the drain core, it is recommended:
- π Perform a reset settings (Wipe) β Factory Reset in TWRP), if there are failures.
- π Reinstall Magisk if it was installed earlier.