FORUMS
Remove All Ads from XDA

[cm12.1] [cm13.0] [maybe touchwiz] Kali NetHunter for the Galaxy S5

1,462 posts
Thanks Meter: 5,833
 
Thread Closed Email Thread

WARNING: THIS IS A BETA, USB CABLES MAY CATCH FIRE, YOUR CHAIR MAY BREAK, AND TRUMP MAY WIN THE ELECTION!

Welcome to the thread on Kali NetHunter for the Galaxy S5.

These Kali NetHunter builds are designed for CyanogenMod 12.1 and CyanogenMod 13.0.
I have TouchWiz builds as well, but NetHunter has not been tested on TouchWiz.

In theory, they should work fine on all AOSP based ROMs. The TouchWiz might work on most custom TouchWiz 5.0 ROMs too!

I am releasing on a nightly based development schedule similar to CyanogenMod.
Occasionally builds can show up more than once per night. This usually happens when there's a big update like a new device added to the line or an apk update for the NetHunter app.

These builds are NOT Aroma enabled, however, it should be no issue to just drag apps you don't need to the uninstall button in your app drawer.
Aroma support is going to be phased out for a while, especially with new TWRP releases coming out soon that may have newer kernels that aren't compatible with Aroma.

DOWNLOAD

Current version: 3.0.1 (beta, 2016-01-21)

Please be careful to download the right version based on this table:
SM-G900F, SM-G900W8, SM-G900T, SM-G900M, SM-G900A, SM-G900S, SM-G900K: klte
SM-G900I: kltedv
SM-G900P: kltespr
SCL23 kltekdi

CyanogenMod 12.1: lollipop
CyanogenMod 13.0: marshmallow

Nightly TWRP flashable zips are located at: https://idlekernel.com/nethunter/nightly/

Kernel only installers are in the kernel-only directory inside each build directory. It might be a better idea to try and install that first and see if you can boot before flashing the entire NetHunter.

BEFORE INSTALLING

Do not flash the NetHunter update zip with a fresh data partition!
Most ROMs will wipe it clean on the first boot if you haven't completed the Android Setup Wizard yet, there's no need to wipe your ROM or data to try it out. I do advise backing up your data partition before flashing the zip though.

Please make sure your phone boots fine and runs fine before flashing NetHunter. It's confusing when people report bugs that exist in CyanogenMod by itself.

The Kali chroot and apps are installed on your data partition (in /data/local for chroot). To initialize the chroot and install Kali Linux, you need to start the Kali NetHunter app.

If you are already rooted or know you have systemless SuperSU installed, you will need to go into the SuperSU app and do a full unroot then reflash CyanogenMod (for the unmodified boot partition) and Gapps. The NetHunter installer does not play well with systemless SuperSU at this time.
The NetHunter installer will automatically install SuperSU in system mode, which I consider to be more stable. Since NetHunter already modifies your system partition, there is no need to use systemless SuperSU anyways.

FULL FRESH INSTALL STEPS
  1. Flash CyanogenMod installer zip
  2. Flash Gapps if you want them (preferably OpenGapps pico)
  3. Boot into device
  4. Complete setup wizard
  5. Reboot into recovery
  6. Flash the Kali NetHunter installer zip from this thread
  7. Boot into device
  8. Open the NetHunter app
  9. Use the Kali Chroot Manager to install Kali on your phone
  10. You're done!
UPDATING TO A NEWER BUILD

Going from 3.0.0 and up, all you have to do is flash the new build in recovery and wipe dalvik cache.
Upgrading from NetHunter 2.0 is not recommended, and may break the NetHunter app in some cases.

RAN INTO AN ISSUE OR BUG?

In order for me to help you, you have to at minimum reply with:
  • The link to the exact zip you downloaded
  • Your device model (klte, kltecan, kltesovietrussia, etc.)
  • The name of the ROM you're flashing it on
  • The version and build date of the ROM you're flashing it on
  • A complete description of your problem
  • Optional: An audio recording of you reading this entire post
If your issue is with a specific app, it might be better to contact the developer of that app.

If your issue is during the installation (ex. flashing the NetHunter zip), then please collect a TWRP recovery.log for me.

If you found a problem and were able to fix it, and no one's mentioned it in the thread already, it would be kind to state the issue and your fix for others to make use of as well.

You can join me and the other NetHunter developers on IRC at the #nethunter room on freenode to more handily diagnose problems together.
I apologize, but I can't do house calls at this time.

