offensive-security / nethunter-devices

NetHunter Devices
248 stars 197 forks source link

Added Nexus 6P (angler) Android 8.1 kernel support #174

Closed kimocoder closed 5 years ago

kimocoder commented 5 years ago

Forked the source from "jcadduono" which was based on v3.10 sources from google, merged 355+- upstream patches of v3.20 onto it and added the wifi modules.

Tested and working on the latest official firmware of Android v8.1 build for Nexus 6P.

:1st_place_medal:

kimocoder commented 5 years ago

@Re4son this should be a walk in the park :+1: :hamburger: WIFI & HID is working. Nexmon is also working on this specific firmware.

Kernel sources is over here

screenshot_20190216-213658

screenshot_20190216-215639

screenshot_20190216-220847

screenshot_20190216-215853

SymbianSyMoh commented 5 years ago

@kimocoder That's super cool, Can you confirm that the bluetooth of the device works fine without any problems?

I have Nexus 6P (Android 7.1.2) Kernel version (3.10.73-nethunter-angler-1.1) Build number (N2G48C) but the bluetooth is not working at all, rest of the functions Wifi/HID/DriveDroid emulation works totally fine.

SymbianSyMoh commented 5 years ago

@Re4son I believe it's time to port it to Planet Computer's GEMINI PDA beside the Kali Linux image, no?

kimocoder commented 5 years ago

Bluetooth is also working just fine <3

Re4son commented 5 years ago

@SymbianSyMoh Working on it - give me a couple of days :-)

SymbianSyMoh commented 5 years ago

Thanks a lot for the feedback, time to upgrade Android to get rid of the annoying notifications regarding the upgrade hahaha

SymbianSyMoh commented 5 years ago

@SymbianSyMoh Working on it - give me a couple of days :-)

That's the spirit <3

kimocoder commented 5 years ago

@SymbianSyMoh you must use a workaround in order to get the kalifs in place. After you have rooted, install "stericsson busybox" to "/system/xbin/" - connect to pc and go into "adb shell", then "su" and cd "/data/local/nhsystem" and download the kalifs file by hand with "wget https://build.nethunter.com/kalifs/kalifs-latest/kalifs-armhf-minimal.tar.xz" (or "curl -O https...")

then simply do "xz -d .tar.xz", then "tar xvf .tar" then you have it! "rm -rf *.tar.xz" to cleanup

I have reported the issue in another thread, so it will be checked upon soon.

SymbianSyMoh commented 5 years ago

Great, so the automatic installation of kalifs through Nethunter's app is not working for now at least, well manually is always good too for debugging.

@SymbianSyMoh you must use a workaround in order to get the kalifs in place. After you have rooted, install "stericsson busybox" to "/system/xbin/" - connect to pc and go into "adb shell", then "su" and cd "/data/local/nhsystem" and download the kalifs file by hand with "wget https://build.nethunter.com/kalifs/kalifs-latest/kalifs-armhf-minimal.tar.xz" (or "curl -O https...")

then simply do "xz -d .tar.xz", then "tar xvf .tar" then you have it! "rm -rf *.tar.xz" to cleanup

I have reported the issue in another thread, so it will be checked upon soon.

Great, so the automatic installation of kalifs through Nethunter's app is not working for now at least, well manually is always good too for debugging.

faloyeh commented 5 years ago

@kimocoder I "think" there is an issue with wireless modules at least I'm not able to load them.

root@kali:~# cat /proc/version Linux version 3.10.73-nethunter-angler-3.0 (root@kimocoder) (gcc version 5.4.1 20170404 (Linaro GCC 5.4-2017.05) ) #1 SMP PREEMPT Sun Feb 17 01:19:09 CET 2019

root@kali:~# lsmod Module Size Used by

root@kali:~# modprobe ath9k_htc modprobe: ERROR: could not insert 'ath9k_htc': Exec format error

Full details here:

https://github.com/kimocoder/android_kernel_huawei_angler/commit/8b6e2492432650cbeb629d4317ec8f3435d335c5

Am I wrong here?

Thanks!

kimocoder commented 5 years ago

@faloyeh you are correct infact, modinfo shows correct but it gets the exec format error. I went offshore for work for 1 month, but the kernel sources is available at my repo over here https://github.com/kimocoder/android_kernel_huawei_angler/tree/nethunter-8.0

Someone should fix the modules as I'm not home for a month now.

@Re4son is tagged and notified

faloyeh commented 5 years ago

@kimocoder Thanks a lot for your reply!

As for the kernel panic , at least symptom wise, it might be similar to what has been dealt with in issue #168 .. I will try to figure out what the solution has been to avoid the kernel panic.

faloyeh commented 5 years ago

@kimocoder, I noticed your recent tweet re changed kernel modules (from 8 days ago). I took the precompiled kernel and modules from here and gave it a try:

https://github.com/offensive-security/nethunter-devices/tree/master/oreo/angler

root@kali:~# cat /proc/version Linux version 3.10.73-angler-nethunter-3.0 (root@kali) (gcc version 5.4.1 20170404 (Linaro GCC 5.4-2017.05) ) #1 SMP PREEMPT Thu Mar 14 02:48:30 CET 2019

The module now loads successfully BUT without the wireless usb device attached only! The phone still reboots (kernel panic) as soon as the wireless usb device being attached. I mentioned that earlier.

In addition, I checked your kernel sources out once again but I don't think that any changes being made to them hence I think the precompiled kernel and modules are based from another repository, correct?