Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

adb not finding my device / phone (MacOS X)

Tags:

android

adb

Important Update : As @equiman points out, there are some USB cables that are for charging only and do not transmit data. Sometimes just swapping cables will help.

Update for some versions of adb, ~/.android/adb_usb.ini has to be removed.

Executive summary: Add the Vendor ID to ~/.android/adb_usb.ini and restart adb

Full Details: Most of the time nothing will need to be done to get the Mac to recognize the phone/device. Seriously, 99% of the time "it just works."

That being said, the quickest way to reset adb is to restart it with the following commands in sequence:

  adb kill-server
  adb devices

But every now and then the adb devices command just fails to find your device. Maybe if you're working with some experimental or prototype or out-of-the-ordinary device, maybe it's just unknown and won't show up.

You can help adb to find your device by telling it about your device's "Vendor ID," essentially providing it with a hint. This can be done by putting the hex Vendor ID in the file ~/.android/adb_usb.ini

But first you have to find the Vendor ID value. Fortunately on Mac this is pretty easy. Launch the System Information application. It is located in the /Applications/Utilities/ folder, or you can get to it via the Apple Menu in the top left corner of the screen, select "About this Mac", then click the "More Info..." button. Screen grab here:

System Information, Hardware USB tree

Expand the "Hardware" tree, select "USB", then look for your target device. In the above example, my device is named "SomeDevice" (I did that in photoshop to hide the real device manufacturer). Another example would be a Samsung tablet which shows up as "SAMSUNG_Android" (btw, I didn't have to do anything special to make the Samsung tablet work.) Anyway, click your device and the full details will display in the pane below. This is where it lists the Vendor ID. In my example from the screenshot the value is 0x9d17 -- use this value in the next command

echo 0x9d17 >> ~/.android/adb_usb.ini

It's okay if you didn't already have that adb_usb.ini file before this, most of the time it's just not needed for finding your device so it's not unusual for that file to not be present. The above command will create it or append to the bottom of it if it already exists. Now run the commands listed way above to restart adb and you should be good to go.

adb kill-server ; adb devices

* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached 
123ABC456DEF001 device

Solution specific to Nexus 4 and Nexus 5 for OS X

Got no device listed in the "List of devices attached" when I ran: adb devices

Fix:

  1. Get the SDK (Latest Version) from developer.android.com
  2. Put developer mode on nexus 4 ( About Phone > Build Number > tap 7 times to enter Dev Mode)
  3. A new menu option will come up in the 'Settings' : { } Developer Options
  4. Make sure you check the following under { } Developer options:
    • USB Debugging : Debug mode when USB is connected (Accept the RSA fingerprint popup)
    • Verify apps over USB : Check apps installed via ADB/ADT for Harmful behavior

Try listing your device from ./adb devices and it should work.

Answer taken from: Any idea why adb does not recognize my nexus 4 on mac


If you have installed the application EasyTether, this can interfere with ADB.

From this page you can execute the command:

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

this will unload your EasyTether extension.

If you need to re-enable EasyTether for tethering, I believe you can use:

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

This worked on my Samsung Galaxy S2. It's been necessary in my case to execute the kextunload command everytime I reboot.


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


I had a similar issue. I've discovered that MTP is not supported in OSX. I changed it to PTP, I was promoted to approve my laptop and then my device was finally listed (LG G3).

enter image description here