OnePlus 6 NetHunter Kernel using Termux Debian Aircrack-ng

Kali Linux Digtvbg Devops Debian Android Termux

OnePlus 6 with NetHunter Kernel using Termux with Atilo to install Debian and run Aircrack-ng

Owning OnePlus 6 for 2 full years was a pleasant experience more or less. I’m about to swap that phone for Poco F2 and I felt it would a shame if I don’t try what many noobs do – running an external wifi adapter with the phone and try using aircrack-ng on it. Here is what I did to make things work.

Flashed the latest OxygenOS on OP6 – 10.3.4, magisk & some magisk modules like busybox and others. Tried to figure out how to get a kernel that would work for me. NetHunter kernel works just fine.

These steps should get anyone aware of linux up to speed in no time:

1. Visit nethunter installer link:

https://gitlab.com/kalilinux/nethunter/build-scripts/kali-nethunter-project/-/tree/master/nethunter-installer

and of course git clone this repository.

2. Pay special attention to this snippet in the readme:

Building the kernel only (useful for testing if kernel works):

python build.py -d hammerhead –marshmallow -k

3. Visit devices link (to get proper params for the step above): https://gitlab.com/kalilinux/nethunter/build-scripts/kali-nethunter-devices

4. Feel free to open the “devices.cfg” file (https://gitlab.com/kalilinux/nethunter/build-scripts/kali-nethunter-devices/-/blob/master/devices.cfg) and control+f the device you’re after – op6 in my case. Its section looks like this:

############################################################

#############################################################

## ——————————————————- ##

##* – oneplus6:

##*     model  : OnePlus 6 / 6T

##*     note   : “”

##*     images :

##*       – name   : OnePlus 6 / 6T (Ten)

##*         id     : oneplus6-oos

##*         os     : ten

##*         status : Stable

##*         note   : >-

##*                  Important: Install Disable_Dm-Verity_ForceEncrypt

##*                  Important: Update NetHunter app after flashing

# OnePlus6 OxygenOS

[oneplus6-oos]

author = “johanlike” “kimocoder”

version = “1.3”

arch = arm64

flasher = anykernel

modules = 1

block = /dev/block/bootdevice/by-name/boot

slot_device = 1

#* Note: when using “anykernel” flasher, use commas to separate device names

devicenames = oneplus6,op6,oneplus6t,op6t,enchilada,fajita

#* If the installer cannot identify the resolution automatically, specify it here

resolution = 1080×2340

extract the info we need:

-d oneplus6-oos

–ten

5. Revisit step 2 and issue this command in the directory of nethunter installer:

python build.py -d oneplus-oos –ten -k

Do not select experimental branch since op6 is in master, enjoy the ride till it’s ready. If everything goes smoothly you will find the archive of the kernel conveniently packed for flashing in twrp or kernel manager app (smartpack or fkm to name a few). In case you’d like to skip building it here I upload the artefact from last evening build – (Pre-built kernel)

6. Reboot in twrp and flash the kernel.

7. Reboot to system,

8. Plug your favourite suppored by linux wifi adapter in the usb port of the phone (usb to usb type c connector might prove hand just now)

9. Enable OTG in the system settings of the phone.

10. Gain terminal access via A) termux or B) adb shell and check if the external wifi is detected properly: ip a |grep wlan or using your favourite method.

11. Once you confirm you’re using a NetHunter kernel and it works so marvelously with your wifi adapter then you can go ahead with… termux.

12. I find termux to be a somehow clean solution to the mess a linux installation could cause. As opposed to flashing some random stuff in recovery having no bulletproof method to revert it.

13. Improving termux (what looks good is a very subjective matter and often is left to the individual taste or the lack of it).

– install openssh: https://wiki.termux.com/wiki/Remote_Access

– make openssh run automatically on opening termux using termux-services: https://wiki.termux.com/wiki/Termux-services (sv-enable sshd , sv up sshd)

– passwd , whoami, ip a |grep 192.168 – just to get enough details for a proper ssh connection

– ssh to termux, install zsh (apt update && apt install zsh) , install oh_my_zsh: https://github.com/ohmyzsh/ohmyzsh , install powerlevel10k zsh theme: https://github.com/romkatv/powerlevel10k

14. Some usefulness for termux:

– install the 3 repos from the motd (x11, root and unstable) + maybe it’s pointless: https://github.com/its-pointless/gcc_termux

– know when NOT to use root with tsu – it’s highly recommended not to install packages with root 🙂

– atilo https://github.com/YadominJinta/atilo

– tool-x https://github.com/rajkumardusad/Tool-X

– restic backups https://wiki.termux.com/wiki/Backing_up_Termux

– kali linux in termux https://github.com/Hax4us/Nethunter-In-Termux

– let your imagination guide you for even more things.

A short video how the end result could potentially look like:

OnePlus 6 NetHunter Kernel using Termux Debian Aircrack-ng
Scroll to top