52

I am developing Android application on macOS and my application runs well on the emulator. I want to run it on the device, but when I run adb devices I get nothing.

localhost:platform-tools BF$ adb devices 
List of devices attached 

localhost:platform-tools BF$

I have checked the documentation in the reference about "Setting up a Device for Development". I have done everything step by step.

In the documentation, there are some words: Setup your system to detect your device. If you're developing on Mac OS X, it just works. Skip this step.

Now, I can't find any solution. Does it need special drivers for Android Devices?

2
  • 2
    Have you enabled USB debugging on the device? Can you mount the device as a usb mass storage device to test that the USB interface is functional? Can you try a different computer or android device? Does Mac OS have any system logs which will list the VID/PID of newly connected USB devices Commented May 17, 2011 at 6:27
  • 1
    Yes. I have enabled the USB debugging on the device. OK.I will try some solution later. thanks your warmly help~~~ I can see the storage card in the device. but use the "adb devices" can't list the device. Commented May 17, 2011 at 7:26

16 Answers 16

60

I know this thread is old, but I think this could still help. Almost all the time "it just works" on OS X, but sometimes new/prototype or obscure devices aren't picked up. Try to help it out with these steps (I'm not near my Mac right now, but I did this last night and think I remember):

  1. Open System Profiler and find the device on USB. View it's details to find the Vendor ID. For example, Motorola devices will show 0x2bb8. Or just Google for your vendor's hardware id.

    If nothing shown, make sure to try different cables. Android File Transfer is good for detecting the device if you have a valid cable.

  2. Edit ~/.android/adb_usb.ini to include that Vendor ID. If the file doesn't exist, create it with that line only.

  3. Restart ADB

    adb kill-server 
    adb start-server
    
  4. Maybe unplug/plugin your phone.

And hopefully you see your device.

6
  • 1
    I originally did this for the Kindle Fire. I just updated a bunch of android files through the eclipse manager and it "reset" my old adb_usb.ini. Once I added the KF id of 0x1949 to the adb_usb.ini again I unplugged/plugged my device back into USB and viola.
    – Jacksonkr
    Commented May 3, 2012 at 21:07
  • 5
    YES YES YES! Thank you so much, jarvisteve. You are a hero. Editing ~/.android/adb_usb.ini is the way to go!
    – Bram
    Commented Oct 16, 2012 at 20:48
  • 1
    it's not working in sdk v22. if I added texts in adb_usb.inifile. after I adb kill-server, I cannot start server via adb start-server. It will complain * daemon not running. starting it now on port 5037 *. ADB server didn't ACK * failed to start daemon * error: cannot connect to daemon. It would only recover if I cleared the added texts!
    – Xiao
    Commented Jun 13, 2013 at 3:20
  • 2
    @Sean You may have edited the file incorrectly. I had the same issue at first, because I left one empty line between the generated comments and the vendor ID. The issue was then solved by removing every empty lines in the file. HTH
    – Justin Lau
    Commented Aug 23, 2013 at 11:22
  • 1
    @JustinLau: The same happened to me when I had a blank line after the vendor ID. As you say, removing every empty line solved that problem (the server starts successfully now). However, adb still can't see my device. :-(
    – LarsH
    Commented Jun 6, 2015 at 0:11
32

Are you by any chance also using the app EasyTether while connected to your Mac? If you happen to use this app, you're in luck, because the solution is to call:

sudo kextunload -v /System/Library/Extensions/EasyTetherUSBEthernet.kext

from a terminal. I forget if you have to reboot or not.

This will disable tethering, but you can now see your device via adb.

To renable tethering once you're done debugging, use

sudo kextload -v /System/Library/Extensions/EasyTetherUSBEthernet.kext

Of course, if you're not using EasyTether, then hopefully someone else has an idea....

