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 dev
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.
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....
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:
And don't forget to activate checkbox "USB debugging".
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):
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.
Edit ~/.android/adb_usb.ini
to include that Vendor ID. If the file doesn't exist, create it with that line only.
Restart ADB
adb kill-server
adb start-server
Maybe unplug/plugin your phone.
And hopefully you see your device.
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
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.