KNOWN ISSUES
  • F2FS - You need to have an ext4 data partition. I'm not sure why, but having a Kali chroot on your data partition totally breaks booting f2fs /data.
    There is currently no fstab modifications in NetHunter, but I do plan on making a zip to automatically modify the fstab for f2fs later.
  • Marshmallow - New android app permissions API can wreak all sorts of havoc. On first boot, accept all permissions after opening the NetHunter app then reboot your phone. You might need to battery pull if it freezes up completely. Once app permissions are accepted, the next reboot should hopefully not freeze up and allow you to install your chroot normally. (once the NetHunter app has full support for the new Android API this should no longer be an issue)
  • USB Keyboard - The keyboard is unusable on some devices (ex. the Note 3) due to a depth bug that causes your key presses to go right through the keyboard into the swipe pad.
  • Terminal App - Full screen programs like nano or vi are unusable because they can't be rendered properly. Learn sed for text file editing. Just kidding that's cruel.
    Install OpenSSH server in Kali and use the JuiceSSH app as an alternative to NetHunter Terminal. (it's wayyyy better sorry jmingov)

THE KERNEL

The NetHunter kernel for the Galaxy S5 is based on CyanogenMod 13.0 kernel sources.
It has the following changes:
  • F2FS updated to Jaeguek Kim's latest kernel.org f2fs-stable sources
  • UKSM Ultra Kernel Same-page Merging KSM support
  • Updated and enabled USB (OTG) Atheros, Ralink, and Realtek WiFi drivers
  • Krait specific Cortex-A15 & Neon-VFPv4 + -O2 compiler optimizations
  • Compiled with Linaro's branch of GCC 4.9.4
  • Simple IO (SIO) scheduler as default IO scheduler
  • USB HID Gadget keyboard support
  • mac80211 packet injection support
  • Additional drivers built in for the full Kali NetHunter experience

SCREENSHOTS



DEVELOPMENT

For the kernel included in NetHunter for the Galaxy S5, you can find the sources here: https://github.com/jcadduono/nethunter_kernel_klte

You can see my branch of the installer development here: https://github.com/jcadduono/kali-nethunter
Alternatively, but not updated as often, it is also available as another branch on the Offensive Security NetHunter GitHub: https://github.com/offensive-securit...ster-jcadduono

The original branch of development is located here: https://github.com/offensive-security/kali-nethunter

DISCLAIMER

I am not affiliated with Offensive Security. They seem like cool guys though.
I'm not even a novice when it comes to security and penetration. I'm just a simple system administrator with a passion for breaking Android.
Please restrain yourselves from asking me security related questions.
The Following 5 Users Say Thank You to jcadduono For This Useful Post: [ View ]
 
 
19th January 2016, 07:30 AM |#2  
jcadduono's Avatar
OP Recognized Developer
Flag Thunder Bay
Thanks Meter: 5,833
 
Donate to Me
More
Reserved
NOT SO MUCH AS SEEN ON MR. ROBOT, BUT PROBABLY EVEN BETTER

The Following 2 Users Say Thank You to jcadduono For This Useful Post: [ View ]
19th January 2016, 06:51 PM |#3  
Junior Member
Thanks Meter: 0
 
More
Hey Jcadduono, just wanted to say thanks! i was trying to do the same thing but never had enough time to fix all kernel recompile issues i got.
I am going to install this and run it as my daily driver i will let you know if i come up with any issues.
Thanks again and keep up the good work! If you need help anytime just say i am willing to help anytime anyway i can.
19th January 2016, 07:11 PM |#4  
sielhadi's Avatar
Senior Member
Thanks Meter: 24
 
More
What about touchwiz
19th January 2016, 07:39 PM |#5  
jcadduono's Avatar
OP Recognized Developer
Flag Thunder Bay
Thanks Meter: 5,833
 
Donate to Me
More
Quote:
Originally Posted by sielhadi

What about touchwiz

It's possible I could create a touchwiz branch (forked from my CM13 branch), but it would be unofficial and probably less maintained.
It would have a bunch of hacks to force the kernel to always be permissive to get past some issues, as well as merged latest drivers from touchwiz.
I would like to see if this CyanogenMod kernel works first though.

Quote:
Originally Posted by mixa2038

Hey Jcadduono, just wanted to say thanks! i was trying to do the same thing but never had enough time to fix all kernel recompile issues i got.
I am going to install this and run it as my daily driver i will let you know if i come up with any issues.
Thanks again and keep up the good work! If you need help anytime just say i am willing to help anytime anyway i can.

Feel free to clone my nethunter_kernel_klte git branch, it's fully compliant with GCC 4.9.X. If you need any specific features you can send pull requests and it might merge them into main.
You should have no problems building it with build.sh or build_nethunter_images.sh (just edit the path variables in config sections of each file to point to right directory and compiler)

To build for kltecan, for example, just type
Code:
./build.sh can
You will get a zImage and a dtb.img inside ./build/arch/arm/boot folder.

Flashing kernels takes a little bit more work. You have to clone my kali-nethunter branch. Copy the zImage and dtb.img (replace the current ones) in ./nethunter-installer/kernels/androidversion/klteX/.
Then all you have to do is go to the ./nethunter-installer folder and do
Code:
./build.py -d klteX --androidversion -k
The -k flag builds just a kernel flashing zip out of your new zImage and dtb.img. Replace androidversion with marshmallow or lollipop. Replace X with your klte variant, ex. kltecan.

You can then flash that zip in TWRP and it will install your new kernel.
The Following 2 Users Say Thank You to jcadduono For This Useful Post: [ View ]
19th January 2016, 07:50 PM |#6  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by jcadduono

It's possible I could create a touchwiz branch (forked from my CM13 branch), but it would be unofficial and probably less maintained.
It would have a bunch of hacks to force the kernel to always be permissive to get past some issues, as well as merged latest drivers from touchwiz.
I would like to see if this CyanogenMod kernel works first though.


Feel free to clone my nethunter_kernel_klte git branch, it's fully compliant with GCC 4.9.X. If you need any specific features you can send pull requests and it might merge them into main.
You should have no problems building it with build.sh or build_nethunter_images.sh (just edit the path variables in config sections of each file to point to right directory and compiler)

To build for kltecan, for example, just type

Code:
./build.sh can
You will get a zImage and a dtb.img inside ./build/arch/arm/boot folder.

Flashing kernels takes a little bit more work. You have to clone my kali-nethunter branch. Copy the zImage and dtb.img (replace the current ones) in ./nethunter-installer/kernels/androidversion/klteX/.
Then all you have to do is go to the ./nethunter-installer folder and do
Code:
./build.py -d klteX --androidversion -k
The -k flag builds just a kernel flashing out of your new zImage and dtb.img. Replace androidversion with marshmallow or lollipop. Replace X with your klte variant, ex. kltecan.

You can then flash that zip in TWRP and it will install your new kernel.

You are AWESOME!
Thank you very much. I will try this as soon as i have time.
19th January 2016, 09:20 PM |#7  
dr460nf1r3's Avatar
Senior Member
Thanks Meter: 65
 
More
Got a bootloop on cm12 29.12.15 version. Clean install, no gapps, fully setup before flashing kali zip. Note that the device stays in the starting screen for like half a minute and goes to bootscreen then which it usually doesnt
19th January 2016, 10:23 PM |#8  
jcadduono's Avatar
OP Recognized Developer
Flag Thunder Bay
Thanks Meter: 5,833
 
Donate to Me
More
Quote:
Originally Posted by dr460nf1r3

Got a bootloop on cm12 29.12.15 version. Clean install, no gapps, fully setup before flashing kali zip. Note that the device stays in the starting screen for like half a minute and goes to bootscreen then which it usually doesnt

Do you get the same result with kernel-only zip? (if you flashed full zip, you will have to restore system, data, boot backups before trying kernel only)
19th January 2016, 10:32 PM |#9  
Stachura5's Avatar
Senior Member
Flag Mieroszów
Thanks Meter: 81
 
Donate to Me
More
Sorry for being a bit ignorant, but can someone explain me what is NetHunter? I've seen it for some devices but still have no idea what is it & what does it do...
19th January 2016, 11:30 PM |#10  
Senior Member
Flag Kansas City
Thanks Meter: 824
 
Donate to Me
More
I cannot, for the life of my get the 19-19 build to boot up, should I try another nightly? I'm flashing the full zip file ontop of a booted cm 13 + gapps install.

---------- Post added at 11:30 PM ---------- Previous post was at 11:29 PM ----------

Sorry should of added this, I'm on kltespr, and am flashing the 2nd one that came out.
19th January 2016, 11:48 PM |#11  
jcadduono's Avatar
OP Recognized Developer
Flag Thunder Bay
Thanks Meter: 5,833
 
Donate to Me
More
Quote:
Originally Posted by pro_granade

I cannot, for the life of my get the 19-19 build to boot up, should I try another nightly? I'm flashing the full zip file ontop of a booted cm 13 + gapps install.

---------- Post added at 11:30 PM ---------- Previous post was at 11:29 PM ----------

Sorry should of added this, I'm on kltespr, and am flashing the 2nd one that came out.

sorry I need feedback from people who are just installing the kernel zip right now. I need to pinpoint whether the issue is kernel related or NetHunter script related.

for folks trying the kernel-only zips: Are you stuck on a neverending Kali boot logo, or the black screen with set warranty bit?
Thread Closed Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes