3

Is it possible to connect two (or more) android devices via USB to the dev machine and debug programs on both devices at the same time? I am trying to do this with an Atrix and Nexus One with no luck.

I couldn't find much documentation about this leading me to believe that it isn't possible..

irwinb
  • 993
  • 2
  • 10
  • 20

1 Answers1

4

You can certainly attach two Androids by USB to the same dev machine, and you can debug both of them.

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

If you are using Eclipse (Helios), you can select the device in the Android Device view, and see output in the Android Logcat view. And I observe that if you select Android A then Android B a few times, you get intermingled Logcat output from both devices. I don't know if that's the design behavior, and it may not work the same on all versions of Eclipse, but it can be helpful.

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

Torid
  • 4,176
  • 1
  • 28
  • 29
  • This definitely does work. I regularly have three or four Android devices connected, and I switch between their LogCat output by clicking the appropriate device in the Android Device view. (I'll admit that this also causes confusion when I forget which device's LogCat I'm looking at....) One thing mentioned here that I haven't seen is intermingled logcat output. For me, selecting a different device in the Device view seems to clear the logcat window and reload the current logcat information for the current device. I never see them mixed together. – Chris Oct 06 '11 at 23:28
  • That would make the most sense. It has started working now though..after I unplugged and plugged the devices until both were "online". Before only one would show that it was online. The intermingled logcat output was definitely helpful. – irwinb Oct 07 '11 at 00:25