Multiple Deployment Devices via Maven Android Devices on a USB Hub

I have been looking for SO for a while, but cannot find a definitive answer.

I recently bought a 7-port USB hub for my development machine, it had 7 different Android devices.

This was done primarily to ensure that everything was charged, but I'm also trying to figure out whether it is possible to configure Maven or even DDMS) to recognize devices and deploy them right away through a hub?

+5
source share
2 answers

Android SDK apk . , .

android-maven-plugin, , android: : , pom.xml:

, . "usb" "emulator" USB- .

  • : java.lang.String
  • :
  • : ${android.device}

, , apk . , , .

pom.xml:

<plugin>
  <groupId>com.jayway.maven.plugins.android.generation2</groupId>
  <artifactId>android-maven-plugin</artifactId>
  <extensions>true</extensions>
  <configuration>
    <sdk>
      <platform>13</platform>
    </sdk>
    <undeployBeforeDeploy>true</undeployBeforeDeploy>
    <!-- Install apk to multiple attached devices -->
    <device>usb</device>
   </configuration>
</plugin>

, mvn android:deploy:

[INFO] Waiting for initial device list from the Android Debug Bridge
[INFO] Found 2 devices connected with the Android Debug Bridge
[INFO] android.device parameter set to usb
[INFO] Device 0123456789abcd_samsung_GT-I9100 found.
[INFO] Successfully uninstalled com.company.app from 0123456789abcd_samsung_GT-I9100
[INFO] Device 0123456789efg_HTC_HTCDesire found.
[INFO] Successfully uninstalled com.company.app from 0123456789efg_HTC_HTCDesire
[INFO] Found 2 devices connected with the Android Debug Bridge
[INFO] android.device parameter set to usb
[INFO] Device 0123456789abcd_samsung_GT-I9100 found.
[INFO] Successfully installed C:\workspace\my-app\target\app-1.0.0-SNAPSHOT.apk to 0123456789abcd_samsung_GT-I9100
[INFO] Device 0123456789efg_HTC_HTCDesire found.
[INFO] Successfully installed C:\workspace\my-app\target\app-1.0.0-SNAPSHOT.apk to 0123456789efg_HTC_HTCDesire
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

, Android-, .

+4

, Android Maven Plugin .

( ), ( usb), ( ) ( ).

, Android Maven Plugin, Android Maven:

, (, , , , , ), , , .

, USB udev . dev.

adb devices 

Android Maven Plugin, ,

mvn android:devices

PS: .

+1

All Articles