Android ADB not detecting device in Mac OS X altho

2019-03-18 04:15发布

After installing android studio, I installed ADB as well. However, for some reason ADB doesn't detect my device. To make a note I think I have done all the basic stuff I found online, i.e. :

  • Set device in Developer mode and enable USB debugging
  • Cable works well (Android file transfer automatically opens when I connect the device)

  • Installed Java JDK 8

  • I have done 'adb kill-server', restarted my device and Mac but still not working

I'm using Android Studio 2.2 and running Mac OS X Sierra on my Laptop, and the android phone is running Android 5.0.1 (on an LG Phone)

NB : I have tried the other solutions on stack overflow but thats not the problem.

ADB (is installed) and works from the command line, but when I run :

  • 'adb usb' command, it says 'error: no devices/emulators found'
  • 'adb devices' command, it prints 'List of devices attached' with an empty line beneath.

I believe this is a specific issue and the general solutions to install ADB or restart doesn't work here as I have tried all that.

  • I have removed and reinstalled android studio, still not working.

  • I have removed and reinstalled adb and adb & fastboot, still not working.

  • I have restarted my device, disabled and re-enabled developer mode, still not working.

  • Obviously, I have unplugged and plugged the cable back in several times, still not working (only Android File Transfer keeps coming up)

Just in case, I have rooted my device, could that be the problem or that doesn't matter?

Please can anyone help?

6条回答
在下西门庆
2楼-- · 2019-03-18 04:49

My solution with Android 7:

  • Activate developer mode by going to settings > about phone > software info > tap "build number" 7 times
  • plug usb into phone <-> macbook and select "charging" option
  • settings > Developer Options > enable "USB debugging" (if this field is disabled, first revoke usb debugging then unplug and plug back in)
查看更多
疯言疯语
3楼-- · 2019-03-18 04:55

Go to developer options and enable USB Debugging:

Settings > More > Developer Options > Debugging > USB Debugging.

Note:

You have to enable developer mode first

查看更多
仙女界的扛把子
4楼-- · 2019-03-18 04:56

None of these answers were enough for me. I was already in USB debugging enabled state and also had switched USB configuration to PTP. It was still in always charging mode no matter what I do. I had even reinstalled all android related stuff , tried on multiple devices to find a fix. Finally what worked for me was getting a new cable.

I had posted a question here(now marked as duplicate) since these answers didn't suffice my situation.

查看更多
姐就是有狂的资本
5楼-- · 2019-03-18 05:02

I might be a bit late to the party on this one, but I just clean installed my MBP and encountered the same issue. I tried the things suggested here but nothing worked.

What I had to do to fix it was "Revoke USB debugging authorizations" from the Developer options.

Once I did that, it offered up the usual "did you want to allow debugging on this device" option, and everything was back to normal.

Hope this helps someone out there!

查看更多
男人必须洒脱
6楼-- · 2019-03-18 05:05

If anyone is still having problems, consider the cable you are using. Not all USB cables are created equal! Some will charge but not allow data transfer. See this post.

查看更多
一夜七次
7楼-- · 2019-03-18 05:09

Finally got the weird problem fixed :-

You basically need to set the USB mode to PTP mode instead of Media Transfer Protocol (MTP) mode.

When I connected the device via USB the USB icon and Debugging Mode Icon appeared on the status bar on the device.

If you open control centre by swiping down from the top, you should see a "Media device MTP" - Tap for more USB options. Tap it and switch the mode to "Send Images (PTP)" mode and it should ask you if you want to enable USB debugging. Enable it and the device should be recognised by ADB and Android Studio now.

Thanks for your time to those that offered other solutions.

Cheers

查看更多
登录 后发表回答