I’ve searched on SO for a while on this but cannot find a definitive answer.
I’ve recently purchased a 7 port USB Hub for my dev machine, with 7 differing Android devices on it.
This was done primarily to keep everything all charged, but I am also trying to find out if it possible to configure Maven or even DDMS) to recognize the devices and deploy to all of them at once through the hub?
The current version of Android SDK does not support install apk on multiple connected devices at once. This is the hard limitation, so the only workaround at the moment is to iterate the attached devices and issue the install command for each of them.
If you look at the android-maven-plugin documentation, you can see there is an interesting parameter in android:deploy goal that you can specify in pom.xml:
Well, the documentation claims that it will install apk to the only connected device. I have tested it myself, it also work if multiple devices are connected.
Sample pom.xml:
Sample log by running
mvn android:deploy:If you want to know how android-maven-plugin implement it, check out source code here.