Reputation: 661
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?
Upvotes: 52
Views: 174200
Reputation: 926
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.
Upvotes: 60
Reputation: 2082
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.
Upvotes: 0
Reputation: 25094
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
Upvotes: -1
Reputation: 37969
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".
Upvotes: 17
Reputation: 131
THIS IS FOR A MAC ONLY!
Here’s what you need to do to make your phone visible to adb:
cd /System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/IOUSBCompositeDriver.kext/Contents
sudo nano Info.plist
(or vi, or emacs, or whatever console editor you prefer)IOUSBComposite
section (from <key>
to </dict>
)bDeviceSubClass
value from 0 to 2IOUSBComposite
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>
sudo diskutil repairpermissions /
and let it finishsudo touch /System/Library/Extensions
and wait a few mins for the extension reindexing to finishadb devices
should now see your phoneNote, 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
Upvotes: 13
Reputation: 10558
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.
Upvotes: 13
Reputation: 9684
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.
Upvotes: 6
Reputation: 4403
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.
Upvotes: 8
Reputation: 2185
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
Upvotes: 0
Reputation: 21
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.
Upvotes: 0
Reputation: 146
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
Upvotes: 0
Reputation: 7120
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.
Upvotes: 2
Reputation: 6581
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.
Upvotes: 15
Reputation: 827
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.
Upvotes: 1
Reputation: 311
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.
Upvotes: 25
Reputation: 4207
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....
Upvotes: 32