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
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.
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.
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/Contentssudo 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 GW620The 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
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.
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.
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.