guide-install(7) whyred-nethunter-kernel Guides guide-install(7)

guide-install(7)

guide-install - from a working whyred to Kali NetHunter, in one sitting

DESCRIPTION

This guide takes a Xiaomi Redmi Note 5 Pro (whyred) from a stock or custom-rom state to a running Kali NetHunter platform with the whyred-nethunter-kernel. Budget about one hour the first time, plus whatever the Xiaomi unlock timer decides. Every step is reversible except the bootloader unlock, which wipes the device and permanently flips the warranty flag, so read once before touching anything.

The kernel is packaged as an AnyKernel3 zip: it patches the boot image in place and installs the extra modules systemlessly through a small Magisk helper. It does not replace the ROM. LineageOS 18.1 stays LineageOS 18.1, just with HID gadget, functionfs, loadable signed modules and WireGuard support underneath.

WHAT YOU NEED

STEPS

  1. Back up. Copy photos, downloads and the two-factor codes somewhere else. The bootloader unlock wipes the device completely. If you are already on a custom recovery, a TWRP backup of boot, system and data saves the day later.
  2. Unlock the bootloader. Enable Developer options, enable OEM unlocking, then use the official Mi Unlock tool from Xiaomi on a Windows PC. The tool may impose a waiting timer, from hours to weeks depending on the account. There is no supported shortcut; everything that claims one bricks whyreds.
  3. Install LineageOS 18.1. The kernel is built against the LOS sdm660 18.1 base, so put that on first. Follow the official LineageOS wiki page for whyred: it is maintained, it covers recovery and the current firmware requirements, and repeating it here would go stale. Boot the ROM once and confirm the phone works before going further.
  4. Flash the kernel zip. Boot to recovery (adb reboot recovery or power plus volume keys), choose Install, pick the AnyKernel3 zip you verified with the sha256 file, and let it finish. The install log on screen should mention the boot image patch and the ak3-helper module.
  5. Reboot back to recovery and reflash Magisk. AnyKernel3 rewrites the boot image, which can evict a previously patched Magisk boot. The safe order is: kernel zip, reboot to recovery, flash Magisk again, reboot to system. Skip the Magisk reflash and root will look broken, even though the kernel is fine.
  6. Install the NetHunter app and the Kali chroot. Grab the official installer from the kali.org NetHunter download page, install the app, then fetch the Kali chroot from inside it. Full chroot first, it is what makes the pentest tools real instead of decorative.

VERIFY

$ adb shell uname -a
Linux localhost 4.4.302-Nethunter-whyred #1 SMP ... aarch64

The -Nethunter-whyred suffix is the fingerprint of the right kernel. In the NetHunter app, the home screen should stop complaining about a generic kernel. If you own a WiFi adapter, plug it into OTG and check that 88XXau loads; guide-wifi(7) covers that part end to end.

ROLLBACK

Two clean ways back. Fastest: restore the TWRP backup of boot taken in step 1 and reboot. The ROM and data stay exactly as they were. Alternative: reflash the LineageOS 18.1 zip from recovery, which rebuilds a stock 18.1 boot image; data survive but Magisk needs a reflash if you want to keep it. In both cases the extra modules disappear with the kernel, since the Magisk helper removes them on kernel mismatch.

BUGS

SEE ALSO