
Builds flashable installer ZIPs that deploy a mobile penetration-testing environment on Android, including kernel boot patching, rootfs integration, and TWRP/Magisk flashing support.
This Kali NetHunter installer is basically just a zip file generated by build.py from the folder layout contained here.
Follow the instructions below to create the Kali NetHunter installer zip.
All you have to do is flash it through Recovery/TWRP (or Magisk) for a complete Kali NetHunter environment and chroot on your device.
The boot image patching script is based on AnyKernel3.
For more information, please see the documentation page.
Before building anything, you will need to initialize the kernels repository.
The whole setup has been automated. As Kali NetHunter kernels have an immense binary Git history, we suggest using shallow clone (--depth 1), rather than full history when prompt:
$ ./bootstrap.sh
This will clone Kali NetHunter Kernels into ./kernels/
Example building for the Nexus 5 (hammerhead):
$ ./build.py --kernel hammerhead --marshmallow
# OR
$ ./build.py -k hammerhead -6
Building the kernel installer (useful for testing if kernel works):
$ ./build.py --kernel hammerhead --marshmallow --installer
Building without the kernel installer (useful for just updating apps):
$ ./build.py --kernel hammerhead --marshmallow --no-installer
Building with adding a full rootfs/chroot (use either pre-created (default) or generate own then add to ./rootfs/kalifs-full-[arch].tar.xz):
$ ./build.py --kernel hammerhead --marshmallow --rootfs full
Create a release version:
$ ./build.py --kernel hammerhead --marshmallow --rootfs full --release 2024.3
$ ./build.py --kernel hammerhead --marshmallow --rootfs minimal --release daily
Force downloading all external resources:
$ ./build.py --kernel hammerhead --marshmallow --force-download
Otherwise, able to "cache" without building anything:
$ ./build.py --force-download
Building the uninstaller:
$ ./build.py --kernel hammerhead --marshmallow --uninstaller
Show help:
$ ./build.py -h
[i] Reading: kernels/devices.yml
usage: build.py [-h] [--generic ARCH] [--kernel KERNEL] [--kitkat] [--lollipop] [--marshmallow] [--nougat] [--oreo] [--pie] [--ten] [--eleven] [--twelve] [--thirteen] [--fourteen] [--fifteen] [--wearos]
[--rootfs SIZE] [--force-download] [--uninstaller] [--installer] [--no-installer] [--no-branding] [--no-freespace-check] [--supersu] [--release VERSION]
Kali NetHunter Installer (Recovery flashable ZIP script builder)
options:
-h, --help show this help message and exit
--generic ARCH, -g ARCH
Build a generic installer (modify ramdisk only)
--kernel KERNEL, -k KERNEL
Allowed kernel IDs: a37-los a5ulte-cm a5ulte-tw a5xelte-tw a7xelte-los ailsa-ii alioth-los-ksu angler angler-los armani beryllium beryllium-los blueline bramble bullhead cancro-cm
cedric-los crosshatch davinci-miui dogo-cm dragon drg-los es2 eva-emui eva-los flo flo-cm flounder gemini4g-p1 gemini4g-p2 gemini4g-p3 gracelte graceltekor grouper gts4llte gts4lwifi
h830 h850 h918 h990 h990-los hammerhead hammerhead-los hammerhead-caf-los hero2lte-tw hero2lte-los hero2lte-oui hero2lte-kor-tw herolte-tw herolte-los herolte-oui herolte-kor-tw
hlte-can-cm hlte-can-tw hlte-dcm-tw hlte-eur-cm hlte-eur-tw hlte-eur-los hlte-kdi-tw hlte-kor-cm hlte-kor-tw hlte-spr-cm hlte-spr-tw hlte-vzw-tw honami-los htc-pmewl ido-los j53g-los
j5lte-los j5nlte-los j7y17lte-oui jalebi-los jfltexx-cm jiayus3a kiwi-cm klte-los klte-tw klte-chn-los klte-chnduo-los klte-duos-los klte-duos-tw klte-kdi-los klte-kdi-tw klte-kor-
los klte-skt-tw klte-spr-los klte-spr-tw klte-usc-tw klte-vzw-tw kminilte-los laurel-sprout-los lv517-los mako mako-cm manning manta markw-los mocha-cm on7xlte-oui onem7gpe onem8gpe
oneplus-nord-oos oneplus1-cm oneplus1-los oneplus2-oos oneplus2-cm oneplus2-los oneplus3-3t-oos oneplus3-3t-los oneplus3-oos oneplus3-v2-oos oneplus3-los oneplus3t-los oneplus3t-oos
oneplus5-oos oneplus5-cm oneplus5-los oneplus5-pa oneplus5-los-ksu oneplus5-pa-ksu oneplus6-oos oneplus6-los oneplus7-oos oneplus7-v2-oos oneplus8-oos oneplusx-cm osprey-los payton-
los pdx201-los pl2-los potter-los pyxis-los r8q-oui rmx1911-cos rmx1971 rmx2185-los rmx3031 s2-cm sakura-los santoni-miui mido-pe11 shamu shamu-los shieldtablet spacewar star2lte-los
sunfish surya-los suzuran-los ticwatchpro ticwatchpro3 us996 vayu victara-cm vienna yuga-cm z00e-los zeroflte-los zeroflte-tw zerolte-los zerolte-tw
--kitkat, -4 Android 4.4
--lollipop, -5 Android 5
--marshmallow, -6 Android 6
--nougat, -7 Android 7
--oreo, -8 Android 8
--pie, -9 Android 9
--ten, -10 Android 10
--eleven, -11 Android 11
--twelve, -12 Android 12
--thirteen, -13 Android 13
--fourteen, -14 Android 14
--fifteen, -15 Android 15
--wearos, -w Wear OS
--rootfs SIZE, -fs SIZE
Build with Kali rootfs (full, minimal or nano)
--force-download, -f Force re-downloading external resources
--uninstaller, -u Create an uninstaller
--installer, -i Build only the kernel installer (boot-patcher)
--no-installer Build without the kernel installer (boot-patcher)
--no-branding Build without wallpaper or boot animation
--no-freespace-check Build without free space check
--supersu, -su Build with SuperSU installer included
--release VERSION, -r VERSION
Specify NetHunter release version
For more examples, please see the documentation page.
See the README.md located in the Kali NetHunter Kernels repository: https://gitlab.com/kalilinux/nethunter/build-scripts/kali-nethunter-kernels
A starting point would be to review:
./kernels/devices.yml (here)