[KERNEL] Coconut-Kernel (Lineage 15.1-Oreo - Nethunter Support)

Search This thread

fredrickz

Senior Member
May 27, 2012
70
74
Coconut Kernel for LineageOS 15.1 - With Nethunter Support:D

Code:
***I'm not responsible for any problems that might occur flashing this kernel or what you do with the kernel support***

This kernel is only for Lineage-OS 15.1 or ROMs based on it
Since I did not find a kernel for LOS Oreo with USB Wifi drivers, compiled one.
This kernel has been built from the LOS 15.1 source on git with changes adapted for standalone compiling. So i don't know if any ROM feature is broken though i believe stock features should work.
Yes, it supports monitor mode and packet injection.
Drivedroid is also supported by default in the kernel.

How to use USB Wifi Adapters?
Download from attachment and flash the kernel in twrp
Reboot (First boot will be a bit slow)
Plugin the adapter
MAKE SURE THAT USB OTG IS ENABLED IN SETTINGS FOR ANY OTHER LINEAGEOS BASED ROM
Test by issuing the command ifconfig wlan1 up

It's also important to be on latest 5.0.8 firmware (not rom) for this to work.

Troubleshooting
If the above steps don't work for you,
1. Clean install latest oxygen os 5.0.8 from stock recovery by side loading ( this will install latest firmware which is required)
2. Do system, dalvik, cache, data wipe(firmware will be still there)
3. Flash any lineage15.1 based rom or LOS itself and gapps
4. Flash and enable root
5. Flash coconut kernel
6. Install and open terminal and type ifconfig wlan1 up as root to test after plugging in usb card
This is the failsafe method

You can use the usb adapters in any chroot environment(eg LinuxDeploy) - not just nethunter.

To mods - i created a separated thread for people to not flash incorrect zip. if its against the rules, i can merge it.
Source
https://github.com/LineageOS/android_kernel_oneplus_msm8996
 

Attachments

  • coconut_lineage15.1.zip
    12.9 MB · Views: 992
Last edited:
It's added and tested working. Does it not work for you?

None of the drivers seem to work, in about phone it says I'm using your kernel so I'm a bit confused
I tried manually moving the file from system/etc/firmware to system/lib/modules and to modprobe it but that doesn't work there either
it's probs a simple mistake I've made, I'm on omni rom 8.1
 

fredrickz

Senior Member
May 27, 2012
70
74
Hey can you add the driver for the Atheros AR9271 Chipset?

None of the drivers seem to work, in about phone it says I'm using your kernel so I'm a bit confused
I tried manually moving the file from system/etc/firmware to system/lib/modules and to modprobe it but that doesn't work there either
it's probs a simple mistake I've made, I'm on omni rom 8.1
I personally tested it on Lineage OS 15.1
I don't know about omnirom. My kernel has nothing to do with the folder /system/etc/firmware
See the screenshot.
There is no need to load the module as all drivers are built-in.
Post me an output of dmesg | grep htc
Reboot the phone, plugin your WiFi card, open terminal, type su, then type dmesg | grep htc

Also check if otg support is enabled in omnirom. Just plugin a USB flash drive on to the otg cable/adapter and see if the drive shows up. If yes, then otg is enabled, else you need to enable that.
I think otg maybe disabled by default in omnirom. Search otg in settings
 

Attachments

  • Screenshot_20190221-193853_Termux.jpg
    Screenshot_20190221-193853_Termux.jpg
    219.3 KB · Views: 369
Last edited:
I personally tested it on Lineage OS 15.1
I don't know about omnirom. My kernel has nothing to do with the folder /system/etc/firmware
See the screenshot.
There is no need to load the module as all drivers are built-in.
Post me an output of dmesg | grep htc
Reboot the phone, plugin your WiFi card, open terminal, type su, then type dmesg | grep htc

Also check if otg support is enabled in omnirom. Just plugin a USB flash drive on to the otg cable/adapter and see if the drive shows up. If yes, then otg is enabled, else you need to enable that.
I type it, no output, kernel might be incompatible with my rom :/ even though its lineage based
 

fredrickz

Senior Member
May 27, 2012
70
74
I type it, no output, kernel might be incompatible with my rom :/ even though its lineage based

Chk the otg settings. Plugin a flash drive and see if it gets detected also type otg in settings and see if theres an option to enable it.
If you enable otg, you should remove and insert the card and test
 

fredrickz

Senior Member
May 27, 2012
70
74
Just downloaded and installed that.
Flashed the ROM after wiping data, system, cache
Flashed supersu
Didn't flash gapps as I was just testing.
Flashed my kernel
Rebooted
Downloaded termux
Typed su
Plugged in USB ath9271 tplink wn722n
Typed ifconfig wlan1 up
And it worked

