3.4 KiB
title | date | tags | author | |||
---|---|---|---|---|---|---|
Installing Kali Nethunter Lite on DivestOS 20 | 2022-07-18 |
|
Tommy |
Disclaimer: This will turn your device into a purely penetration testing device, and it will be very insecure for any other purposes. Please do not do this on your daily driver.
Originally, I just needed a device to run packet capture on my other devices. I have a OnePlus 7T laying around which I am not using for anything (since it has already reached its end-of-life), so I thought it would be cool to give it a new purpose. I am using DivestOS here since it is my go-to distribution, but you can use LineageOS or any other distribution if you want to.
Officially, Kali Nethunter only supports Android 10 and 11 with OxygenOS on my device. That is quite boring, as those are very old Android versions by this day and age. Besides, since there is no security to be had anyways, there's no need to do things by the book (and their official documentation isn't accurate anyways, as I will explain below).
Installing DivestOS
The installation procedure for DivestOS is pretty straight forward. All you need to do is to head to the download page, download the recovery, then it using fastboot:
fastboot flash recovery /path/to/the/divestos/recovery.img
Next, reboot to recovery:
fastboot reboot recovery
Select Apply Update and Apply Update from ADB:
adb sideload /path/to/divestos.zip
Do not attempt to relock the bootloader - we need to leave it unlocked for rooting anyways. Also, do not reboot into the OS - next we need to install Magisk and force disable encryption.
Installing Magisk and disabling forceencrypt
The official documentation recommends using TWRP and Disable_Dm-Verity_ForceEncrypt.
The problem is, TWRP doesn't exist for Android 12 and above for my device, and Disable_Dm-Verity_ForceEncrypt has been deprecated and doesn't even work on Android 11.
Instead, what we need is just a custom recovery which allows for flashing files with arbitary signatures and a way to disable forceencrypt. Fortunately, the LineageOS Recovery and Disable Force Encryption NEO work for just this.
First, reboot the device into the bootloader.
Then, you need to download the LineageOS Recovery for your device and boot into it:
fastboot reboot /path/to/the/divestos/recovery.img
Next, you just need to do ADB sideload for Disable Force Encryption NEO. It will give you the option to install Magisk and disable forceencrypt, and choose yes on both. The rest of the options are up to you - they are not very important.
Installing Kali Nethunter Lite
Reboot into your OS and set it up normally. Make sure that encryption is disabled:
Finally, download the appropriate build for Nethunter and flash it as a Magisk module in the Magisk Manager.
Happy Nethunting!