Remove common-config and switch to AndroidJUnitTest.

bug:21762834
Change-Id: I17e1b44e4429a3fbeb9f110a74038e4ec306af38
diff --git a/tests/JobScheduler/AndroidTest.xml b/tests/JobScheduler/AndroidTest.xml
index 4b322ae..c8fba92 100644
--- a/tests/JobScheduler/AndroidTest.xml
+++ b/tests/JobScheduler/AndroidTest.xml
@@ -13,11 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Configuration for Job Scheduler Tests">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsJobSchedulerTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS Job Scheduler test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsJobSchedulerTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.jobscheduler.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/acceleration/AndroidTest.xml b/tests/acceleration/AndroidTest.xml
index 5d745c1..1786c8e 100644
--- a/tests/acceleration/AndroidTest.xml
+++ b/tests/acceleration/AndroidTest.xml
@@ -13,11 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Base config for CTS package preparer">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsAccelerationTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS Acceleration test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsAccelerationTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.acceleration.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
 </configuration>
diff --git a/tests/accessibility/AndroidTest.xml b/tests/accessibility/AndroidTest.xml
index 248db71..f60e6b1 100644
--- a/tests/accessibility/AndroidTest.xml
+++ b/tests/accessibility/AndroidTest.xml
@@ -13,18 +13,21 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Base config for CTS package preparer">
-    <include name="common-config" />
-    <option name="run-command:run-command" value="settings put secure enabled_accessibility_services android.view.accessibility.services/.SpeakingAccessibilityService:android.view.accessibility.services/.VibratingAccessibilityService" />
-    <option name="run-command:run-command" value="settings put secure touch_exploration_granted_accessibility_services android.view.accessibility.services/.SpeakingAccessibilityService:android.view.accessibility.services/.VibratingAccessibilityService" />
-    <option name="run-command:run-command" value="settings put secure accessibility_enabled 1" />
-    <option name="run-command:teardown-command" value="settings put secure enabled_accessibility_services &quot;&quot;" />
-    <option name="run-command:teardown-command" value="settings put secure touch_exploration_granted_accessibility_services &quot;&quot;" />
-    <option name="run-command:teardown-command" value="settings put secure accessibility_enabled 0" />
-    <option name="apk-installer:test-file-name" value="CtsAccessibilityTestCases.apk" />
-    <option name="apk-installer:test-file-name" value="CtsSomeAccessibilityServices.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS Accessibility test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsAccessibilityTestCases.apk" />
+        <option name="test-file-name" value="CtsSomeAccessibilityServices.apk" />
+    </target_preparer>
+    <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer" >
+        <option name="run-command" value="settings put secure enabled_accessibility_services android.view.accessibility.services/.SpeakingAccessibilityService:android.view.accessibility.services/.VibratingAccessibilityService" />
+        <option name="run-command" value="settings put secure touch_exploration_granted_accessibility_services android.view.accessibility.services/.SpeakingAccessibilityService:android.view.accessibility.services/.VibratingAccessibilityService" />
+        <option name="run-command" value="settings put secure accessibility_enabled 1" />
+        <option name="teardown-command" value="settings put secure enabled_accessibility_services &quot;&quot;" />
+        <option name="teardown-command" value="settings put secure touch_exploration_granted_accessibility_services &quot;&quot;" />
+        <option name="teardown-command" value="settings put secure accessibility_enabled 0" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.view.accessibility.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/accessibilityservice/AndroidTest.xml b/tests/accessibilityservice/AndroidTest.xml
index 0e821b6..db2707d 100644
--- a/tests/accessibilityservice/AndroidTest.xml
+++ b/tests/accessibilityservice/AndroidTest.xml
@@ -13,11 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Base config for CTS package preparer">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsAccessibilityServiceTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS Accessibility test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsAccessibilityServiceTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.accessibilityservice.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/app/AndroidTest.xml b/tests/app/AndroidTest.xml
index fb9abf9..5a4c7ef 100644
--- a/tests/app/AndroidTest.xml
+++ b/tests/app/AndroidTest.xml
@@ -13,13 +13,14 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Base config for CTS package preparer">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsSimpleApp.apk" />
-    <option name="apk-installer:test-file-name" value="CtsAppTestStubs.apk" />
-    <option name="apk-installer:test-file-name" value="CtsAppTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS App test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsSimpleApp.apk" />
+        <option name="test-file-name" value="CtsAppTestStubs.apk" />
+        <option name="test-file-name" value="CtsAppTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.app.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/browser/AndroidTest.xml b/tests/browser/AndroidTest.xml
index 4b3ec29..c5030db 100644
--- a/tests/browser/AndroidTest.xml
+++ b/tests/browser/AndroidTest.xml
@@ -13,11 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Config for CTS Browser Test Cases">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsBrowserTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS Browser test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsBrowserTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.browser.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/dram/AndroidTest.xml b/tests/dram/AndroidTest.xml
index 8011a7f..019c15d 100644
--- a/tests/dram/AndroidTest.xml
+++ b/tests/dram/AndroidTest.xml
@@ -13,11 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Config for CTS Dram Test Cases">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsDramTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS Dram test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsDramTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.dram.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/filesystem/AndroidTest.xml b/tests/filesystem/AndroidTest.xml
index 65d4296..8b961fe 100644
--- a/tests/filesystem/AndroidTest.xml
+++ b/tests/filesystem/AndroidTest.xml
@@ -13,11 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Config for CTS File System Test Cases">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsFileSystemTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS File System test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsFileSystemTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.filesystem.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
 </configuration>
