🇮🇩 Bahasa Indonesia · 🇬🇧 English · ← README
Important
Do section 1 before flashing any kernel. Without your stock boot.img, recovery is much harder.
- The phone is stuck on the logo, keeps restarting, or drops into fastboot by itself.
- The first boot after flashing a kernel is usually no slower than a normal boot. If you haven't reached the lock screen after about 5 minutes, treat it as a bootloop.
Recovery and the logs you need are different, so find the cause first.
| Symptom | Most likely cause | What to do |
|---|---|---|
| Restarts or hangs on the first logo (brand logo / unlocked text); the boot animation never shows | Kernel | Section 2: flash your stock boot.img |
| Bootloop right after flashing a new kernel, no module installed | Kernel | Section 2 |
| The boot animation shows, then loops or hangs for a long time | Usually a module | Try safe mode below first |
| Bootloop right after installing or updating a module | Module | Safe mode below |
Safe mode test (KernelSU; KernelSU Next and BakaSU are based on it):
- Force a restart: hold Power until the phone turns off and on again.
- As soon as the first logo shows, press Volume Down more than 3 times: press-release, press-release, press-release, not hold. Be quick: the window closes before the boot animation starts. If you miss it, start again from step 1.
- Safe mode disables all modules:
- On HyperOS/MIUI the system safe mode can also be started from the stock recovery (Volume Up + Power, if the menu has it); KernelSU then disables modules too.
Safe mode does not stop a module's own init.rc scripts. If such a module is the cause, use the manual steps in the official KernelSU guide or flash your stock boot.img (section 2).
AnyKernel3 writes the kernel to the boot partition of the active slot. To recover you need the boot.img from exactly the same ROM version.
Option A: copy it from the phone (rooted)
- Kernel Flasher: select the active slot, then Backup.
- Or with ADB:
adb shell
su
dd if=/dev/block/by-name/boot$(getprop ro.boot.slot_suffix) of=/sdcard/boot-stock.img
exit
exit
adb pull /sdcard/boot-stock.imgOption B: take it from the official ROM
- Download the official ROM with exactly the same version (see Settings → About phone).
- Fastboot ROM: take
images/boot.img. - Recovery/OTA ROM (contains
payload.bin): extractboot.imgwith payload-dumper-go.
Keep the boot.img on your PC. Also install Android SDK Platform-Tools (adb and fastboot), plus a USB driver on Windows.
If you patched init_boot before (Magisk or KernelSU LKM mode), keep the stock init_boot.img as well.
- Enter fastboot mode. The key combination depends on the phone; for Xiaomi see section 3.
- Connect to the PC and check with
fastboot devices. - Flash the stock
boot.imgback to the active slot:
fastboot getvar current-slot
fastboot flash boot boot-stock.img
fastboot rebootfastboot flash boot writes to the active slot automatically. Your data is not wiped.
- If you also changed
init_boot, also runfastboot flash init_boot init_boot-stock.img.
A kernel bootloop does not need fastboot -w, fastboot erase or a factory reset.
| Codename | rothko |
| SoC | MediaTek Dimensity 9300+ (MT6989) |
| Partitions | A/B (slots _a / _b) |
| Stock kernel | GKI android14-6.1 (e.g. 6.1.138-android14-11) |
| ROM | HyperOS (e.g. OS3.0.301.0.WNNIDXM) |
Flash boot or init_boot? Flash boot only. This phone launched with Android 14, so the kernel lives in the boot partition; init_boot only holds the ramdisk, and the Cogan ZIP never changes it. Flash the stock init_boot.img too only if you patched init_boot yourself (Magisk or KernelSU LKM mode).
Enter fastboot: hold Volume Down + Power until FASTBOOT appears. During a bootloop, keep holding both keys until the fastboot screen shows.
Steps:
- Make sure the
boot.imgcomes from exactly the same HyperOS version that is installed. - Run the commands in section 2.
- The phone boots with the stock kernel and your data stays intact.
Never:
- Run
flash_all_lockfrom a fastboot ROM. It locks the bootloader; with modified partitions the phone can hard brick. - Flash a ROM older than the installed version. Xiaomi uses anti-rollback, and a downgrade can hard brick the phone.
- Use SP Flash Tool or MediaTek BROM mode. It usually needs an authorized Xiaomi account and can wipe the modem/IMEI calibration.
- Flash
boot.imgto any other partition (init_boot,vendor_boot, and so on).
The stock Xiaomi recovery (Volume Up + Power) cannot flash boot.img, so use fastboot.
Still bootlooping after flashing the stock boot.img?
- Flash the official fastboot ROM of the same version with
flash_all_except_storage(keeps your data). - If that still fails, take the phone to an official Xiaomi service center.
Collect logs right after the phone is back up, before it restarts again. Every CMD (Platform Tools) command is also summarized in README → Using CMD.
The panic message of the failed boot is kept in memory for a while (pstore). It is overwritten after the next restart and lost if the phone fully powers off.
- Once the phone boots with your stock
boot.img(no root), take a bug report via Developer options → Bug report → Full report, or runadb bugreportfrom a PC. The bug report includes the pstore contents. - Want to look yourself? Open the main
.txtfile inside the bug report ZIP and search for theLAST KMSGsection or the keywordsKernel panic,Unable to handle kernelandCall trace. - If the phone is rooted again, you can copy pstore directly:
adb shell "su -c 'cat /sys/fs/pstore/console-ramoops*'" > ramoops.txt- Enter safe mode (how). Root still works; only modules are off.
- In the manager open Settings → Send logs or Save log (the menu name may differ slightly in KernelSU Next and BakaSU). The ZIP contains
dmesg,logcat, pstore and the KernelSU logs (/data/adb/ksu/log). - If USB debugging was already on and the PC was already authorized, you can record the log live while the boot animation loops:
adb logcat -b all > logcat-bootloop.txtPress Ctrl+C after about a minute. Look for FATAL EXCEPTION, system_server or the path /data/adb/modules/<module-name>.
4. Finding the culprit: enable modules one at a time in the manager and reboot each time. The last module enabled before the bootloop is the cause.
Open an Issue and attach:
- the bug report file (
.zip) and/or the manager's log ZIP, - the name of the kernel ZIP you flashed (variant and release or run number),
- the list of installed modules (if a module is the cause),
- the phone model and ROM version.
A bug report like this is what found the cause of the KernelSU Next + SUSFS bootloop while it was still a test build (record).
- Pick the same or a newer sublevel than your stock kernel.
Compatvariants (built through All variants (advanced)) are built without LTO for phones that do not boot the standard variants.- Variants marked (uji) are test builds only. Always keep your stock
boot.imgbefore trying one.