Possible problems for you
You need to install the latest firmware and modem for OxygenOs 5.0.8 .the latest you can get
For that you can either flash full oxygen OS ROM from op3 recovery by side loading
OR
you could download and flash only the firmware and.modem collection.
I recommend you flash stock oxygen is 5.0.8 official from their website.
Then wipe system data cache and then flash omni ROM latest and gapps and SuperSU whatever
Then reboot and complete initial setup
Then reboot and flashy my kernel.
It will work.
 
Last edited:

fredrickz

Senior Member
May 27, 2012
70
74
HAVOC 2.2 is AOSP base, should i try on that? If No please add support for it, its a Highly customizable Rom an Top Liked, I want to test your kernel

The kernel should work on that ROM but for all the specific features of that rom, i should build the kernel from the customized version of their source. If their source is updated with all rom features, and it's available in git, maybe i can try.
You can ask the rom devs regarding updated kernel source for their rom and if you find one let me know. I'll look into it.
 
  • Like
Reactions: Hayatzada

Hayatzada

Senior Member
Jul 26, 2013
353
80
Lahore
The kernel should work on that ROM but for all the specific features of that rom, i should build the kernel from the customized version of their source. If their source is updated with all rom features, and it's available in git, maybe i can try.
You can ask the rom devs regarding updated kernel source for their rom and if you find one let me know. I'll look into it.

i installed magisk module Nethunter but can't see Nethunter Icon on Havoc 2.2. any idia what the problem would be?
 

fredrickz

Senior Member
May 27, 2012
70
74
i installed magisk module Nethunter but can't see Nethunter Icon on Havoc 2.2. any idia what the problem would be?
I've compiled a kernel with USB WiFi drivers supporting monitor mode and packet injection for havoc 2.2 pie. You can try that too. I'll try to post it in a cpl of days. Im just testing the kernel for any stability issues. As if now its working fine and USB adapters are also working good.

I personally have used nethunter only by installing the nethuter apk or by flashing the zip file for the ROM version. If magisk module is giving problems, you can do any of the following
1. Download nethunter apk by searching online
2. Download armhf or arm64 full ROM zip from nethunter nightly website(both works on OP3)
3. Extract Kali image from the zip and place in root of internal storage.
4. Open nethunter app and install from sdcard
5. Install additional tools if required

OR

Simply omit nethunter and use another chroot app like Linux Deploy.
You can install and use all tools in Linux deploy the same way as net hunter like airgeddon, metasploit, Beef, airmon-ng, wifite, reaver etc
I think a new version of net hunter is on its way too..
 
  • Like
Reactions: Hayatzada

Hayatzada

Senior Member
Jul 26, 2013
353
80
Lahore
I've compiled a kernel with USB WiFi drivers supporting monitor mode and packet injection for havoc 2.2 pie. You can try that too. I'll try to post it in a cpl of days. Im just testing the kernel for any stability issues. As if now its working fine and USB adapters are also working good.

I personally have used nethunter only by installing the nethuter apk or by flashing the zip file for the ROM version. If magisk module is giving problems, you can do any of the following
1. Download nethunter apk by searching online
2. Download armhf or arm64 full ROM zip from nethunter nightly website(both works on OP3)
3. Extract Kali image from the zip and place in root of internal storage.
4. Open nethunter app and install from sdcard
5. Install additional tools if required

OR

Simply omit nethunter and use another chroot app like Linux Deploy.
You can install and use all tools in Linux deploy the same way as net hunter like airgeddon, metasploit, Beef, airmon-ng, wifite, reaver etc
I think a new version of net hunter is on its way too..

Thanks a lot for your reply, installed nethunter apk and placed in root of internal storage after renaming but not detected by chroot(have successfully done it before in Nougat), i personally dislike Linux deploy method so waiting for resolving, i think its a Pie issue. By the way thanks again.
 

fredrickz

Senior Member
May 27, 2012
70
74
Thanks a lot for your reply, installed nethunter apk and placed in root of internal storage after renaming but not detected by chroot(have successfully done it before in Nougat), i personally dislike Linux deploy method so waiting for resolving, i think its a Pie issue. By the way thanks again.

Try the download option in nethunter app. Renaming to correct file should get it detected in nethunter app
Regarding linuxdeploy, you can change the default repository to any other mirror and get blazing fast speed. Try the following
Install to a file or directory selecting kali-rolling
Use http://kali.download/kali as source instead of default http://http.kali.org/kali
Then select other configurations and install it
What was the filename you renamed the kali archive to?
 

