offensive-security / kali-nethunter

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

OnePlus 3 not recognized by pc #615

Closed mitros123 closed 5 years ago

mitros123 commented 7 years ago

Device: Oneplus 3

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

Built from repo (date and build command) or downloaded from website (links): https://idlekernel.com/nethunter/nightly/3.15.2-20161002-0200/ ,flashed kernel-nethunter-oneplus3-marshmallow-3.15.2-20161002-0200.zip , then nethunter-generic-arm64-kalifs-full-rolling-3.15.2-20161002-0200.zip and then, as the device had returned to stock(?) kernel, flashed nethunter kernel again.

Output of cat /proc/version in adb shell or NetHunter Terminal: Linux version 3.18.20-ElementalX-OP3-0.22 (root@nh-buildbox) (gcc version 4.9.x-google 20140827 (prerelease) (GCC) ) #3 SMP PREEMPT Wed Sep 28 00:02:55 UTC 2016

Issue: When connecting oneplus 3 to a pc, it is not recognized at all. It is charging though.

Hello. I am having a problem with my OP3. However, it is very likely that the mistake is mine. Please bear with me. I unlocked bootloader, flashed TWRP, rooted with this toolkit: http://forum.xda-developers.com/oneplus-3/development/toolkit-oneplus-3-toolkit-unlock-t3398799 . After that I flashed the nethunter kernel from twrp (kernel-nethunter-oneplus3-marshmallow-3.15.2-20161002-0200.zip) , and then flashed the nethunter-generic-arm64-kalifs-full-rolling-3.15.2-20161002-0200.zip. Should I have flashed the armhf zip? Also, I did not flash the update-nethunter-generic-arm64-3.15.2-20161002-0200.zip . What is it for? Anyway, after that, nothing worked, not even wifi. I noticed that at that time the kernel did not have any "nh" anywhere, so I flashed the kernel again. After that things seemed to work fine. For example, I could put an external TP LINK TL-WN722N into monitor mode and use wifite (although the first OTG cable I tried did not work). Plugging however OP3 to a pc does nothing except charging the OP3. The device does not show up in adb (windows), or in a file manager (windows,linux). So the question is: Did I do anything wrong and it is my fault or it's an issue with the kernel? Thank you in advance.

binkybear commented 7 years ago

Have you tried enabling developer options in settings and going to select USB configuraiton? I do not have a OnePlus3 at the moment.

Recent version have presented kernel issues.

mitros123 commented 7 years ago

Hmm that option seems broken. MTP was selected, but I could not change it. I selected the other options but the name below USB configuration in Developer Options did not change. I re enabled developer options and the problem persisted, but now the option (which I cannot change) is for charging only (the first one, I do not know the official english name since the language is not set to english).

rob070511 commented 7 years ago

have you tried enabling usb debugging then changing the usb configuration?

mitros123 commented 7 years ago

Yes and yes, but the latter does not change, even if I select the other options.

mitros123 commented 7 years ago

Update: When I DISABLE USB debugging, the phone is recognized by the file manager, and the files can be seen. At that time, the usb configuration can be changed (although in the developer options list the visible option does not change) - When selecting "charging only" it charges, when selecting "MTP" the files can be seen. At the same time, the visible option in the list is always MTP. However, when enabling USB debugging, the phone is not recognized at all.

rob070511 commented 7 years ago

I thought that was going to be the issue. ive noticed this issue with a few of my personal devices. I dont think its an issue related to kali nethunter, ive got it the issue and i'm currently running copperheadOS on my nexus 5x. perhaps it has something to with loading a custom kernel, at the present i havent looked into it.

mitros123 commented 7 years ago

Well I hope it can be fixed :P. @binkybear should I try to install an older kernel? If yes, which one?

mitros123 commented 7 years ago

Update number 2: Ok, now it seems to work for some reason. And.. I really don't know why. Things I tried: a)plugged it into usb 2.0 port, b)enabled advanced reboot (but it can be disabled afterwards), c) selected PTP,MIDI and the other options in USB configuration. Someone with the same problem as me can try it with all these combinations, changing something and then removing and plugging the phone again. Now, it is recognized by adb, even HID seems to work, although it wasn't able to bypass UAC in Win8 properly. However, the buttons WERE "pressed". Don't know what to say. Edit: Problem appeared again after rebooting phone. I will soon narrow down the workaround.

mitros123 commented 7 years ago

Update number 3: Ok. There is definitely a problem, and I could not find the workaround. I just didn't seem to work again, even after trying every possible combination: When USB debugging is activated, even if I connect the phone to USB 2.0, use PTP or something else, or enable advanced reboot, the connection to the pc drops that very moment. No idea what to do next.

mitros123 commented 7 years ago

More updates: When phone boots without usb debugging enabled, when plugged into a pc it does not show the files. If I change from MTP to PTP and back again, the files can be seen. If the phone boots with usb debugging enabled, when I disable it the files can be seen. However, if usb debugging is enabled on boot, the process " /sbin/adbd --root_seclabel=:u:r:su (... more that cannot be seen) " constantly eats ~22% of the cpu (and much battery) (seen with "top" run with root privileges). This does not stop even if I disable usb debugging. I need to reboot to stop it.

rob070511 commented 7 years ago

I tried the replicate the issue on my oneplus three however on my device it works fine, have you tried a reset? Also i rooted and flashed TWRP manually via linux fastboot instead of the toolkit but it shouldn't make any difference the only two zips are the same as yours.

mitros123 commented 7 years ago

Well no I did not reset, but that would be an ordeal to get everything back up again... I do not think that currently I have time for this :(

sicklebrick commented 7 years ago

Identical behaviour here, right down to the usb type selector showing one thing and being another.

Some days it works, some days it doesn't. Tried front/back USB ports, different machines, official cables, other cables with adapters, no hub, with hub, with another hub, etc Just nothing in the device manager so long as debugging is enabled. I tried removing nethunter apps to see if something weird was going on at startup, but that didn't seem to help.

TomerLFO commented 6 years ago

If anyone still having this issue, I think I found a workaround. I was trying to search for any solution online but no luck until I tried to wipe cache (Won't delete Apps, files and etc..) start the device and it worked like a charm.

jcadduono commented 6 years ago

seems to be happening with elementalx kernels on other devices as well