offensive-security / kali-nethunter

The Kali NetHunter Project
https://github.com/offensive-security/kali-nethunter/wiki
3.51k stars 889 forks source link

nexus 6 (shamu) android 7.1.1 Sound not working #873

Closed dannyrock closed 5 years ago

dannyrock commented 7 years ago

Device:

nexus 6 (shamu)

OS version (KitKat/Lollipop/Marshmallow/Nougat):

7.1.1

Built from repo (date and build command) or downloaded from website (links):

python build.py -d shamu --nougat --rootfs full --release v3.1

Output of cat /proc/version in adb shell or NetHunter Terminal:

Linux version 3.10.40-g90f4f12 (root@nh-buildbox) (gcc version 4.7 (GCC) ) #1 SMP PREEMPT Wed Jan 25 18:18:56 CST 2017

Issue:

Builtin speakers are not working , Bluetooth speakers and aux headphone are working

Note:

Speaker were working after the flashing the stock image .. flashing the nethunter caused the problem

Thing which may caused the problem

while flashing the nethunuter (./twrpFlash.sh) this line was printed to installation log(on console) "Executing: 03-kernel-modules-- No kernel modules found, skipping- " it might have caused the problem??? You can see full installation logs at

Output while flashing

https://pastebin.com/91Dp9vRf (./twrpFlash.sh) https://pastebin.com/Zp300cbG ( ./stockNexusFlash.sh)

rubencabrera commented 7 years ago

I'm having the same issue. Same device but android 7.0, nethunter built with: python build.py -d shamu -n -ns I'm sorry I'm quite new tinkering with Android. Is there a way we can debug to give a better and more detailed report?

error-try-again commented 6 years ago

I'm running a nexus 6 and I've been experiencing the same issue. My ROM is Lineage14.1-20180223-NIGHTLY-shamu, android 7.1/7.2 I believe it is also a problem with several kernels from the official https://build.nethunter.com/nightly/ repo built for shamu.

I've had the problem you're referring to with multiple variants of kernel-nethunter-shamu-nougat-* There were a couple (older) kernels which fixed the problem for me out of the several I tested. The one I settled on was kernel-nethunter-shamu-nougat-3.15.4-20170116-1311.

However kernel-nethunter-shamu-nougat-3.15.4-20170116-1311 and similar "working" kernels also contain a crippling bug. Although speaker audio works now, hotspotting & usb tethering breaks (you turn it on, and it shows it running but also has a vague "error" messaging, and tethering wont toggle on. Oddly enough bluetooth tethering still works, though. Wireless/cellular is all g, and working fine.

EDIT** Tested on several hammerhead (nexus 5x) kernel variants from the same https://build.nethunter.com/nightly/ mirror and hotspotting & usb is also broken.

I tried what some folks suggested here https://www.reddit.com/r/nexus5x/comments/65fnlv/wifi_hotspot_and_usb_tethering_broken_in_712/dgcdquv/ to fix and also I tried deleting /data/misc/wifi as well to reset configs. I even tried setting up hostapd to start on boot (I thought maybe nethunter chroot may have broken something).

I'm at a loss though, so if anyone has any other ideas?

rubencabrera commented 6 years ago

Some magic happened. After @lordcactus's report I was ready to fully reinstall android on my terminal. The "pending android upgrade" notification has been there for a long time, never worked for me when I tried. Today it did. After a huge download and a long time for rebooting, sound works! Try to upgrade your android and see if it works too. I know it sounds very shitty troubleshooting, but I tried many times with android rolling back after reboot and this time was different.

error-try-again commented 6 years ago

Upgrading to the latest version of lineage fixed the issue but removed the custom nh kernel I had installed (it was overwritten). Reinstalled the old kernel and the bug comes back.

error-try-again commented 6 years ago

FINALLY, found some fixes for custom kernel and all the bugs I was experiencing.

1) copied all the files from here over to my nethunter-installer/devices directory: https://github.com/offensive-security/nethunter-devices/tree/d54c155c55cfec518ea66436b4bea7986b3a18ee 2) changed the zImage-dtb in my /devices/nougat/shamu/ directory to the one linked from here: https://github.com/offensive-security/kali-nethunter/issues/836#issuecomment-299906734 3) ./bootstrap.sh 4) built NH using; python build.py -d shamu --nougat --rootfs full --release v3.1 and flashed it 5) built NH kernel using: python build.py -d shamu --nougat -k and flashed it 6) ran setprop sys.usb.config hid (to enable HID interfaces, etc.) (7) ran setprop sys.usb.config adb (disables HID interfaces, turns adb functionality back on etc.)