Hayatzada

Senior Member
Jul 26, 2013
353
80
Lahore
Try the download option in nethunter app. Renaming to correct file should get it detected in nethunter app
Regarding linuxdeploy, you can change the default repository to any other mirror and get blazing fast speed. Try the following
Install to a file or directory selecting kali-rolling
Use http://kali.download/kali as source instead of default http://http.kali.org/kali
Then select other configurations and install it
What was the filename you renamed the kali archive to?

i successfully installed kali but nethunter terminal crashes when ever i open it.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 5
    Coconut Kernel for LineageOS 15.1 - With Nethunter Support:D

    Code:
    ***I'm not responsible for any problems that might occur flashing this kernel or what you do with the kernel support***

    This kernel is only for Lineage-OS 15.1 or ROMs based on it
    Since I did not find a kernel for LOS Oreo with USB Wifi drivers, compiled one.
    This kernel has been built from the LOS 15.1 source on git with changes adapted for standalone compiling. So i don't know if any ROM feature is broken though i believe stock features should work.
    Yes, it supports monitor mode and packet injection.
    Drivedroid is also supported by default in the kernel.

    How to use USB Wifi Adapters?
    Download from attachment and flash the kernel in twrp
    Reboot (First boot will be a bit slow)
    Plugin the adapter
    MAKE SURE THAT USB OTG IS ENABLED IN SETTINGS FOR ANY OTHER LINEAGEOS BASED ROM
    Test by issuing the command ifconfig wlan1 up

    It's also important to be on latest 5.0.8 firmware (not rom) for this to work.

    Troubleshooting
    If the above steps don't work for you,
    1. Clean install latest oxygen os 5.0.8 from stock recovery by side loading ( this will install latest firmware which is required)
    2. Do system, dalvik, cache, data wipe(firmware will be still there)
    3. Flash any lineage15.1 based rom or LOS itself and gapps
    4. Flash and enable root
    5. Flash coconut kernel
    6. Install and open terminal and type ifconfig wlan1 up as root to test after plugging in usb card
    This is the failsafe method

    You can use the usb adapters in any chroot environment(eg LinuxDeploy) - not just nethunter.

    To mods - i created a separated thread for people to not flash incorrect zip. if its against the rules, i can merge it.
    Source
    https://github.com/LineageOS/android_kernel_oneplus_msm8996
    1
    Hey can you add the driver for the Atheros AR9271 Chipset?
    It's added and tested working. Does it not work for you?
    1
    HAVOC 2.2 is AOSP base, should i try on that? If No please add support for it, its a Highly customizable Rom an Top Liked, I want to test your kernel

    The kernel should work on that ROM but for all the specific features of that rom, i should build the kernel from the customized version of their source. If their source is updated with all rom features, and it's available in git, maybe i can try.
    You can ask the rom devs regarding updated kernel source for their rom and if you find one let me know. I'll look into it.
    1
    i installed magisk module Nethunter but can't see Nethunter Icon on Havoc 2.2. any idia what the problem would be?
    I've compiled a kernel with USB WiFi drivers supporting monitor mode and packet injection for havoc 2.2 pie. You can try that too. I'll try to post it in a cpl of days. Im just testing the kernel for any stability issues. As if now its working fine and USB adapters are also working good.

    I personally have used nethunter only by installing the nethuter apk or by flashing the zip file for the ROM version. If magisk module is giving problems, you can do any of the following
    1. Download nethunter apk by searching online
    2. Download armhf or arm64 full ROM zip from nethunter nightly website(both works on OP3)
    3. Extract Kali image from the zip and place in root of internal storage.
    4. Open nethunter app and install from sdcard
    5. Install additional tools if required

    OR

    Simply omit nethunter and use another chroot app like Linux Deploy.
    You can install and use all tools in Linux deploy the same way as net hunter like airgeddon, metasploit, Beef, airmon-ng, wifite, reaver etc
    I think a new version of net hunter is on its way too..
    1
    I fully understand your explanations about kernel vs ROM compatibility. The kernel that you have now compiled works well in my OmniDragon ROM. I am looking forward to that new compilation from HolyDrargon kernel, thank you.
    See the thread below. It's tested on havoc os 2.2 and 2.3. if the sky dragon os is similar, this should work
    If you are using skydragon is check the kernel version.
    This is compiled from holydragon 0.6.1 source for pie.
    There is another version with different version numbering for stock based rom. Check your default kernel version
    https://xdaforums.com/oneplus-3/one...nel-coconut-kernel-nethunter-support-t3908438