adb not finding my device / phone (MacOS X)

2019-01-01 08:05发布

Doing Android development on a Mac and this very new phone I have doesn't show up in the devices list in adb. Lots of other phones and devices work fine for me so I know my setup is good.

I have debugging enabled (Settings --> Applications --> Development --> USB debugging) on the phone, but it just doesn't show up when I run adb devices

标签: android adb
29条回答
余欢
2楼-- · 2019-01-01 08:17

Its damn strange but just plugging to the USB port located next to Thunderbolt port on my mid-2014 MBP with Retina worked!

The other USB port would simply not recognise the device.

查看更多
浪荡孟婆
3楼-- · 2019-01-01 08:17

I was trying to connect an old phone that I use to test apps on older API versions. Today adb was not finding it.

After trying pretty much everything here, I figured out that the phone was not even showing the system notification about the USB connection going on.

So I looked around for that issue, and found the solution here (credits to the original source):

  1. Remove phone from PC and remove battery to shut off phone.
  2. Plug USB cable into PC.
  3. Plug USB cable (other end) into phone.
  4. The PC install new hardware appropriate drivers for a few minutes (phone without battery)
  5. Unplug USB cable from phone
  6. Put battery back in and turn on phone
  7. As the phone boots, hold down Volume up and down. Phone boots into safe mode.
  8. Plug USB cable into phone.
  9. I saw notification about USB MTP-connecting on the phone. PC have found my phone!
  10. After the reboot in normal mode problem was fixed

Not sure step 4. is of any use here on macOS, however I did all the steps and it worked well.

查看更多
孤独总比滥情好
4楼-- · 2019-01-01 08:22

I was experiencing the same issue and the following fixed it.

  • Make sure your phone has USB Debugging enabled.
  • Install Android File Transfer
  • You will receive two notifications on your phone to allow the connected computer to have access and another to allow access to the media on your device. Enable both.
  • Your phone will now be recognized if you type 'adb devices' in the terminal.
查看更多
怪性笑人.
5楼-- · 2019-01-01 08:24

If you are using following devices:
Samsung S3 GT-I9305 (Android 4.1.2)
Mac OS 10.6.8

Do following:

# echo "0x04e8" >> ~/.android/adb_usb.ini
# adb kill-server
# adb devices

(if you are not using Samsung device, change the Vendor ID "0x04e8" to the correct value of your Vendor)

If still not working, you may want to try following:

(1) On your Samsung device, disable "USB Debugging" and re-enable it again
(and try the adb commands again)

(2) Disconnect the USB cable, and re-connect it again

(3) Uninstall Samsung Kies

(4) Install Android File Transfer

(5) Reboot your Mac and the Samsung device

(6) Use hardware device to test your Android app

After getting the devices connected but you suddenly unplug the USB cable, and suppose now "adb devices" cannot see your device any more, even after "adb kill-server", in this case, you may want to try the following:

(1) power off your Mac
(2) disable "USB debuggine" on your Samsung device
(3) power off your Samsung device
(4) power on your Mac
(5) power on your Samsung device
(6) enable "USB debuggine" on your Samsung device
(7) connect the USB cable
(8) Run "adb devices"
(9) You should see the attached device now

查看更多
有味是清欢
6楼-- · 2019-01-01 08:24

In my case, USB debugging wasn't enabled on my device yet connecting the device to my macbook didn't cause the familiar "Allow USB Debugging" dialog to pop up on the screen.

查看更多
长期被迫恋爱
7楼-- · 2019-01-01 08:25

Also make sure you are not using an USB cable designated for charging only. This just got me. And it actually was labelled "for charging only"

查看更多
登录 后发表回答