offensive-security / nethunter-devices

NetHunter Devices
248 stars 197 forks source link

Added S6 edge LineageOS 14.1 #175

Closed yesimxev closed 5 years ago

Re4son commented 5 years ago

Different repo same kernel as before?

yesimxev commented 5 years ago

Not the same, or at least I don't understand what is in his repo. Doesn't seem like lineage14 zerolte anymore. Not sure about it, but there is no cm-14.1 branch, only nx-8.1 and nx-9.0. Looks like they are not even patched for Nethunter. That's why I needed to build mine.

Re4son commented 5 years ago

Good point. Would you be able to add the HID patch and the CDROM patch as well and add the kernel image, modules (if any), and devices.cfg changes to this commit? And please ensure that "CDC ACM" is enabled in the kernel config. Many thanks!

yesimxev commented 5 years ago

HID and CDrom is done already. Will do the rest probably tonight

yesimxev commented 5 years ago

Actually his image could be good, should I replace? And not sure where to add modules

jcadduono commented 5 years ago

I very much recommend using one of my premade build and menuconfig scripts. You only need to change a few variables to account for the location of the toolchain and the name of the defconfig. See menuconfig.sh, build.sh, and VERSION file at my angler kernel repository: https://github.com/jcadduono/android_kernel_huawei_angler/tree/nethunter-8.0

Assuming that your defconfig is named nethunter_yourdevice_defconfig (recommended), you would simply change https://github.com/jcadduono/android_kernel_huawei_angler/blob/nethunter-8.0/build.sh#L57 to [ "$DEVICE" ] || DEVICE=yourdevicename

The build.sh script when run will compile the kernel (in its own build folder) AND then install and strip the modules to build/lib/modules folder, which you just copy into the nethunter-devices repository as is. See the angler folder in nethunter-devices for an example of how the layout should look: https://github.com/offensive-security/nethunter-devices/tree/master/nougat/angler

If the modules are set up like this in the nethunter-devices repository, then the NetHunter installer will take care of the rest and your modprobe will work inside and outside of the chroot. :)

Update: See the new README.md instructions in the nethunter-devices repo now :)

yesimxev commented 5 years ago

Well, @XXH3X added his original/previous cm14.1 branch after I pulled this, and also the entry to devices.cfg, and kernel Image with modules. His one does not include the above mentioned patches. Should I replace with mine? Or do you want to paste my (@jcadduono 's) HID and CDROM patch into yours? Also mine has SCO driver revised for carwhisperer so not sure what to do now tbh

ghost commented 5 years ago

The only patch that I don't hve is the carwhisperer, which I might implement and my kernel already supports CD-ROM emulation, check the files. I didn't had to commit that, by default the patch was inside the kernel. And relatively to the HiD patches check this commits:

https://github.com/XXH3X/Exynos7420_Nethunter/commit/7dc18fa5bec9b4f7e54beb57265986e0bea16cb9

https://github.com/XXH3X/Exynos7420_Nethunter/commit/97f6454112ca597f42d1fa3cca9f2cd552bcdbf1

yesimxev commented 5 years ago

Great, haven't checked since. The SCO is kind of a workaround, looks like it does not mess up anything else

ghost commented 5 years ago

@yesimxev, What is it for?

yesimxev commented 5 years ago

https://github.com/balle/bluediving has carwhisperer tool, which could not run. The kernel gave back the -EINVAL error, so the SCO channel couldn't be created. Not sure how it goes in later kernels, but removing those address family checks did the job

ghost commented 5 years ago

Nice, I'll cherry-pick your commit and later compile both kernels for the pull request, I'll dd you in the contributors

Re4son commented 5 years ago

Thanks for your efforts and awesome collaboration. I suppose this request can be closed with https://github.com/offensive-security/nethunter-devices/pull/176 having been merged, correct?