\ No newline at end of file
diff --git a/tests/jank/AndroidTest.xml b/tests/jank/AndroidTest.xml
index 1a08f4f..c7e476a 100644
--- a/tests/jank/AndroidTest.xml
+++ b/tests/jank/AndroidTest.xml
@@ -13,12 +13,13 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Config for CTS Jank Test Cases">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsUiDeviceTestCases.apk" />
-    <option name="apk-installer:test-file-name" value="CtsJankDeviceTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS Jank test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsUiDeviceTestCases.apk" />
+        <option name="test-file-name" value="CtsJankDeviceTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.jank.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/netlegacy22.api/AndroidTest.xml b/tests/netlegacy22.api/AndroidTest.xml
index 9504848..b40f21a 100644
--- a/tests/netlegacy22.api/AndroidTest.xml
+++ b/tests/netlegacy22.api/AndroidTest.xml
@@ -12,11 +12,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Test module config for legacy android.net APIs as of API 22">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsNetTestCasesLegacyApi22.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS Legacy android.net APIs test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsNetTestCasesLegacyApi22.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.netlegacy22.api.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/netlegacy22.permission/AndroidTest.xml b/tests/netlegacy22.permission/AndroidTest.xml
index c753119..490e979 100644
--- a/tests/netlegacy22.permission/AndroidTest.xml
+++ b/tests/netlegacy22.permission/AndroidTest.xml
@@ -12,11 +12,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Test module config for legacy android.net permissions as of API 22">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsNetTestCasesLegacyPermission22.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS Legacy android.net Permission test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsNetTestCasesLegacyPermission22.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.netlegacy22.permission.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
 </configuration>
diff --git a/tests/openglperf2/AndroidTest.xml b/tests/openglperf2/AndroidTest.xml
index 2bae240..bb489b6 100644
--- a/tests/openglperf2/AndroidTest.xml
+++ b/tests/openglperf2/AndroidTest.xml
@@ -13,11 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Configuration for Location2 Tests">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsOpenGlPerf2TestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS OpenGL test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsOpenGlPerf2TestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.opengl2.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/sample/AndroidTest.xml b/tests/sample/AndroidTest.xml
index 0b165f8..62b0d67 100644
--- a/tests/sample/AndroidTest.xml
+++ b/tests/sample/AndroidTest.xml
@@ -13,12 +13,13 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Base config for CTS package preparer">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsSampleDeviceTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS Sample test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsSampleDeviceTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.sample.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
     <target_preparer class="com.android.compatibility.common.tradefed.targetprep.DynamicConfigPusher">
         <option name="target" value="device" />
