Skip to content
This repository has been archived by the owner on Apr 25, 2019. It is now read-only.

Building Nethunter

binkybear edited this page Feb 27, 2016 · 5 revisions

Building NetHunter

Those of you who want to build a NetHunter image from our GitHub repository may do so using our Python build scripts.

root@kali:~# git clone https://github.com/offensive-security/kali-nethunter
root@kali:~# cd kali-nethunter/nethunter-installer

The main build script is located in the nethunter-installer directory and can be used to build images for multiple devices and Android OS versions as shown below:

root@kali:~/kali-nethunter/nethunter-installer# python build.py -h
usage: build.py [-h] [--device DEVICE] [--kitkat] [--lollipop] [--marshmallow]
                [--forcedown] [--uninstaller] [--kernel] [--nokernel]
                [--generic ARCH] [--rootfs SIZE] [--release VERSION]

Kali NetHunter recovery flashable zip builder

optional arguments:
  -h, --help            show this help message and exit
  --device DEVICE, -d DEVICE
                        Allowed device names: manta flounder flocm flo
                        groupercm grouper angler shamu bullhead hammerheadmon
                        hammerheadcm hammerhead makocm mako oneplusx
                        oneplus2cm oneplus2 oneplus1 hlteeur hltecan hltespr
                        hltekor hltedcm hltekdi hlteeur-touchwiz hltecan-
                        touchwiz hltespr-touchwiz hltekor-touchwiz hltedcm-
                        touchwiz hltekdi-touchwiz klte kltedv kltekdi kltespr
  --kitkat, -kk         Android 4.4.4
  --lollipop, -l        Android 5
  --marshmallow, -m     Android 6
  --forcedown, -f       Force redownloading
  --uninstaller, -u     Create an uninstaller
  --kernel, -k          Build kernel installer only
  --nokernel, -nk       Build without the kernel installer
  --generic ARCH, -g ARCH
                        Build a generic installer (modify ramdisk only)
  --rootfs SIZE, -fs SIZE
                        Build with Kali chroot rootfs (full or minimal)
  --release VERSION, -r VERSION
                        Specify NetHunter release version
root@kali:~/kali-nethunter/nethunter-installer#

To build a Lollipop image for a OnePlus One device, we would run build.py as follows:

root@kali:~/kali-nethunter/nethunter-installer# python build.py -d oneplus1 --lollipop

The resulting zip file image will be created in the nethunter-installer directory – this is the zip file you will need to flash on your device later on.