Setting up Nethunter despite infinite boot

Sun 31 July 2016

I have recently wiped and reinstalled a Kali Nethunter instance running on my Nexus 5 phone. It gave me a bit of trouble, so I thought I'd document the work-around in case it helps anyone out there :)


The process

  1. Downloaded Nethunter for Nexus 5 Marshmallow. Did this straight from my phone.

  2. Grabbed the latest CM nightly from my phone.

  3. Booted up in recovery mode, wiped / factory reset the phone.

  4. Installed the latest nightly.

  5. Rebooted in normal mode, and verified that the phone was functional under CM.

  6. Rebooted in recovery mode, and installed Kali Nethunter.

    At this point, rebooting the phone didn't work for me. It got stuck in the typical infinite loop of starting, running app optimization, then rebooting. Bummer.

  7. Rebooted in recovery mode, and re-installed CM nightly.

  8. Rebooted the phone in normal mode. Noted that CM booted up correctly, yet it still had Nethunter & co. installed. However, when I tried to start up nethunter, it couldn't find busybox. OK, I can work with this.

  9. Downloaded the latest, ARM 7.1 version of busybox ( Here's where things get fun: you can download the binary easily, but then you have to put it in /system, which is read-only.

    You start by jumping into a shell (Terminal Emulator, JuiceSSH... whatever suits) and becoming root. Then, you remount the /system partition in read-write mode: mount -o rw,remount /system. Then, move busybox to /system/xbin/.

    Finally, a bit of permissions cleanup: chmod +x busybox; chmod o+r busybox; chmod g-w busybox; chgrp shell busybox

  10. I also noticed that symlinks were missing, which was messing with running some of the nethunter features. This led me here:

    Fixing the symlinks helped, but still doesn't seem to fix everything. However, it gets me most of the way there: by running bootkali_bash, I can run nmap, msfconsole, python... And that's really all I need.

Final notes

This fixed most of the issues I was having running nethunter on marshmallow. If I've missed something, or if you have suggestions on how to improve this process, don't hesitate to get in touch with me on Twitter. Link's below :)