diff --git a/tests/tests/animation/AndroidTest.xml b/tests/tests/animation/AndroidTest.xml
index ea1be73..b4a0ad5 100644
--- a/tests/tests/animation/AndroidTest.xml
+++ b/tests/tests/animation/AndroidTest.xml
@@ -13,11 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Configuration for Animation Tests">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsAnimationTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS Animation test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsAnimationTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.animation.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/tests/appwidget/AndroidTest.xml b/tests/tests/appwidget/AndroidTest.xml
index dcdacb4..aabe777 100644
--- a/tests/tests/appwidget/AndroidTest.xml
+++ b/tests/tests/appwidget/AndroidTest.xml
@@ -12,11 +12,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Test module config for App Widget apis">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsAppWidgetTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS App Widget test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsAppWidgetTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.appwidget.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/tests/assist/AndroidTest.xml b/tests/tests/assist/AndroidTest.xml
index 6add0c5..f1af0c4 100644
--- a/tests/tests/assist/AndroidTest.xml
+++ b/tests/tests/assist/AndroidTest.xml
@@ -13,15 +13,17 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Configuration for Assist Tests">
-    <include name="common-config" />
-    <option name="run-command:run-command"
-         value="settings put secure voice_interaction_service android.assist.service/.MainInteractionService" />
-    <option name="apk-installer:test-file-name" value="CtsAssistService.apk" />
-    <option name="apk-installer:test-file-name" value="CtsAssistApp.apk" />
-    <option name="apk-installer:test-file-name" value="CtsAssistTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS Assist test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsAssistService.apk" />
+        <option name="test-file-name" value="CtsAssistApp.apk" />
+        <option name="test-file-name" value="CtsAssistTestCases.apk" />
+    </target_preparer>
+    <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
+        <option name="run-command" value="settings put secure voice_interaction_service android.assist.service/.MainInteractionService" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.assist.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/tests/bluetooth/AndroidTest.xml b/tests/tests/bluetooth/AndroidTest.xml
index 05f06e5..1f39752 100644
--- a/tests/tests/bluetooth/AndroidTest.xml
+++ b/tests/tests/bluetooth/AndroidTest.xml
@@ -13,11 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Configuration for Bluetooth Tests">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsBluetoothTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS Bluetooth test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsBluetoothTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.bluetooth.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
 </configuration>
diff --git a/tests/tests/calendarcommon/AndroidTest.xml b/tests/tests/calendarcommon/AndroidTest.xml
index f5a3a3a..65f2d7a 100644
--- a/tests/tests/calendarcommon/AndroidTest.xml
+++ b/tests/tests/calendarcommon/AndroidTest.xml
@@ -13,11 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Configuration for Calendar Tests">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsCalendarcommon2TestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS Calendar test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsCalendarcommon2TestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.calendarcommon2.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/tests/calllog/AndroidTest.xml b/tests/tests/calllog/AndroidTest.xml
index a2cb5fc..408aaac 100644
--- a/tests/tests/calllog/AndroidTest.xml
+++ b/tests/tests/calllog/AndroidTest.xml
@@ -13,11 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Configuration for call log Tests">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsCallLogTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS Call Log test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsCallLogTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.calllog.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/tests/content/AndroidTest.xml b/tests/tests/content/AndroidTest.xml
index b4b674c..33f9013 100644
--- a/tests/tests/content/AndroidTest.xml
+++ b/tests/tests/content/AndroidTest.xml
@@ -13,15 +13,16 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Configuration for content Tests">
-    <include name="common-config" />
+<configuration description="Config for CTS Content test cases">
     <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkPreconditionCheck">
         <option name="apk" value="CtsContentPreconditions.apk"/>
         <option name="package" value="android.content.preconditions"/>
     </target_preparer>
-    <option name="apk-installer:test-file-name" value="CtsContentTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsContentTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.content.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
 </configuration>
