Support adb device-targeting arguments in ant scripts.

Example of usage:
  $ ant install -Dadb.device.arg=-d

SDK BUG 2172690

Change-Id: I196441f9aab888b1356b4fc0255842570be5140f
diff --git a/tools/scripts/android_rules.xml b/tools/scripts/android_rules.xml
index 5b32736..a235716 100644
--- a/tools/scripts/android_rules.xml
+++ b/tools/scripts/android_rules.xml
@@ -28,6 +28,11 @@
 
     <!-- Properties -->
 
+    <!-- Tells adb which device to target. You can change this from the command line
+         by invoking "ant -Dadb.device.arg=-d" for device "ant -Dadb.device.arg=-e" for
+         the emulator. -->
+    <property name="adb.device.arg" value="" />
+
     <property name="android.tools.dir" location="${sdk.dir}/tools" />
     <!-- Name of the application package extracted from manifest file -->
     <xpath input="AndroidManifest.xml" expression="/manifest/@package"
@@ -177,6 +182,7 @@
         <sequential>
             <echo>Installing ${out.debug.package} onto default emulator or device...</echo>
             <exec executable="${adb}" failonerror="true">
+                <arg value="${adb.device.arg}" />
                 <arg value="install" />
                 <arg value="-r" />
                 <arg path="${out.debug.package}" />