Building Kali NetHunter for a specific device (optional)
Many smartphone manufacturers, such as OnePlus, Samsung, Google, and LG, produce a variety of phones every year. You may be wondering, Do I need to purchase another Android-based smartphone to host the Kali NetHunter platform? The answer is simple: you do not. One of the benefits provided to us is the ability to build a custom version of NetHunter for our Android device. In step 3, you'll be able to choose the type of device and the version of Android your smartphone is currently running; this is to ensure the output file is compatible with your Android phone.
If you would like to build your own Kali NetHunter image from the official GitHub repository, use the following steps:
- Download the repository using the git clone https://github.com/offensive-security/kali-nethunter command:
- Ensure you change the directory to the new folder using the cd kali-nethunter/nethunter-installer command. Next, run the ./bootstrap.sh command on the Terminal. There will be an interactive prompt that asks some questions before it attempts to download any of the device's folders on your system:
- Use the python build.py –h command to view the options available for building a custom Kali NetHunter image for your device:
To build an image, we can use the python build.py -d <device> --<android version> syntax.
If you want to build Kali NetHunter for a Nexus 7 (2013) device running Android Kitkat, you can use the python build.py –d flo –kitkat command.
- When the build is complete, the output will be a .zip file that is stored in the nethunter-installer directory. Simply copy the .zip file into the root folder of your Android device as it will be required to move into Kali NetHunter.