diff --git a/tests/tests/database/AndroidTest.xml b/tests/tests/database/AndroidTest.xml
index 5014b00..046215d 100644
--- a/tests/tests/database/AndroidTest.xml
+++ b/tests/tests/database/AndroidTest.xml
@@ -12,11 +12,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Test module config for database apis">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsDatabaseTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS Database test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsDatabaseTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.database.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/tests/display/AndroidTest.xml b/tests/tests/display/AndroidTest.xml
index 0296e8e..f346c22 100644
--- a/tests/tests/display/AndroidTest.xml
+++ b/tests/tests/display/AndroidTest.xml
@@ -13,14 +13,17 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Base config for CTS package preparer">
-    <include name="common-config" />
-    <!-- Use a non-standard pattern, must match values in tests/tests/display/.../DisplayTest.java -->
-    <option name="run-command:run-command" value="settings put global overlay_display_devices '181x161/214|181x161/214'" />
-    <option name="run-command:teardown-command" value="settings put global overlay_display_devices &quot;&quot;" />
-    <option name="apk-installer:test-file-name" value="CtsDisplayTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS Acceleration test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsDisplayTestCases.apk" />
+    </target_preparer>
+    <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
+        <!-- Use a non-standard pattern, must match values in tests/tests/display/.../DisplayTest.java -->
+        <option name="run-command" value="settings put global overlay_display_devices '181x161/214|181x161/214'" />
+        <option name="teardown-command" value="settings put global overlay_display_devices &quot;&quot;" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.display.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/tests/dpi/AndroidTest.xml b/tests/tests/dpi/AndroidTest.xml
index ad7c021..b8d941b 100644
--- a/tests/tests/dpi/AndroidTest.xml
+++ b/tests/tests/dpi/AndroidTest.xml
@@ -12,11 +12,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Test module config for dpi apis">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsDpiTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS DPI test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsDpiTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.dpi.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/tests/dpi2/AndroidTest.xml b/tests/tests/dpi2/AndroidTest.xml
index f60d4ba..dfb1730 100644
--- a/tests/tests/dpi2/AndroidTest.xml
+++ b/tests/tests/dpi2/AndroidTest.xml
@@ -12,11 +12,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Test module config for DPI apis">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsDpiTestCases2.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS DPI test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsDpiTestCases2.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.dpi2.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/tests/dreams/AndroidTest.xml b/tests/tests/dreams/AndroidTest.xml
index fb121ce..b334ade 100644
--- a/tests/tests/dreams/AndroidTest.xml
+++ b/tests/tests/dreams/AndroidTest.xml
@@ -12,11 +12,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Test module config for Dreams apis">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsDreamsTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS Dreams test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsDreamsTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.dreams.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/tests/drm/AndroidTest.xml b/tests/tests/drm/AndroidTest.xml
index d1bd240..48287aa 100644
--- a/tests/tests/drm/AndroidTest.xml
+++ b/tests/tests/drm/AndroidTest.xml
@@ -13,11 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Configuration for DRM Tests">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsDrmTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS DRM test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsDrmTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.drm.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/tests/effect/AndroidTest.xml b/tests/tests/effect/AndroidTest.xml
index ea3faa9..abf2b22 100644
--- a/tests/tests/effect/AndroidTest.xml
+++ b/tests/tests/effect/AndroidTest.xml
@@ -13,11 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Configuration for Effect Tests">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsEffectTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS Effect test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsEffectTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.effect.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/tests/gesture/AndroidTest.xml b/tests/tests/gesture/AndroidTest.xml
index e0be497..497cad1 100644
--- a/tests/tests/gesture/AndroidTest.xml
+++ b/tests/tests/gesture/AndroidTest.xml
@@ -13,11 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Base config for CTS package preparer">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsGestureTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS Gesture test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsGestureTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.gesture.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/tests/graphics/AndroidTest.xml b/tests/tests/graphics/AndroidTest.xml
index 777859b..cf3311b 100644
--- a/tests/tests/graphics/AndroidTest.xml
+++ b/tests/tests/graphics/AndroidTest.xml
@@ -13,12 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Configuration for Graphics Tests">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsGraphicsTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS Graphics test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsGraphicsTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.graphics.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
-
+</configuration>
\ No newline at end of file
diff --git a/tests/tests/graphics2/AndroidTest.xml b/tests/tests/graphics2/AndroidTest.xml
index 5e7e4ac..2f9961b 100644
--- a/tests/tests/graphics2/AndroidTest.xml
+++ b/tests/tests/graphics2/AndroidTest.xml
@@ -13,12 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Configuration for Graphics2 Tests">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsGraphics2TestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS Graphics test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsGraphics2TestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.graphics2.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
-
+</configuration>
\ No newline at end of file
diff --git a/tests/tests/jni/AndroidTest.xml b/tests/tests/jni/AndroidTest.xml
index 8ac1e02..8ec1df6 100644
--- a/tests/tests/jni/AndroidTest.xml
+++ b/tests/tests/jni/AndroidTest.xml
@@ -13,11 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Configuration for JNI Tests">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsJniTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS JNI test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsJniTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.jni.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/tests/keystore/AndroidTest.xml b/tests/tests/keystore/AndroidTest.xml
index fdab24c..5309dff 100644
--- a/tests/tests/keystore/AndroidTest.xml
+++ b/tests/tests/keystore/AndroidTest.xml
@@ -13,11 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Configuration for Keystore Tests">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsKeystoreTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS Keystore test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsKeystoreTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.keystore.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/tests/libcorelegacy22/AndroidTest.xml b/tests/tests/libcorelegacy22/AndroidTest.xml
index fee2c94..cdc6611 100644
--- a/tests/tests/libcorelegacy22/AndroidTest.xml
+++ b/tests/tests/libcorelegacy22/AndroidTest.xml
@@ -12,11 +12,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Test module config for libcorelegacy22 apis">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsLibcoreLegacy22TestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS Legacy Libcore test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsLibcoreLegacy22TestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.libcorelegacy22.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/tests/location/AndroidTest.xml b/tests/tests/location/AndroidTest.xml
index a3647d2..8fdcc76 100644
--- a/tests/tests/location/AndroidTest.xml
+++ b/tests/tests/location/AndroidTest.xml
@@ -13,11 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Configuration for Location Tests">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsLocationTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS Location test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsLocationTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.location.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/tests/location2/AndroidTest.xml b/tests/tests/location2/AndroidTest.xml
index eb6e195..9a9379d 100644
--- a/tests/tests/location2/AndroidTest.xml
+++ b/tests/tests/location2/AndroidTest.xml
@@ -13,11 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Configuration for Location2 Tests">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsLocation2TestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS Location test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsLocation2TestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.location2.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/tests/media/AndroidTest.xml b/tests/tests/media/AndroidTest.xml
index 68af957..ac23ef2 100644
--- a/tests/tests/media/AndroidTest.xml
+++ b/tests/tests/media/AndroidTest.xml
@@ -13,16 +13,17 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Configuration for Media Tests">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsMediaTestCases.apk" />
+<configuration description="Config for CTS Media test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsMediaTestCases.apk" />
+    </target_preparer>
     <target_preparer class="com.android.compatibility.common.tradefed.targetprep.DynamicConfigPusher">
         <option name="target" value="device" />
         <option name="module-name" value="CtsMediaTestCases"/>
         <option name="version-name" value="1.0"/>
     </target_preparer>
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.media.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/tests/mediastress/AndroidTest.xml b/tests/tests/mediastress/AndroidTest.xml
index a501056..fd434f1 100644
--- a/tests/tests/mediastress/AndroidTest.xml
+++ b/tests/tests/mediastress/AndroidTest.xml
@@ -13,11 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Configuration for MediaStress Tests">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsMediaStressTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS Media Stress test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsMediaStressTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.mediastress.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/tests/midi/AndroidTest.xml b/tests/tests/midi/AndroidTest.xml
index 3f9b3a5..c95ab89 100644
--- a/tests/tests/midi/AndroidTest.xml
+++ b/tests/tests/midi/AndroidTest.xml
@@ -13,11 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Configuration for Midi Tests">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsMidiTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS MIDI test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsMidiTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.midi.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/tests/ndef/AndroidTest.xml b/tests/tests/ndef/AndroidTest.xml
index 92ff22c..cfb40d3 100644
--- a/tests/tests/ndef/AndroidTest.xml
+++ b/tests/tests/ndef/AndroidTest.xml
@@ -12,11 +12,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Test module config for ndef apis">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsNdefTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS NDEF test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsNdefTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.ndef.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/tests/net/AndroidTest.xml b/tests/tests/net/AndroidTest.xml
index 1736151..5d38c64 100644
--- a/tests/tests/net/AndroidTest.xml
+++ b/tests/tests/net/AndroidTest.xml
@@ -12,15 +12,16 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Test module config for net apis">
-    <include name="common-config" />
+<configuration description="Config for CTS Net test cases">
     <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkPreconditionCheck">
         <option name="apk" value="CtsNetPreconditions.apk"/>
         <option name="package" value="android.net.preconditions"/>
     </target_preparer>
