How I became a l33t h4x0r by installing Kali Nethunter on LineageOS on a Pixel 3
Do you want to hack your neighbors and disable their Wi-Fi because they’re blasting too much loud music? Don’t, because this is highly illegal and you’ll get into trouble. As my Network Security professor says, “please don’t get arrested.”
But if you want to theoretically have the capability to do it from your phone, you might want to install Kali Nethunter on it. This guide is the fruit of a few hours of labor trying to get it installed on my girlfriend’s no-longer-needed Pixel 3.
Amazingly detailed illustration of the system
Your system may or may not look something like this at the end.
Caveat emptor
These instructions will completely wipe your phone’s data.
Additionally, I have no fucking clue what I’m doing. I’ve never done anything related to Android ROMs before. If you brick your phone then it’s your fault, not mine. Go Google how to fix it.
Assumptions about you
- You know how to use ADB
- You know how to activate Android developer mode
- You actually know what you need Kali for and you’re not just installing it to look cool. Only I get to install it just to look cool.
What you should do
Download these things first
- Android SDK. That should be installed on your computer.
- The appropriate TWRP image for your device
- DM-Verity, ForceEncrypt, Disk Quota Disabler.
The forum link is
here,
and although it says deprecated it did still work, even on Android 12. Ensure
the filename has the substrings
dm-verity
andforceencrypt
, because that’s how it knows what to do. - The latest Magisk release.
Make a copy of the APK with a
.zip
file extension instead. - Magisk Magic ToolFlash.
Make a copy of the APK with a
.zip
file extension instead. - The latest LineageOS release for your device
- And, of course, Kali Nethunter. Pick the correct version for your phone, or the generic ones if there is none.
Recommended downloads
- F-droid so you can install other apps
Steps
- On your phone, enable developer tools and USB debugging, and your unlock your bootloader in developer tools.
- Reboot your phone into fastboot mode with
adb reboot fastboot
- From your computer, boot your phone into TWRP with
fastboot boot <your-twrp.img>
- In TWRP, wipe your phone’s data cache.
- From your computer, push some ROMs with
adb push <your-dm-verity-forceencrypt.zip> <your-lineageos.zip> /sdcard
. Then, use TWRP to install those ROMs in that order. There may be a warning about TWRP being overwritten. You can ignore that. - From your computer, push
<your-magisk.zip>
to/sdcard
. Then, use TWRP to install it.1 - Reboot your phone and go through the LineageOS setup. Note that internet, etc. can be skipped if you want.
- From your computer, push
<your-magic-flash.zip>
to your phone. Install it in Magisk’s modules, and reboot. - From your computer, push
<your-nethunter.zip>
to your phone. Install it in Magisk’s modules, and reboot.
And you’re done!
Optionally, to install F-Droid, you can run adb install <your-fdroid.apk>
.
Summary of how I figured it out
It was with much pain and these steps only barely go into detail about my pain.
- I think what I did first was unlock the bootloader.
- Then, I installed Magisk, patched some
system.img
I downloaded somewhere, and flashed that. It worked, thankfully enough. - I believe I then tried to install magic-flash, then I did
adb shell
,su
, andflash <nethunter>
but that caused me to bootloop. - I started over again, I believe with TWRP. I tried installing the TWRP RAMDisk, I believe, which broke. I had to flash the original system on it again.
- Installing Nethunter via TWRP failed, but the system wasn’t affected when I did that.
- I tried installing the dm-verity-forceencrypt thing. Unfortunately for me, I installed it on top of the stock ROM, rather than below, which caused Kali to bootloop the system again.
- The next day, I thought “lmao what if I put it on top of Lineage” and I did basically these steps and it worked. ¯\_(ツ)_/¯
-
This step comes after installing LineageOS because installing LineageOS will wipe your entire system. ↩