Unlike iOS development where XCode knows all devices it should test on (because Apple monopolized all iOS supported devices), the Android Development Toolkit doesn't know all Android devices in the wild so it needs a bit more tweaking. If running adb devices doesn't list your USB-connected Android device, don't fret. There's a fix for that. Here's how to do it on the Mac:
- If you haven't already (which would be weird because you're already trying to use ADB), download and install the Android Development Toolkit bundle.
- Connect device via USB
- Launch System Information via Spotlight search or via Apple icon on dock > About this Mac > More Info > System Report
- Go to Hardware > USB and select your device from the USB device tree
- Take note of the vendor ID. In my case it's 0x2207.
- Go to Terminal and type in open ~/.android/adb_usb.ini -a TextEdit
If adb_usb.ini doesn't exist yet, you may not have ran the Android Development Toolkit. That's okay. You can create a new adb_usb.ini file yourself. As long as it's in <homedir>/.android/
- When the file opens in TextEdit, add your device's vendor ID in one line. It should look like this:
# ANDROID 3RD PARTY USB VENDOR ID LIST -- DO NOT EDIT. # USE 'android update adb' TO GENERATE. # 1 USB VENDOR ID PER LINE. 0x2207 0x04E8
- Restart your ADB server by invoking adb kill-server and adb start-server from command line.
- Run adb devices and see if your USB device is already discovered this time.
Did it work for you? Let me know. I got most of these info from Mario Wehr's post and just collated some information in the comments and my experience.
Cover image from XDA.