-    <option name="apk-installer:test-file-name" value="CtsNetTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsNetTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.net.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
 </configuration>
diff --git a/tests/tests/opengl/AndroidTest.xml b/tests/tests/opengl/AndroidTest.xml
index eef73de..124d072 100644
--- a/tests/tests/opengl/AndroidTest.xml
+++ b/tests/tests/opengl/AndroidTest.xml
@@ -12,11 +12,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Test module config for opengl">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsOpenGLTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS OpenGL test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsOpenGLTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.opengl.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/tests/openglperf/AndroidTest.xml b/tests/tests/openglperf/AndroidTest.xml
index 1d83eee..630bd05 100644
--- a/tests/tests/openglperf/AndroidTest.xml
+++ b/tests/tests/openglperf/AndroidTest.xml
@@ -12,11 +12,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Test module config for opengl">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsOpenGlPerfTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS OpenGL Performance test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsOpenGlPerfTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.openglperf.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/tests/permission/AndroidTest.xml b/tests/tests/permission/AndroidTest.xml
index 44bff37..f64db70 100644
--- a/tests/tests/permission/AndroidTest.xml
+++ b/tests/tests/permission/AndroidTest.xml
@@ -13,11 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Configuration for Permission Tests">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsPermissionTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS Permission test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsPermissionTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.permission.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/tests/permission2/AndroidTest.xml b/tests/tests/permission2/AndroidTest.xml
index e62cd92..604b682 100644
--- a/tests/tests/permission2/AndroidTest.xml
+++ b/tests/tests/permission2/AndroidTest.xml
@@ -13,11 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Configuration for Permission2 Tests">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsPermission2TestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS Permission test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsPermission2TestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.permission2.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/tests/preference/AndroidTest.xml b/tests/tests/preference/AndroidTest.xml
index bcb8ccc..f9074fe 100644
--- a/tests/tests/preference/AndroidTest.xml
+++ b/tests/tests/preference/AndroidTest.xml
@@ -13,11 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Configuration for Preference Tests">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsPreferenceTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS Preference test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsPreferenceTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.preference.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/tests/preference2/AndroidTest.xml b/tests/tests/preference2/AndroidTest.xml
index 76a41d1..96dfe0e 100644
--- a/tests/tests/preference2/AndroidTest.xml
+++ b/tests/tests/preference2/AndroidTest.xml
@@ -13,11 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Configuration for Preference2 Tests">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsPreference2TestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS Preference test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsPreference2TestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.preference2.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/tests/print/AndroidTest.xml b/tests/tests/print/AndroidTest.xml
index 94821b2..21d8f03 100644
--- a/tests/tests/print/AndroidTest.xml
+++ b/tests/tests/print/AndroidTest.xml
@@ -13,11 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Configuration for Print Tests">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsPrintTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS Print test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsPrintTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.print.cts" />
-        <option name="runner" value="android.support.test.uiautomator.UiAutomatorInstrumentationTestRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/tests/provider/AndroidTest.xml b/tests/tests/provider/AndroidTest.xml
index 790734f..4bdd733 100644
--- a/tests/tests/provider/AndroidTest.xml
+++ b/tests/tests/provider/AndroidTest.xml
@@ -13,13 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Configuration for Provider Tests">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsProviderTestCases.apk" />
-    <option name="run-command:run-command"
-            value="ime enable android.provider.cts/.MockInputMethodService" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS Provider test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsProviderTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.provider.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/tests/sax/AndroidTest.xml b/tests/tests/sax/AndroidTest.xml
index 08f74f3..14ec1c3 100644
--- a/tests/tests/sax/AndroidTest.xml
+++ b/tests/tests/sax/AndroidTest.xml
@@ -13,11 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Configuration for Sax Tests">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsSaxTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS SAX test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsSaxTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.sax.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/tests/speech/AndroidTest.xml b/tests/tests/speech/AndroidTest.xml
index 3ae5553..08df58e 100644
--- a/tests/tests/speech/AndroidTest.xml
+++ b/tests/tests/speech/AndroidTest.xml
@@ -13,11 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Configuration for Speech Tests">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsSpeechTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS Speech test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsSpeechTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.speech.tts.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/tests/systemui/AndroidTest.xml b/tests/tests/systemui/AndroidTest.xml
index 82db7e2..d98dae6 100644
--- a/tests/tests/systemui/AndroidTest.xml
+++ b/tests/tests/systemui/AndroidTest.xml
@@ -13,11 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Configuration for SystemUi Tests">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsSystemUiTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS SystemUI test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsSystemUiTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.systemui.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/tests/telephony/AndroidTest.xml b/tests/tests/telephony/AndroidTest.xml
index c56c8ce..81fd49a 100644
--- a/tests/tests/telephony/AndroidTest.xml
+++ b/tests/tests/telephony/AndroidTest.xml
@@ -13,11 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Configuration for Telephony Tests">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsTelephonyTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS Telephony test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsTelephonyTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.telephony.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/tests/telephony2/AndroidTest.xml b/tests/tests/telephony2/AndroidTest.xml
index aa141e7..45ee5fa 100644
--- a/tests/tests/telephony2/AndroidTest.xml
+++ b/tests/tests/telephony2/AndroidTest.xml
@@ -13,11 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Configuration for Telephony2 Tests">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsTelephony2TestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS Telephony test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsTelephony2TestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.telephony2.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/tests/text/AndroidTest.xml b/tests/tests/text/AndroidTest.xml
index 01d1808..789b220 100644
--- a/tests/tests/text/AndroidTest.xml
+++ b/tests/tests/text/AndroidTest.xml
@@ -13,15 +13,16 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Configuration for Text Tests">
-    <include name="common-config" />
+<configuration description="Config for CTS Text test cases">
     <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkPreconditionCheck">
         <option name="apk" value="CtsTextPreconditions.apk"/>
         <option name="package" value="android.text.preconditions"/>
     </target_preparer>