If anyone knows how to split functionality of the usb interface so that both can run at the same time, that would be nice but if not that's cool. I hope this helps the next poor soul who tries to install all the features of NH on their nexus 6.

dasheswithdots commented 6 years ago

Lordcactus, I had experienced the same trouble as described here. I struggled with different kernels, always ending up with a device that had no audio or couldn't use hotspot. I'm not familiar enough with compiling my own kernel to be able to figure out the cause but did find one kernel last year that someone had uploaded. This was titled "kernel-nethunter-shamu-nougat-20170411_214322". With this I was able to use hotspot and maintain audio output on the phone. I've searched and can no longer find any mention of it through Github/XDA/Reddit. I could upload a copy of it here if it would be helpful to you or anyone else.

error-try-again commented 6 years ago

@dasheswithdots, yeah I was about to attempt to build my own kernel from sources and compile when I solved my issue (at least on the surface). That would be awesome if I could try to flash your kernel/see if it works too. I think two working kernels would be a good starting point as to finding the underlying problem and maybe a more permanent fix?

dasheswithdots commented 6 years ago

@lordcactus - I've attached the kernel I've been using on my Nexus 6. As I said, this appears to work correctly - audio works, hotspot works, I can enter monitor mode (with external adapter), bluetooth works, etc.

Two quirky things I have noticed with this kernel that I should mention though:

kernel-nethunter-shamu-nougat-20170411_214322.zip

error-try-again commented 6 years ago

UPDATE: @dasheswithdots uninstalling root (supersu) and reinstalling broke the sound? I think I might have found the cause idk. That is good work though, thank you for the upload. It'll be good when we get to the bottom of these bugs

error-try-again commented 6 years ago

@dasheswithdots reflashing the kernel is a temporary fix, I think this might have something to do with root compatibility with some apps. I'm not sure. Further research and testing is probably required

TM-Btx commented 6 years ago

@dasheswithdots I got the same freaking issue with Nexus 6 Nougat (Build N6F27M). The latest nightly kernel has a bunch of good stuff but the sound issue messed everything. I flashed the nightly kernel from old releases i.e. January 16, 2017 and January 22, 2017 has the great result except tethering issue which is unbearable for me too. Rather, I flashed your provided kernel and it worked great until I tried some Rubber Ducky scripts. HID is totally not working for me in your kernel, neither USB Keyboard feature is working and asking for custom kernel. Some Android apps like Youtube and Maps are crashing randomly but I am cool with it :grinning: I hope you will try some HID attacks by yourself. I am a newbie and have no kernel building experience at all, so trying the fruits of others hardwork, LOL. And by the ways, many thanks for sharing your work. It helped me a lot. Regards

error-try-again commented 6 years ago

If you would like to try the kernel I got working (mostly)

kernel-nethunter-shamu-nougat-20180317_185442.zip

issues;

  1. sometimes after "reboot", logo loops until hard restart
  2. need to run setprop sys.usb.config hid in stock android terminal as su to use hid attacks, hid keyboard
  3. need to run setprop sys.usb.config adb to revert to "normal" mode
  4. after su reinstall some apps like NH-term need to be reinstalled (idfk why)
  5. monitor mode/wireless otg doesn't work without a lot of tweaking

