Java – Android – Connect multiple devices via USB

Android – Connect multiple devices via USB… here is a solution to the problem.

Android – Connect multiple devices via USB

Is it possible to connect two (or more) Android devices to my dev machine via USB and debug the program on both devices at the same time? I’m trying to do this with Atrix and Nexus One, but without success.

I can’t find much documentation on this that leads me to believe it’s impossible…

Solution

You can of course connect two Androids to the same development machine via USB, and you can debug them.

If you’re using adb, you’ll have to specify which Android you’re debugging, and you can only debug one at a time.

If you are using Eclipse (Helios), you can select the device in the Android Devices View and view the output in the Android Logcat View. I’ve observed that if you select Android A multiple times and then select Android B, you get mixed Logcat output from both devices. I don’t know if this is a design act, it may not work the same way on all Eclipse versions, but it might help.

Another approach is to monitor one device in Eclipse and another device in DDMS.

Related Problems and Solutions