-    <option name="apk-installer:test-file-name" value="CtsTextTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsTextTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.text.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/tests/textureview/AndroidTest.xml b/tests/tests/textureview/AndroidTest.xml
index 904edc6..d60a4a3 100644
--- a/tests/tests/textureview/AndroidTest.xml
+++ b/tests/tests/textureview/AndroidTest.xml
@@ -13,11 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Configuration for TextureView Tests">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsTextureViewTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS TextureView test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsTextureViewTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.textureview.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/tests/theme/AndroidTest.xml b/tests/tests/theme/AndroidTest.xml
index ff0111b..82bd476 100644
--- a/tests/tests/theme/AndroidTest.xml
+++ b/tests/tests/theme/AndroidTest.xml
@@ -13,11 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Configuration for Theme Tests">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsThemeDeviceTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS Theme test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsThemeDeviceTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.theme.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/tests/tests/transition/AndroidTest.xml b/tests/tests/transition/AndroidTest.xml
index a814605..5aad82b 100644
--- a/tests/tests/transition/AndroidTest.xml
+++ b/tests/tests/transition/AndroidTest.xml
@@ -13,11 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Configuration for Transition Tests">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsTransitionTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS Transition test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsTransitionTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.transition.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
 </configuration>
diff --git a/tests/tests/tv/AndroidTest.xml b/tests/tests/tv/AndroidTest.xml
index bacc6d1..48d5666 100644
--- a/tests/tests/tv/AndroidTest.xml
+++ b/tests/tests/tv/AndroidTest.xml
@@ -13,11 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Configuration for Tv Tests">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsTvTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS TV test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsTvTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.tv.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
 </configuration>
