Bec d'état - Rebecca Scott

Blog | Links | Archive
About | Resume | Advisor profile | Projects | Contact


~/Xamarin Studio can't find my Android device

23 Mar 2014

Know what? This doesn’t work. Try setting the USB transfer mode (Settings, Storage, (in the menu) USB computer connection) to ‘Camera (PTP)’. Found in this StackOverflow answer. I’ll leave the below for reference in case it comes in handy.

Messing with Android Developer Bridge (ADB)

I installed Xamarin Studio on Windows 8 to start on some Android development. I was able to debug directly on my little oldish Nexus 7 (running Android 4.4.2) (Xamarin’s instructions are here):

This worked fine, yay for me. The problem was, after restarting my system (after an upgrade to Windows 8.1 (how seamless is that now by the way?)) Xamarin Studio wasn’t seeing my device. It was still showing up in Device Manager correctly and debug mode was still enabled, but something broke.

Turns out the something is the Android Debug Bridge, or ADB. I found a reference deep in this document (WARNING PDF) from Xamarin:

Helpful but not extremely helpful. That link to adb program is broken by the way. I found some nicer information about the Android Debug Bridge on Android’s developer site.

Next step is actually finding the ADB program, which is part of the Android SDK. I looked all over my machine for the SDK. Turns out Xamarin installs the SDK in the user’s local AppData directory, in X:\Users\username\AppData\Local\Android\android-sdk. Then adp.exe lives in the platform-tools directory.

After all that, I dropped a batch file on my desktop to restart the bridge, in case this happens again:

@C:\Users\bec\AppData\Local\Android\android-sdk\platform-tools\adb.exe kill-server
@C:\Users\bec\AppData\Local\Android\android-sdk\platform-tools\adb.exe start-server
@pause

Results: