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?
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
4 - Maybe unplug/plugin your phone.
And hopefully you see your device.
If
adb devices
does not list the device though you have plugged it in to the system, you need to ensure thatUSB debugging
option is checked in theDeveloper Options
tab underSettings
. Under Android 4.2.2 and above (from what I have observed), theDeveloper Options
are hidden unless explicitly revealed. To makeDeveloper Options
active, tap 7 times on theSettings > About device > Build number
. Once done, go back toSettings > Developer Options
and activateUSB Debugging
.Using
adb version 1.0.31
, I was able to make the device visible.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
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.
restart the adb server works for me, in emulator, vmwware and virtual
if you´re using a virtual machine, make sure you have an IP assigned with:
to go back:
if you have:
change your configuration to:
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
Referenced from this link!
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
toGW620
The end result should look something like this:
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