diff --git a/tests/tests/uiautomation/AndroidTest.xml b/tests/tests/uiautomation/AndroidTest.xml
index 73d2a18..cf15c6b 100644
--- a/tests/tests/uiautomation/AndroidTest.xml
+++ b/tests/tests/uiautomation/AndroidTest.xml
@@ -13,11 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Configuration for UiAutomation Tests">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsUiAutomationTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS UI Automation test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsUiAutomationTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.app.uiautomation.cts" />
-        <option name="runner" value="android.support.test.uiautomator.UiAutomatorInstrumentationTestRunner" />
     </test>
 </configuration>
diff --git a/tests/tests/uidisolation/AndroidTest.xml b/tests/tests/uidisolation/AndroidTest.xml
index f6742bf..e7717c0 100644
--- a/tests/tests/uidisolation/AndroidTest.xml
+++ b/tests/tests/uidisolation/AndroidTest.xml
@@ -13,11 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Configuration for UidIsolation Tests">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsUidIsolationTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS UID Isolation test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsUidIsolationTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.uidisolation.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
 </configuration>
diff --git a/tests/tests/uirendering/AndroidTest.xml b/tests/tests/uirendering/AndroidTest.xml
index b5453e6..954a435 100644
--- a/tests/tests/uirendering/AndroidTest.xml
+++ b/tests/tests/uirendering/AndroidTest.xml
@@ -13,11 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Configuration for UiRendering Tests">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsUiRenderingTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS UI Rendering test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsUiRenderingTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.uirendering.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
 </configuration>
diff --git a/tests/tests/util/AndroidTest.xml b/tests/tests/util/AndroidTest.xml
index 205e04b..9af993c 100644
--- a/tests/tests/util/AndroidTest.xml
+++ b/tests/tests/util/AndroidTest.xml
@@ -13,11 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Configuration for Util Tests">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsUtilTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS Util test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsUtilTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.util.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
 </configuration>
diff --git a/tests/tests/view/AndroidTest.xml b/tests/tests/view/AndroidTest.xml
index ecd1853..def111d 100644
--- a/tests/tests/view/AndroidTest.xml
+++ b/tests/tests/view/AndroidTest.xml
@@ -13,11 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Configuration for View Tests">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsViewTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS View test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsViewTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.view.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
 </configuration>
diff --git a/tests/tests/voiceinteraction/AndroidTest.xml b/tests/tests/voiceinteraction/AndroidTest.xml
index c355341..2aba101 100644
--- a/tests/tests/voiceinteraction/AndroidTest.xml
+++ b/tests/tests/voiceinteraction/AndroidTest.xml
@@ -13,13 +13,14 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Configuration for Voice Interaction Tests">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsVoiceInteractionService.apk" />
-    <option name="apk-installer:test-file-name" value="CtsVoiceInteractionApp.apk" />
-    <option name="apk-installer:test-file-name" value="CtsVoiceInteractionTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS Voice Interaction test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsVoiceInteractionService.apk" />
+        <option name="test-file-name" value="CtsVoiceInteractionApp.apk" />
+        <option name="test-file-name" value="CtsVoiceInteractionTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.voiceinteraction.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
 </configuration>