fixed;

maps and youtube aren't broken, sound works, hotspot/tethering works, other otg stuff works, most of the nh suite besides issues above work fine

to install snapchat with root and nethunter;

  1. full unroot in su app-----> install sc ------>
  2. recovery -----> reinstall working nh-kernel + supersu ------> reboot
  3. recovery -----> reinstall nh-kernel again without reinstalling super-su -----> reboot (idk why but this extra step worked for me)
  4. extract generic-nethunter.zip -----> cd /data/app -----> adb push USBkeyboard.apk /sdcard/ ; adb push Term-nh.apk /sdcard/ ;
  5. -----> adb root ----> adb shell ----> cd /sdcard/ -----> pm install USBkeyboard.apk -----> pm install Term-nh.apk
  6. setprop sys.usb.config hid test stuff; hopefully it werk
TM-Btx commented 6 years ago

@lordcactus Thank you so much for taking notice of my issue. I will try it soon because yesterday I have migrated to Lineage OS 14.1 nightly release of March 24, 2018 and flashed the latest nethunter nightly kernel for "shamucm". In my experience, everything is going great with LOS. Monitor mode, sound, Bluetooth, Hotspot tethering, every single thing which I have checked. I am testing LOS for further. I am more than happy with LOS as compared to stock. Because I have tested many kernels and found 1 issue at least in 1 kernel, i.e. either sound not working or tethering not working or the HID and USB keyboard not working, which is totally vaporized in LOS. In any case, your kind cooperation and effort is really appreciable for a noob like me :-) Bunch of many thanks, Regards.

arshiay commented 5 years ago

@lordcactus - I've attached the kernel I've been using on my Nexus 6. As I said, this appears to work correctly - audio works, hotspot works, I can enter monitor mode (with external adapter), bluetooth works, etc.

Two quirky things I have noticed with this kernel that I should mention though:

  • The phone gets stuck in a loop if you "restart". I've found you have to fully power down, then turn the phone back on to avoid this.
  • On a rare occasion the phone speaker will pop for a split second when initiating phone calls (as if for a moment it enabled speakerphone). This sounds kind of like someone plugs in a hot microphone to an already active receiver. Not a huge deal to me, but maybe a clue for someone to figure out some of the audio strangeness.

kernel-nethunter-shamu-nougat-20170411_214322.zip

how can i use this kernel? please help

error-try-again commented 5 years ago

Flash with twrp :/

arshiay commented 5 years ago

Flash with twrp :/

thanks a lot

error-try-again commented 5 years ago

Np, there are some kinks to this kernel though. If you want a kernel which is more stable I have found you will have to do some of your own research, kernel modding/unit testing and integration testing with the rom/stock, not to mention building a bunch of tools and patches yourself. Good luck

Dead3ch commented 5 years ago

@ lordcactus Большое спасибо за внимание к моей проблеме. Я попробую это в ближайшее время, потому что вчера я перешел на ночной выпуск Lineage OS 14.1 от 24 марта 2018 года и запустил последнее ночное ядро ​​nethunter для «shamucm». По моему опыту, все отлично с LOS. Режим монитора, звук, Bluetooth, модем Hotspot, все, что я проверял. Я тестирую LOS для дальнейшего. Я более чем доволен LOS по сравнению с акциями. Потому что я протестировал много ядер и обнаружил 1 проблему, по крайней мере, в 1 ядре, то есть либо не работает звук, либо не работает привязывание, либо не работают клавиатура HID и USB, что полностью испаряется в LOS. В любом случае, ваше любезное сотрудничество и усилия действительно заметны для такого нуба, как я :-) Огромное спасибо, С уважением.

Hello. Give the link. What should I first install for NetHunter Nexus 6 to work properly ? I need to put to start Android Nugat 7.1.1 and then Lineage OS 14.1 ???