12
  • 2
    No,there doesn't exist such software on my Mac. Commented May 17, 2011 at 7:37
  • 3
    I was totally baffled why I couldn't see my Android devices anymore and you totally saved my day! I would have had no idea this was the issue, thanks a million! Commented Jun 7, 2011 at 0:02
  • 1
    Thank you! How did you figure out that the EasyTether kext was causing the issue? I would love to learn how you did that.
    – Eddified
    Commented Aug 24, 2011 at 4:36
  • 3
    FAQ for EasyTether mobile-stream.com/easytether/android_faq.html#adbmacosx .
    – levis501
    Commented Aug 24, 2011 at 5:44
  • 1
    I actually notice that once the device is discovered, I can re-enable tethering and it stays registered w/ the adb.
    – Paul
    Commented Mar 24, 2012 at 23:52
25

Same problem here. osx 10.6.6 and adb devices giving $ ./adb devices List of devices attached ...empty....

Rebooting the phone didn;'t help although it was listed with adb devices just for a second during the booting process.

Debugging was turned on in adroidsettings->applications

What finally made it tick: turning debugging mode off and on again.

0
17

If you're struggling with such an issue using Lollipop (Android 5.*) probably you guys should do one simple step that I'd done before my ADB (I use Ubuntu) got my phone:

Change USB PC connection type to "Send images(PTP)" (before I've been using "Media device(MTP)")

Just like this:

Screenshot

And don't forget to activate checkbox "USB debugging".

0
15

I had this problem today where the phone was charging when connected, but wasn't seen by the Mac. It turned out the micro USB cable that I was using was for charging only and didn't do data. Once I changed the USB cable it started working fine.

3
  • Hard to believe but this is so true! I mistakenly used another cable looks same today, it can charge but data won't work. I reliazed that by reading your answer, replaced and it works! Thanks!
    – Billy Chan
    Commented Jun 30, 2015 at 8:45
  • This has been the case for me several times. You'd think the newer cables would work find, but it usually turns out to the be the older, "plain" ones that work.
    – daleyjem
    Commented Nov 22, 2016 at 2:30
  • Also very surprised by this one, but sure enough was the problem Commented Dec 20, 2016 at 17:02
13

If adb devices does not list the device though you have plugged it in to the system, you need to ensure that USB debugging option is checked in the Developer Options tab under Settings. Under Android 4.2.2 and above (from what I have observed), the Developer Options are hidden unless explicitly revealed. To make Developer Options active, tap 7 times on the Settings > About device > Build number. Once done, go back to Settings > Developer Options and activate USB Debugging.

Using adb version 1.0.31, I was able to make the device visible.

1
  • This was all that was required to get my cheap Alcatel OneTouch to appear. I can now use it to test using cordova.
    – blythburgh
    Commented Dec 15, 2015 at 15:41
13

Referenced from this link!

THIS IS FOR A MAC ONLY!

Here’s what you need to do to make your phone visible to adb:

  1. Open terminal (Applications/Utilities/Terminal)
  2. cd /System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/IOUSBCompositeDriver.kext/Contents
  3. sudo nano Info.plist (or vi, or emacs, or whatever console editor you prefer)
  4. Copy the IOUSBComposite section (from <key> to </dict>)
  5. Paste the section in at line 66 (right after where it appears) so you have 2 copies in the file
  6. Change the bDeviceSubClass value from 0 to 2
  7. Change the key name from IOUSBComposite to GW620

The end result should look something like this:

                    <key>GW620</key>
                    <dict>
                            <key>CFBundleIdentifier</key>
                            <string>com.apple.driver.AppleUSBComposite</string>
                            <key>IOClass</key>
                            <string>IOUSBCompositeDriver</string>
                            <key>IOProviderClass</key>
                            <string>IOUSBDevice</string>
                            <key>bDeviceClass</key>
                            <integer>0</integer>
                            <key>bDeviceSubClass</key>
                            <integer>2</integer>
                    </dict>

  1. sudo diskutil repairpermissions / and let it finish
  2. sudo touch /System/Library/Extensions and wait a few mins for the extension reindexing to finish
  3. adb devices should now see your phone

Note, this is VERY kludgy, and will probably break every time OSX updates itself, but it works. I can finally stop rebooting every time I want to work on the phone! :D

4
  • this worked for me!, nexus 4(also an lg model). Needed to reboot osx before it took effect. Also, beware if you screw up editing Info.plist you could risk losing connection to your usb keyboard/mouse! (luckily I had a bluetooth keyboard nearby) - worked on OSX v10.6.8
    – Peter P.
    Commented Oct 13, 2013 at 16:57
  • Worked for me in mavericks, did not need to reboot. Commented Dec 2, 2013 at 16:57
  • On El Capitan (10.11.3) sudo diskutil repairpermissions / just gives the error message diskutil: did not recognize verb "repairpermissions"; type "diskutil" for a list. Any idea on how to get around it? Commented May 4, 2016 at 18:48
  • this worked for me, although strangely enough all I needed to do was just open the contents of the directory in step 2)... nothing more, and all of a sudden my macbook started recognizing my device. I had tried every other remedy and this problem was killing me. Thanks!
    – hunter
    Commented Jan 1, 2017 at 17:33
