Prerequisites: Make sure you have USB debugging enabled on your device. Make sure you have approved the USB debugging RSA fingerprint for your computer before you continue.
This script allows you to easily deploy Kali Linux Nethunter to the 2013 Nexus 7 (LMY48G) with ease. It can be modified for other devices too.
This script uses the Offensive Security scripts and automates the process:
This builds a marshmallow image with a full chroot (Change flo to a different version if required):
python build.py -d flo --marshmallow --rootfs full --release Kali_Keith_Edition_v1.9
Android stock image is pulled down from Google:
TWRP is downloaded:
SuperSU is then downloaded:
The unlock script is then ran against the device and it sleeps for a minute as you may need to touch the screen to confirm this if not already unlocked.
/bin/bash ./oemUnlock.sh && sleep 1m
Stock image is flashed (Change 32gb to the required version):
/bin/bash ./stockNexusFlash.sh 32gb
Stock flashing can take some time to complete, once it's finished, update any additional updates that may need to be installed and configure developer options with USB debugging enabled to continue to the next step. Once done click enter.
Flash with your custom Kali NetHunter image, install TWRP and SuperSU: