Adb Not Finding My Device/Phone (Macos X)

adb not finding my device / phone (MacOS X)

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

Android device does not show up in adb list

Looks like the installed driver was in bad state. Here is what I did to make it work:

  1. Delete the device from Device Manager.
  2. Rescan for hardware changes.
  3. List item "Slate 21" will show up with "Unknown driver" status.
  4. Click on "Update Driver" and select /extras/google/usb_driver

Device Manager will find the driver and warn you about installing it. Select "Yes."
This time the device got installed properly.

Note that I didn't have to modify winusb.inf file or update any other driver.

Hope this helps.

Not able to access adb in OS X through Terminal, command not found

The problem is: adb is not in your PATH. This is where the shell looks for executables. You can check your current PATH with echo $PATH.

Bash will first try to look for a binary called adb in your Path, and not in the current directory. Therefore, if you are currently in the platform-tools directory, just call

./adb --help

The dot is your current directory, and this tells Bash to use adb from there.

But actually, you should add platform-tools to your PATH, as well as some other tools that the Android SDK comes with. This is how you do it:

  1. Find out where you installed the Android SDK. This might be (where $HOME is your user's home directory) one of the following (or verify via Configure > SDK Manager in the Android Studio startup screen):

    • Linux: $HOME/Android/Sdk
    • macOS: $HOME/Library/Android/sdk
  2. Find out which shell profile to edit, depending on which file is used:

    • Linux: typically $HOME/.bashrc
    • macOS: typically $HOME/.bash_profile
    • With Zsh: $HOME/.zshrc
  3. Open the shell profile from step two, and at the bottom of the file, add the following lines. Make sure to replace the path with the one where you installed platform-tools if it differs:

    export ANDROID_HOME="$HOME/Android/Sdk"
    export PATH="$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/platform-tools:$PATH"
  4. Save the profile file, then, re-start the terminal or run source ~/.bashrc (or whatever you just modified).

Note that setting ANDROID_HOME is required for some third party frameworks, so it does not hurt to add it.

Android studio on Mac cannot detect connected USB phone

There are some great responses that worked for others, like this one or this one which seemed to work for others.

In my case, the issue was Tizen Studio (I was working on a watch app for Samsung Gear). Through this poster's research, found that the adb error could not open interface: e00002c5 implies that the usb device is already in use by some other driver.

So it seems Tizen Studio takes up the usb driver resource even though it is not using it. Quitting the application will automatically allow adb devices to list your device and run the project on it.

Hope this helps other lost souls.

Android Studio (adb) stopped to see my device (Mac)

Probably obvious but did you try:

Restarting adb using server commands:

adb kill-server
adb start-server

Use a known good USB cable ie. one that works for the other devices as a worn cable can stop working.

Make sure when you turn developer options on (on the device) that you also turn on USB Debugging. USB debugging icon should be a persistent notification on the phone.



Related Topics



Leave a reply



Submit