8

I was having this problem. It turns out my fix was to change the USB cable I was connecting with. I switched back to using the cable that came with the phone and it worked.

Using Samsung Galaxy Player and Samsung micro USB.

Yes. This is incredibly dumb.

1
  • I wonder if this is my problem. I'm having trouble with a Samsung Galaxy Tab 4, 7". Don't know if it came with a cable though.
    – LarsH
    Commented Jun 6, 2015 at 0:15
6

If using adb devices on Mac OS X no device is displayed and, of course, you have enabled the USB debugging on your device (see http://developer.android.com/tools/device.html), then try with:

$ android update adb
adb has been updated. You must restart adb with the following commands
    adb kill-server
    adb start-server

Then:

$ adb kill-server
$ adb start-server
* daemon not running. starting it now on port ... *
* daemon started successfully *

And finally:

$ adb devices
List of devices attached 
......  device

Your device should be now in the list.

2
  • Indeed the USB debugging option in my phone did the trick for me. I had enabled it before, so I thought it was still enabled, therefore it took me a long time to realize to actually double check the option. Turns out that it turns itself off automatically. Commented Jun 3, 2015 at 6:42
  • Turning on USB debugging did it for me. (I didn't even have to kill the adb server.) This is strange, because elsewhere I read that I should turn off USB debugging.
    – LarsH
    Commented Jun 6, 2015 at 0:18
2

On Mac Lion :

I just had to go to /path/to/android-sdk/tools and run android adb update for the devices to be detected.

1
  • When I run android update adb in the tools folder it replies "command not found". No workie.
    – Alyoshak
    Commented Sep 15, 2015 at 21:29
1

make sure you have same / higher API level installed on SDK packages with your devices.

example :

I have Android 2.3.4 on my Xperia Play. ADB wouldn't detect my device if theres only API 10 (Android 2.3.3) installed on my Mac. When i installed SDK 11 (Android 3.0) -- since I didn't found any SDK package for 2.3.4, the ADB working fine.

hope this help you.

0

restart the adb server works for me, in emulator, vmwware and virtual

adb kill-server
adb start-server

if you´re using a virtual machine, make sure you have an IP assigned with:

Alt + 1
type: netcfg

to go back:

Alt + 7

if you have:

 eth0: DOWN 0.0.0.0/XX

change your configuration to:

NAT or BRIDGE

Restart the virtual machine and server, and tried again.

if you´re using a phone or tablet:

  • unplug your device

  • wait a moment and plug it again

  • and restart the adb server

Hope this help you

0

You will need USB driver installed correctly and have debugging enabled in settings. if these dont work there could be something wrong with your device.

Also see this.

0

The same problem I had on Windows 7. It happened that I was using USB tethering feature alongwith trying to use adb. There are some workarounds for this Usb tether and debug at the same time

0

Just because your Android device is in Developer Mode, doesn't mean it has USB debugging enabled!! Go into Settings > Developer options then enable "USB debugging" and then you should see your device. It's a common mistake that's easily overlooked.

-1

I had Xamarin installed and tried to use Unity. Basically in any case you have to kill any application that might be talking to your device through ADB

Not the answer you're looking for? Browse other questions tagged or ask your own question.