diff --git a/tests/tests/voicesettings/AndroidTest.xml b/tests/tests/voicesettings/AndroidTest.xml
index 1435b27..64f5335 100644
--- a/tests/tests/voicesettings/AndroidTest.xml
+++ b/tests/tests/voicesettings/AndroidTest.xml
@@ -13,14 +13,16 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Configuration for Voice Settings Tests">
-    <include name="common-config" />
-    <option name="run-command:run-command"
-         value="settings put secure voice_interaction_service android.voicesettings.service/.MainInteractionService" />
-    <option name="apk-installer:test-file-name" value="CtsVoiceSettingsService.apk" />
-    <option name="apk-installer:test-file-name" value="CtsVoiceSettingsTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS Voice Settings test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsVoiceSettingsService.apk" />
+        <option name="test-file-name" value="CtsVoiceSettingsTestCases.apk" />
+    </target_preparer>
+    <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
+        <option name="run-command" value="settings put secure voice_interaction_service android.voicesettings.service/.MainInteractionService" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.voicesettings.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
 </configuration>
diff --git a/tests/tests/webkit/AndroidTest.xml b/tests/tests/webkit/AndroidTest.xml
index bfbabe3..35940b0 100644
--- a/tests/tests/webkit/AndroidTest.xml
+++ b/tests/tests/webkit/AndroidTest.xml
@@ -13,15 +13,16 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Configuration for Webkit Tests">
-    <include name="common-config" />
+<configuration description="Config for CTS Webkit test cases">
     <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkPreconditionCheck">
         <option name="apk" value="CtsWebkitPreconditions.apk"/>
         <option name="package" value="android.webkit.preconditions"/>
     </target_preparer>
-    <option name="apk-installer:test-file-name" value="CtsWebkitTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsWebkitTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.webkit.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
 </configuration>
diff --git a/tests/tests/widget/AndroidTest.xml b/tests/tests/widget/AndroidTest.xml
index 29a98bd..ef4e24e 100644
--- a/tests/tests/widget/AndroidTest.xml
+++ b/tests/tests/widget/AndroidTest.xml
@@ -13,15 +13,16 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Configuration for Widget Tests">
-    <include name="common-config" />
+<configuration description="Config for CTS Widget test cases">
     <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkPreconditionCheck">
         <option name="apk" value="CtsWidgetPreconditions.apk"/>
         <option name="package" value="android.widget.preconditions"/>
     </target_preparer>
-    <option name="apk-installer:test-file-name" value="CtsWidgetTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsWidgetTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.widget.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
 </configuration>
diff --git a/tests/ui/AndroidTest.xml b/tests/ui/AndroidTest.xml
index 2335d46..d73e8dc 100644
--- a/tests/ui/AndroidTest.xml
+++ b/tests/ui/AndroidTest.xml
@@ -13,11 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Config for CTS UI Test Cases">
-    <include name="common-config" />
-    <option name="apk-installer:test-file-name" value="CtsUiDeviceTestCases.apk" />
-    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+<configuration description="Config for CTS UI test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsUiDeviceTestCases.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.ui.cts" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
     </test>
 </configuration>
diff --git a/tests/uiautomator/AndroidTest.xml b/tests/uiautomator/AndroidTest.xml
index 29074af..c931f59 100644
--- a/tests/uiautomator/AndroidTest.xml
+++ b/tests/uiautomator/AndroidTest.xml
@@ -13,10 +13,15 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Config for CTS UI Automator tests">
-    <include name="common-config" />
-    <option name="file-pusher:push" value="CtsUiAutomatorTestCases.jar->/data/local/tmp/CtsUiAutomatorTestCases.jar" />
-    <option name="apk-installer:test-file-name" value="CtsUiAutomatorTestApp.apk" />
+<configuration description="Config for CTS UI Automator test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="CtsUiAutomatorTestApp.apk" />
+    </target_preparer>
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.FilePusher">
+        <option name="cleanup" value="true" />
+        <option name="push" value="CtsUiAutomatorTestCases.jar->/data/local/tmp/CtsUiAutomatorTestCases.jar" />
+    </target_preparer>
     <test class="com.android.tradefed.testtype.UiAutomatorTest" >
         <option name="jar-path" value="CtsUiAutomatorTestCases.jar" />
         <option name="capture-logs" value="OFF" />