[automerger skipped] DO NOT MERGE Push libwifi-hal.so and libwifi-system.so am: e330a833b1 -s ours am: 653513eb16 am: c2d70c68d1
am: 4d7e560399 -s ours
am skip reason: subject contains skip directive

Change-Id: Ic32c1b20cb0b7ed1aa8858abdad73fbf3600140e
diff --git a/Android.bp b/Android.bp
index 995dd5b..82a982f 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,6 +1,53 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+cc_defaults {
+    name: "VtsHalLibDefaults",
+    shared_libs: [
+        "libbase",
+        "libcutils",
+        "liblog",
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "libutils",
+    ],
+    cflags: [
+        "-Wall",
+        "-Werror",
+    ],
+    group_static_libs: true,
+}
 
-subdirs = [
-    "*",
-]
+cc_defaults {
+    name: "VtsHalDriverDefaults",
+    defaults: ["VtsHalLibDefaults"],
+    shared_libs: [
+        "libcamera_metadata",
+        "libfmq",
+        "libprotobuf-cpp-full",
+        "libvts_common",
+        "libvts_datatype",
+        "libvts_drivercomm",
+        "libvts_measurement",
+        "libvts_multidevice_proto",
+        "android.hidl.allocator@1.0",
+    ],
+}
+
+cc_defaults {
+    name: "VtsHalProfilerDefaults",
+    defaults: ["VtsHalLibDefaults"],
+    shared_libs: [
+        "libfmq",
+        "libvts_profiling",
+        "libvts_multidevice_proto",
+        "libprotobuf-cpp-full",
+    ],
+    // Userdebug only, should not be used to build modules contained in a user build device image.
+    multilib: {
+        lib32: {
+            ldflags: ["-Wl,--rpath,/data/local/tmp/32"]
+        },
+        lib64: {
+            ldflags: ["-Wl,--rpath,/data/local/tmp/64"]
+        },
+    },
+}
diff --git a/audio/Android.bp b/audio/Android.bp
deleted file mode 100644
index 009a762..0000000
--- a/audio/Android.bp
+++ /dev/null
@@ -1,8 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "V2_0",
-    "common/V2_0",
-    "effect/V2_0",
-]
diff --git a/audio/OWNERS b/audio/OWNERS
new file mode 100644
index 0000000..6fdc97c
--- /dev/null
+++ b/audio/OWNERS
@@ -0,0 +1,3 @@
+elaurent@google.com
+krocard@google.com
+mnaganov@google.com
diff --git a/audio/V2_0/Android.bp b/audio/V2_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/audio/V2_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/audio/V2_0/build/Android.bp b/audio/V2_0/build/Android.bp
index 4266f1a..582150b 100644
--- a/audio/V2_0/build/Android.bp
+++ b/audio/V2_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.audio@2.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.audio@2.0_hal",
     ],
@@ -23,7 +24,7 @@
 genrule {
     name: "android.hardware.audio@2.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.audio@2.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/audio/2.0/ $(genDir)/android/hardware/audio/2.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.audio@2.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/audio/2.0/ $(genDir)/android/hardware/audio/2.0/",
     srcs: [
         ":android.hardware.audio@2.0_hal",
     ],
@@ -42,7 +43,7 @@
 genrule {
     name: "android.hardware.audio@2.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.audio@2.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/audio/2.0/ $(genDir)/android/hardware/audio/2.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.audio@2.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/audio/2.0/ $(genDir)/android/hardware/audio/2.0/",
     srcs: [
         ":android.hardware.audio@2.0_hal",
     ],
@@ -63,38 +64,13 @@
     generated_sources: ["android.hardware.audio@2.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.audio@2.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.audio@2.0-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
     shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+        "android.hardware.audio.common@2.0-vts.driver",
+    ],
+    static_libs: [
+        "android.hardware.audio.common@2.0",
         "android.hardware.audio@2.0",
-        "android.hardware.audio.common@2.0",
-        "android.hardware.audio.common@2.0-vts.driver",
-    ],
-    export_shared_lib_headers: [
-        "android.hardware.audio.common@2.0",
-        "android.hardware.audio.common@2.0-vts.driver",
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -102,7 +78,7 @@
 genrule {
     name: "android.hardware.audio@2.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.audio@2.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/audio/2.0/ $(genDir)/android/hardware/audio/2.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.audio@2.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/audio/2.0/ $(genDir)/android/hardware/audio/2.0/",
     srcs: [
         ":android.hardware.audio@2.0_hal",
     ],
@@ -121,7 +97,7 @@
 genrule {
     name: "android.hardware.audio@2.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.audio@2.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/audio/2.0/ $(genDir)/android/hardware/audio/2.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.audio@2.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/audio/2.0/ $(genDir)/android/hardware/audio/2.0/",
     srcs: [
         ":android.hardware.audio@2.0_hal",
     ],
@@ -142,28 +118,13 @@
     generated_sources: ["android.hardware.audio@2.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.audio@2.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.audio@2.0-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
     shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
-        "android.hardware.audio@2.0",
-        "android.hardware.audio.common@2.0",
         "android.hardware.audio.common@2.0-vts.profiler",
     ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
+    static_libs: [
+        "android.hardware.audio.common@2.0",
+        "android.hardware.audio@2.0",
     ],
 }
 
diff --git a/audio/V2_0/target/AndroidTest.xml b/audio/V2_0/target/AndroidTest.xml
index 584e834..c14a7b5 100644
--- a/audio/V2_0/target/AndroidTest.xml
+++ b/audio/V2_0/target/AndroidTest.xml
@@ -20,7 +20,6 @@
         <option name="push-group" value="HalHidlTargetTest.push"/>
         <option name="push" value="DATA/hardware/interfaces/audio/2.0/config/audio_policy_configuration.xsd->/data/local/tmp/audio_policy_configuration.xsd"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalAudioV2_0Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalAudioV2_0TargetTest/VtsHalAudioV2_0TargetTest" />
@@ -28,8 +27,11 @@
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.audio@2.0"/>
-        <option name="test-timeout" value="120m"/>
-        <option name="runtime-hint" value="10m"/>
+        <option name="exclude-coverage-path" value="hardware/interfaces/audio/effect" />
+        <option name="exclude-coverage-path" value="hardware/qcom/audio/post_proc" />
+        <option name="exclude-coverage-path" value="hardware/qcom/audio/visualizer" />
+        <option name="exclude-coverage-path" value="hardware/qcom/audio/voice_processing/" />
+        <option name="test-timeout" value="30m"/>
+        <option name="gtest-batch-mode" value="true"/>
     </test>
 </configuration>
diff --git a/audio/V2_0/target_profiling/AndroidTest.xml b/audio/V2_0/target_profiling/AndroidTest.xml
index 2cd5bd4..c1ee846 100644
--- a/audio/V2_0/target_profiling/AndroidTest.xml
+++ b/audio/V2_0/target_profiling/AndroidTest.xml
@@ -25,7 +25,6 @@
         <option name="push" value="DATA/lib64/android.hardware.audio.common@2.0-vts.profiler.so->/data/local/tmp/64/android.hardware.audio.common@2.0-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.audio@2.0-vts.profiler.so->/data/local/tmp/64/android.hardware.audio@2.0-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalAudioV2_0TargetProfiling"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalAudioV2_0TargetTest/VtsHalAudioV2_0TargetTest" />
@@ -34,7 +33,11 @@
         <option name="enable-profiling" value="true"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.audio@2.0"/>
-        <option name="test-timeout" value="120m"/>
+        <option name="exclude-coverage-path" value="hardware/interfaces/audio/effect" />
+        <option name="exclude-coverage-path" value="hardware/qcom/audio/post_proc" />
+        <option name="exclude-coverage-path" value="hardware/qcom/audio/visualizer" />
+        <option name="exclude-coverage-path" value="hardware/qcom/audio/voice_processing/" />
+        <option name="test-timeout" value="60m"/>
+        <option name="gtest-batch-mode" value="true"/>
     </test>
 </configuration>
diff --git a/audio/V4_0/build/Android.bp b/audio/V4_0/build/Android.bp
new file mode 100644
index 0000000..445ecb0
--- /dev/null
+++ b/audio/V4_0/build/Android.bp
@@ -0,0 +1,130 @@
+// This file was auto-generated. Do not edit manually.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
+
+// Generate .vts spec files.
+hal2vts {
+    name: "android.hardware.audio@4.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
+    srcs: [
+        ":android.hardware.audio@4.0_hal",
+    ],
+    out: [
+        "android/hardware/audio/4.0/Device.vts",
+        "android/hardware/audio/4.0/DevicesFactory.vts",
+        "android/hardware/audio/4.0/PrimaryDevice.vts",
+        "android/hardware/audio/4.0/Stream.vts",
+        "android/hardware/audio/4.0/StreamIn.vts",
+        "android/hardware/audio/4.0/StreamOut.vts",
+        "android/hardware/audio/4.0/StreamOutCallback.vts",
+        "android/hardware/audio/4.0/types.vts",
+    ],
+}
+
+// Build VTS driver.
+genrule {
+    name: "android.hardware.audio@4.0-vts.driver_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.audio@4.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/audio/4.0/ $(genDir)/android/hardware/audio/4.0/",
+    srcs: [
+        ":android.hardware.audio@4.0_hal",
+    ],
+    out: [
+        "android/hardware/audio/4.0/Device.vts.cpp",
+        "android/hardware/audio/4.0/DevicesFactory.vts.cpp",
+        "android/hardware/audio/4.0/PrimaryDevice.vts.cpp",
+        "android/hardware/audio/4.0/Stream.vts.cpp",
+        "android/hardware/audio/4.0/StreamIn.vts.cpp",
+        "android/hardware/audio/4.0/StreamOut.vts.cpp",
+        "android/hardware/audio/4.0/StreamOutCallback.vts.cpp",
+        "android/hardware/audio/4.0/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.audio@4.0-vts.driver_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.audio@4.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/audio/4.0/ $(genDir)/android/hardware/audio/4.0/",
+    srcs: [
+        ":android.hardware.audio@4.0_hal",
+    ],
+    out: [
+        "android/hardware/audio/4.0/Device.vts.h",
+        "android/hardware/audio/4.0/DevicesFactory.vts.h",
+        "android/hardware/audio/4.0/PrimaryDevice.vts.h",
+        "android/hardware/audio/4.0/Stream.vts.h",
+        "android/hardware/audio/4.0/StreamIn.vts.h",
+        "android/hardware/audio/4.0/StreamOut.vts.h",
+        "android/hardware/audio/4.0/StreamOutCallback.vts.h",
+        "android/hardware/audio/4.0/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.audio@4.0-vts.driver",
+    generated_sources: ["android.hardware.audio@4.0-vts.driver_genc++"],
+    generated_headers: ["android.hardware.audio@4.0-vts.driver_genc++_headers"],
+    export_generated_headers: ["android.hardware.audio@4.0-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [
+        "android.hardware.audio.common@4.0-vts.driver",
+    ],
+    static_libs: [
+        "android.hardware.audio.common@4.0",
+        "android.hardware.audio@4.0",
+    ],
+}
+
+// Build VTS profiler.
+genrule {
+    name: "android.hardware.audio@4.0-vts.profiler_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.audio@4.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/audio/4.0/ $(genDir)/android/hardware/audio/4.0/",
+    srcs: [
+        ":android.hardware.audio@4.0_hal",
+    ],
+    out: [
+        "android/hardware/audio/4.0/Device.vts.cpp",
+        "android/hardware/audio/4.0/DevicesFactory.vts.cpp",
+        "android/hardware/audio/4.0/PrimaryDevice.vts.cpp",
+        "android/hardware/audio/4.0/Stream.vts.cpp",
+        "android/hardware/audio/4.0/StreamIn.vts.cpp",
+        "android/hardware/audio/4.0/StreamOut.vts.cpp",
+        "android/hardware/audio/4.0/StreamOutCallback.vts.cpp",
+        "android/hardware/audio/4.0/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.audio@4.0-vts.profiler_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.audio@4.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/audio/4.0/ $(genDir)/android/hardware/audio/4.0/",
+    srcs: [
+        ":android.hardware.audio@4.0_hal",
+    ],
+    out: [
+        "android/hardware/audio/4.0/Device.vts.h",
+        "android/hardware/audio/4.0/DevicesFactory.vts.h",
+        "android/hardware/audio/4.0/PrimaryDevice.vts.h",
+        "android/hardware/audio/4.0/Stream.vts.h",
+        "android/hardware/audio/4.0/StreamIn.vts.h",
+        "android/hardware/audio/4.0/StreamOut.vts.h",
+        "android/hardware/audio/4.0/StreamOutCallback.vts.h",
+        "android/hardware/audio/4.0/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.audio@4.0-vts.profiler",
+    generated_sources: ["android.hardware.audio@4.0-vts.profiler_genc++"],
+    generated_headers: ["android.hardware.audio@4.0-vts.profiler_genc++_headers"],
+    export_generated_headers: ["android.hardware.audio@4.0-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [
+        "android.hardware.audio.common@4.0-vts.profiler",
+    ],
+    static_libs: [
+        "android.hardware.audio.common@4.0",
+        "android.hardware.audio@4.0",
+    ],
+}
+
diff --git a/radio/V1_1/target/Android.mk b/audio/V4_0/target/Android.mk
similarity index 81%
copy from radio/V1_1/target/Android.mk
copy to audio/V4_0/target/Android.mk
index bd1a0f1..f472407 100644
--- a/radio/V1_1/target/Android.mk
+++ b/audio/V4_0/target/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,7 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalAudioV4_0Target
+
+VTS_CONFIG_SRC_DIR := testcases/hal/audio/V4_0/target
 include test/vts/tools/build/Android.host_config.mk
diff --git a/audio/V4_0/target/AndroidTest.xml b/audio/V4_0/target/AndroidTest.xml
new file mode 100644
index 0000000..fea368d
--- /dev/null
+++ b/audio/V4_0/target/AndroidTest.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS Audio V4_0 HIDL HAL's basic target-side test cases">
+    <option name="config-descriptor:metadata" key="plan" value="vts-hal" />
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="abort-on-push-failure" value="false"/>
+        <option name="push-group" value="HalHidlTargetTest.push"/>
+        <option name="push" value="DATA/hardware/interfaces/audio/4.0/config/audio_policy_configuration.xsd->/data/local/tmp/audio_policy_configuration_V4_0.xsd"/>
+    </target_preparer>
+    <multi_target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
+    <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+        <option name="test-module-name" value="VtsHalAudioV4_0Target"/>
+        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalAudioV4_0TargetTest/VtsHalAudioV4_0TargetTest" />
+        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalAudioV4_0TargetTest/VtsHalAudioV4_0TargetTest" />
+        <option name="binary-test-type" value="hal_hidl_gtest"/>
+        <option name="binary-test-disable-framework" value="true"/>
+        <option name="binary-test-stop-native-servers" value="true"/>
+        <option name="exclude-coverage-path" value="hardware/interfaces/audio/effect" />
+        <option name="exclude-coverage-path" value="hardware/qcom/audio/post_proc" />
+        <option name="exclude-coverage-path" value="hardware/qcom/audio/visualizer" />
+        <option name="exclude-coverage-path" value="hardware/qcom/audio/voice_processing/" />
+        <option name="test-timeout" value="30m"/>
+        <option name="gtest-batch-mode" value="true"/>
+    </test>
+</configuration>
diff --git a/radio/V1_1/target/Android.mk b/audio/V4_0/target_profiling/Android.mk
similarity index 79%
copy from radio/V1_1/target/Android.mk
copy to audio/V4_0/target_profiling/Android.mk
index bd1a0f1..82e3d62 100644
--- a/radio/V1_1/target/Android.mk
+++ b/audio/V4_0/target_profiling/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,7 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalAudioV4_0TargetProfiling
+
+VTS_CONFIG_SRC_DIR := testcases/hal/audio/V4_0/target_profiling
 include test/vts/tools/build/Android.host_config.mk
diff --git a/audio/V4_0/target_profiling/AndroidTest.xml b/audio/V4_0/target_profiling/AndroidTest.xml
new file mode 100644
index 0000000..2027686
--- /dev/null
+++ b/audio/V4_0/target_profiling/AndroidTest.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS Audio V4_0 HIDL HAL's basic target-side, profiling test cases">
+    <option name="config-descriptor:metadata" key="plan" value="vts-hal-profiling" />
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="abort-on-push-failure" value="false"/>
+        <option name="cleanup" value="true"/>
+        <option name="push-group" value="HalHidlTargetProfilingTest.push"/>
+        <option name="push" value="DATA/hardware/interfaces/audio/4.0/config/audio_policy_configuration.xsd->/data/local/tmp/audio_policy_configuration_V4_0.xsd"/>
+        <option name="push" value="DATA/lib/android.hardware.audio.common@4.0-vts.profiler.so->/data/local/tmp/32/android.hardware.audio.common@4.0-vts.profiler.so"/>
+        <option name="push" value="DATA/lib/android.hardware.audio@4.0-vts.profiler.so->/data/local/tmp/32/android.hardware.audio@4.0-vts.profiler.so"/>
+        <option name="push" value="DATA/lib64/android.hardware.audio.common@4.0-vts.profiler.so->/data/local/tmp/64/android.hardware.audio.common@4.0-vts.profiler.so"/>
+        <option name="push" value="DATA/lib64/android.hardware.audio@4.0-vts.profiler.so->/data/local/tmp/64/android.hardware.audio@4.0-vts.profiler.so"/>
+    </target_preparer>
+    <multi_target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
+    <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+        <option name="test-module-name" value="VtsHalAudioV4_0TargetProfiling"/>
+        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalAudioV4_0TargetTest/VtsHalAudioV4_0TargetTest" />
+        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalAudioV4_0TargetTest/VtsHalAudioV4_0TargetTest" />
+        <option name="binary-test-type" value="hal_hidl_gtest"/>
+        <option name="enable-profiling" value="true"/>
+        <option name="binary-test-disable-framework" value="true"/>
+        <option name="binary-test-stop-native-servers" value="true"/>
+        <option name="exclude-coverage-path" value="hardware/interfaces/audio/effect" />
+        <option name="exclude-coverage-path" value="hardware/qcom/audio/post_proc" />
+        <option name="exclude-coverage-path" value="hardware/qcom/audio/visualizer" />
+        <option name="exclude-coverage-path" value="hardware/qcom/audio/voice_processing/" />
+        <option name="test-timeout" value="60m"/>
+        <option name="gtest-batch-mode" value="true"/>
+    </test>
+</configuration>
diff --git a/audio/common/V2_0/Android.bp b/audio/common/V2_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/audio/common/V2_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/audio/common/V2_0/build/Android.bp b/audio/common/V2_0/build/Android.bp
index 0d49052..fee6dff 100644
--- a/audio/common/V2_0/build/Android.bp
+++ b/audio/common/V2_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.audio.common@2.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.audio.common@2.0_hal",
     ],
@@ -16,7 +17,7 @@
 genrule {
     name: "android.hardware.audio.common@2.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.audio.common@2.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/audio/common/2.0/ $(genDir)/android/hardware/audio/common/2.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.audio.common@2.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/audio/common/2.0/ $(genDir)/android/hardware/audio/common/2.0/",
     srcs: [
         ":android.hardware.audio.common@2.0_hal",
     ],
@@ -28,7 +29,7 @@
 genrule {
     name: "android.hardware.audio.common@2.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.audio.common@2.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/audio/common/2.0/ $(genDir)/android/hardware/audio/common/2.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.audio.common@2.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/audio/common/2.0/ $(genDir)/android/hardware/audio/common/2.0/",
     srcs: [
         ":android.hardware.audio.common@2.0_hal",
     ],
@@ -42,36 +43,10 @@
     generated_sources: ["android.hardware.audio.common@2.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.audio.common@2.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.audio.common@2.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.audio.common@2.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -79,7 +54,7 @@
 genrule {
     name: "android.hardware.audio.common@2.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.audio.common@2.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/audio/common/2.0/ $(genDir)/android/hardware/audio/common/2.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.audio.common@2.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/audio/common/2.0/ $(genDir)/android/hardware/audio/common/2.0/",
     srcs: [
         ":android.hardware.audio.common@2.0_hal",
     ],
@@ -91,7 +66,7 @@
 genrule {
     name: "android.hardware.audio.common@2.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.audio.common@2.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/audio/common/2.0/ $(genDir)/android/hardware/audio/common/2.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.audio.common@2.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/audio/common/2.0/ $(genDir)/android/hardware/audio/common/2.0/",
     srcs: [
         ":android.hardware.audio.common@2.0_hal",
     ],
@@ -105,27 +80,10 @@
     generated_sources: ["android.hardware.audio.common@2.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.audio.common@2.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.audio.common@2.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.audio.common@2.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/audio/common/V4_0/build/Android.bp b/audio/common/V4_0/build/Android.bp
new file mode 100644
index 0000000..4de2585
--- /dev/null
+++ b/audio/common/V4_0/build/Android.bp
@@ -0,0 +1,89 @@
+// This file was auto-generated. Do not edit manually.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
+
+// Generate .vts spec files.
+hal2vts {
+    name: "android.hardware.audio.common@4.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
+    srcs: [
+        ":android.hardware.audio.common@4.0_hal",
+    ],
+    out: [
+        "android/hardware/audio/common/4.0/types.vts",
+    ],
+}
+
+// Build VTS driver.
+genrule {
+    name: "android.hardware.audio.common@4.0-vts.driver_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.audio.common@4.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/audio/common/4.0/ $(genDir)/android/hardware/audio/common/4.0/",
+    srcs: [
+        ":android.hardware.audio.common@4.0_hal",
+    ],
+    out: [
+        "android/hardware/audio/common/4.0/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.audio.common@4.0-vts.driver_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.audio.common@4.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/audio/common/4.0/ $(genDir)/android/hardware/audio/common/4.0/",
+    srcs: [
+        ":android.hardware.audio.common@4.0_hal",
+    ],
+    out: [
+        "android/hardware/audio/common/4.0/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.audio.common@4.0-vts.driver",
+    generated_sources: ["android.hardware.audio.common@4.0-vts.driver_genc++"],
+    generated_headers: ["android.hardware.audio.common@4.0-vts.driver_genc++_headers"],
+    export_generated_headers: ["android.hardware.audio.common@4.0-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
+        "android.hardware.audio.common@4.0",
+    ],
+}
+
+// Build VTS profiler.
+genrule {
+    name: "android.hardware.audio.common@4.0-vts.profiler_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.audio.common@4.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/audio/common/4.0/ $(genDir)/android/hardware/audio/common/4.0/",
+    srcs: [
+        ":android.hardware.audio.common@4.0_hal",
+    ],
+    out: [
+        "android/hardware/audio/common/4.0/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.audio.common@4.0-vts.profiler_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.audio.common@4.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/audio/common/4.0/ $(genDir)/android/hardware/audio/common/4.0/",
+    srcs: [
+        ":android.hardware.audio.common@4.0_hal",
+    ],
+    out: [
+        "android/hardware/audio/common/4.0/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.audio.common@4.0-vts.profiler",
+    generated_sources: ["android.hardware.audio.common@4.0-vts.profiler_genc++"],
+    generated_headers: ["android.hardware.audio.common@4.0-vts.profiler_genc++_headers"],
+    export_generated_headers: ["android.hardware.audio.common@4.0-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
+        "android.hardware.audio.common@4.0",
+    ],
+}
+
diff --git a/audio/effect/V2_0/Android.bp b/audio/effect/V2_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/audio/effect/V2_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/audio/effect/V2_0/build/Android.bp b/audio/effect/V2_0/build/Android.bp
index f2937ba..7574b77 100644
--- a/audio/effect/V2_0/build/Android.bp
+++ b/audio/effect/V2_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.audio.effect@2.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.audio.effect@2.0_hal",
     ],
@@ -30,7 +31,7 @@
 genrule {
     name: "android.hardware.audio.effect@2.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.audio.effect@2.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/audio/effect/2.0/ $(genDir)/android/hardware/audio/effect/2.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.audio.effect@2.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/audio/effect/2.0/ $(genDir)/android/hardware/audio/effect/2.0/",
     srcs: [
         ":android.hardware.audio.effect@2.0_hal",
     ],
@@ -56,7 +57,7 @@
 genrule {
     name: "android.hardware.audio.effect@2.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.audio.effect@2.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/audio/effect/2.0/ $(genDir)/android/hardware/audio/effect/2.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.audio.effect@2.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/audio/effect/2.0/ $(genDir)/android/hardware/audio/effect/2.0/",
     srcs: [
         ":android.hardware.audio.effect@2.0_hal",
     ],
@@ -84,38 +85,13 @@
     generated_sources: ["android.hardware.audio.effect@2.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.audio.effect@2.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.audio.effect@2.0-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
     shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+        "android.hardware.audio.common@2.0-vts.driver",
+    ],
+    static_libs: [
+        "android.hardware.audio.common@2.0",
         "android.hardware.audio.effect@2.0",
-        "android.hardware.audio.common@2.0",
-        "android.hardware.audio.common@2.0-vts.driver",
-    ],
-    export_shared_lib_headers: [
-        "android.hardware.audio.common@2.0",
-        "android.hardware.audio.common@2.0-vts.driver",
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -123,7 +99,7 @@
 genrule {
     name: "android.hardware.audio.effect@2.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.audio.effect@2.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/audio/effect/2.0/ $(genDir)/android/hardware/audio/effect/2.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.audio.effect@2.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/audio/effect/2.0/ $(genDir)/android/hardware/audio/effect/2.0/",
     srcs: [
         ":android.hardware.audio.effect@2.0_hal",
     ],
@@ -149,7 +125,7 @@
 genrule {
     name: "android.hardware.audio.effect@2.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.audio.effect@2.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/audio/effect/2.0/ $(genDir)/android/hardware/audio/effect/2.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.audio.effect@2.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/audio/effect/2.0/ $(genDir)/android/hardware/audio/effect/2.0/",
     srcs: [
         ":android.hardware.audio.effect@2.0_hal",
     ],
@@ -177,28 +153,13 @@
     generated_sources: ["android.hardware.audio.effect@2.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.audio.effect@2.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.audio.effect@2.0-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
     shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
-        "android.hardware.audio.effect@2.0",
-        "android.hardware.audio.common@2.0",
         "android.hardware.audio.common@2.0-vts.profiler",
     ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
+    static_libs: [
+        "android.hardware.audio.common@2.0",
+        "android.hardware.audio.effect@2.0",
     ],
 }
 
diff --git a/audio/effect/V2_0/target/AndroidTest.xml b/audio/effect/V2_0/target/AndroidTest.xml
index 8e86a25..8aee73b 100644
--- a/audio/effect/V2_0/target/AndroidTest.xml
+++ b/audio/effect/V2_0/target/AndroidTest.xml
@@ -20,7 +20,6 @@
         <option name="push-group" value="HalHidlTargetTest.push"/>
         <option name="push" value="DATA/hardware/interfaces/audio/effect/2.0/xml/audio_effects_conf_V2_0.xsd->/data/local/tmp/audio_effects_conf_V2_0.xsd"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalAudioEffectV2_0Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalAudioEffectV2_0TargetTest/VtsHalAudioEffectV2_0TargetTest"/>
@@ -28,7 +27,15 @@
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.audio.effect@2.0"/>
+        <option name="exclude-coverage-path" value="frameworks/av" />
+        <option name="exclude-coverage-path" value="hardware/interfaces/audio/2.0/default/" />
+        <option name="exclude-coverage-path" value="hardware/interfaces/audio/core/" />
+        <option name="exclude-coverage-path" value="hardware/interfaces/soundtrigger/" />
+        <option name="exclude-coverage-path" value="hardware/libhardware/include/hardware/audio_alsaops.h" />
+        <option name="exclude-coverage-path" value="hardware/libhardware/include/hardware/sound_trigger.h" />
+        <option name="exclude-coverage-path" value="hardware/libhardware/modules/" />
+        <option name="exclude-coverage-path" value="hardware/qcom/audio/hal/" />
+        <option name="exclude-coverage-path" value="system/media" />
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/audio/effect/V2_0/target_profiling/AndroidTest.xml b/audio/effect/V2_0/target_profiling/AndroidTest.xml
index 95cf39c..240b63e 100644
--- a/audio/effect/V2_0/target_profiling/AndroidTest.xml
+++ b/audio/effect/V2_0/target_profiling/AndroidTest.xml
@@ -25,7 +25,6 @@
         <option name="push" value="DATA/lib64/android.hardware.audio.effect@2.0-vts.profiler.so->/data/local/tmp/64/android.hardware.audio.effect@2.0-vts.profiler.so"/>
         <option name="push" value="DATA/hardware/interfaces/audio/effect/2.0/xml/audio_effects_conf_V2_0.xsd->/data/local/tmp/audio_effects_conf_V2_0.xsd"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalAudioEffectV2_0TargetProfiling"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalAudioEffectV2_0TargetTest/VtsHalAudioEffectV2_0TargetTest"/>
@@ -34,7 +33,15 @@
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.audio.effect@2.0"/>
+        <option name="exclude-coverage-path" value="frameworks/av" />
+        <option name="exclude-coverage-path" value="hardware/interfaces/audio/2.0/default/" />
+        <option name="exclude-coverage-path" value="hardware/interfaces/audio/core/" />
+        <option name="exclude-coverage-path" value="hardware/interfaces/soundtrigger/" />
+        <option name="exclude-coverage-path" value="hardware/libhardware/include/hardware/audio_alsaops.h" />
+        <option name="exclude-coverage-path" value="hardware/libhardware/include/hardware/sound_trigger.h" />
+        <option name="exclude-coverage-path" value="hardware/libhardware/modules/" />
+        <option name="exclude-coverage-path" value="hardware/qcom/audio/hal/" />
+        <option name="exclude-coverage-path" value="system/media" />
         <option name="test-timeout" value="15m"/>
     </test>
 </configuration>
diff --git a/radio/V1_1/target/Android.mk b/audio/effect/V2_0/target_replay/Android.mk
similarity index 85%
copy from radio/V1_1/target/Android.mk
copy to audio/effect/V2_0/target_replay/Android.mk
index bd1a0f1..9bbfa23 100644
--- a/radio/V1_1/target/Android.mk
+++ b/audio/effect/V2_0/target_replay/Android.mk
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalAudioEffectV2_0TargetReplay
+VTS_CONFIG_SRC_DIR := testcases/hal/audio/effect/V2_0/target_replay
 include test/vts/tools/build/Android.host_config.mk
diff --git a/audio/effect/V2_0/target_replay/AndroidTest.xml b/audio/effect/V2_0/target_replay/AndroidTest.xml
new file mode 100644
index 0000000..16aff53
--- /dev/null
+++ b/audio/effect/V2_0/target_replay/AndroidTest.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2017 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS VtsHalAudioEffectV2_0TargetReplay test cases">
+    <option name="config-descriptor:metadata" key="plan" value="vts-misc" />
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="abort-on-push-failure" value="false"/>
+        <option name="push-group" value="HalHidlHostTest.push"/>
+        <option name="cleanup" value="true"/>
+        <option name="push" value="spec/hardware/interfaces/audio/common/2.0/vts/types.vts->/data/local/tmp/spec/android/hardware/audio/common/2.0/types.vts"/>
+        <option name="push" value="DATA/lib/android.hardware.audio.common@2.0-vts.driver.so->/data/local/tmp/32/android.hardware.audio.common@2.0-vts.driver.so"/>
+        <option name="push" value="DATA/lib64/android.hardware.audio.common@2.0-vts.driver.so->/data/local/tmp/64/android.hardware.audio.common@2.0-vts.driver.so"/>
+        <option name="push" value="spec/hardware/interfaces/audio/effect/2.0/vts/AcousticEchoCancelerEffect.vts->/data/local/tmp/spec/android/hardware/audio/effect/2.0/AcousticEchoCancelerEffect.vts"/>
+        <option name="push" value="spec/hardware/interfaces/audio/effect/2.0/vts/AutomaticGainControlEffect.vts->/data/local/tmp/spec/android/hardware/audio/effect/2.0/AutomaticGainControlEffect.vts"/>
+        <option name="push" value="spec/hardware/interfaces/audio/effect/2.0/vts/BassBoostEffect.vts->/data/local/tmp/spec/android/hardware/audio/effect/2.0/BassBoostEffect.vts"/>
+        <option name="push" value="spec/hardware/interfaces/audio/effect/2.0/vts/DownmixEffect.vts->/data/local/tmp/spec/android/hardware/audio/effect/2.0/DownmixEffect.vts"/>
+        <option name="push" value="spec/hardware/interfaces/audio/effect/2.0/vts/Effect.vts->/data/local/tmp/spec/android/hardware/audio/effect/2.0/Effect.vts"/>
+        <option name="push" value="spec/hardware/interfaces/audio/effect/2.0/vts/EffectBufferProviderCallback.vts->/data/local/tmp/spec/android/hardware/audio/effect/2.0/EffectBufferProviderCallback.vts"/>
+        <option name="push" value="spec/hardware/interfaces/audio/effect/2.0/vts/EffectsFactory.vts->/data/local/tmp/spec/android/hardware/audio/effect/2.0/EffectsFactory.vts"/>
+        <option name="push" value="spec/hardware/interfaces/audio/effect/2.0/vts/EnvironmentalReverbEffect.vts->/data/local/tmp/spec/android/hardware/audio/effect/2.0/EnvironmentalReverbEffect.vts"/>
+        <option name="push" value="spec/hardware/interfaces/audio/effect/2.0/vts/EqualizerEffect.vts->/data/local/tmp/spec/android/hardware/audio/effect/2.0/EqualizerEffect.vts"/>
+        <option name="push" value="spec/hardware/interfaces/audio/effect/2.0/vts/LoudnessEnhancerEffect.vts->/data/local/tmp/spec/android/hardware/audio/effect/2.0/LoudnessEnhancerEffect.vts"/>
+        <option name="push" value="spec/hardware/interfaces/audio/effect/2.0/vts/NoiseSuppressionEffect.vts->/data/local/tmp/spec/android/hardware/audio/effect/2.0/NoiseSuppressionEffect.vts"/>
+        <option name="push" value="spec/hardware/interfaces/audio/effect/2.0/vts/PresetReverbEffect.vts->/data/local/tmp/spec/android/hardware/audio/effect/2.0/PresetReverbEffect.vts"/>
+        <option name="push" value="spec/hardware/interfaces/audio/effect/2.0/vts/VirtualizerEffect.vts->/data/local/tmp/spec/android/hardware/audio/effect/2.0/VirtualizerEffect.vts"/>
+        <option name="push" value="spec/hardware/interfaces/audio/effect/2.0/vts/VisualizerEffect.vts->/data/local/tmp/spec/android/hardware/audio/effect/2.0/VisualizerEffect.vts"/>
+        <option name="push" value="spec/hardware/interfaces/audio/effect/2.0/vts/types.vts->/data/local/tmp/spec/android/hardware/audio/effect/2.0/types.vts"/>
+        <option name="push" value="DATA/lib/android.hardware.audio.effect@2.0-vts.driver.so->/data/local/tmp/32/android.hardware.audio.effect@2.0-vts.driver.so"/>
+        <option name="push" value="DATA/lib64/android.hardware.audio.effect@2.0-vts.driver.so->/data/local/tmp/64/android.hardware.audio.effect@2.0-vts.driver.so"/>
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+        <option name="test-module-name" value="VtsHalAudioEffectV2_0TargetReplay"/>
+        <option name="binary-test-type" value="hal_hidl_replay_test"/>
+        <option name="hal-hidl-replay-test-trace-path" value="test/vts-testcase/hal-trace/audio/effect/V2_0/android.hardware.audio.effect_2.0_32249473887.vts.trace"/>
+        <option name="hal-hidl-replay-test-trace-path" value="test/vts-testcase/hal-trace/audio/effect/V2_0/android.hardware.audio.effect_2.0_486896798397.vts.trace"/>
+        <option name="hal-hidl-replay-test-trace-path" value="test/vts-testcase/hal-trace/audio/effect/V2_0/android.hardware.audio.effect_2.0_61278401310.vts.trace"/>
+        <option name="hal-hidl-replay-test-trace-path" value="test/vts-testcase/hal-trace/audio/effect/V2_0/android.hardware.audio.effect_2.0_89221826074.vts.trace"/>
+        <option name="binary-test-disable-framework" value="true"/>
+        <option name="test-timeout" value="6m"/>
+    </test>
+</configuration>
diff --git a/audio/effect/V4_0/build/Android.bp b/audio/effect/V4_0/build/Android.bp
new file mode 100644
index 0000000..75fd5fc
--- /dev/null
+++ b/audio/effect/V4_0/build/Android.bp
@@ -0,0 +1,165 @@
+// This file was auto-generated. Do not edit manually.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
+
+// Generate .vts spec files.
+hal2vts {
+    name: "android.hardware.audio.effect@4.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
+    srcs: [
+        ":android.hardware.audio.effect@4.0_hal",
+    ],
+    out: [
+        "android/hardware/audio/effect/4.0/AcousticEchoCancelerEffect.vts",
+        "android/hardware/audio/effect/4.0/AutomaticGainControlEffect.vts",
+        "android/hardware/audio/effect/4.0/BassBoostEffect.vts",
+        "android/hardware/audio/effect/4.0/DownmixEffect.vts",
+        "android/hardware/audio/effect/4.0/Effect.vts",
+        "android/hardware/audio/effect/4.0/EffectBufferProviderCallback.vts",
+        "android/hardware/audio/effect/4.0/EffectsFactory.vts",
+        "android/hardware/audio/effect/4.0/EnvironmentalReverbEffect.vts",
+        "android/hardware/audio/effect/4.0/EqualizerEffect.vts",
+        "android/hardware/audio/effect/4.0/LoudnessEnhancerEffect.vts",
+        "android/hardware/audio/effect/4.0/NoiseSuppressionEffect.vts",
+        "android/hardware/audio/effect/4.0/PresetReverbEffect.vts",
+        "android/hardware/audio/effect/4.0/VirtualizerEffect.vts",
+        "android/hardware/audio/effect/4.0/VisualizerEffect.vts",
+        "android/hardware/audio/effect/4.0/types.vts",
+    ],
+}
+
+// Build VTS driver.
+genrule {
+    name: "android.hardware.audio.effect@4.0-vts.driver_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.audio.effect@4.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/audio/effect/4.0/ $(genDir)/android/hardware/audio/effect/4.0/",
+    srcs: [
+        ":android.hardware.audio.effect@4.0_hal",
+    ],
+    out: [
+        "android/hardware/audio/effect/4.0/AcousticEchoCancelerEffect.vts.cpp",
+        "android/hardware/audio/effect/4.0/AutomaticGainControlEffect.vts.cpp",
+        "android/hardware/audio/effect/4.0/BassBoostEffect.vts.cpp",
+        "android/hardware/audio/effect/4.0/DownmixEffect.vts.cpp",
+        "android/hardware/audio/effect/4.0/Effect.vts.cpp",
+        "android/hardware/audio/effect/4.0/EffectBufferProviderCallback.vts.cpp",
+        "android/hardware/audio/effect/4.0/EffectsFactory.vts.cpp",
+        "android/hardware/audio/effect/4.0/EnvironmentalReverbEffect.vts.cpp",
+        "android/hardware/audio/effect/4.0/EqualizerEffect.vts.cpp",
+        "android/hardware/audio/effect/4.0/LoudnessEnhancerEffect.vts.cpp",
+        "android/hardware/audio/effect/4.0/NoiseSuppressionEffect.vts.cpp",
+        "android/hardware/audio/effect/4.0/PresetReverbEffect.vts.cpp",
+        "android/hardware/audio/effect/4.0/VirtualizerEffect.vts.cpp",
+        "android/hardware/audio/effect/4.0/VisualizerEffect.vts.cpp",
+        "android/hardware/audio/effect/4.0/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.audio.effect@4.0-vts.driver_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.audio.effect@4.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/audio/effect/4.0/ $(genDir)/android/hardware/audio/effect/4.0/",
+    srcs: [
+        ":android.hardware.audio.effect@4.0_hal",
+    ],
+    out: [
+        "android/hardware/audio/effect/4.0/AcousticEchoCancelerEffect.vts.h",
+        "android/hardware/audio/effect/4.0/AutomaticGainControlEffect.vts.h",
+        "android/hardware/audio/effect/4.0/BassBoostEffect.vts.h",
+        "android/hardware/audio/effect/4.0/DownmixEffect.vts.h",
+        "android/hardware/audio/effect/4.0/Effect.vts.h",
+        "android/hardware/audio/effect/4.0/EffectBufferProviderCallback.vts.h",
+        "android/hardware/audio/effect/4.0/EffectsFactory.vts.h",
+        "android/hardware/audio/effect/4.0/EnvironmentalReverbEffect.vts.h",
+        "android/hardware/audio/effect/4.0/EqualizerEffect.vts.h",
+        "android/hardware/audio/effect/4.0/LoudnessEnhancerEffect.vts.h",
+        "android/hardware/audio/effect/4.0/NoiseSuppressionEffect.vts.h",
+        "android/hardware/audio/effect/4.0/PresetReverbEffect.vts.h",
+        "android/hardware/audio/effect/4.0/VirtualizerEffect.vts.h",
+        "android/hardware/audio/effect/4.0/VisualizerEffect.vts.h",
+        "android/hardware/audio/effect/4.0/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.audio.effect@4.0-vts.driver",
+    generated_sources: ["android.hardware.audio.effect@4.0-vts.driver_genc++"],
+    generated_headers: ["android.hardware.audio.effect@4.0-vts.driver_genc++_headers"],
+    export_generated_headers: ["android.hardware.audio.effect@4.0-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [
+        "android.hardware.audio.common@4.0-vts.driver",
+    ],
+    static_libs: [
+        "android.hardware.audio.common@4.0",
+        "android.hardware.audio.effect@4.0",
+    ],
+}
+
+// Build VTS profiler.
+genrule {
+    name: "android.hardware.audio.effect@4.0-vts.profiler_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.audio.effect@4.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/audio/effect/4.0/ $(genDir)/android/hardware/audio/effect/4.0/",
+    srcs: [
+        ":android.hardware.audio.effect@4.0_hal",
+    ],
+    out: [
+        "android/hardware/audio/effect/4.0/AcousticEchoCancelerEffect.vts.cpp",
+        "android/hardware/audio/effect/4.0/AutomaticGainControlEffect.vts.cpp",
+        "android/hardware/audio/effect/4.0/BassBoostEffect.vts.cpp",
+        "android/hardware/audio/effect/4.0/DownmixEffect.vts.cpp",
+        "android/hardware/audio/effect/4.0/Effect.vts.cpp",
+        "android/hardware/audio/effect/4.0/EffectBufferProviderCallback.vts.cpp",
+        "android/hardware/audio/effect/4.0/EffectsFactory.vts.cpp",
+        "android/hardware/audio/effect/4.0/EnvironmentalReverbEffect.vts.cpp",
+        "android/hardware/audio/effect/4.0/EqualizerEffect.vts.cpp",
+        "android/hardware/audio/effect/4.0/LoudnessEnhancerEffect.vts.cpp",
+        "android/hardware/audio/effect/4.0/NoiseSuppressionEffect.vts.cpp",
+        "android/hardware/audio/effect/4.0/PresetReverbEffect.vts.cpp",
+        "android/hardware/audio/effect/4.0/VirtualizerEffect.vts.cpp",
+        "android/hardware/audio/effect/4.0/VisualizerEffect.vts.cpp",
+        "android/hardware/audio/effect/4.0/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.audio.effect@4.0-vts.profiler_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.audio.effect@4.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/audio/effect/4.0/ $(genDir)/android/hardware/audio/effect/4.0/",
+    srcs: [
+        ":android.hardware.audio.effect@4.0_hal",
+    ],
+    out: [
+        "android/hardware/audio/effect/4.0/AcousticEchoCancelerEffect.vts.h",
+        "android/hardware/audio/effect/4.0/AutomaticGainControlEffect.vts.h",
+        "android/hardware/audio/effect/4.0/BassBoostEffect.vts.h",
+        "android/hardware/audio/effect/4.0/DownmixEffect.vts.h",
+        "android/hardware/audio/effect/4.0/Effect.vts.h",
+        "android/hardware/audio/effect/4.0/EffectBufferProviderCallback.vts.h",
+        "android/hardware/audio/effect/4.0/EffectsFactory.vts.h",
+        "android/hardware/audio/effect/4.0/EnvironmentalReverbEffect.vts.h",
+        "android/hardware/audio/effect/4.0/EqualizerEffect.vts.h",
+        "android/hardware/audio/effect/4.0/LoudnessEnhancerEffect.vts.h",
+        "android/hardware/audio/effect/4.0/NoiseSuppressionEffect.vts.h",
+        "android/hardware/audio/effect/4.0/PresetReverbEffect.vts.h",
+        "android/hardware/audio/effect/4.0/VirtualizerEffect.vts.h",
+        "android/hardware/audio/effect/4.0/VisualizerEffect.vts.h",
+        "android/hardware/audio/effect/4.0/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.audio.effect@4.0-vts.profiler",
+    generated_sources: ["android.hardware.audio.effect@4.0-vts.profiler_genc++"],
+    generated_headers: ["android.hardware.audio.effect@4.0-vts.profiler_genc++_headers"],
+    export_generated_headers: ["android.hardware.audio.effect@4.0-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [
+        "android.hardware.audio.common@4.0-vts.profiler",
+    ],
+    static_libs: [
+        "android.hardware.audio.common@4.0",
+        "android.hardware.audio.effect@4.0",
+    ],
+}
+
diff --git a/radio/V1_1/target/Android.mk b/audio/effect/V4_0/target/Android.mk
similarity index 80%
copy from radio/V1_1/target/Android.mk
copy to audio/effect/V4_0/target/Android.mk
index bd1a0f1..c20ac56 100644
--- a/radio/V1_1/target/Android.mk
+++ b/audio/effect/V4_0/target/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalAudioEffectV4_0Target
+VTS_CONFIG_SRC_DIR := testcases/hal/audio/effect/V4_0/target
 include test/vts/tools/build/Android.host_config.mk
diff --git a/audio/effect/V4_0/target/AndroidTest.xml b/audio/effect/V4_0/target/AndroidTest.xml
new file mode 100644
index 0000000..865a4c9
--- /dev/null
+++ b/audio/effect/V4_0/target/AndroidTest.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS VtsHalAudioEffectV4_0Target test cases">
+    <option name="config-descriptor:metadata" key="plan" value="vts-hal" />
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="abort-on-push-failure" value="false"/>
+        <option name="push-group" value="HalHidlTargetTest.push"/>
+        <option name="push" value="DATA/hardware/interfaces/audio/effect/4.0/xml/audio_effects_conf_V4_0.xsd->/data/local/tmp/audio_effects_conf_V4_0.xsd"/>
+    </target_preparer>
+    <multi_target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
+    <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+        <option name="test-module-name" value="VtsHalAudioEffectV4_0Target"/>
+        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalAudioEffectV4_0TargetTest/VtsHalAudioEffectV4_0TargetTest"/>
+        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalAudioEffectV4_0TargetTest/VtsHalAudioEffectV4_0TargetTest"/>
+        <option name="binary-test-type" value="hal_hidl_gtest"/>
+        <option name="binary-test-disable-framework" value="true"/>
+        <option name="binary-test-stop-native-servers" value="true"/>
+        <option name="exclude-coverage-path" value="frameworks/av" />
+        <option name="exclude-coverage-path" value="hardware/interfaces/audio/4.0/default/" />
+        <option name="exclude-coverage-path" value="hardware/interfaces/audio/core/" />
+        <option name="exclude-coverage-path" value="hardware/interfaces/soundtrigger/" />
+        <option name="exclude-coverage-path" value="hardware/libhardware/include/hardware/audio_alsaops.h" />
+        <option name="exclude-coverage-path" value="hardware/libhardware/include/hardware/sound_trigger.h" />
+        <option name="exclude-coverage-path" value="hardware/libhardware/modules/" />
+        <option name="exclude-coverage-path" value="hardware/qcom/audio/hal/" />
+        <option name="exclude-coverage-path" value="system/media" />
+        <option name="test-timeout" value="5m"/>
+    </test>
+</configuration>
diff --git a/radio/V1_1/target/Android.mk b/audio/effect/V4_0/target_profiling/Android.mk
similarity index 78%
copy from radio/V1_1/target/Android.mk
copy to audio/effect/V4_0/target_profiling/Android.mk
index bd1a0f1..68f8d6d 100644
--- a/radio/V1_1/target/Android.mk
+++ b/audio/effect/V4_0/target_profiling/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalAudioEffectV4_0TargetProfiling
+VTS_CONFIG_SRC_DIR := testcases/hal/audio/effect/V4_0/target_profiling
 include test/vts/tools/build/Android.host_config.mk
diff --git a/audio/effect/V4_0/target_profiling/AndroidTest.xml b/audio/effect/V4_0/target_profiling/AndroidTest.xml
new file mode 100644
index 0000000..a49d275
--- /dev/null
+++ b/audio/effect/V4_0/target_profiling/AndroidTest.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS VtsHalAudioEffectV4_0TargetProfiling test cases">
+    <option name="config-descriptor:metadata" key="plan" value="vts-hal-profiling" />
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="abort-on-push-failure" value="false"/>
+        <option name="push-group" value="HalHidlTargetProfilingTest.push"/>
+        <option name="cleanup" value="true"/>
+        <option name="push" value="DATA/lib/android.hardware.audio.common@4.0-vts.profiler.so->/data/local/tmp/32/android.hardware.audio.common@4.0-vts.profiler.so"/>
+        <option name="push" value="DATA/lib64/android.hardware.audio.common@4.0-vts.profiler.so->/data/local/tmp/64/android.hardware.audio.common@4.0-vts.profiler.so"/>
+        <option name="push" value="DATA/lib/android.hardware.audio.effect@4.0-vts.profiler.so->/data/local/tmp/32/android.hardware.audio.effect@4.0-vts.profiler.so"/>
+        <option name="push" value="DATA/lib64/android.hardware.audio.effect@4.0-vts.profiler.so->/data/local/tmp/64/android.hardware.audio.effect@4.0-vts.profiler.so"/>
+        <option name="push" value="DATA/hardware/interfaces/audio/effect/4.0/xml/audio_effects_conf_V4_0.xsd->/data/local/tmp/audio_effects_conf_V4_0.xsd"/>
+    </target_preparer>
+    <multi_target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
+    <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+        <option name="test-module-name" value="VtsHalAudioEffectV4_0TargetProfiling"/>
+        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalAudioEffectV4_0TargetTest/VtsHalAudioEffectV4_0TargetTest"/>
+        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalAudioEffectV4_0TargetTest/VtsHalAudioEffectV4_0TargetTest"/>
+        <option name="binary-test-type" value="hal_hidl_gtest"/>
+        <option name="binary-test-disable-framework" value="true"/>
+        <option name="binary-test-stop-native-servers" value="true"/>
+        <option name="enable-profiling" value="true"/>
+        <option name="exclude-coverage-path" value="frameworks/av" />
+        <option name="exclude-coverage-path" value="hardware/interfaces/audio/4.0/default/" />
+        <option name="exclude-coverage-path" value="hardware/interfaces/audio/core/" />
+        <option name="exclude-coverage-path" value="hardware/interfaces/soundtrigger/" />
+        <option name="exclude-coverage-path" value="hardware/libhardware/include/hardware/audio_alsaops.h" />
+        <option name="exclude-coverage-path" value="hardware/libhardware/include/hardware/sound_trigger.h" />
+        <option name="exclude-coverage-path" value="hardware/libhardware/modules/" />
+        <option name="exclude-coverage-path" value="hardware/qcom/audio/hal/" />
+        <option name="exclude-coverage-path" value="system/media" />
+        <option name="test-timeout" value="15m"/>
+    </test>
+</configuration>
diff --git a/authsecret/V1_0/build/Android.bp b/authsecret/V1_0/build/Android.bp
new file mode 100644
index 0000000..9c9ada4
--- /dev/null
+++ b/authsecret/V1_0/build/Android.bp
@@ -0,0 +1,89 @@
+// This file was auto-generated. Do not edit manually.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
+
+// Generate .vts spec files.
+hal2vts {
+    name: "android.hardware.authsecret@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
+    srcs: [
+        ":android.hardware.authsecret@1.0_hal",
+    ],
+    out: [
+        "android/hardware/authsecret/1.0/AuthSecret.vts",
+    ],
+}
+
+// Build VTS driver.
+genrule {
+    name: "android.hardware.authsecret@1.0-vts.driver_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.authsecret@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/authsecret/1.0/ $(genDir)/android/hardware/authsecret/1.0/",
+    srcs: [
+        ":android.hardware.authsecret@1.0_hal",
+    ],
+    out: [
+        "android/hardware/authsecret/1.0/AuthSecret.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.authsecret@1.0-vts.driver_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.authsecret@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/authsecret/1.0/ $(genDir)/android/hardware/authsecret/1.0/",
+    srcs: [
+        ":android.hardware.authsecret@1.0_hal",
+    ],
+    out: [
+        "android/hardware/authsecret/1.0/AuthSecret.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.authsecret@1.0-vts.driver",
+    generated_sources: ["android.hardware.authsecret@1.0-vts.driver_genc++"],
+    generated_headers: ["android.hardware.authsecret@1.0-vts.driver_genc++_headers"],
+    export_generated_headers: ["android.hardware.authsecret@1.0-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
+        "android.hardware.authsecret@1.0",
+    ],
+}
+
+// Build VTS profiler.
+genrule {
+    name: "android.hardware.authsecret@1.0-vts.profiler_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.authsecret@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/authsecret/1.0/ $(genDir)/android/hardware/authsecret/1.0/",
+    srcs: [
+        ":android.hardware.authsecret@1.0_hal",
+    ],
+    out: [
+        "android/hardware/authsecret/1.0/AuthSecret.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.authsecret@1.0-vts.profiler_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.authsecret@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/authsecret/1.0/ $(genDir)/android/hardware/authsecret/1.0/",
+    srcs: [
+        ":android.hardware.authsecret@1.0_hal",
+    ],
+    out: [
+        "android/hardware/authsecret/1.0/AuthSecret.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.authsecret@1.0-vts.profiler",
+    generated_sources: ["android.hardware.authsecret@1.0-vts.profiler_genc++"],
+    generated_headers: ["android.hardware.authsecret@1.0-vts.profiler_genc++_headers"],
+    export_generated_headers: ["android.hardware.authsecret@1.0-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
+        "android.hardware.authsecret@1.0",
+    ],
+}
+
diff --git a/radio/V1_1/target/Android.mk b/authsecret/V1_0/target/Android.mk
similarity index 80%
copy from radio/V1_1/target/Android.mk
copy to authsecret/V1_0/target/Android.mk
index bd1a0f1..70a93c6 100644
--- a/radio/V1_1/target/Android.mk
+++ b/authsecret/V1_0/target/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalAuthSecretV1_0Target
+VTS_CONFIG_SRC_DIR := testcases/hal/authsecret/V1_0/target
 include test/vts/tools/build/Android.host_config.mk
diff --git a/radio/V1_1/target/AndroidTest.xml b/authsecret/V1_0/target/AndroidTest.xml
similarity index 70%
copy from radio/V1_1/target/AndroidTest.xml
copy to authsecret/V1_0/target/AndroidTest.xml
index 76b339d..94bc442 100644
--- a/radio/V1_1/target/AndroidTest.xml
+++ b/authsecret/V1_0/target/AndroidTest.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2017 The Android Open Source Project
+<!-- Copyright (C) 2018 The Android Open Source Project
 
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
@@ -13,21 +13,20 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Config for VTS VtsHalRadioV1_1Target test cases">
+<configuration description="Config for VTS VtsHalAuthSecretV1_0Target test cases">
     <option name="config-descriptor:metadata" key="plan" value="vts-hal" />
     <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
+    <multi_target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
-        <option name="test-module-name" value="VtsHalRadioV1_1Target"/>
-        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalRadioV1_1TargetTest/VtsHalRadioV1_1TargetTest"/>
-        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalRadioV1_1TargetTest/VtsHalRadioV1_1TargetTest"/>
+        <option name="test-module-name" value="VtsHalAuthSecretV1_0Target"/>
+        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalAuthSecretV1_0TargetTest/VtsHalAuthSecretV1_0TargetTest"/>
+        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalAuthSecretV1_0TargetTest/VtsHalAuthSecretV1_0TargetTest"/>
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.radio@1.1"/>
-        <option name="test-timeout" value="15m"/>
+        <option name="test-timeout" value="1m"/>
     </test>
 </configuration>
diff --git a/automotive/Android.bp b/automotive/Android.bp
deleted file mode 100644
index 13c324a..0000000
--- a/automotive/Android.bp
+++ /dev/null
@@ -1,7 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "evs/V1_0",
-    "vehicle/V2_0",
-]
diff --git a/automotive/audiocontrol/V1_0/build/Android.bp b/automotive/audiocontrol/V1_0/build/Android.bp
new file mode 100644
index 0000000..b564d95
--- /dev/null
+++ b/automotive/audiocontrol/V1_0/build/Android.bp
@@ -0,0 +1,94 @@
+// This file was auto-generated. Do not edit manually.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
+
+// Generate .vts spec files.
+hal2vts {
+    name: "android.hardware.automotive.audiocontrol@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
+    srcs: [
+        ":android.hardware.automotive.audiocontrol@1.0_hal",
+    ],
+    out: [
+        "android/hardware/automotive/audiocontrol/1.0/AudioControl.vts",
+        "android/hardware/automotive/audiocontrol/1.0/types.vts",
+    ],
+}
+
+// Build VTS driver.
+genrule {
+    name: "android.hardware.automotive.audiocontrol@1.0-vts.driver_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.automotive.audiocontrol@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/automotive/audiocontrol/1.0/ $(genDir)/android/hardware/automotive/audiocontrol/1.0/",
+    srcs: [
+        ":android.hardware.automotive.audiocontrol@1.0_hal",
+    ],
+    out: [
+        "android/hardware/automotive/audiocontrol/1.0/AudioControl.vts.cpp",
+        "android/hardware/automotive/audiocontrol/1.0/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.automotive.audiocontrol@1.0-vts.driver_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.automotive.audiocontrol@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/automotive/audiocontrol/1.0/ $(genDir)/android/hardware/automotive/audiocontrol/1.0/",
+    srcs: [
+        ":android.hardware.automotive.audiocontrol@1.0_hal",
+    ],
+    out: [
+        "android/hardware/automotive/audiocontrol/1.0/AudioControl.vts.h",
+        "android/hardware/automotive/audiocontrol/1.0/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.automotive.audiocontrol@1.0-vts.driver",
+    generated_sources: ["android.hardware.automotive.audiocontrol@1.0-vts.driver_genc++"],
+    generated_headers: ["android.hardware.automotive.audiocontrol@1.0-vts.driver_genc++_headers"],
+    export_generated_headers: ["android.hardware.automotive.audiocontrol@1.0-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
+        "android.hardware.automotive.audiocontrol@1.0",
+    ],
+}
+
+// Build VTS profiler.
+genrule {
+    name: "android.hardware.automotive.audiocontrol@1.0-vts.profiler_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.automotive.audiocontrol@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/automotive/audiocontrol/1.0/ $(genDir)/android/hardware/automotive/audiocontrol/1.0/",
+    srcs: [
+        ":android.hardware.automotive.audiocontrol@1.0_hal",
+    ],
+    out: [
+        "android/hardware/automotive/audiocontrol/1.0/AudioControl.vts.cpp",
+        "android/hardware/automotive/audiocontrol/1.0/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.automotive.audiocontrol@1.0-vts.profiler_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.automotive.audiocontrol@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/automotive/audiocontrol/1.0/ $(genDir)/android/hardware/automotive/audiocontrol/1.0/",
+    srcs: [
+        ":android.hardware.automotive.audiocontrol@1.0_hal",
+    ],
+    out: [
+        "android/hardware/automotive/audiocontrol/1.0/AudioControl.vts.h",
+        "android/hardware/automotive/audiocontrol/1.0/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.automotive.audiocontrol@1.0-vts.profiler",
+    generated_sources: ["android.hardware.automotive.audiocontrol@1.0-vts.profiler_genc++"],
+    generated_headers: ["android.hardware.automotive.audiocontrol@1.0-vts.profiler_genc++_headers"],
+    export_generated_headers: ["android.hardware.automotive.audiocontrol@1.0-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
+        "android.hardware.automotive.audiocontrol@1.0",
+    ],
+}
+
diff --git a/automotive/evs/V1_0/Android.bp b/automotive/evs/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/automotive/evs/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/automotive/evs/V1_0/build/Android.bp b/automotive/evs/V1_0/build/Android.bp
index 87aef34..b592c36 100644
--- a/automotive/evs/V1_0/build/Android.bp
+++ b/automotive/evs/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.automotive.evs@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.automotive.evs@1.0_hal",
     ],
@@ -20,7 +21,7 @@
 genrule {
     name: "android.hardware.automotive.evs@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.automotive.evs@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/automotive/evs/1.0/ $(genDir)/android/hardware/automotive/evs/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.automotive.evs@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/automotive/evs/1.0/ $(genDir)/android/hardware/automotive/evs/1.0/",
     srcs: [
         ":android.hardware.automotive.evs@1.0_hal",
     ],
@@ -36,7 +37,7 @@
 genrule {
     name: "android.hardware.automotive.evs@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.automotive.evs@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/automotive/evs/1.0/ $(genDir)/android/hardware/automotive/evs/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.automotive.evs@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/automotive/evs/1.0/ $(genDir)/android/hardware/automotive/evs/1.0/",
     srcs: [
         ":android.hardware.automotive.evs@1.0_hal",
     ],
@@ -54,36 +55,10 @@
     generated_sources: ["android.hardware.automotive.evs@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.automotive.evs@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.automotive.evs@1.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.automotive.evs@1.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -91,7 +66,7 @@
 genrule {
     name: "android.hardware.automotive.evs@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.automotive.evs@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/automotive/evs/1.0/ $(genDir)/android/hardware/automotive/evs/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.automotive.evs@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/automotive/evs/1.0/ $(genDir)/android/hardware/automotive/evs/1.0/",
     srcs: [
         ":android.hardware.automotive.evs@1.0_hal",
     ],
@@ -107,7 +82,7 @@
 genrule {
     name: "android.hardware.automotive.evs@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.automotive.evs@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/automotive/evs/1.0/ $(genDir)/android/hardware/automotive/evs/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.automotive.evs@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/automotive/evs/1.0/ $(genDir)/android/hardware/automotive/evs/1.0/",
     srcs: [
         ":android.hardware.automotive.evs@1.0_hal",
     ],
@@ -125,27 +100,10 @@
     generated_sources: ["android.hardware.automotive.evs@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.automotive.evs@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.automotive.evs@1.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.automotive.evs@1.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/automotive/evs/V1_0/target/AndroidTest.xml b/automotive/evs/V1_0/target/AndroidTest.xml
index de5aa23..56583de 100644
--- a/automotive/evs/V1_0/target/AndroidTest.xml
+++ b/automotive/evs/V1_0/target/AndroidTest.xml
@@ -19,7 +19,6 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalEvsV1_0Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalEvsV1_0TargetTest/VtsHalEvsV1_0TargetTest"/>
@@ -27,7 +26,6 @@
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.automotive.evs@1.0"/>
         <option name="test-timeout" value="15m"/>
     </test>
 </configuration>
diff --git a/automotive/evs/V1_0/target_profiling/AndroidTest.xml b/automotive/evs/V1_0/target_profiling/AndroidTest.xml
index 6ca4852..6c04d69 100644
--- a/automotive/evs/V1_0/target_profiling/AndroidTest.xml
+++ b/automotive/evs/V1_0/target_profiling/AndroidTest.xml
@@ -19,7 +19,6 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalEvsV1_0TargetProfiling"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalEvsV1_0TargetTest/VtsHalEvsV1_0TargetTest"/>
@@ -28,7 +27,6 @@
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.automotive.evs@1.0"/>
         <option name="test-timeout" value="15m"/>
     </test>
 </configuration>
diff --git a/automotive/vehicle/V2_0/Android.bp b/automotive/vehicle/V2_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/automotive/vehicle/V2_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/automotive/vehicle/V2_0/build/Android.bp b/automotive/vehicle/V2_0/build/Android.bp
index 514ae0f..3110ccc 100644
--- a/automotive/vehicle/V2_0/build/Android.bp
+++ b/automotive/vehicle/V2_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.automotive.vehicle@2.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.automotive.vehicle@2.0_hal",
     ],
@@ -18,7 +19,7 @@
 genrule {
     name: "android.hardware.automotive.vehicle@2.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.automotive.vehicle@2.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/automotive/vehicle/2.0/ $(genDir)/android/hardware/automotive/vehicle/2.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.automotive.vehicle@2.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/automotive/vehicle/2.0/ $(genDir)/android/hardware/automotive/vehicle/2.0/",
     srcs: [
         ":android.hardware.automotive.vehicle@2.0_hal",
     ],
@@ -32,7 +33,7 @@
 genrule {
     name: "android.hardware.automotive.vehicle@2.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.automotive.vehicle@2.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/automotive/vehicle/2.0/ $(genDir)/android/hardware/automotive/vehicle/2.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.automotive.vehicle@2.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/automotive/vehicle/2.0/ $(genDir)/android/hardware/automotive/vehicle/2.0/",
     srcs: [
         ":android.hardware.automotive.vehicle@2.0_hal",
     ],
@@ -48,36 +49,10 @@
     generated_sources: ["android.hardware.automotive.vehicle@2.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.automotive.vehicle@2.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.automotive.vehicle@2.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.automotive.vehicle@2.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -85,7 +60,7 @@
 genrule {
     name: "android.hardware.automotive.vehicle@2.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.automotive.vehicle@2.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/automotive/vehicle/2.0/ $(genDir)/android/hardware/automotive/vehicle/2.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.automotive.vehicle@2.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/automotive/vehicle/2.0/ $(genDir)/android/hardware/automotive/vehicle/2.0/",
     srcs: [
         ":android.hardware.automotive.vehicle@2.0_hal",
     ],
@@ -99,7 +74,7 @@
 genrule {
     name: "android.hardware.automotive.vehicle@2.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.automotive.vehicle@2.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/automotive/vehicle/2.0/ $(genDir)/android/hardware/automotive/vehicle/2.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.automotive.vehicle@2.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/automotive/vehicle/2.0/ $(genDir)/android/hardware/automotive/vehicle/2.0/",
     srcs: [
         ":android.hardware.automotive.vehicle@2.0_hal",
     ],
@@ -115,27 +90,10 @@
     generated_sources: ["android.hardware.automotive.vehicle@2.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.automotive.vehicle@2.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.automotive.vehicle@2.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.automotive.vehicle@2.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/automotive/vehicle/V2_0/host/AndroidTest.xml b/automotive/vehicle/V2_0/host/AndroidTest.xml
index a3aafcb..5961b6d 100644
--- a/automotive/vehicle/V2_0/host/AndroidTest.xml
+++ b/automotive/vehicle/V2_0/host/AndroidTest.xml
@@ -25,11 +25,9 @@
         <option name="push" value="DATA/lib/android.hardware.automotive.vehicle@2.0-vts.driver.so->/data/local/tmp/32/android.hardware.automotive.vehicle@2.0-vts.driver.so"/>
         <option name="push" value="DATA/lib64/android.hardware.automotive.vehicle@2.0-vts.driver.so->/data/local/tmp/64/android.hardware.automotive.vehicle@2.0-vts.driver.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalAutomotiveVehicleV2_0Host"/>
         <option name="test-case-path" value="vts/testcases/hal/automotive/vehicle/V2_0/host/VtsHalAutomotiveVehicleV2_0HostTest"/>
-        <option name="precondition-lshal" value="android.hardware.automotive.vehicle@2.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/automotive/vehicle/V2_0/host/VtsHalAutomotiveVehicleV2_0HostTest.py b/automotive/vehicle/V2_0/host/VtsHalAutomotiveVehicleV2_0HostTest.py
index 107a8f3..0ce8fd9 100644
--- a/automotive/vehicle/V2_0/host/VtsHalAutomotiveVehicleV2_0HostTest.py
+++ b/automotive/vehicle/V2_0/host/VtsHalAutomotiveVehicleV2_0HostTest.py
@@ -19,45 +19,35 @@
 import time
 
 from vts.runners.host import asserts
-from vts.runners.host import base_test
 from vts.runners.host import const
 from vts.runners.host import keys
 from vts.runners.host import test_runner
-from vts.utils.python.controllers import android_device
-from vts.utils.python.precondition import precondition_utils
+from vts.testcases.template.hal_hidl_host_test import hal_hidl_host_test
 
+VEHICLE_V2_0_HAL = "android.hardware.automotive.vehicle@2.0::IVehicle"
 
-class VtsHalAutomotiveVehicleV2_0HostTest(base_test.BaseTestClass):
+class VtsHalAutomotiveVehicleV2_0HostTest(hal_hidl_host_test.HalHidlHostTest):
     """A simple testcase for the VEHICLE HIDL HAL."""
 
+    TEST_HAL_SERVICES = {
+        VEHICLE_V2_0_HAL,
+    }
+
     def setUpClass(self):
         """Creates a mirror and init vehicle hal."""
-        self.dut = self.registerController(android_device)[0]
+        super(VtsHalAutomotiveVehicleV2_0HostTest, self).setUpClass()
 
-        self.dut.shell.InvokeTerminal("one")
-        self.dut.shell.one.Execute("setenforce 0")  # SELinux permissive mode
-        if not precondition_utils.CanRunHidlHalTest(
-            self, self.dut, self.dut.shell.one):
-            self._skip_all_testcases = True
-            return
-
-        results = self.dut.shell.one.Execute("id -u system")
+        results = self.shell.Execute("id -u system")
         system_uid = results[const.STDOUT][0].strip()
         logging.info("system_uid: %s", system_uid)
 
-        if self.coverage.enabled:
-            self.coverage.LoadArtifacts()
-            self.coverage.InitializeDeviceCoverage(self.dut)
-
-        if self.profiling.enabled:
-            self.profiling.EnableVTSProfiling(self.dut.shell.one)
-
         self.dut.hal.InitHidlHal(
             target_type="vehicle",
             target_basepaths=self.dut.libPaths,
             target_version=2.0,
             target_package="android.hardware.automotive.vehicle",
             target_component_name="IVehicle",
+            hw_binder_service_name=self.getHalServiceName(VEHICLE_V2_0_HAL),
             bits=int(self.abi_bitness))
 
         self.vehicle = self.dut.hal.vehicle  # shortcut
@@ -67,23 +57,8 @@
         asserts.assertEqual(0x00ff0000, self.vtypes.VehiclePropertyType.MASK)
         asserts.assertEqual(0x0f000000, self.vtypes.VehicleArea.MASK)
 
-    def tearDownClass(self):
-        """Disables the profiling.
-
-        If profiling is enabled for the test, collect the profiling data
-        and disable profiling after the test is done.
-        """
-        if self._skip_all_testcases:
-            return
-
-        if self.profiling.enabled:
-            self.profiling.ProcessTraceDataForTestCase(self.dut)
-            self.profiling.ProcessAndUploadTraceData()
-
-        if self.coverage.enabled:
-            self.coverage.SetCoverageData(dut=self.dut, isGlobal=True)
-
     def setUp(self):
+        super(VtsHalAutomotiveVehicleV2_0HostTest, self).setUp()
         self.propToConfig = {}
         for config in self.vehicle.getAllPropConfigs():
             self.propToConfig[config['prop']] = config
@@ -98,17 +73,6 @@
         logging.info("all supported properties: %s", self.configList)
         asserts.assertLess(0, len(self.configList))
 
-    def testMandatoryProperties(self):
-        """Verifies that all mandatory properties are supported."""
-        # 1 property so far
-        mandatoryProps = set([self.vtypes.VehicleProperty.DRIVING_STATUS])
-        logging.info(self.vtypes.VehicleProperty.DRIVING_STATUS)
-
-        for config in self.configList:
-            mandatoryProps.discard(config['prop'])
-
-        asserts.assertEqual(0, len(mandatoryProps))
-
     def emptyValueProperty(self, propertyId, areaId=0):
         """Creates a property structure for use with the Vehicle HAL.
 
@@ -124,6 +88,7 @@
             'prop' : propertyId,
             'timestamp' : 0,
             'areaId' : areaId,
+            'status' : self.vtypes.VehiclePropertyStatus.AVAILABLE,
             'value' : {
                 'int32Values' : [],
                 'floatValues' : [],
@@ -199,42 +164,21 @@
         asserts.assertEqual(1, len(propValue["value"]["int32Values"]))
         asserts.assertEqual(value, propValue["value"]["int32Values"][0])
 
-    def testDrivingStatus(self):
-        """Checks that DRIVING_STATUS property returns correct result."""
-        propValue = self.readVhalProperty(
-            self.vtypes.VehicleProperty.DRIVING_STATUS)
-        asserts.assertEqual(1, len(propValue["value"]["int32Values"]))
-        drivingStatus = propValue["value"]["int32Values"][0]
-
-        allStatuses = (self.vtypes.VehicleDrivingStatus.UNRESTRICTED
-                       | self.vtypes.VehicleDrivingStatus.NO_VIDEO
-                       | self.vtypes.VehicleDrivingStatus.NO_KEYBOARD_INPUT
-                       | self.vtypes.VehicleDrivingStatus.NO_VOICE_INPUT
-                       | self.vtypes.VehicleDrivingStatus.NO_CONFIG
-                       | self.vtypes.VehicleDrivingStatus.LIMIT_MESSAGE_LEN)
-
-        asserts.assertEqual(allStatuses, allStatuses | drivingStatus)
-
     def extractZonesAsList(self, supportedAreas):
         """Converts bitwise area flags to list of zones"""
         allZones = [
             self.vtypes.VehicleAreaZone.ROW_1_LEFT,
             self.vtypes.VehicleAreaZone.ROW_1_CENTER,
             self.vtypes.VehicleAreaZone.ROW_1_RIGHT,
-            self.vtypes.VehicleAreaZone.ROW_1,
             self.vtypes.VehicleAreaZone.ROW_2_LEFT,
             self.vtypes.VehicleAreaZone.ROW_2_CENTER,
             self.vtypes.VehicleAreaZone.ROW_2_RIGHT,
-            self.vtypes.VehicleAreaZone.ROW_2,
             self.vtypes.VehicleAreaZone.ROW_3_LEFT,
             self.vtypes.VehicleAreaZone.ROW_3_CENTER,
             self.vtypes.VehicleAreaZone.ROW_3_RIGHT,
-            self.vtypes.VehicleAreaZone.ROW_3,
             self.vtypes.VehicleAreaZone.ROW_4_LEFT,
             self.vtypes.VehicleAreaZone.ROW_4_CENTER,
             self.vtypes.VehicleAreaZone.ROW_4_RIGHT,
-            self.vtypes.VehicleAreaZone.ROW_4,
-            self.vtypes.VehicleAreaZone.WHOLE_CABIN,
         ]
 
         extractedZones = []
@@ -244,7 +188,9 @@
         return extractedZones
 
 
-    def testHvacPowerOn(self):
+    def disableTestHvacPowerOn(self):
+        # Disable this test for now.  HVAC Power On will no longer behave like this now that we've
+        #   added the status field in VehiclePropValue.  Need to update the test for this.
         """Test power on/off and properties associated with it.
 
         Gets the list of properties that are affected by the HVAC power state
@@ -350,8 +296,10 @@
             self.vtypes.VehicleProperty.INFO_MODEL,
             self.vtypes.VehicleProperty.INFO_MODEL_YEAR,
             self.vtypes.VehicleProperty.INFO_FUEL_CAPACITY,
+            self.vtypes.VehicleProperty.INFO_FUEL_TYPE,
+            self.vtypes.VehicleProperty.INFO_EV_BATTERY_CAPACITY,
+            self.vtypes.VehicleProperty.INFO_EV_CONNECTOR_TYPE,
             self.vtypes.VehicleProperty.HVAC_FAN_DIRECTION_AVAILABLE,
-            self.vtypes.VehicleProperty.AUDIO_HW_VARIANT,
             self.vtypes.VehicleProperty.AP_POWER_BOOTUP_REASON,
         ])
         for c in self.configList:
@@ -361,7 +309,7 @@
                 asserts.assertEqual(self.vtypes.VehiclePropertyChangeMode.STATIC, c["changeMode"], msg)
                 asserts.assertEqual(self.vtypes.VehiclePropertyAccess.READ, c["access"], msg)
                 propValue = self.readVhalProperty(prop)
-                asserts.assertEqual(prop, propValue['prop'])
+                asserts.assertEqual(prop, propValue["prop"])
                 self.setVhalProperty(prop, propValue["value"],
                     expectedStatus=self.vtypes.StatusCode.ACCESS_DENIED)
             else:  # Non-static property
@@ -373,6 +321,16 @@
         This checks that the areas noted in the config all give valid area
         configs.  Once these are validated, the values for all these areas
         retrieved from the HIDL must be within the ranges defined."""
+
+        enumProperties = {
+            self.vtypes.VehicleProperty.ENGINE_OIL_LEVEL,
+            self.vtypes.VehicleProperty.GEAR_SELECTION,
+            self.vtypes.VehicleProperty.CURRENT_GEAR,
+            self.vtypes.VehicleProperty.TURN_SIGNAL_STATE,
+            self.vtypes.VehicleProperty.IGNITION_STATE,
+            self.vtypes.VehicleProperty.HVAC_FAN_DIRECTION,
+        }
+
         for c in self.configList:
             # Continuous properties need to have a sampling frequency.
             if c["changeMode"] & self.vtypes.VehiclePropertyChangeMode.CONTINUOUS != 0:
@@ -384,7 +342,21 @@
                                     "Prop 0x%x minSampleRate > maxSampleRate" %
                                         c["prop"])
 
+            if c["prop"] & self.vtypes.VehiclePropertyType.BOOLEAN != 0:
+                # Boolean types don't have ranges
+                continue
+
+            if c["prop"] in enumProperties:
+                # This property does not use traditional min/max ranges
+                continue
+
+            asserts.assertTrue(c["areaConfigs"] != None, "Prop 0x%x must have areaConfigs" %
+                               c["prop"])
             areasFound = 0
+            if c["prop"] == self.vtypes.VehicleProperty.HVAC_TEMPERATURE_DISPLAY_UNITS:
+                # This property doesn't have sensible min/max
+                continue
+
             for a in c["areaConfigs"]:
                 # Make sure this doesn't override one of the other areas found.
                 asserts.assertEqual(0, areasFound & a["areaId"])
@@ -454,7 +426,6 @@
     def testGlobalFloatProperties(self):
         """Verifies that values of global float properties are in the correct range"""
         floatProperties = {
-            self.vtypes.VehicleProperty.ENV_CABIN_TEMPERATURE: (-50, 100),  # celsius
             self.vtypes.VehicleProperty.ENV_OUTSIDE_TEMPERATURE: (-50, 100),  # celsius
             self.vtypes.VehicleProperty.ENGINE_RPM : (0, 30000),  # RPMs
             self.vtypes.VehicleProperty.ENGINE_OIL_TEMP : (-50, 150),  # celsius
@@ -477,11 +448,6 @@
             self.vtypes.VehicleProperty.PARKING_BRAKE_ON,
             self.vtypes.VehicleProperty.FUEL_LEVEL_LOW,
             self.vtypes.VehicleProperty.NIGHT_MODE,
-            self.vtypes.VehicleProperty.DOOR_LOCK,
-            self.vtypes.VehicleProperty.MIRROR_LOCK,
-            self.vtypes.VehicleProperty.MIRROR_FOLD,
-            self.vtypes.VehicleProperty.SEAT_BELT_BUCKLED,
-            self.vtypes.VehicleProperty.WINDOW_LOCK,
         ])
         for prop in booleanProperties:
             self.verifyEnumPropIfSupported(prop, [0, 1])
@@ -489,6 +455,7 @@
     def testGlobalEnumProperties(self):
         """Verifies that values of global enum properties are in the correct range"""
         enumProperties = {
+            self.vtypes.VehicleProperty.ENGINE_OIL_LEVEL : self.vtypes.VehicleOilLevel,
             self.vtypes.VehicleProperty.GEAR_SELECTION : self.vtypes.VehicleGear,
             self.vtypes.VehicleProperty.CURRENT_GEAR : self.vtypes.VehicleGear,
             self.vtypes.VehicleProperty.TURN_SIGNAL_STATE : self.vtypes.VehicleTurnSignal,
@@ -610,9 +577,8 @@
 
             subscribeOptions = {
                 "propId" : self.vtypes.VehicleProperty.ENGINE_OIL_TEMP,
-                "vehicleAreas" : 0,
                 "sampleRate" : 10.0,  # Hz
-                "flags" : self.vtypes.SubscribeFlags.HAL_EVENT,
+                "flags" : self.vtypes.SubscribeFlags.EVENTS_FROM_CAR,
             }
             pbSubscribeOptions = self.vtypes.Py2Pb("SubscribeOptions", subscribeOptions)
 
@@ -676,6 +642,7 @@
                 'prop' : self.propertyId,
                 'timestamp' : 0,
                 'areaId' : self.areaId,
+                'status' : self.test.vtypes.VehiclePropertyStatus.AVAILABLE,
                 'value' : {
                     'int32Values' : [],
                     'floatValues' : [],
@@ -732,6 +699,7 @@
                 'prop' : self.propertyId,
                 'timestamp' : 0,
                 'areaId' : self.areaId,
+                'status' : self.test.vtypes.VehiclePropertyStatus.AVAILABLE,
                 'value' : {
                     'int32Values' : [],
                     'floatValues' : [],
diff --git a/automotive/vehicle/V2_0/host_profiling/AndroidTest.xml b/automotive/vehicle/V2_0/host_profiling/AndroidTest.xml
index a33c0bb..bffef7f 100644
--- a/automotive/vehicle/V2_0/host_profiling/AndroidTest.xml
+++ b/automotive/vehicle/V2_0/host_profiling/AndroidTest.xml
@@ -27,12 +27,10 @@
         <option name="push" value="DATA/lib/android.hardware.automotive.vehicle@2.0-vts.profiler.so->/data/local/tmp/32/android.hardware.automotive.vehicle@2.0-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.automotive.vehicle@2.0-vts.profiler.so->/data/local/tmp/64/android.hardware.automotive.vehicle@2.0-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalAutomotiveVehicleV2_0HostProfiling"/>
         <option name="test-case-path" value="vts/testcases/hal/automotive/vehicle/V2_0/host/VtsHalAutomotiveVehicleV2_0HostTest"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.automotive.vehicle@2.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/biometrics/Android.bp b/biometrics/Android.bp
deleted file mode 100644
index 8e0f4dc..0000000
--- a/biometrics/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "fingerprint/V2_1",
-]
diff --git a/biometrics/fingerprint/V2_1/Android.bp b/biometrics/fingerprint/V2_1/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/biometrics/fingerprint/V2_1/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/biometrics/fingerprint/V2_1/build/Android.bp b/biometrics/fingerprint/V2_1/build/Android.bp
index c4fb80e..92d9bab 100644
--- a/biometrics/fingerprint/V2_1/build/Android.bp
+++ b/biometrics/fingerprint/V2_1/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.biometrics.fingerprint@2.1-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.biometrics.fingerprint@2.1_hal",
     ],
@@ -18,7 +19,7 @@
 genrule {
     name: "android.hardware.biometrics.fingerprint@2.1-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.biometrics.fingerprint@2.1 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/biometrics/fingerprint/2.1/ $(genDir)/android/hardware/biometrics/fingerprint/2.1/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.biometrics.fingerprint@2.1 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/biometrics/fingerprint/2.1/ $(genDir)/android/hardware/biometrics/fingerprint/2.1/",
     srcs: [
         ":android.hardware.biometrics.fingerprint@2.1_hal",
     ],
@@ -32,7 +33,7 @@
 genrule {
     name: "android.hardware.biometrics.fingerprint@2.1-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.biometrics.fingerprint@2.1 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/biometrics/fingerprint/2.1/ $(genDir)/android/hardware/biometrics/fingerprint/2.1/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.biometrics.fingerprint@2.1 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/biometrics/fingerprint/2.1/ $(genDir)/android/hardware/biometrics/fingerprint/2.1/",
     srcs: [
         ":android.hardware.biometrics.fingerprint@2.1_hal",
     ],
@@ -48,36 +49,10 @@
     generated_sources: ["android.hardware.biometrics.fingerprint@2.1-vts.driver_genc++"],
     generated_headers: ["android.hardware.biometrics.fingerprint@2.1-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.biometrics.fingerprint@2.1-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.biometrics.fingerprint@2.1",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -85,7 +60,7 @@
 genrule {
     name: "android.hardware.biometrics.fingerprint@2.1-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.biometrics.fingerprint@2.1 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/biometrics/fingerprint/2.1/ $(genDir)/android/hardware/biometrics/fingerprint/2.1/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.biometrics.fingerprint@2.1 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/biometrics/fingerprint/2.1/ $(genDir)/android/hardware/biometrics/fingerprint/2.1/",
     srcs: [
         ":android.hardware.biometrics.fingerprint@2.1_hal",
     ],
@@ -99,7 +74,7 @@
 genrule {
     name: "android.hardware.biometrics.fingerprint@2.1-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.biometrics.fingerprint@2.1 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/biometrics/fingerprint/2.1/ $(genDir)/android/hardware/biometrics/fingerprint/2.1/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.biometrics.fingerprint@2.1 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/biometrics/fingerprint/2.1/ $(genDir)/android/hardware/biometrics/fingerprint/2.1/",
     srcs: [
         ":android.hardware.biometrics.fingerprint@2.1_hal",
     ],
@@ -115,27 +90,10 @@
     generated_sources: ["android.hardware.biometrics.fingerprint@2.1-vts.profiler_genc++"],
     generated_headers: ["android.hardware.biometrics.fingerprint@2.1-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.biometrics.fingerprint@2.1-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.biometrics.fingerprint@2.1",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/biometrics/fingerprint/V2_1/target/AndroidTest.xml b/biometrics/fingerprint/V2_1/target/AndroidTest.xml
index 7a2e047..d1c23e2 100644
--- a/biometrics/fingerprint/V2_1/target/AndroidTest.xml
+++ b/biometrics/fingerprint/V2_1/target/AndroidTest.xml
@@ -19,7 +19,6 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalBiometricsFingerprintV2_1Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalBiometricsFingerprintV2_1TargetTest/VtsHalBiometricsFingerprintV2_1TargetTest"/>
@@ -27,7 +26,6 @@
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.biometrics.fingerprint@2.1"/>
         <option name="test-timeout" value="15m"/>
     </test>
 </configuration>
diff --git a/biometrics/fingerprint/V2_1/target_profiling/AndroidTest.xml b/biometrics/fingerprint/V2_1/target_profiling/AndroidTest.xml
index 422ea42..12863c8 100644
--- a/biometrics/fingerprint/V2_1/target_profiling/AndroidTest.xml
+++ b/biometrics/fingerprint/V2_1/target_profiling/AndroidTest.xml
@@ -22,7 +22,6 @@
         <option name="push" value="DATA/lib/android.hardware.biometrics.fingerprint@2.1-vts.profiler.so->/data/local/tmp/32/android.hardware.biometrics.fingerprint@2.1-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.biometrics.fingerprint@2.1-vts.profiler.so->/data/local/tmp/64/android.hardware.biometrics.fingerprint@2.1-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalBiometricsFingerprintV2_1TargetProfiling"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalBiometricsFingerprintV2_1TargetTest/VtsHalBiometricsFingerprintV2_1TargetTest"/>
@@ -31,7 +30,6 @@
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.biometrics.fingerprint@2.1"/>
         <option name="test-timeout" value="15m"/>
     </test>
 </configuration>
diff --git a/biometrics/fingerprint/V2_1/target_replay/AndroidTest.xml b/biometrics/fingerprint/V2_1/target_replay/AndroidTest.xml
index b2bf143..e2ca2ad 100644
--- a/biometrics/fingerprint/V2_1/target_replay/AndroidTest.xml
+++ b/biometrics/fingerprint/V2_1/target_replay/AndroidTest.xml
@@ -25,15 +25,12 @@
         <option name="push" value="DATA/lib/android.hardware.biometrics.fingerprint@2.1-vts.driver.so->/data/local/tmp/32/android.hardware.biometrics.fingerprint@2.1-vts.driver.so"/>
         <option name="push" value="DATA/lib64/android.hardware.biometrics.fingerprint@2.1-vts.driver.so->/data/local/tmp/64/android.hardware.biometrics.fingerprint@2.1-vts.driver.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalBiometricsFingerprintV2_1TargetReplay"/>
         <option name="binary-test-type" value="hal_hidl_replay_test"/>
         <option name="hal-hidl-replay-test-trace-path" value="test/vts-testcase/hal-trace/biometrics/fingerprint/V2_1/android.hardware.biometrics.fingerprint_2.1_232168888856.vts.trace"/>
         <option name="hal-hidl-replay-test-trace-path" value="test/vts-testcase/hal-trace/biometrics/fingerprint/V2_1/android.hardware.biometrics.fingerprint_2.1_45646006628.vts.trace"/>
         <option name="hal-hidl-replay-test-trace-path" value="test/vts-testcase/hal-trace/biometrics/fingerprint/V2_1/android.hardware.biometrics.fingerprint_2.1_705377609277.vts.trace"/>
-        <option name="hal-hidl-package-name" value="android.hardware.biometrics.fingerprint@2.1"/>
-        <option name="precondition-lshal" value="android.hardware.biometrics.fingerprint@2.1"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/bluetooth/Android.bp b/bluetooth/Android.bp
deleted file mode 100644
index cdc8905..0000000
--- a/bluetooth/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "V1_0",
-]
diff --git a/bluetooth/V1_0/Android.bp b/bluetooth/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/bluetooth/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/bluetooth/V1_0/build/Android.bp b/bluetooth/V1_0/build/Android.bp
index d289977..850aedf 100644
--- a/bluetooth/V1_0/build/Android.bp
+++ b/bluetooth/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.bluetooth@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.bluetooth@1.0_hal",
     ],
@@ -18,7 +19,7 @@
 genrule {
     name: "android.hardware.bluetooth@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.bluetooth@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/bluetooth/1.0/ $(genDir)/android/hardware/bluetooth/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.bluetooth@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/bluetooth/1.0/ $(genDir)/android/hardware/bluetooth/1.0/",
     srcs: [
         ":android.hardware.bluetooth@1.0_hal",
     ],
@@ -32,7 +33,7 @@
 genrule {
     name: "android.hardware.bluetooth@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.bluetooth@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/bluetooth/1.0/ $(genDir)/android/hardware/bluetooth/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.bluetooth@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/bluetooth/1.0/ $(genDir)/android/hardware/bluetooth/1.0/",
     srcs: [
         ":android.hardware.bluetooth@1.0_hal",
     ],
@@ -48,36 +49,10 @@
     generated_sources: ["android.hardware.bluetooth@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.bluetooth@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.bluetooth@1.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.bluetooth@1.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -85,7 +60,7 @@
 genrule {
     name: "android.hardware.bluetooth@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.bluetooth@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/bluetooth/1.0/ $(genDir)/android/hardware/bluetooth/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.bluetooth@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/bluetooth/1.0/ $(genDir)/android/hardware/bluetooth/1.0/",
     srcs: [
         ":android.hardware.bluetooth@1.0_hal",
     ],
@@ -99,7 +74,7 @@
 genrule {
     name: "android.hardware.bluetooth@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.bluetooth@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/bluetooth/1.0/ $(genDir)/android/hardware/bluetooth/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.bluetooth@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/bluetooth/1.0/ $(genDir)/android/hardware/bluetooth/1.0/",
     srcs: [
         ":android.hardware.bluetooth@1.0_hal",
     ],
@@ -115,27 +90,10 @@
     generated_sources: ["android.hardware.bluetooth@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.bluetooth@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.bluetooth@1.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.bluetooth@1.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/bluetooth/V1_0/target/AndroidTest.xml b/bluetooth/V1_0/target/AndroidTest.xml
index be2878d..4529f1e 100644
--- a/bluetooth/V1_0/target/AndroidTest.xml
+++ b/bluetooth/V1_0/target/AndroidTest.xml
@@ -19,14 +19,12 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalBluetoothV1_0Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalBluetoothV1_0TargetTest/VtsHalBluetoothV1_0TargetTest"/>
         <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalBluetoothV1_0TargetTest/VtsHalBluetoothV1_0TargetTest"/>
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.bluetooth@1.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/bluetooth/V1_0/target_profiling/AndroidTest.xml b/bluetooth/V1_0/target_profiling/AndroidTest.xml
index 63108ea..97bbfbf 100644
--- a/bluetooth/V1_0/target_profiling/AndroidTest.xml
+++ b/bluetooth/V1_0/target_profiling/AndroidTest.xml
@@ -22,7 +22,6 @@
         <option name="push" value="DATA/lib/android.hardware.bluetooth@1.0-vts.profiler.so->/data/local/tmp/32/android.hardware.bluetooth@1.0-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.bluetooth@1.0-vts.profiler.so->/data/local/tmp/64/android.hardware.bluetooth@1.0-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalBluetoothV1_0TargetProfiling"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalBluetoothV1_0TargetTest/VtsHalBluetoothV1_0TargetTest"/>
@@ -30,7 +29,6 @@
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.bluetooth@1.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/radio/V1_1/target/Android.mk b/bluetooth/V1_0/target_replay/Android.mk
similarity index 85%
copy from radio/V1_1/target/Android.mk
copy to bluetooth/V1_0/target_replay/Android.mk
index bd1a0f1..e44a943 100644
--- a/radio/V1_1/target/Android.mk
+++ b/bluetooth/V1_0/target_replay/Android.mk
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalBluetoothV1_0TargetReplay
+VTS_CONFIG_SRC_DIR := testcases/hal/bluetooth/V1_0/target_replay
 include test/vts/tools/build/Android.host_config.mk
diff --git a/bluetooth/V1_0/target_replay/AndroidTest.xml b/bluetooth/V1_0/target_replay/AndroidTest.xml
new file mode 100644
index 0000000..6787bcd
--- /dev/null
+++ b/bluetooth/V1_0/target_replay/AndroidTest.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2017 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS VtsHalBluetoothV1_0TargetReplay test cases">
+    <option name="config-descriptor:metadata" key="plan" value="vts-misc" />
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="abort-on-push-failure" value="false"/>
+        <option name="push-group" value="HalHidlHostTest.push"/>
+        <option name="cleanup" value="true"/>
+        <option name="push" value="spec/hardware/interfaces/bluetooth/1.0/vts/BluetoothHci.vts->/data/local/tmp/spec/android/hardware/bluetooth/1.0/BluetoothHci.vts"/>
+        <option name="push" value="spec/hardware/interfaces/bluetooth/1.0/vts/BluetoothHciCallbacks.vts->/data/local/tmp/spec/android/hardware/bluetooth/1.0/BluetoothHciCallbacks.vts"/>
+        <option name="push" value="spec/hardware/interfaces/bluetooth/1.0/vts/types.vts->/data/local/tmp/spec/android/hardware/bluetooth/1.0/types.vts"/>
+        <option name="push" value="DATA/lib/android.hardware.bluetooth@1.0-vts.driver.so->/data/local/tmp/32/android.hardware.bluetooth@1.0-vts.driver.so"/>
+        <option name="push" value="DATA/lib64/android.hardware.bluetooth@1.0-vts.driver.so->/data/local/tmp/64/android.hardware.bluetooth@1.0-vts.driver.so"/>
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+        <option name="test-module-name" value="VtsHalBluetoothV1_0TargetReplay"/>
+        <option name="binary-test-type" value="hal_hidl_replay_test"/>
+        <option name="hal-hidl-replay-test-trace-path" value="test/vts-testcase/hal-trace/bluetooth/V1_0/android.hardware.bluetooth_1.0_4975305052967.vts.trace"/>
+        <option name="hal-hidl-replay-test-trace-path" value="test/vts-testcase/hal-trace/bluetooth/V1_0/android.hardware.bluetooth_1.0_19300431972.vts.trace"/>
+        <option name="binary-test-disable-framework" value="true"/>
+        <option name="test-timeout" value="5m"/>
+    </test>
+</configuration>
diff --git a/boot/Android.bp b/boot/Android.bp
deleted file mode 100644
index cdc8905..0000000
--- a/boot/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "V1_0",
-]
diff --git a/boot/V1_0/Android.bp b/boot/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/boot/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/boot/V1_0/build/Android.bp b/boot/V1_0/build/Android.bp
index f020db0..34e3e57 100644
--- a/boot/V1_0/build/Android.bp
+++ b/boot/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.boot@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.boot@1.0_hal",
     ],
@@ -17,7 +18,7 @@
 genrule {
     name: "android.hardware.boot@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.boot@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/boot/1.0/ $(genDir)/android/hardware/boot/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.boot@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/boot/1.0/ $(genDir)/android/hardware/boot/1.0/",
     srcs: [
         ":android.hardware.boot@1.0_hal",
     ],
@@ -30,7 +31,7 @@
 genrule {
     name: "android.hardware.boot@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.boot@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/boot/1.0/ $(genDir)/android/hardware/boot/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.boot@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/boot/1.0/ $(genDir)/android/hardware/boot/1.0/",
     srcs: [
         ":android.hardware.boot@1.0_hal",
     ],
@@ -45,36 +46,10 @@
     generated_sources: ["android.hardware.boot@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.boot@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.boot@1.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.boot@1.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -82,7 +57,7 @@
 genrule {
     name: "android.hardware.boot@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.boot@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/boot/1.0/ $(genDir)/android/hardware/boot/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.boot@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/boot/1.0/ $(genDir)/android/hardware/boot/1.0/",
     srcs: [
         ":android.hardware.boot@1.0_hal",
     ],
@@ -95,7 +70,7 @@
 genrule {
     name: "android.hardware.boot@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.boot@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/boot/1.0/ $(genDir)/android/hardware/boot/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.boot@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/boot/1.0/ $(genDir)/android/hardware/boot/1.0/",
     srcs: [
         ":android.hardware.boot@1.0_hal",
     ],
@@ -110,27 +85,10 @@
     generated_sources: ["android.hardware.boot@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.boot@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.boot@1.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.boot@1.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/boot/V1_0/target/AndroidTest.xml b/boot/V1_0/target/AndroidTest.xml
index 463c821..2b23122 100644
--- a/boot/V1_0/target/AndroidTest.xml
+++ b/boot/V1_0/target/AndroidTest.xml
@@ -19,7 +19,6 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalBootV1_0Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalBootV1_0TargetTest/VtsHalBootV1_0TargetTest"/>
@@ -27,7 +26,6 @@
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.boot@1.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/boot/V1_0/target/HalBootHidlTargetTest.config b/boot/V1_0/target/HalBootHidlTargetTest.config
deleted file mode 100644
index ebb4d1b..0000000
--- a/boot/V1_0/target/HalBootHidlTargetTest.config
+++ /dev/null
@@ -1,20 +0,0 @@
-{
-    "use_gae_db": true,
-    "coverage": true,
-    "modules": [
-        {
-            "module_name": "system/lib64/hw/bootctrl.msm8996",
-            "git_project": {
-                "name": "platform/hardware/qcom/bootctrl",
-                "path": "hardware/qcom/bootctrl"
-            }
-        },
-        {
-            "module_name": "system/lib64/hw/android.hardware.boot@1.0-impl",
-            "git_project": {
-                "name": "platform/hardware/interfaces",
-                "path": "hardware/interfaces"
-            }
-        }
-    ]
-}
diff --git a/boot/V1_0/target_profiling/AndroidTest.xml b/boot/V1_0/target_profiling/AndroidTest.xml
index da9d8ee..3f3d235 100644
--- a/boot/V1_0/target_profiling/AndroidTest.xml
+++ b/boot/V1_0/target_profiling/AndroidTest.xml
@@ -22,7 +22,6 @@
         <option name="push" value="DATA/lib/android.hardware.boot@1.0-vts.profiler.so->/data/local/tmp/32/android.hardware.boot@1.0-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.boot@1.0-vts.profiler.so->/data/local/tmp/64/android.hardware.boot@1.0-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalBootV1_0TargetProfiling"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalBootV1_0TargetTest/VtsHalBootV1_0TargetTest"/>
@@ -31,7 +30,6 @@
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.boot@1.0"/>
         <option name="test-timeout" value="15m"/>
     </test>
 </configuration>
diff --git a/broadcastradio/Android.bp b/broadcastradio/Android.bp
deleted file mode 100644
index 2e98897..0000000
--- a/broadcastradio/Android.bp
+++ /dev/null
@@ -1,7 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "V1_0",
-    "V1_1",
-]
diff --git a/broadcastradio/V1_0/Android.bp b/broadcastradio/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/broadcastradio/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/broadcastradio/V1_0/OWNERS b/broadcastradio/V1_0/OWNERS
new file mode 100644
index 0000000..b159083
--- /dev/null
+++ b/broadcastradio/V1_0/OWNERS
@@ -0,0 +1,4 @@
+elaurent@google.com
+krocard@google.com
+mnaganov@google.com
+twasilczyk@google.com
diff --git a/broadcastradio/V1_0/build/Android.bp b/broadcastradio/V1_0/build/Android.bp
index 04244cd..4fad9fd 100644
--- a/broadcastradio/V1_0/build/Android.bp
+++ b/broadcastradio/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.broadcastradio@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.broadcastradio@1.0_hal",
     ],
@@ -20,7 +21,7 @@
 genrule {
     name: "android.hardware.broadcastradio@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.broadcastradio@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/broadcastradio/1.0/ $(genDir)/android/hardware/broadcastradio/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.broadcastradio@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/broadcastradio/1.0/ $(genDir)/android/hardware/broadcastradio/1.0/",
     srcs: [
         ":android.hardware.broadcastradio@1.0_hal",
     ],
@@ -36,7 +37,7 @@
 genrule {
     name: "android.hardware.broadcastradio@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.broadcastradio@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/broadcastradio/1.0/ $(genDir)/android/hardware/broadcastradio/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.broadcastradio@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/broadcastradio/1.0/ $(genDir)/android/hardware/broadcastradio/1.0/",
     srcs: [
         ":android.hardware.broadcastradio@1.0_hal",
     ],
@@ -54,36 +55,10 @@
     generated_sources: ["android.hardware.broadcastradio@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.broadcastradio@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.broadcastradio@1.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.broadcastradio@1.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -91,7 +66,7 @@
 genrule {
     name: "android.hardware.broadcastradio@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.broadcastradio@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/broadcastradio/1.0/ $(genDir)/android/hardware/broadcastradio/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.broadcastradio@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/broadcastradio/1.0/ $(genDir)/android/hardware/broadcastradio/1.0/",
     srcs: [
         ":android.hardware.broadcastradio@1.0_hal",
     ],
@@ -107,7 +82,7 @@
 genrule {
     name: "android.hardware.broadcastradio@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.broadcastradio@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/broadcastradio/1.0/ $(genDir)/android/hardware/broadcastradio/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.broadcastradio@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/broadcastradio/1.0/ $(genDir)/android/hardware/broadcastradio/1.0/",
     srcs: [
         ":android.hardware.broadcastradio@1.0_hal",
     ],
@@ -125,27 +100,10 @@
     generated_sources: ["android.hardware.broadcastradio@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.broadcastradio@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.broadcastradio@1.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.broadcastradio@1.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/broadcastradio/V1_0/target/AndroidTest.xml b/broadcastradio/V1_0/target/AndroidTest.xml
index 69e07e5..7b24b5f 100644
--- a/broadcastradio/V1_0/target/AndroidTest.xml
+++ b/broadcastradio/V1_0/target/AndroidTest.xml
@@ -14,12 +14,12 @@
      limitations under the License.
 -->
 <configuration description="Config for VTS VtsHalBroadcastradioV1_0Target test cases">
+    <option name="config-descriptor:metadata" key="plan" value="vts-hal-auto" />
     <option name="config-descriptor:metadata" key="plan" value="vts-hal" />
     <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalBroadcastradioV1_0Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalBroadcastradioV1_0TargetTest/VtsHalBroadcastradioV1_0TargetTest"/>
@@ -27,7 +27,6 @@
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.broadcastradio@1.0"/>
         <option name="test-timeout" value="15m"/>
     </test>
 </configuration>
diff --git a/broadcastradio/V1_0/target_profiling/AndroidTest.xml b/broadcastradio/V1_0/target_profiling/AndroidTest.xml
index 55a19d5..66ee4d8 100644
--- a/broadcastradio/V1_0/target_profiling/AndroidTest.xml
+++ b/broadcastradio/V1_0/target_profiling/AndroidTest.xml
@@ -22,7 +22,6 @@
         <option name="push" value="DATA/lib/android.hardware.broadcastradio@1.0-vts.profiler.so->/data/local/tmp/32/android.hardware.broadcastradio@1.0-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.broadcastradio@1.0-vts.profiler.so->/data/local/tmp/64/android.hardware.broadcastradio@1.0-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalBroadcastradioV1_0TargetProfiling"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalBroadcastradioV1_0TargetTest/VtsHalBroadcastradioV1_0TargetTest"/>
@@ -31,7 +30,6 @@
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.broadcastradio@1.0"/>
         <option name="test-timeout" value="15m"/>
     </test>
 </configuration>
diff --git a/broadcastradio/V1_1/Android.bp b/broadcastradio/V1_1/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/broadcastradio/V1_1/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/radio/V1_1/target/Android.mk b/broadcastradio/V1_1/adapter/Android.mk
similarity index 79%
copy from radio/V1_1/target/Android.mk
copy to broadcastradio/V1_1/adapter/Android.mk
index bd1a0f1..599b896 100644
--- a/radio/V1_1/target/Android.mk
+++ b/broadcastradio/V1_1/adapter/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalBroadcastradioV1_1Adapter
+VTS_CONFIG_SRC_DIR := testcases/hal/broadcastradio/V1_1/adapter
 include test/vts/tools/build/Android.host_config.mk
diff --git a/broadcastradio/V1_1/adapter/AndroidTest.xml b/broadcastradio/V1_1/adapter/AndroidTest.xml
new file mode 100644
index 0000000..b630c93
--- /dev/null
+++ b/broadcastradio/V1_1/adapter/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS VtsHalBroadcastradioV1_1Adapter test cases">
+    <option key="plan" name="config-descriptor:metadata" value="vts-hal-adapter"/>
+    <object class="com.android.tradefed.module.VtsHalAdapterModuleController" type="module_controller">
+        <option name="hal-package-name" value="android.hardware.broadcastradio@1.1"/>
+    </object>
+    <target_preparer class="com.android.tradefed.targetprep.VtsHalAdapterPreparer">
+        <option name="adapter-binary-name" value="android.hardware.broadcastradio@1.0-adapter"/>
+        <option name="hal-package-name" value="android.hardware.broadcastradio@1.1"/>
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest">
+        <option name="package" value="com.android.devicehealth.tests"/>
+        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner"/>
+    </test>
+</configuration>
diff --git a/broadcastradio/V1_1/build/Android.bp b/broadcastradio/V1_1/build/Android.bp
index f64c410..dc6f86f 100644
--- a/broadcastradio/V1_1/build/Android.bp
+++ b/broadcastradio/V1_1/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.broadcastradio@1.1-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.broadcastradio@1.1_hal",
     ],
@@ -20,7 +21,7 @@
 genrule {
     name: "android.hardware.broadcastradio@1.1-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.broadcastradio@1.1 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/broadcastradio/1.1/ $(genDir)/android/hardware/broadcastradio/1.1/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.broadcastradio@1.1 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/broadcastradio/1.1/ $(genDir)/android/hardware/broadcastradio/1.1/",
     srcs: [
         ":android.hardware.broadcastradio@1.1_hal",
     ],
@@ -36,7 +37,7 @@
 genrule {
     name: "android.hardware.broadcastradio@1.1-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.broadcastradio@1.1 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/broadcastradio/1.1/ $(genDir)/android/hardware/broadcastradio/1.1/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.broadcastradio@1.1 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/broadcastradio/1.1/ $(genDir)/android/hardware/broadcastradio/1.1/",
     srcs: [
         ":android.hardware.broadcastradio@1.1_hal",
     ],
@@ -54,38 +55,13 @@
     generated_sources: ["android.hardware.broadcastradio@1.1-vts.driver_genc++"],
     generated_headers: ["android.hardware.broadcastradio@1.1-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.broadcastradio@1.1-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
     shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+        "android.hardware.broadcastradio@1.0-vts.driver",
+    ],
+    static_libs: [
+        "android.hardware.broadcastradio@1.0",
         "android.hardware.broadcastradio@1.1",
-        "android.hardware.broadcastradio@1.0",
-        "android.hardware.broadcastradio@1.0-vts.driver",
-    ],
-    export_shared_lib_headers: [
-        "android.hardware.broadcastradio@1.0",
-        "android.hardware.broadcastradio@1.0-vts.driver",
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -93,7 +69,7 @@
 genrule {
     name: "android.hardware.broadcastradio@1.1-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.broadcastradio@1.1 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/broadcastradio/1.1/ $(genDir)/android/hardware/broadcastradio/1.1/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.broadcastradio@1.1 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/broadcastradio/1.1/ $(genDir)/android/hardware/broadcastradio/1.1/",
     srcs: [
         ":android.hardware.broadcastradio@1.1_hal",
     ],
@@ -109,7 +85,7 @@
 genrule {
     name: "android.hardware.broadcastradio@1.1-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.broadcastradio@1.1 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/broadcastradio/1.1/ $(genDir)/android/hardware/broadcastradio/1.1/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.broadcastradio@1.1 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/broadcastradio/1.1/ $(genDir)/android/hardware/broadcastradio/1.1/",
     srcs: [
         ":android.hardware.broadcastradio@1.1_hal",
     ],
@@ -127,28 +103,13 @@
     generated_sources: ["android.hardware.broadcastradio@1.1-vts.profiler_genc++"],
     generated_headers: ["android.hardware.broadcastradio@1.1-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.broadcastradio@1.1-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
     shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
-        "android.hardware.broadcastradio@1.1",
-        "android.hardware.broadcastradio@1.0",
         "android.hardware.broadcastradio@1.0-vts.profiler",
     ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
+    static_libs: [
+        "android.hardware.broadcastradio@1.0",
+        "android.hardware.broadcastradio@1.1",
     ],
 }
 
diff --git a/broadcastradio/V1_1/target/AndroidTest.xml b/broadcastradio/V1_1/target/AndroidTest.xml
index 4a73abd..784f8c5 100644
--- a/broadcastradio/V1_1/target/AndroidTest.xml
+++ b/broadcastradio/V1_1/target/AndroidTest.xml
@@ -13,13 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Config for VTS VtsHalBroadcastradioV1_0Target test cases">
-    <option name="config-descriptor:metadata" key="plan" value="vts-misc" />
+<configuration description="Config for VTS VtsHalBroadcastradioV1_1Target test cases">
+    <option name="config-descriptor:metadata" key="plan" value="vts-hal-auto" />
     <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalBroadcastradioV1_1Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalBroadcastradioV1_1TargetTest/VtsHalBroadcastradioV1_1TargetTest"/>
@@ -27,7 +26,6 @@
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.broadcastradio@1.1"/>
         <option name="test-timeout" value="15m"/>
     </test>
 </configuration>
diff --git a/broadcastradio/V1_1/target_profiling/AndroidTest.xml b/broadcastradio/V1_1/target_profiling/AndroidTest.xml
index 1ac9fa5..77b62a4 100644
--- a/broadcastradio/V1_1/target_profiling/AndroidTest.xml
+++ b/broadcastradio/V1_1/target_profiling/AndroidTest.xml
@@ -22,7 +22,6 @@
         <option name="push" value="DATA/lib/android.hardware.broadcastradio@1.1-vts.profiler.so->/data/local/tmp/32/android.hardware.broadcastradio@1.1-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.broadcastradio@1.1-vts.profiler.so->/data/local/tmp/64/android.hardware.broadcastradio@1.1-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalBroadcastradioV1_1TargetProfiling"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalBroadcastradioV1_1TargetTest/VtsHalBroadcastradioV1_1TargetTest"/>
@@ -31,7 +30,6 @@
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.broadcastradio@1.1"/>
         <option name="test-timeout" value="15m"/>
     </test>
 </configuration>
diff --git a/broadcastradio/V2_0/build/Android.bp b/broadcastradio/V2_0/build/Android.bp
new file mode 100644
index 0000000..ce820aa
--- /dev/null
+++ b/broadcastradio/V2_0/build/Android.bp
@@ -0,0 +1,114 @@
+// This file was auto-generated. Do not edit manually.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
+
+// Generate .vts spec files.
+hal2vts {
+    name: "android.hardware.broadcastradio@2.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
+    srcs: [
+        ":android.hardware.broadcastradio@2.0_hal",
+    ],
+    out: [
+        "android/hardware/broadcastradio/2.0/AnnouncementListener.vts",
+        "android/hardware/broadcastradio/2.0/BroadcastRadio.vts",
+        "android/hardware/broadcastradio/2.0/CloseHandle.vts",
+        "android/hardware/broadcastradio/2.0/TunerCallback.vts",
+        "android/hardware/broadcastradio/2.0/TunerSession.vts",
+        "android/hardware/broadcastradio/2.0/types.vts",
+    ],
+}
+
+// Build VTS driver.
+genrule {
+    name: "android.hardware.broadcastradio@2.0-vts.driver_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.broadcastradio@2.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/broadcastradio/2.0/ $(genDir)/android/hardware/broadcastradio/2.0/",
+    srcs: [
+        ":android.hardware.broadcastradio@2.0_hal",
+    ],
+    out: [
+        "android/hardware/broadcastradio/2.0/AnnouncementListener.vts.cpp",
+        "android/hardware/broadcastradio/2.0/BroadcastRadio.vts.cpp",
+        "android/hardware/broadcastradio/2.0/CloseHandle.vts.cpp",
+        "android/hardware/broadcastradio/2.0/TunerCallback.vts.cpp",
+        "android/hardware/broadcastradio/2.0/TunerSession.vts.cpp",
+        "android/hardware/broadcastradio/2.0/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.broadcastradio@2.0-vts.driver_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.broadcastradio@2.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/broadcastradio/2.0/ $(genDir)/android/hardware/broadcastradio/2.0/",
+    srcs: [
+        ":android.hardware.broadcastradio@2.0_hal",
+    ],
+    out: [
+        "android/hardware/broadcastradio/2.0/AnnouncementListener.vts.h",
+        "android/hardware/broadcastradio/2.0/BroadcastRadio.vts.h",
+        "android/hardware/broadcastradio/2.0/CloseHandle.vts.h",
+        "android/hardware/broadcastradio/2.0/TunerCallback.vts.h",
+        "android/hardware/broadcastradio/2.0/TunerSession.vts.h",
+        "android/hardware/broadcastradio/2.0/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.broadcastradio@2.0-vts.driver",
+    generated_sources: ["android.hardware.broadcastradio@2.0-vts.driver_genc++"],
+    generated_headers: ["android.hardware.broadcastradio@2.0-vts.driver_genc++_headers"],
+    export_generated_headers: ["android.hardware.broadcastradio@2.0-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
+        "android.hardware.broadcastradio@2.0",
+    ],
+}
+
+// Build VTS profiler.
+genrule {
+    name: "android.hardware.broadcastradio@2.0-vts.profiler_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.broadcastradio@2.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/broadcastradio/2.0/ $(genDir)/android/hardware/broadcastradio/2.0/",
+    srcs: [
+        ":android.hardware.broadcastradio@2.0_hal",
+    ],
+    out: [
+        "android/hardware/broadcastradio/2.0/AnnouncementListener.vts.cpp",
+        "android/hardware/broadcastradio/2.0/BroadcastRadio.vts.cpp",
+        "android/hardware/broadcastradio/2.0/CloseHandle.vts.cpp",
+        "android/hardware/broadcastradio/2.0/TunerCallback.vts.cpp",
+        "android/hardware/broadcastradio/2.0/TunerSession.vts.cpp",
+        "android/hardware/broadcastradio/2.0/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.broadcastradio@2.0-vts.profiler_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.broadcastradio@2.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/broadcastradio/2.0/ $(genDir)/android/hardware/broadcastradio/2.0/",
+    srcs: [
+        ":android.hardware.broadcastradio@2.0_hal",
+    ],
+    out: [
+        "android/hardware/broadcastradio/2.0/AnnouncementListener.vts.h",
+        "android/hardware/broadcastradio/2.0/BroadcastRadio.vts.h",
+        "android/hardware/broadcastradio/2.0/CloseHandle.vts.h",
+        "android/hardware/broadcastradio/2.0/TunerCallback.vts.h",
+        "android/hardware/broadcastradio/2.0/TunerSession.vts.h",
+        "android/hardware/broadcastradio/2.0/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.broadcastradio@2.0-vts.profiler",
+    generated_sources: ["android.hardware.broadcastradio@2.0-vts.profiler_genc++"],
+    generated_headers: ["android.hardware.broadcastradio@2.0-vts.profiler_genc++_headers"],
+    export_generated_headers: ["android.hardware.broadcastradio@2.0-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
+        "android.hardware.broadcastradio@2.0",
+    ],
+}
+
diff --git a/radio/V1_1/target/Android.mk b/broadcastradio/V2_0/target/Android.mk
similarity index 79%
copy from radio/V1_1/target/Android.mk
copy to broadcastradio/V2_0/target/Android.mk
index bd1a0f1..94efe08 100644
--- a/radio/V1_1/target/Android.mk
+++ b/broadcastradio/V2_0/target/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalBroadcastradioV2_0Target
+VTS_CONFIG_SRC_DIR := testcases/hal/broadcastradio/V2_0/target
 include test/vts/tools/build/Android.host_config.mk
diff --git a/radio/V1_1/target/AndroidTest.xml b/broadcastradio/V2_0/target/AndroidTest.xml
similarity index 71%
copy from radio/V1_1/target/AndroidTest.xml
copy to broadcastradio/V2_0/target/AndroidTest.xml
index 76b339d..e91956d 100644
--- a/radio/V1_1/target/AndroidTest.xml
+++ b/broadcastradio/V2_0/target/AndroidTest.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2017 The Android Open Source Project
+<!-- Copyright (C) 2018 The Android Open Source Project
 
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
@@ -13,21 +13,21 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Config for VTS VtsHalRadioV1_1Target test cases">
+<configuration description="Config for VTS VtsHalBroadcastradioV2_0Target test cases">
+    <option name="config-descriptor:metadata" key="plan" value="vts-hal-auto" />
     <option name="config-descriptor:metadata" key="plan" value="vts-hal" />
     <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
+    <multi_target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
-        <option name="test-module-name" value="VtsHalRadioV1_1Target"/>
-        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalRadioV1_1TargetTest/VtsHalRadioV1_1TargetTest"/>
-        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalRadioV1_1TargetTest/VtsHalRadioV1_1TargetTest"/>
+        <option name="test-module-name" value="VtsHalBroadcastradioV2_0Target"/>
+        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalBroadcastradioV2_0TargetTest/VtsHalBroadcastradioV2_0TargetTest"/>
+        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalBroadcastradioV2_0TargetTest/VtsHalBroadcastradioV2_0TargetTest"/>
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.radio@1.1"/>
         <option name="test-timeout" value="15m"/>
     </test>
 </configuration>
diff --git a/radio/V1_1/target/Android.mk b/broadcastradio/V2_0/target_profiling/Android.mk
similarity index 78%
copy from radio/V1_1/target/Android.mk
copy to broadcastradio/V2_0/target_profiling/Android.mk
index bd1a0f1..35f64c6 100644
--- a/radio/V1_1/target/Android.mk
+++ b/broadcastradio/V2_0/target_profiling/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalBroadcastradioV2_0TargetProfiling
+VTS_CONFIG_SRC_DIR := testcases/hal/broadcastradio/V2_0/target_profiling
 include test/vts/tools/build/Android.host_config.mk
diff --git a/broadcastradio/V2_0/target_profiling/AndroidTest.xml b/broadcastradio/V2_0/target_profiling/AndroidTest.xml
new file mode 100644
index 0000000..8927a95
--- /dev/null
+++ b/broadcastradio/V2_0/target_profiling/AndroidTest.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS VtsHalBroadcastradioV2_0TargetProfiling test cases">
+    <option name="config-descriptor:metadata" key="plan" value="vts-hal-profiling" />
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="abort-on-push-failure" value="false"/>
+        <option name="push-group" value="HalHidlTargetProfilingTest.push"/>
+        <option name="cleanup" value="true"/>
+        <option name="push" value="DATA/lib/android.hardware.broadcastradio@2.0-vts.profiler.so->/data/local/tmp/32/android.hardware.broadcastradio@2.0-vts.profiler.so"/>
+        <option name="push" value="DATA/lib64/android.hardware.broadcastradio@2.0-vts.profiler.so->/data/local/tmp/64/android.hardware.broadcastradio@2.0-vts.profiler.so"/>
+    </target_preparer>
+    <multi_target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
+    <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+        <option name="test-module-name" value="VtsHalBroadcastradioV2_0TargetProfiling"/>
+        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalBroadcastradioV2_0TargetTest/VtsHalBroadcastradioV2_0TargetTest"/>
+        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalBroadcastradioV2_0TargetTest/VtsHalBroadcastradioV2_0TargetTest"/>
+        <option name="binary-test-type" value="hal_hidl_gtest"/>
+        <option name="binary-test-disable-framework" value="true"/>
+        <option name="binary-test-stop-native-servers" value="true"/>
+        <option name="enable-profiling" value="true"/>
+        <option name="test-timeout" value="15m"/>
+    </test>
+</configuration>
diff --git a/build/soong/hal2vts.go b/build/soong/hal2vts.go
index 01ac1fd..670280d 100644
--- a/build/soong/hal2vts.go
+++ b/build/soong/hal2vts.go
@@ -35,19 +35,18 @@
 
 	hidlGen = pctx.HostBinToolVariable("hidlGen", "hidl-gen")
 
-	hidlGenCmd = "${hidlGen}  -o ${genDir} -L vts " +
-		"-r android.hardware:hardware/interfaces " +
-		"-r android.hidl:system/libhidl/transport " +
+	hidlGenCmd = "${hidlGen} -o ${genDir} -L vts ${args} " +
 		"${pckg}@${ver}::${halFile}"
 
 	hal2vtsRule = pctx.StaticRule("hal2vtsRule", blueprint.RuleParams{
 		Command:     hidlGenCmd,
 		CommandDeps: []string{"${hidlGen}"},
 		Description: "hidl-gen -l vts $in => $out",
-	}, "genDir", "pckg", "ver", "halFile")
+	}, "genDir", "args", "pckg", "ver", "halFile")
 )
 
 type hal2vtsProperties struct {
+	Hidl_gen_args string
 	Srcs []string
 	Out  []string
 }
@@ -75,6 +74,8 @@
 		ctx.ModuleErrorf("Number of inputs must be equal to number of outputs.")
 	}
 
+	args := h.properties.Hidl_gen_args
+
 	genDir := android.PathForModuleGen(ctx, "").String()
 
 	vtsList := vtsList(ctx.AConfig())
@@ -88,18 +89,17 @@
 			ctx.ModuleErrorf("Source file has to be a .hal file.")
 		}
 
-		relSrc, err := filepath.Rel("hardware/interfaces/", src.String())
+		relOut, err := filepath.Rel(genDir, out.String())
 		if err != nil {
-			ctx.ModuleErrorf("Source file has to be from hardware/interfaces")
+			ctx.ModuleErrorf("Cannot get relative output path.")
 		}
-		halDir := filepath.Dir(relSrc)
+		halDir := filepath.Dir(relOut)
 		halFile := strings.TrimSuffix(src.Base(), ".hal")
 
 		ver := filepath.Base(halDir)
 		// Need this to transform directory path to hal name.
 		// For example, audio/effect -> audio.effect
 		pckg := strings.Replace(filepath.Dir(halDir), "/", ".", -1)
-		pckg = "android.hardware." + pckg
 
 		ctx.ModuleBuild(pctx, android.ModuleBuildParams{
 			Rule:   hal2vtsRule,
@@ -107,6 +107,7 @@
 			Output: out,
 			Args: map[string]string{
 				"genDir":  genDir,
+				"args":    args,
 				"pckg":    pckg,
 				"ver":     ver,
 				"halFile": halFile,
@@ -127,6 +128,10 @@
 }
 
 func (h *hal2vts) GeneratedSourceFiles() android.Paths {
+	return nil
+}
+
+func (h *hal2vts) GeneratedDeps() android.Paths {
 	return h.generatedHeaders
 }
 
diff --git a/camera/Android.bp b/camera/Android.bp
deleted file mode 100644
index fb12cd5..0000000
--- a/camera/Android.bp
+++ /dev/null
@@ -1,11 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "common/V1_0",
-    "device/V1_0",
-    "device/V3_2",
-    "device/V3_3",
-    "metadata/V3_2",
-    "provider/V2_4",
-]
diff --git a/camera/common/V1_0/Android.bp b/camera/common/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/camera/common/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/camera/common/V1_0/build/Android.bp b/camera/common/V1_0/build/Android.bp
index 47e91b2..9271b1b 100644
--- a/camera/common/V1_0/build/Android.bp
+++ b/camera/common/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.camera.common@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.camera.common@1.0_hal",
     ],
@@ -16,7 +17,7 @@
 genrule {
     name: "android.hardware.camera.common@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.common@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/camera/common/1.0/ $(genDir)/android/hardware/camera/common/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.camera.common@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/camera/common/1.0/ $(genDir)/android/hardware/camera/common/1.0/",
     srcs: [
         ":android.hardware.camera.common@1.0_hal",
     ],
@@ -28,7 +29,7 @@
 genrule {
     name: "android.hardware.camera.common@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.common@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/camera/common/1.0/ $(genDir)/android/hardware/camera/common/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.camera.common@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/camera/common/1.0/ $(genDir)/android/hardware/camera/common/1.0/",
     srcs: [
         ":android.hardware.camera.common@1.0_hal",
     ],
@@ -42,36 +43,10 @@
     generated_sources: ["android.hardware.camera.common@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.camera.common@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.camera.common@1.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.camera.common@1.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -79,7 +54,7 @@
 genrule {
     name: "android.hardware.camera.common@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.common@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/camera/common/1.0/ $(genDir)/android/hardware/camera/common/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.camera.common@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/camera/common/1.0/ $(genDir)/android/hardware/camera/common/1.0/",
     srcs: [
         ":android.hardware.camera.common@1.0_hal",
     ],
@@ -91,7 +66,7 @@
 genrule {
     name: "android.hardware.camera.common@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.common@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/camera/common/1.0/ $(genDir)/android/hardware/camera/common/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.camera.common@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/camera/common/1.0/ $(genDir)/android/hardware/camera/common/1.0/",
     srcs: [
         ":android.hardware.camera.common@1.0_hal",
     ],
@@ -105,27 +80,10 @@
     generated_sources: ["android.hardware.camera.common@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.camera.common@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.camera.common@1.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.camera.common@1.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/camera/device/V1_0/Android.bp b/camera/device/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/camera/device/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/camera/device/V1_0/build/Android.bp b/camera/device/V1_0/build/Android.bp
index 8232106..4283772 100644
--- a/camera/device/V1_0/build/Android.bp
+++ b/camera/device/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.camera.device@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.camera.device@1.0_hal",
     ],
@@ -19,7 +20,7 @@
 genrule {
     name: "android.hardware.camera.device@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.device@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/camera/device/1.0/ $(genDir)/android/hardware/camera/device/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.camera.device@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/camera/device/1.0/ $(genDir)/android/hardware/camera/device/1.0/",
     srcs: [
         ":android.hardware.camera.device@1.0_hal",
     ],
@@ -34,7 +35,7 @@
 genrule {
     name: "android.hardware.camera.device@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.device@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/camera/device/1.0/ $(genDir)/android/hardware/camera/device/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.camera.device@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/camera/device/1.0/ $(genDir)/android/hardware/camera/device/1.0/",
     srcs: [
         ":android.hardware.camera.device@1.0_hal",
     ],
@@ -51,42 +52,15 @@
     generated_sources: ["android.hardware.camera.device@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.camera.device@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.camera.device@1.0-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
     shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+        "android.hardware.camera.common@1.0-vts.driver",
+        "android.hardware.graphics.common@1.0-vts.driver",
+    ],
+    static_libs: [
+        "android.hardware.camera.common@1.0",
         "android.hardware.camera.device@1.0",
-        "android.hardware.camera.common@1.0",
-        "android.hardware.camera.common@1.0-vts.driver",
         "android.hardware.graphics.common@1.0",
-        "android.hardware.graphics.common@1.0-vts.driver",
-    ],
-    export_shared_lib_headers: [
-        "android.hardware.camera.common@1.0",
-        "android.hardware.camera.common@1.0-vts.driver",
-        "android.hardware.graphics.common@1.0",
-        "android.hardware.graphics.common@1.0-vts.driver",
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -94,7 +68,7 @@
 genrule {
     name: "android.hardware.camera.device@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.device@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/camera/device/1.0/ $(genDir)/android/hardware/camera/device/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.camera.device@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/camera/device/1.0/ $(genDir)/android/hardware/camera/device/1.0/",
     srcs: [
         ":android.hardware.camera.device@1.0_hal",
     ],
@@ -109,7 +83,7 @@
 genrule {
     name: "android.hardware.camera.device@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.device@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/camera/device/1.0/ $(genDir)/android/hardware/camera/device/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.camera.device@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/camera/device/1.0/ $(genDir)/android/hardware/camera/device/1.0/",
     srcs: [
         ":android.hardware.camera.device@1.0_hal",
     ],
@@ -126,30 +100,15 @@
     generated_sources: ["android.hardware.camera.device@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.camera.device@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.camera.device@1.0-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
     shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
-        "android.hardware.camera.device@1.0",
-        "android.hardware.camera.common@1.0",
         "android.hardware.camera.common@1.0-vts.profiler",
-        "android.hardware.graphics.common@1.0",
         "android.hardware.graphics.common@1.0-vts.profiler",
     ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
+    static_libs: [
+        "android.hardware.camera.common@1.0",
+        "android.hardware.camera.device@1.0",
+        "android.hardware.graphics.common@1.0",
     ],
 }
 
diff --git a/camera/device/V3_2/Android.bp b/camera/device/V3_2/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/camera/device/V3_2/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/camera/device/V3_2/build/Android.bp b/camera/device/V3_2/build/Android.bp
index 9094150..ab6e27e 100644
--- a/camera/device/V3_2/build/Android.bp
+++ b/camera/device/V3_2/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.camera.device@3.2-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.camera.device@3.2_hal",
     ],
@@ -19,7 +20,7 @@
 genrule {
     name: "android.hardware.camera.device@3.2-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.device@3.2 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/camera/device/3.2/ $(genDir)/android/hardware/camera/device/3.2/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.camera.device@3.2 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/camera/device/3.2/ $(genDir)/android/hardware/camera/device/3.2/",
     srcs: [
         ":android.hardware.camera.device@3.2_hal",
     ],
@@ -34,7 +35,7 @@
 genrule {
     name: "android.hardware.camera.device@3.2-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.device@3.2 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/camera/device/3.2/ $(genDir)/android/hardware/camera/device/3.2/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.camera.device@3.2 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/camera/device/3.2/ $(genDir)/android/hardware/camera/device/3.2/",
     srcs: [
         ":android.hardware.camera.device@3.2_hal",
     ],
@@ -51,42 +52,15 @@
     generated_sources: ["android.hardware.camera.device@3.2-vts.driver_genc++"],
     generated_headers: ["android.hardware.camera.device@3.2-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.camera.device@3.2-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
     shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+        "android.hardware.camera.common@1.0-vts.driver",
+        "android.hardware.graphics.common@1.0-vts.driver",
+    ],
+    static_libs: [
+        "android.hardware.camera.common@1.0",
         "android.hardware.camera.device@3.2",
-        "android.hardware.camera.common@1.0",
-        "android.hardware.camera.common@1.0-vts.driver",
         "android.hardware.graphics.common@1.0",
-        "android.hardware.graphics.common@1.0-vts.driver",
-    ],
-    export_shared_lib_headers: [
-        "android.hardware.camera.common@1.0",
-        "android.hardware.camera.common@1.0-vts.driver",
-        "android.hardware.graphics.common@1.0",
-        "android.hardware.graphics.common@1.0-vts.driver",
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -94,7 +68,7 @@
 genrule {
     name: "android.hardware.camera.device@3.2-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.device@3.2 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/camera/device/3.2/ $(genDir)/android/hardware/camera/device/3.2/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.camera.device@3.2 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/camera/device/3.2/ $(genDir)/android/hardware/camera/device/3.2/",
     srcs: [
         ":android.hardware.camera.device@3.2_hal",
     ],
@@ -109,7 +83,7 @@
 genrule {
     name: "android.hardware.camera.device@3.2-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.device@3.2 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/camera/device/3.2/ $(genDir)/android/hardware/camera/device/3.2/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.camera.device@3.2 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/camera/device/3.2/ $(genDir)/android/hardware/camera/device/3.2/",
     srcs: [
         ":android.hardware.camera.device@3.2_hal",
     ],
@@ -126,30 +100,15 @@
     generated_sources: ["android.hardware.camera.device@3.2-vts.profiler_genc++"],
     generated_headers: ["android.hardware.camera.device@3.2-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.camera.device@3.2-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
     shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
-        "android.hardware.camera.device@3.2",
-        "android.hardware.camera.common@1.0",
         "android.hardware.camera.common@1.0-vts.profiler",
-        "android.hardware.graphics.common@1.0",
         "android.hardware.graphics.common@1.0-vts.profiler",
     ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
+    static_libs: [
+        "android.hardware.camera.common@1.0",
+        "android.hardware.camera.device@3.2",
+        "android.hardware.graphics.common@1.0",
     ],
 }
 
diff --git a/camera/device/V3_3/Android.bp b/camera/device/V3_3/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/camera/device/V3_3/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/radio/V1_1/target/Android.mk b/camera/device/V3_3/adapter/Android.mk
similarity index 79%
copy from radio/V1_1/target/Android.mk
copy to camera/device/V3_3/adapter/Android.mk
index bd1a0f1..9957433 100644
--- a/radio/V1_1/target/Android.mk
+++ b/camera/device/V3_3/adapter/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalCameraDeviceV3_3Adapter
+VTS_CONFIG_SRC_DIR := testcases/hal/camera/device/V3_3/adapter
 include test/vts/tools/build/Android.host_config.mk
diff --git a/camera/device/V3_3/adapter/AndroidTest.xml b/camera/device/V3_3/adapter/AndroidTest.xml
new file mode 100644
index 0000000..7c1728d
--- /dev/null
+++ b/camera/device/V3_3/adapter/AndroidTest.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS VtsHalCameraDeviceV3_3Adapter test cases">
+    <option key="plan" name="config-descriptor:metadata" value="vts-hal-adapter"/>
+    <object class="com.android.tradefed.module.VtsHalAdapterModuleController" type="module_controller">
+        <option name="hal-package-name" value="android.hardware.camera.device@3.3"/>
+    </object>
+    <target_preparer class="com.android.tradefed.targetprep.VtsHalAdapterPreparer">
+        <option name="adapter-binary-name" value="android.hardware.camera.device@3.2-adapter"/>
+        <option name="hal-package-name" value="android.hardware.camera.device@3.3"/>
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest">
+        <option name="package" value="com.android.devicehealth.tests"/>
+        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner"/>
+    </test>
+    <include name="CtsCameraTestCases.config"/>
+    <include name="CtsStatsdHostTestCases.config"/>
+</configuration>
diff --git a/camera/device/V3_3/build/Android.bp b/camera/device/V3_3/build/Android.bp
index 1cc2e8f..d69bc68 100644
--- a/camera/device/V3_3/build/Android.bp
+++ b/camera/device/V3_3/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.camera.device@3.3-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.camera.device@3.3_hal",
     ],
@@ -17,7 +18,7 @@
 genrule {
     name: "android.hardware.camera.device@3.3-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.device@3.3 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/camera/device/3.3/ $(genDir)/android/hardware/camera/device/3.3/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.camera.device@3.3 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/camera/device/3.3/ $(genDir)/android/hardware/camera/device/3.3/",
     srcs: [
         ":android.hardware.camera.device@3.3_hal",
     ],
@@ -30,7 +31,7 @@
 genrule {
     name: "android.hardware.camera.device@3.3-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.device@3.3 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/camera/device/3.3/ $(genDir)/android/hardware/camera/device/3.3/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.camera.device@3.3 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/camera/device/3.3/ $(genDir)/android/hardware/camera/device/3.3/",
     srcs: [
         ":android.hardware.camera.device@3.3_hal",
     ],
@@ -45,46 +46,17 @@
     generated_sources: ["android.hardware.camera.device@3.3-vts.driver_genc++"],
     generated_headers: ["android.hardware.camera.device@3.3-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.camera.device@3.3-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
     shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+        "android.hardware.camera.common@1.0-vts.driver",
+        "android.hardware.camera.device@3.2-vts.driver",
+        "android.hardware.graphics.common@1.0-vts.driver",
+    ],
+    static_libs: [
+        "android.hardware.camera.common@1.0",
+        "android.hardware.camera.device@3.2",
         "android.hardware.camera.device@3.3",
-        "android.hardware.camera.common@1.0",
-        "android.hardware.camera.common@1.0-vts.driver",
-        "android.hardware.camera.device@3.2",
-        "android.hardware.camera.device@3.2-vts.driver",
         "android.hardware.graphics.common@1.0",
-        "android.hardware.graphics.common@1.0-vts.driver",
-    ],
-    export_shared_lib_headers: [
-        "android.hardware.camera.common@1.0",
-        "android.hardware.camera.common@1.0-vts.driver",
-        "android.hardware.camera.device@3.2",
-        "android.hardware.camera.device@3.2-vts.driver",
-        "android.hardware.graphics.common@1.0",
-        "android.hardware.graphics.common@1.0-vts.driver",
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -92,7 +64,7 @@
 genrule {
     name: "android.hardware.camera.device@3.3-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.device@3.3 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/camera/device/3.3/ $(genDir)/android/hardware/camera/device/3.3/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.camera.device@3.3 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/camera/device/3.3/ $(genDir)/android/hardware/camera/device/3.3/",
     srcs: [
         ":android.hardware.camera.device@3.3_hal",
     ],
@@ -105,7 +77,7 @@
 genrule {
     name: "android.hardware.camera.device@3.3-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.device@3.3 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/camera/device/3.3/ $(genDir)/android/hardware/camera/device/3.3/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.camera.device@3.3 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/camera/device/3.3/ $(genDir)/android/hardware/camera/device/3.3/",
     srcs: [
         ":android.hardware.camera.device@3.3_hal",
     ],
@@ -120,32 +92,17 @@
     generated_sources: ["android.hardware.camera.device@3.3-vts.profiler_genc++"],
     generated_headers: ["android.hardware.camera.device@3.3-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.camera.device@3.3-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
     shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
-        "android.hardware.camera.device@3.3",
-        "android.hardware.camera.common@1.0",
         "android.hardware.camera.common@1.0-vts.profiler",
-        "android.hardware.camera.device@3.2",
         "android.hardware.camera.device@3.2-vts.profiler",
-        "android.hardware.graphics.common@1.0",
         "android.hardware.graphics.common@1.0-vts.profiler",
     ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
+    static_libs: [
+        "android.hardware.camera.common@1.0",
+        "android.hardware.camera.device@3.2",
+        "android.hardware.camera.device@3.3",
+        "android.hardware.graphics.common@1.0",
     ],
 }
 
diff --git a/radio/V1_1/target/Android.mk b/camera/device/V3_4/adapter/Android.mk
similarity index 79%
copy from radio/V1_1/target/Android.mk
copy to camera/device/V3_4/adapter/Android.mk
index bd1a0f1..c2cebcb 100644
--- a/radio/V1_1/target/Android.mk
+++ b/camera/device/V3_4/adapter/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalCameraDeviceV3_4Adapter
+VTS_CONFIG_SRC_DIR := testcases/hal/camera/device/V3_4/adapter
 include test/vts/tools/build/Android.host_config.mk
diff --git a/camera/device/V3_4/adapter/AndroidTest.xml b/camera/device/V3_4/adapter/AndroidTest.xml
new file mode 100644
index 0000000..6d4396e
--- /dev/null
+++ b/camera/device/V3_4/adapter/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS VtsHalCameraDeviceV3_4Adapter test cases">
+    <option key="plan" name="config-descriptor:metadata" value="vts-hal-adapter"/>
+    <object class="com.android.tradefed.module.VtsHalAdapterModuleController" type="module_controller">
+        <option name="hal-package-name" value="android.hardware.camera.device@3.4"/>
+    </object>
+    <target_preparer class="com.android.tradefed.targetprep.VtsHalAdapterPreparer">
+        <option name="adapter-binary-name" value="android.hardware.camera.device@3.3-adapter"/>
+        <option name="hal-package-name" value="android.hardware.camera.device@3.4"/>
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest">
+        <option name="package" value="com.android.devicehealth.tests"/>
+        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner"/>
+    </test>
+</configuration>
diff --git a/camera/device/V3_4/build/Android.bp b/camera/device/V3_4/build/Android.bp
new file mode 100644
index 0000000..a11acdb
--- /dev/null
+++ b/camera/device/V3_4/build/Android.bp
@@ -0,0 +1,117 @@
+// This file was auto-generated. Do not edit manually.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
+
+// Generate .vts spec files.
+hal2vts {
+    name: "android.hardware.camera.device@3.4-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
+    srcs: [
+        ":android.hardware.camera.device@3.4_hal",
+    ],
+    out: [
+        "android/hardware/camera/device/3.4/CameraDeviceCallback.vts",
+        "android/hardware/camera/device/3.4/CameraDeviceSession.vts",
+        "android/hardware/camera/device/3.4/types.vts",
+    ],
+}
+
+// Build VTS driver.
+genrule {
+    name: "android.hardware.camera.device@3.4-vts.driver_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.camera.device@3.4 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/camera/device/3.4/ $(genDir)/android/hardware/camera/device/3.4/",
+    srcs: [
+        ":android.hardware.camera.device@3.4_hal",
+    ],
+    out: [
+        "android/hardware/camera/device/3.4/CameraDeviceCallback.vts.cpp",
+        "android/hardware/camera/device/3.4/CameraDeviceSession.vts.cpp",
+        "android/hardware/camera/device/3.4/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.camera.device@3.4-vts.driver_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.camera.device@3.4 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/camera/device/3.4/ $(genDir)/android/hardware/camera/device/3.4/",
+    srcs: [
+        ":android.hardware.camera.device@3.4_hal",
+    ],
+    out: [
+        "android/hardware/camera/device/3.4/CameraDeviceCallback.vts.h",
+        "android/hardware/camera/device/3.4/CameraDeviceSession.vts.h",
+        "android/hardware/camera/device/3.4/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.camera.device@3.4-vts.driver",
+    generated_sources: ["android.hardware.camera.device@3.4-vts.driver_genc++"],
+    generated_headers: ["android.hardware.camera.device@3.4-vts.driver_genc++_headers"],
+    export_generated_headers: ["android.hardware.camera.device@3.4-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [
+        "android.hardware.camera.common@1.0-vts.driver",
+        "android.hardware.camera.device@3.2-vts.driver",
+        "android.hardware.camera.device@3.3-vts.driver",
+        "android.hardware.graphics.common@1.0-vts.driver",
+    ],
+    static_libs: [
+        "android.hardware.camera.common@1.0",
+        "android.hardware.camera.device@3.2",
+        "android.hardware.camera.device@3.3",
+        "android.hardware.camera.device@3.4",
+        "android.hardware.graphics.common@1.0",
+    ],
+}
+
+// Build VTS profiler.
+genrule {
+    name: "android.hardware.camera.device@3.4-vts.profiler_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.camera.device@3.4 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/camera/device/3.4/ $(genDir)/android/hardware/camera/device/3.4/",
+    srcs: [
+        ":android.hardware.camera.device@3.4_hal",
+    ],
+    out: [
+        "android/hardware/camera/device/3.4/CameraDeviceCallback.vts.cpp",
+        "android/hardware/camera/device/3.4/CameraDeviceSession.vts.cpp",
+        "android/hardware/camera/device/3.4/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.camera.device@3.4-vts.profiler_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.camera.device@3.4 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/camera/device/3.4/ $(genDir)/android/hardware/camera/device/3.4/",
+    srcs: [
+        ":android.hardware.camera.device@3.4_hal",
+    ],
+    out: [
+        "android/hardware/camera/device/3.4/CameraDeviceCallback.vts.h",
+        "android/hardware/camera/device/3.4/CameraDeviceSession.vts.h",
+        "android/hardware/camera/device/3.4/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.camera.device@3.4-vts.profiler",
+    generated_sources: ["android.hardware.camera.device@3.4-vts.profiler_genc++"],
+    generated_headers: ["android.hardware.camera.device@3.4-vts.profiler_genc++_headers"],
+    export_generated_headers: ["android.hardware.camera.device@3.4-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [
+        "android.hardware.camera.common@1.0-vts.profiler",
+        "android.hardware.camera.device@3.2-vts.profiler",
+        "android.hardware.camera.device@3.3-vts.profiler",
+        "android.hardware.graphics.common@1.0-vts.profiler",
+    ],
+    static_libs: [
+        "android.hardware.camera.common@1.0",
+        "android.hardware.camera.device@3.2",
+        "android.hardware.camera.device@3.3",
+        "android.hardware.camera.device@3.4",
+        "android.hardware.graphics.common@1.0",
+    ],
+}
+
diff --git a/camera/metadata/V3_2/Android.bp b/camera/metadata/V3_2/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/camera/metadata/V3_2/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/camera/metadata/V3_2/build/Android.bp b/camera/metadata/V3_2/build/Android.bp
index ca9b055..4b886ac 100644
--- a/camera/metadata/V3_2/build/Android.bp
+++ b/camera/metadata/V3_2/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.camera.metadata@3.2-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.camera.metadata@3.2_hal",
     ],
@@ -16,7 +17,7 @@
 genrule {
     name: "android.hardware.camera.metadata@3.2-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.metadata@3.2 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/camera/metadata/3.2/ $(genDir)/android/hardware/camera/metadata/3.2/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.camera.metadata@3.2 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/camera/metadata/3.2/ $(genDir)/android/hardware/camera/metadata/3.2/",
     srcs: [
         ":android.hardware.camera.metadata@3.2_hal",
     ],
@@ -28,7 +29,7 @@
 genrule {
     name: "android.hardware.camera.metadata@3.2-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.metadata@3.2 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/camera/metadata/3.2/ $(genDir)/android/hardware/camera/metadata/3.2/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.camera.metadata@3.2 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/camera/metadata/3.2/ $(genDir)/android/hardware/camera/metadata/3.2/",
     srcs: [
         ":android.hardware.camera.metadata@3.2_hal",
     ],
@@ -42,36 +43,10 @@
     generated_sources: ["android.hardware.camera.metadata@3.2-vts.driver_genc++"],
     generated_headers: ["android.hardware.camera.metadata@3.2-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.camera.metadata@3.2-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.camera.metadata@3.2",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -79,7 +54,7 @@
 genrule {
     name: "android.hardware.camera.metadata@3.2-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.metadata@3.2 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/camera/metadata/3.2/ $(genDir)/android/hardware/camera/metadata/3.2/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.camera.metadata@3.2 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/camera/metadata/3.2/ $(genDir)/android/hardware/camera/metadata/3.2/",
     srcs: [
         ":android.hardware.camera.metadata@3.2_hal",
     ],
@@ -91,7 +66,7 @@
 genrule {
     name: "android.hardware.camera.metadata@3.2-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.metadata@3.2 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/camera/metadata/3.2/ $(genDir)/android/hardware/camera/metadata/3.2/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.camera.metadata@3.2 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/camera/metadata/3.2/ $(genDir)/android/hardware/camera/metadata/3.2/",
     srcs: [
         ":android.hardware.camera.metadata@3.2_hal",
     ],
@@ -105,27 +80,10 @@
     generated_sources: ["android.hardware.camera.metadata@3.2-vts.profiler_genc++"],
     generated_headers: ["android.hardware.camera.metadata@3.2-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.camera.metadata@3.2-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.camera.metadata@3.2",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/radio/V1_1/target/Android.mk b/camera/metadata/V3_3/adapter/Android.mk
similarity index 79%
copy from radio/V1_1/target/Android.mk
copy to camera/metadata/V3_3/adapter/Android.mk
index bd1a0f1..bd8bb79 100644
--- a/radio/V1_1/target/Android.mk
+++ b/camera/metadata/V3_3/adapter/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalCameraMetadataV3_3Adapter
+VTS_CONFIG_SRC_DIR := testcases/hal/camera/metadata/V3_3/adapter
 include test/vts/tools/build/Android.host_config.mk
diff --git a/camera/metadata/V3_3/adapter/AndroidTest.xml b/camera/metadata/V3_3/adapter/AndroidTest.xml
new file mode 100644
index 0000000..cf3ef15
--- /dev/null
+++ b/camera/metadata/V3_3/adapter/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS VtsHalCameraMetadataV3_3Adapter test cases">
+    <option key="plan" name="config-descriptor:metadata" value="vts-hal-adapter"/>
+    <object class="com.android.tradefed.module.VtsHalAdapterModuleController" type="module_controller">
+        <option name="hal-package-name" value="android.hardware.camera.metadata@3.3"/>
+    </object>
+    <target_preparer class="com.android.tradefed.targetprep.VtsHalAdapterPreparer">
+        <option name="adapter-binary-name" value="android.hardware.camera.metadata@3.2-adapter"/>
+        <option name="hal-package-name" value="android.hardware.camera.metadata@3.3"/>
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest">
+        <option name="package" value="com.android.devicehealth.tests"/>
+        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner"/>
+    </test>
+</configuration>
diff --git a/camera/metadata/V3_3/build/Android.bp b/camera/metadata/V3_3/build/Android.bp
new file mode 100644
index 0000000..f454fe5
--- /dev/null
+++ b/camera/metadata/V3_3/build/Android.bp
@@ -0,0 +1,95 @@
+// This file was auto-generated. Do not edit manually.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
+
+// Generate .vts spec files.
+hal2vts {
+    name: "android.hardware.camera.metadata@3.3-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
+    srcs: [
+        ":android.hardware.camera.metadata@3.3_hal",
+    ],
+    out: [
+        "android/hardware/camera/metadata/3.3/types.vts",
+    ],
+}
+
+// Build VTS driver.
+genrule {
+    name: "android.hardware.camera.metadata@3.3-vts.driver_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.camera.metadata@3.3 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/camera/metadata/3.3/ $(genDir)/android/hardware/camera/metadata/3.3/",
+    srcs: [
+        ":android.hardware.camera.metadata@3.3_hal",
+    ],
+    out: [
+        "android/hardware/camera/metadata/3.3/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.camera.metadata@3.3-vts.driver_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.camera.metadata@3.3 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/camera/metadata/3.3/ $(genDir)/android/hardware/camera/metadata/3.3/",
+    srcs: [
+        ":android.hardware.camera.metadata@3.3_hal",
+    ],
+    out: [
+        "android/hardware/camera/metadata/3.3/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.camera.metadata@3.3-vts.driver",
+    generated_sources: ["android.hardware.camera.metadata@3.3-vts.driver_genc++"],
+    generated_headers: ["android.hardware.camera.metadata@3.3-vts.driver_genc++_headers"],
+    export_generated_headers: ["android.hardware.camera.metadata@3.3-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [
+        "android.hardware.camera.metadata@3.2-vts.driver",
+    ],
+    static_libs: [
+        "android.hardware.camera.metadata@3.2",
+        "android.hardware.camera.metadata@3.3",
+    ],
+}
+
+// Build VTS profiler.
+genrule {
+    name: "android.hardware.camera.metadata@3.3-vts.profiler_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.camera.metadata@3.3 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/camera/metadata/3.3/ $(genDir)/android/hardware/camera/metadata/3.3/",
+    srcs: [
+        ":android.hardware.camera.metadata@3.3_hal",
+    ],
+    out: [
+        "android/hardware/camera/metadata/3.3/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.camera.metadata@3.3-vts.profiler_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.camera.metadata@3.3 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/camera/metadata/3.3/ $(genDir)/android/hardware/camera/metadata/3.3/",
+    srcs: [
+        ":android.hardware.camera.metadata@3.3_hal",
+    ],
+    out: [
+        "android/hardware/camera/metadata/3.3/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.camera.metadata@3.3-vts.profiler",
+    generated_sources: ["android.hardware.camera.metadata@3.3-vts.profiler_genc++"],
+    generated_headers: ["android.hardware.camera.metadata@3.3-vts.profiler_genc++_headers"],
+    export_generated_headers: ["android.hardware.camera.metadata@3.3-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [
+        "android.hardware.camera.metadata@3.2-vts.profiler",
+    ],
+    static_libs: [
+        "android.hardware.camera.metadata@3.2",
+        "android.hardware.camera.metadata@3.3",
+    ],
+}
+
diff --git a/camera/provider/V2_4/Android.bp b/camera/provider/V2_4/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/camera/provider/V2_4/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/camera/provider/V2_4/build/Android.bp b/camera/provider/V2_4/build/Android.bp
index e80e66c..2fea040 100644
--- a/camera/provider/V2_4/build/Android.bp
+++ b/camera/provider/V2_4/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.camera.provider@2.4-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.camera.provider@2.4_hal",
     ],
@@ -17,7 +18,7 @@
 genrule {
     name: "android.hardware.camera.provider@2.4-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.provider@2.4 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/camera/provider/2.4/ $(genDir)/android/hardware/camera/provider/2.4/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.camera.provider@2.4 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/camera/provider/2.4/ $(genDir)/android/hardware/camera/provider/2.4/",
     srcs: [
         ":android.hardware.camera.provider@2.4_hal",
     ],
@@ -30,7 +31,7 @@
 genrule {
     name: "android.hardware.camera.provider@2.4-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.provider@2.4 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/camera/provider/2.4/ $(genDir)/android/hardware/camera/provider/2.4/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.camera.provider@2.4 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/camera/provider/2.4/ $(genDir)/android/hardware/camera/provider/2.4/",
     srcs: [
         ":android.hardware.camera.provider@2.4_hal",
     ],
@@ -45,50 +46,19 @@
     generated_sources: ["android.hardware.camera.provider@2.4-vts.driver_genc++"],
     generated_headers: ["android.hardware.camera.provider@2.4-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.camera.provider@2.4-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
     shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+        "android.hardware.camera.common@1.0-vts.driver",
+        "android.hardware.camera.device@1.0-vts.driver",
+        "android.hardware.camera.device@3.2-vts.driver",
+        "android.hardware.graphics.common@1.0-vts.driver",
+    ],
+    static_libs: [
+        "android.hardware.camera.common@1.0",
+        "android.hardware.camera.device@1.0",
+        "android.hardware.camera.device@3.2",
         "android.hardware.camera.provider@2.4",
-        "android.hardware.camera.common@1.0",
-        "android.hardware.camera.common@1.0-vts.driver",
-        "android.hardware.camera.device@1.0",
-        "android.hardware.camera.device@1.0-vts.driver",
-        "android.hardware.camera.device@3.2",
-        "android.hardware.camera.device@3.2-vts.driver",
         "android.hardware.graphics.common@1.0",
-        "android.hardware.graphics.common@1.0-vts.driver",
-    ],
-    export_shared_lib_headers: [
-        "android.hardware.camera.common@1.0",
-        "android.hardware.camera.common@1.0-vts.driver",
-        "android.hardware.camera.device@1.0",
-        "android.hardware.camera.device@1.0-vts.driver",
-        "android.hardware.camera.device@3.2",
-        "android.hardware.camera.device@3.2-vts.driver",
-        "android.hardware.graphics.common@1.0",
-        "android.hardware.graphics.common@1.0-vts.driver",
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -96,7 +66,7 @@
 genrule {
     name: "android.hardware.camera.provider@2.4-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.provider@2.4 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/camera/provider/2.4/ $(genDir)/android/hardware/camera/provider/2.4/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.camera.provider@2.4 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/camera/provider/2.4/ $(genDir)/android/hardware/camera/provider/2.4/",
     srcs: [
         ":android.hardware.camera.provider@2.4_hal",
     ],
@@ -109,7 +79,7 @@
 genrule {
     name: "android.hardware.camera.provider@2.4-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.provider@2.4 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/camera/provider/2.4/ $(genDir)/android/hardware/camera/provider/2.4/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.camera.provider@2.4 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/camera/provider/2.4/ $(genDir)/android/hardware/camera/provider/2.4/",
     srcs: [
         ":android.hardware.camera.provider@2.4_hal",
     ],
@@ -124,34 +94,19 @@
     generated_sources: ["android.hardware.camera.provider@2.4-vts.profiler_genc++"],
     generated_headers: ["android.hardware.camera.provider@2.4-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.camera.provider@2.4-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
     shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
-        "android.hardware.camera.provider@2.4",
-        "android.hardware.camera.common@1.0",
         "android.hardware.camera.common@1.0-vts.profiler",
-        "android.hardware.camera.device@1.0",
         "android.hardware.camera.device@1.0-vts.profiler",
-        "android.hardware.camera.device@3.2",
         "android.hardware.camera.device@3.2-vts.profiler",
-        "android.hardware.graphics.common@1.0",
         "android.hardware.graphics.common@1.0-vts.profiler",
     ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
+    static_libs: [
+        "android.hardware.camera.common@1.0",
+        "android.hardware.camera.device@1.0",
+        "android.hardware.camera.device@3.2",
+        "android.hardware.camera.provider@2.4",
+        "android.hardware.graphics.common@1.0",
     ],
 }
 
diff --git a/camera/provider/V2_4/target/AndroidTest.xml b/camera/provider/V2_4/target/AndroidTest.xml
index e830291..4eca95f 100644
--- a/camera/provider/V2_4/target/AndroidTest.xml
+++ b/camera/provider/V2_4/target/AndroidTest.xml
@@ -19,13 +19,17 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalCameraProviderV2_4Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalCameraProviderV2_4TargetTest/VtsHalCameraProviderV2_4TargetTest"/>
         <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalCameraProviderV2_4TargetTest/VtsHalCameraProviderV2_4TargetTest"/>
         <option name="binary-test-type" value="hal_hidl_gtest"/>
-        <option name="precondition-lshal" value="android.hardware.camera.provider@2.4"/>
+        <option name="exclude-coverage-path" value="hardware/qcom/camera/msm8998/QCamera2/HAL" />
+        <option name="exclude-coverage-path" value="hardware/interfaces/graphics/mapper/2.0" />
+        <option name="exclude-coverage-path" value="hardware/interfaces/configstore/utils" />
+        <option name="exclude-coverage-path" value="hardware/interfaces/sensors" />
+        <option name="exclude-coverage-path" value="hardware/qcom/display/msm8998" />
+        <option name="exclude-coverage-path" value="vendor/qcom/msm8998/proprietary/proprietary/qmi-framework" />
         <option name="test-timeout" value="30m"/>
     </test>
 </configuration>
diff --git a/camera/provider/V2_4/target_profiling/AndroidTest.xml b/camera/provider/V2_4/target_profiling/AndroidTest.xml
index e5c360a..ee5a16a 100644
--- a/camera/provider/V2_4/target_profiling/AndroidTest.xml
+++ b/camera/provider/V2_4/target_profiling/AndroidTest.xml
@@ -30,14 +30,12 @@
         <option name="push" value="DATA/lib/android.hardware.camera.provider@2.4-vts.profiler.so->/data/local/tmp/32/android.hardware.camera.provider@2.4-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.camera.provider@2.4-vts.profiler.so->/data/local/tmp/64/android.hardware.camera.provider@2.4-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalCameraProviderV2_4TargetProfiling"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalCameraProviderV2_4TargetTest/VtsHalCameraProviderV2_4TargetTest"/>
         <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalCameraProviderV2_4TargetTest/VtsHalCameraProviderV2_4TargetTest"/>
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.camera.provider@2.4"/>
         <option name="test-timeout" value="45m"/>
     </test>
 </configuration>
diff --git a/cas/Android.bp b/cas/Android.bp
deleted file mode 100644
index 8c4fa06..0000000
--- a/cas/Android.bp
+++ /dev/null
@@ -1,7 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "V1_0",
-    "native/V1_0",
-]
diff --git a/cas/V1_0/Android.bp b/cas/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/cas/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/cas/V1_0/build/Android.bp b/cas/V1_0/build/Android.bp
index 0f85302..2bacf73 100644
--- a/cas/V1_0/build/Android.bp
+++ b/cas/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.cas@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.cas@1.0_hal",
     ],
@@ -20,7 +21,7 @@
 genrule {
     name: "android.hardware.cas@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.cas@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/cas/1.0/ $(genDir)/android/hardware/cas/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.cas@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/cas/1.0/ $(genDir)/android/hardware/cas/1.0/",
     srcs: [
         ":android.hardware.cas@1.0_hal",
     ],
@@ -36,7 +37,7 @@
 genrule {
     name: "android.hardware.cas@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.cas@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/cas/1.0/ $(genDir)/android/hardware/cas/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.cas@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/cas/1.0/ $(genDir)/android/hardware/cas/1.0/",
     srcs: [
         ":android.hardware.cas@1.0_hal",
     ],
@@ -54,36 +55,10 @@
     generated_sources: ["android.hardware.cas@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.cas@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.cas@1.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.cas@1.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -91,7 +66,7 @@
 genrule {
     name: "android.hardware.cas@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.cas@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/cas/1.0/ $(genDir)/android/hardware/cas/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.cas@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/cas/1.0/ $(genDir)/android/hardware/cas/1.0/",
     srcs: [
         ":android.hardware.cas@1.0_hal",
     ],
@@ -107,7 +82,7 @@
 genrule {
     name: "android.hardware.cas@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.cas@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/cas/1.0/ $(genDir)/android/hardware/cas/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.cas@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/cas/1.0/ $(genDir)/android/hardware/cas/1.0/",
     srcs: [
         ":android.hardware.cas@1.0_hal",
     ],
@@ -125,27 +100,10 @@
     generated_sources: ["android.hardware.cas@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.cas@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.cas@1.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.cas@1.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/cas/V1_0/target/AndroidTest.xml b/cas/V1_0/target/AndroidTest.xml
index bfc3716..a960e5e 100644
--- a/cas/V1_0/target/AndroidTest.xml
+++ b/cas/V1_0/target/AndroidTest.xml
@@ -19,7 +19,6 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalCasV1_0Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalCasV1_0TargetTest/VtsHalCasV1_0TargetTest"/>
@@ -27,7 +26,7 @@
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.cas@1.0"/>
+        <option name="exclude-coverage-path" value="frameworks/av/media" />
         <option name="test-timeout" value="1m"/>
     </test>
 </configuration>
diff --git a/cas/native/V1_0/Android.bp b/cas/native/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/cas/native/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/cas/native/V1_0/build/Android.bp b/cas/native/V1_0/build/Android.bp
index e667395..fdc65bf 100644
--- a/cas/native/V1_0/build/Android.bp
+++ b/cas/native/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.cas.native@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.cas.native@1.0_hal",
     ],
@@ -17,7 +18,7 @@
 genrule {
     name: "android.hardware.cas.native@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.cas.native@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/cas/native/1.0/ $(genDir)/android/hardware/cas/native/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.cas.native@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/cas/native/1.0/ $(genDir)/android/hardware/cas/native/1.0/",
     srcs: [
         ":android.hardware.cas.native@1.0_hal",
     ],
@@ -30,7 +31,7 @@
 genrule {
     name: "android.hardware.cas.native@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.cas.native@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/cas/native/1.0/ $(genDir)/android/hardware/cas/native/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.cas.native@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/cas/native/1.0/ $(genDir)/android/hardware/cas/native/1.0/",
     srcs: [
         ":android.hardware.cas.native@1.0_hal",
     ],
@@ -45,38 +46,13 @@
     generated_sources: ["android.hardware.cas.native@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.cas.native@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.cas.native@1.0-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
     shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+        "android.hardware.cas@1.0-vts.driver",
+    ],
+    static_libs: [
         "android.hardware.cas.native@1.0",
         "android.hardware.cas@1.0",
-        "android.hardware.cas@1.0-vts.driver",
-    ],
-    export_shared_lib_headers: [
-        "android.hardware.cas@1.0",
-        "android.hardware.cas@1.0-vts.driver",
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -84,7 +60,7 @@
 genrule {
     name: "android.hardware.cas.native@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.cas.native@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/cas/native/1.0/ $(genDir)/android/hardware/cas/native/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.cas.native@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/cas/native/1.0/ $(genDir)/android/hardware/cas/native/1.0/",
     srcs: [
         ":android.hardware.cas.native@1.0_hal",
     ],
@@ -97,7 +73,7 @@
 genrule {
     name: "android.hardware.cas.native@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.cas.native@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/cas/native/1.0/ $(genDir)/android/hardware/cas/native/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.cas.native@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/cas/native/1.0/ $(genDir)/android/hardware/cas/native/1.0/",
     srcs: [
         ":android.hardware.cas.native@1.0_hal",
     ],
@@ -112,28 +88,13 @@
     generated_sources: ["android.hardware.cas.native@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.cas.native@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.cas.native@1.0-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
     shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
-        "android.hardware.cas.native@1.0",
-        "android.hardware.cas@1.0",
         "android.hardware.cas@1.0-vts.profiler",
     ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
+    static_libs: [
+        "android.hardware.cas.native@1.0",
+        "android.hardware.cas@1.0",
     ],
 }
 
diff --git a/configstore/Android.bp b/configstore/Android.bp
deleted file mode 100644
index cdc8905..0000000
--- a/configstore/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "V1_0",
-]
diff --git a/configstore/V1_0/Android.bp b/configstore/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/configstore/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/configstore/V1_0/build/Android.bp b/configstore/V1_0/build/Android.bp
index 373af03..3a7754a 100644
--- a/configstore/V1_0/build/Android.bp
+++ b/configstore/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.configstore@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.configstore@1.0_hal",
     ],
@@ -17,7 +18,7 @@
 genrule {
     name: "android.hardware.configstore@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.configstore@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/configstore/1.0/ $(genDir)/android/hardware/configstore/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.configstore@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/configstore/1.0/ $(genDir)/android/hardware/configstore/1.0/",
     srcs: [
         ":android.hardware.configstore@1.0_hal",
     ],
@@ -30,7 +31,7 @@
 genrule {
     name: "android.hardware.configstore@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.configstore@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/configstore/1.0/ $(genDir)/android/hardware/configstore/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.configstore@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/configstore/1.0/ $(genDir)/android/hardware/configstore/1.0/",
     srcs: [
         ":android.hardware.configstore@1.0_hal",
     ],
@@ -45,36 +46,10 @@
     generated_sources: ["android.hardware.configstore@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.configstore@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.configstore@1.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.configstore@1.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -82,7 +57,7 @@
 genrule {
     name: "android.hardware.configstore@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.configstore@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/configstore/1.0/ $(genDir)/android/hardware/configstore/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.configstore@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/configstore/1.0/ $(genDir)/android/hardware/configstore/1.0/",
     srcs: [
         ":android.hardware.configstore@1.0_hal",
     ],
@@ -95,7 +70,7 @@
 genrule {
     name: "android.hardware.configstore@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.configstore@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/configstore/1.0/ $(genDir)/android/hardware/configstore/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.configstore@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/configstore/1.0/ $(genDir)/android/hardware/configstore/1.0/",
     srcs: [
         ":android.hardware.configstore@1.0_hal",
     ],
@@ -110,27 +85,10 @@
     generated_sources: ["android.hardware.configstore@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.configstore@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.configstore@1.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.configstore@1.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/configstore/V1_0/target/AndroidTest.xml b/configstore/V1_0/target/AndroidTest.xml
index b1bfe48..217e6e4 100644
--- a/configstore/V1_0/target/AndroidTest.xml
+++ b/configstore/V1_0/target/AndroidTest.xml
@@ -19,7 +19,6 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalConfigstoreV1_0Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalConfigstoreV1_0TargetTest/VtsHalConfigstoreV1_0TargetTest" />
@@ -27,7 +26,6 @@
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.configstore@1.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/configstore/V1_0/target_profiling/AndroidTest.xml b/configstore/V1_0/target_profiling/AndroidTest.xml
index b9b5e1e..834c66b 100644
--- a/configstore/V1_0/target_profiling/AndroidTest.xml
+++ b/configstore/V1_0/target_profiling/AndroidTest.xml
@@ -22,7 +22,6 @@
         <option name="push" value="DATA/lib/android.hardware.configstore@1.0-vts.profiler.so->/data/local/tmp/32/android.hardware.configstore@1.0-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.configstore@1.0-vts.profiler.so->/data/local/tmp/64/android.hardware.configstore@1.0-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalConfigstoreV1_0TargetProfiling"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalConfigstoreV1_0TargetTest/VtsHalConfigstoreV1_0TargetTest" />
@@ -31,7 +30,6 @@
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.configstore@1.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/configstore/V1_0/target_replay/AndroidTest.xml b/configstore/V1_0/target_replay/AndroidTest.xml
index abedaa1..6163503 100644
--- a/configstore/V1_0/target_replay/AndroidTest.xml
+++ b/configstore/V1_0/target_replay/AndroidTest.xml
@@ -24,13 +24,10 @@
         <option name="push" value="DATA/lib/android.hardware.configstore@1.0-vts.driver.so->/data/local/tmp/32/android.hardware.configstore@1.0-vts.driver.so"/>
         <option name="push" value="DATA/lib64/android.hardware.configstore@1.0-vts.driver.so->/data/local/tmp/64/android.hardware.configstore@1.0-vts.driver.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalConfigstoreV1_0TargetReplay"/>
         <option name="binary-test-type" value="hal_hidl_replay_test"/>
         <option name="hal-hidl-replay-test-trace-path" value="test/vts-testcase/hal-trace/configstore/V1_0/android.hardware.configstore_1.0_16680329225052.vts.trace"/>
-        <option name="hal-hidl-package-name" value="android.hardware.configstore@1.0"/>
-        <option name="precondition-lshal" value="android.hardware.configstore@1.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/confirmationui/V1_0/build/Android.bp b/confirmationui/V1_0/build/Android.bp
new file mode 100644
index 0000000..caf0ad9
--- /dev/null
+++ b/confirmationui/V1_0/build/Android.bp
@@ -0,0 +1,105 @@
+// This file was auto-generated. Do not edit manually.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
+
+// Generate .vts spec files.
+hal2vts {
+    name: "android.hardware.confirmationui@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
+    srcs: [
+        ":android.hardware.confirmationui@1.0_hal",
+    ],
+    out: [
+        "android/hardware/confirmationui/1.0/ConfirmationResultCallback.vts",
+        "android/hardware/confirmationui/1.0/ConfirmationUI.vts",
+        "android/hardware/confirmationui/1.0/types.vts",
+    ],
+}
+
+// Build VTS driver.
+genrule {
+    name: "android.hardware.confirmationui@1.0-vts.driver_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.confirmationui@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/confirmationui/1.0/ $(genDir)/android/hardware/confirmationui/1.0/",
+    srcs: [
+        ":android.hardware.confirmationui@1.0_hal",
+    ],
+    out: [
+        "android/hardware/confirmationui/1.0/ConfirmationResultCallback.vts.cpp",
+        "android/hardware/confirmationui/1.0/ConfirmationUI.vts.cpp",
+        "android/hardware/confirmationui/1.0/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.confirmationui@1.0-vts.driver_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.confirmationui@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/confirmationui/1.0/ $(genDir)/android/hardware/confirmationui/1.0/",
+    srcs: [
+        ":android.hardware.confirmationui@1.0_hal",
+    ],
+    out: [
+        "android/hardware/confirmationui/1.0/ConfirmationResultCallback.vts.h",
+        "android/hardware/confirmationui/1.0/ConfirmationUI.vts.h",
+        "android/hardware/confirmationui/1.0/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.confirmationui@1.0-vts.driver",
+    generated_sources: ["android.hardware.confirmationui@1.0-vts.driver_genc++"],
+    generated_headers: ["android.hardware.confirmationui@1.0-vts.driver_genc++_headers"],
+    export_generated_headers: ["android.hardware.confirmationui@1.0-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [
+        "android.hardware.keymaster@4.0-vts.driver",
+    ],
+    static_libs: [
+        "android.hardware.confirmationui@1.0",
+        "android.hardware.keymaster@4.0",
+    ],
+}
+
+// Build VTS profiler.
+genrule {
+    name: "android.hardware.confirmationui@1.0-vts.profiler_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.confirmationui@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/confirmationui/1.0/ $(genDir)/android/hardware/confirmationui/1.0/",
+    srcs: [
+        ":android.hardware.confirmationui@1.0_hal",
+    ],
+    out: [
+        "android/hardware/confirmationui/1.0/ConfirmationResultCallback.vts.cpp",
+        "android/hardware/confirmationui/1.0/ConfirmationUI.vts.cpp",
+        "android/hardware/confirmationui/1.0/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.confirmationui@1.0-vts.profiler_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.confirmationui@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/confirmationui/1.0/ $(genDir)/android/hardware/confirmationui/1.0/",
+    srcs: [
+        ":android.hardware.confirmationui@1.0_hal",
+    ],
+    out: [
+        "android/hardware/confirmationui/1.0/ConfirmationResultCallback.vts.h",
+        "android/hardware/confirmationui/1.0/ConfirmationUI.vts.h",
+        "android/hardware/confirmationui/1.0/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.confirmationui@1.0-vts.profiler",
+    generated_sources: ["android.hardware.confirmationui@1.0-vts.profiler_genc++"],
+    generated_headers: ["android.hardware.confirmationui@1.0-vts.profiler_genc++_headers"],
+    export_generated_headers: ["android.hardware.confirmationui@1.0-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [
+        "android.hardware.keymaster@4.0-vts.profiler",
+    ],
+    static_libs: [
+        "android.hardware.confirmationui@1.0",
+        "android.hardware.keymaster@4.0",
+    ],
+}
+
diff --git a/contexthub/Android.bp b/contexthub/Android.bp
deleted file mode 100644
index cdc8905..0000000
--- a/contexthub/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "V1_0",
-]
diff --git a/contexthub/V1_0/Android.bp b/contexthub/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/contexthub/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/contexthub/V1_0/build/Android.bp b/contexthub/V1_0/build/Android.bp
index f1af8e5..102fcc8 100644
--- a/contexthub/V1_0/build/Android.bp
+++ b/contexthub/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.contexthub@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.contexthub@1.0_hal",
     ],
@@ -18,7 +19,7 @@
 genrule {
     name: "android.hardware.contexthub@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.contexthub@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/contexthub/1.0/ $(genDir)/android/hardware/contexthub/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.contexthub@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/contexthub/1.0/ $(genDir)/android/hardware/contexthub/1.0/",
     srcs: [
         ":android.hardware.contexthub@1.0_hal",
     ],
@@ -32,7 +33,7 @@
 genrule {
     name: "android.hardware.contexthub@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.contexthub@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/contexthub/1.0/ $(genDir)/android/hardware/contexthub/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.contexthub@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/contexthub/1.0/ $(genDir)/android/hardware/contexthub/1.0/",
     srcs: [
         ":android.hardware.contexthub@1.0_hal",
     ],
@@ -48,36 +49,10 @@
     generated_sources: ["android.hardware.contexthub@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.contexthub@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.contexthub@1.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.contexthub@1.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -85,7 +60,7 @@
 genrule {
     name: "android.hardware.contexthub@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.contexthub@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/contexthub/1.0/ $(genDir)/android/hardware/contexthub/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.contexthub@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/contexthub/1.0/ $(genDir)/android/hardware/contexthub/1.0/",
     srcs: [
         ":android.hardware.contexthub@1.0_hal",
     ],
@@ -99,7 +74,7 @@
 genrule {
     name: "android.hardware.contexthub@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.contexthub@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/contexthub/1.0/ $(genDir)/android/hardware/contexthub/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.contexthub@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/contexthub/1.0/ $(genDir)/android/hardware/contexthub/1.0/",
     srcs: [
         ":android.hardware.contexthub@1.0_hal",
     ],
@@ -115,27 +90,10 @@
     generated_sources: ["android.hardware.contexthub@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.contexthub@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.contexthub@1.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.contexthub@1.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/contexthub/V1_0/host/AndroidTest.xml b/contexthub/V1_0/host/AndroidTest.xml
index 812b8fb..9d4f08a 100644
--- a/contexthub/V1_0/host/AndroidTest.xml
+++ b/contexthub/V1_0/host/AndroidTest.xml
@@ -14,7 +14,7 @@
      limitations under the License.
 -->
 <configuration description="Config for VTS VtsHalContexthubV1_0Host test cases">
-    <option name="config-descriptor:metadata" key="plan" value="vts-misc" />
+    <option name="config-descriptor:metadata" key="plan" value="vts-staging-hal" />
     <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlHostTest.push"/>
@@ -25,11 +25,9 @@
         <option name="push" value="DATA/lib/android.hardware.contexthub@1.0-vts.driver.so->/data/local/tmp/32/android.hardware.contexthub@1.0-vts.driver.so"/>
         <option name="push" value="DATA/lib64/android.hardware.contexthub@1.0-vts.driver.so->/data/local/tmp/64/android.hardware.contexthub@1.0-vts.driver.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalContexthubV1_0Host"/>
         <option name="test-case-path" value="vts/testcases/hal/contexthub/V1_0/host/VtsHalContexthubV1_0HostTest"/>
-        <option name="precondition-lshal" value="android.hardware.contexthub@1.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/contexthub/V1_0/host/VtsHalContexthubV1_0HostTest.py b/contexthub/V1_0/host/VtsHalContexthubV1_0HostTest.py
index 27838cd..1b4ec65 100644
--- a/contexthub/V1_0/host/VtsHalContexthubV1_0HostTest.py
+++ b/contexthub/V1_0/host/VtsHalContexthubV1_0HostTest.py
@@ -20,10 +20,8 @@
 import time
 
 from vts.runners.host import asserts
-from vts.runners.host import base_test
 from vts.runners.host import test_runner
-from vts.utils.python.controllers import android_device
-from vts.utils.python.precondition import precondition_utils
+from vts.testcases.template.hal_hidl_host_test import hal_hidl_host_test
 
 
 class ContextHubCallback:
@@ -64,26 +62,15 @@
         self.event.set()
 
 
-class ContexthubHidlTest(base_test.BaseTestClass):
+class ContexthubHidlTest(hal_hidl_host_test.HalHidlHostTest):
     """A set of test cases for the context hub HIDL HAL"""
+    TEST_HAL_SERVICES = {
+        "android.hardware.contexthub@1.0::IContexthub",
+    }
 
     def setUpClass(self):
         """Creates a mirror and turns on the framework-layer CONTEXTHUB service."""
-        self.dut = self.registerController(android_device)[0]
-
-        self.dut.shell.InvokeTerminal("one")
-        self.dut.shell.one.Execute("setenforce 0")  # SELinux permissive mode
-        if not precondition_utils.CanRunHidlHalTest(
-            self, self.dut, self.dut.shell.one):
-            self._skip_all_testcases = True
-            return
-
-        if self.profiling.enabled:
-            self.profiling.EnableVTSProfiling(self.dut.shell.one)
-
-        # Bring down the Android runtime so it doesn't interfere with the test
-        #self.dut.shell.one.Execute("stop")
-
+        super(ContexthubHidlTest, self).setUpClass()
         self.dut.hal.InitHidlHal(
             target_type="contexthub",
             target_basepaths=self.dut.libPaths,
@@ -95,19 +82,6 @@
         self.types = self.dut.hal.contexthub.GetHidlTypeInterface("types")
         logging.info("types: %s", self.types)
 
-    def tearDownClass(self):
-        # Restart the Android runtime
-        #self.dut.shell.one.Execute("start")
-        if not self._skip_all_testcases and self.profiling.enabled:
-            self.profiling.ProcessAndUploadTraceData()
-
-    def tearDown(self):
-        """Process trace data.
-        """
-        if self.profiling.enabled:
-            self.profiling.ProcessTraceDataForTestCase(self.dut)
-            self.profiling.DisableVTSProfiling(self.dut.shell.one)
-
     def testContexthubBasic(self):
         logging.info("About to call gethubs!!!")
         hubs = self.dut.hal.contexthub.getHubs()
diff --git a/contexthub/V1_0/target/AndroidTest.xml b/contexthub/V1_0/target/AndroidTest.xml
index 5d7be0d..f3f5a52 100644
--- a/contexthub/V1_0/target/AndroidTest.xml
+++ b/contexthub/V1_0/target/AndroidTest.xml
@@ -19,7 +19,6 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalContexthubV1_0Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalContexthubV1_0TargetTest/VtsHalContexthubV1_0TargetTest"/>
@@ -27,7 +26,6 @@
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.contexthub@1.0"/>
         <option name="test-timeout" value="15m"/>
     </test>
 </configuration>
diff --git a/contexthub/V1_0/target_profiling/AndroidTest.xml b/contexthub/V1_0/target_profiling/AndroidTest.xml
index 2183fec..645c638 100644
--- a/contexthub/V1_0/target_profiling/AndroidTest.xml
+++ b/contexthub/V1_0/target_profiling/AndroidTest.xml
@@ -22,7 +22,6 @@
         <option name="push" value="DATA/lib/android.hardware.contexthub@1.0-vts.profiler.so->/data/local/tmp/32/android.hardware.contexthub@1.0-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.contexthub@1.0-vts.profiler.so->/data/local/tmp/64/android.hardware.contexthub@1.0-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalContexthubV1_0TargetProfiling"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalContexthubV1_0TargetTest/VtsHalContexthubV1_0TargetTest"/>
@@ -31,7 +30,6 @@
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.contexthub@1.0"/>
         <option name="test-timeout" value="15m"/>
     </test>
 </configuration>
diff --git a/contexthub/V1_0/target_replay/AndroidTest.xml b/contexthub/V1_0/target_replay/AndroidTest.xml
index 70f4f5d..6fe76d2 100644
--- a/contexthub/V1_0/target_replay/AndroidTest.xml
+++ b/contexthub/V1_0/target_replay/AndroidTest.xml
@@ -25,13 +25,10 @@
         <option name="push" value="DATA/lib/android.hardware.contexthub@1.0-vts.driver.so->/data/local/tmp/32/android.hardware.contexthub@1.0-vts.driver.so"/>
         <option name="push" value="DATA/lib64/android.hardware.contexthub@1.0-vts.driver.so->/data/local/tmp/64/android.hardware.contexthub@1.0-vts.driver.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalContexthubV1_0TargetReplay"/>
         <option name="binary-test-type" value="hal_hidl_replay_test"/>
         <option name="hal-hidl-replay-test-trace-path" value="test/vts-testcase/hal-trace/contexthub/V1_0/android.hardware.contexthub_1.0_sailfish_19190690972.vts.trace"/>
-        <option name="hal-hidl-package-name" value="android.hardware.contexthub@1.0"/>
-        <option name="precondition-lshal" value="android.hardware.contexthub@1.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/drm/Android.bp b/drm/Android.bp
deleted file mode 100644
index cdc8905..0000000
--- a/drm/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "V1_0",
-]
diff --git a/drm/V1_0/Android.bp b/drm/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/drm/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/drm/V1_0/build/Android.bp b/drm/V1_0/build/Android.bp
index 81bb65c..4cee58f 100644
--- a/drm/V1_0/build/Android.bp
+++ b/drm/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.drm@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.drm@1.0_hal",
     ],
@@ -21,7 +22,7 @@
 genrule {
     name: "android.hardware.drm@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.drm@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/drm/1.0/ $(genDir)/android/hardware/drm/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.drm@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/drm/1.0/ $(genDir)/android/hardware/drm/1.0/",
     srcs: [
         ":android.hardware.drm@1.0_hal",
     ],
@@ -38,7 +39,7 @@
 genrule {
     name: "android.hardware.drm@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.drm@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/drm/1.0/ $(genDir)/android/hardware/drm/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.drm@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/drm/1.0/ $(genDir)/android/hardware/drm/1.0/",
     srcs: [
         ":android.hardware.drm@1.0_hal",
     ],
@@ -57,36 +58,10 @@
     generated_sources: ["android.hardware.drm@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.drm@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.drm@1.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.drm@1.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -94,7 +69,7 @@
 genrule {
     name: "android.hardware.drm@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.drm@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/drm/1.0/ $(genDir)/android/hardware/drm/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.drm@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/drm/1.0/ $(genDir)/android/hardware/drm/1.0/",
     srcs: [
         ":android.hardware.drm@1.0_hal",
     ],
@@ -111,7 +86,7 @@
 genrule {
     name: "android.hardware.drm@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.drm@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/drm/1.0/ $(genDir)/android/hardware/drm/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.drm@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/drm/1.0/ $(genDir)/android/hardware/drm/1.0/",
     srcs: [
         ":android.hardware.drm@1.0_hal",
     ],
@@ -130,27 +105,10 @@
     generated_sources: ["android.hardware.drm@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.drm@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.drm@1.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.drm@1.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/drm/V1_0/target/AndroidTest.xml b/drm/V1_0/target/AndroidTest.xml
index 7f717e7..ce84f13 100644
--- a/drm/V1_0/target/AndroidTest.xml
+++ b/drm/V1_0/target/AndroidTest.xml
@@ -18,16 +18,14 @@
     <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
-        <option name="push" value="vendor/lib/drm-vts-test-libs->/data/local/tmp/32/lib"/>
-        <option name="push" value="vendor/lib64/drm-vts-test-libs->/data/local/tmp/64/lib"/>
+        <option name="push" value="vendor/lib/drm-vts-test-libs/libvtswidevine.so->/data/local/tmp/32/lib/libvtswidevine.so"/>
+        <option name="push" value="vendor/lib64/drm-vts-test-libs/libvtswidevine.so->/data/local/tmp/64/lib/libvtswidevine.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalDrmV1_0Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalDrmV1_0TargetTest/VtsHalDrmV1_0TargetTest"/>
         <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalDrmV1_0TargetTest/VtsHalDrmV1_0TargetTest"/>
         <option name="binary-test-type" value="hal_hidl_gtest"/>
-        <option name="precondition-lshal" value="android.hardware.drm@1.0"/>
         <option name="test-timeout" value="15m"/>
     </test>
 </configuration>
diff --git a/drm/V1_0/target_profiling/AndroidTest.xml b/drm/V1_0/target_profiling/AndroidTest.xml
index 0d17c45..365bbfc 100644
--- a/drm/V1_0/target_profiling/AndroidTest.xml
+++ b/drm/V1_0/target_profiling/AndroidTest.xml
@@ -19,19 +19,17 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetProfilingTest.push"/>
         <option name="cleanup" value="true"/>
-        <option name="push" value="vendor/lib/drm-vts-test-libs->/data/local/tmp/32/lib"/>
-        <option name="push" value="vendor/lib64/drm-vts-test-libs->/data/local/tmp/64/lib"/>
+        <option name="push" value="vendor/lib/drm-vts-test-libs/libvtswidevine.so->/data/local/tmp/32/lib/libvtswidevine.so"/>
+        <option name="push" value="vendor/lib64/drm-vts-test-libs/libvtswidevine.so->/data/local/tmp/64/lib/libvtswidevine.so"/>
         <option name="push" value="DATA/lib/android.hardware.drm@1.0-vts.profiler.so->/data/local/tmp/32/android.hardware.drm@1.0-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.drm@1.0-vts.profiler.so->/data/local/tmp/64/android.hardware.drm@1.0-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalDrmV1_0TargetProfiling"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalDrmV1_0TargetTest/VtsHalDrmV1_0TargetTest"/>
         <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalDrmV1_0TargetTest/VtsHalDrmV1_0TargetTest"/>
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.drm@1.0"/>
         <option name="test-timeout" value="15m"/>
     </test>
 </configuration>
diff --git a/radio/V1_1/target/Android.mk b/drm/V1_1/adapter/Android.mk
similarity index 81%
copy from radio/V1_1/target/Android.mk
copy to drm/V1_1/adapter/Android.mk
index bd1a0f1..ef60974 100644
--- a/radio/V1_1/target/Android.mk
+++ b/drm/V1_1/adapter/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalDrmV1_1Adapter
+VTS_CONFIG_SRC_DIR := testcases/hal/drm/V1_1/adapter
 include test/vts/tools/build/Android.host_config.mk
diff --git a/drm/V1_1/adapter/AndroidTest.xml b/drm/V1_1/adapter/AndroidTest.xml
new file mode 100644
index 0000000..e7331ff
--- /dev/null
+++ b/drm/V1_1/adapter/AndroidTest.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS VtsHalDrmV1_1Adapter test cases">
+    <option key="plan" name="config-descriptor:metadata" value="vts-hal-adapter"/>
+    <object class="com.android.tradefed.module.VtsHalAdapterModuleController" type="module_controller">
+        <option name="hal-package-name" value="android.hardware.drm@1.1"/>
+    </object>
+    <target_preparer class="com.android.tradefed.targetprep.VtsHalAdapterPreparer">
+        <option name="adapter-binary-name" value="android.hardware.drm@1.0-adapter"/>
+        <option name="hal-package-name" value="android.hardware.drm@1.1"/>
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest">
+        <option name="package" value="com.android.devicehealth.tests"/>
+        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner"/>
+    </test>
+    <include name="CtsMediaTestCases.config"/>
+</configuration>
diff --git a/drm/V1_1/build/Android.bp b/drm/V1_1/build/Android.bp
new file mode 100644
index 0000000..b504e38
--- /dev/null
+++ b/drm/V1_1/build/Android.bp
@@ -0,0 +1,110 @@
+// This file was auto-generated. Do not edit manually.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
+
+// Generate .vts spec files.
+hal2vts {
+    name: "android.hardware.drm@1.1-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
+    srcs: [
+        ":android.hardware.drm@1.1_hal",
+    ],
+    out: [
+        "android/hardware/drm/1.1/CryptoFactory.vts",
+        "android/hardware/drm/1.1/DrmFactory.vts",
+        "android/hardware/drm/1.1/DrmPlugin.vts",
+        "android/hardware/drm/1.1/types.vts",
+    ],
+}
+
+// Build VTS driver.
+genrule {
+    name: "android.hardware.drm@1.1-vts.driver_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.drm@1.1 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/drm/1.1/ $(genDir)/android/hardware/drm/1.1/",
+    srcs: [
+        ":android.hardware.drm@1.1_hal",
+    ],
+    out: [
+        "android/hardware/drm/1.1/CryptoFactory.vts.cpp",
+        "android/hardware/drm/1.1/DrmFactory.vts.cpp",
+        "android/hardware/drm/1.1/DrmPlugin.vts.cpp",
+        "android/hardware/drm/1.1/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.drm@1.1-vts.driver_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.drm@1.1 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/drm/1.1/ $(genDir)/android/hardware/drm/1.1/",
+    srcs: [
+        ":android.hardware.drm@1.1_hal",
+    ],
+    out: [
+        "android/hardware/drm/1.1/CryptoFactory.vts.h",
+        "android/hardware/drm/1.1/DrmFactory.vts.h",
+        "android/hardware/drm/1.1/DrmPlugin.vts.h",
+        "android/hardware/drm/1.1/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.drm@1.1-vts.driver",
+    generated_sources: ["android.hardware.drm@1.1-vts.driver_genc++"],
+    generated_headers: ["android.hardware.drm@1.1-vts.driver_genc++_headers"],
+    export_generated_headers: ["android.hardware.drm@1.1-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [
+        "android.hardware.drm@1.0-vts.driver",
+    ],
+    static_libs: [
+        "android.hardware.drm@1.0",
+        "android.hardware.drm@1.1",
+    ],
+}
+
+// Build VTS profiler.
+genrule {
+    name: "android.hardware.drm@1.1-vts.profiler_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.drm@1.1 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/drm/1.1/ $(genDir)/android/hardware/drm/1.1/",
+    srcs: [
+        ":android.hardware.drm@1.1_hal",
+    ],
+    out: [
+        "android/hardware/drm/1.1/CryptoFactory.vts.cpp",
+        "android/hardware/drm/1.1/DrmFactory.vts.cpp",
+        "android/hardware/drm/1.1/DrmPlugin.vts.cpp",
+        "android/hardware/drm/1.1/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.drm@1.1-vts.profiler_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.drm@1.1 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/drm/1.1/ $(genDir)/android/hardware/drm/1.1/",
+    srcs: [
+        ":android.hardware.drm@1.1_hal",
+    ],
+    out: [
+        "android/hardware/drm/1.1/CryptoFactory.vts.h",
+        "android/hardware/drm/1.1/DrmFactory.vts.h",
+        "android/hardware/drm/1.1/DrmPlugin.vts.h",
+        "android/hardware/drm/1.1/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.drm@1.1-vts.profiler",
+    generated_sources: ["android.hardware.drm@1.1-vts.profiler_genc++"],
+    generated_headers: ["android.hardware.drm@1.1-vts.profiler_genc++_headers"],
+    export_generated_headers: ["android.hardware.drm@1.1-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [
+        "android.hardware.drm@1.0-vts.profiler",
+    ],
+    static_libs: [
+        "android.hardware.drm@1.0",
+        "android.hardware.drm@1.1",
+    ],
+}
+
diff --git a/radio/V1_1/target/Android.mk b/drm/V1_1/target/Android.mk
similarity index 88%
copy from radio/V1_1/target/Android.mk
copy to drm/V1_1/target/Android.mk
index bd1a0f1..1e0e34c 100644
--- a/radio/V1_1/target/Android.mk
+++ b/drm/V1_1/target/Android.mk
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalDrmV1_1Target
+VTS_CONFIG_SRC_DIR := testcases/hal/drm/V1_1/target
 include test/vts/tools/build/Android.host_config.mk
diff --git a/radio/V1_1/target/AndroidTest.xml b/drm/V1_1/target/AndroidTest.xml
similarity index 65%
copy from radio/V1_1/target/AndroidTest.xml
copy to drm/V1_1/target/AndroidTest.xml
index 76b339d..e35980d 100644
--- a/radio/V1_1/target/AndroidTest.xml
+++ b/drm/V1_1/target/AndroidTest.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2017 The Android Open Source Project
+<!-- Copyright (C) 2018 The Android Open Source Project
 
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
@@ -13,21 +13,20 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Config for VTS VtsHalRadioV1_1Target test cases">
+<configuration description="Config for VTS VtsHalDrmV1_1Target test cases">
     <option name="config-descriptor:metadata" key="plan" value="vts-hal" />
     <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
+        <option name="push" value="vendor/lib/drm-vts-test-libs/libvtswidevine.so->/data/local/tmp/32/lib/libvtswidevine.so"/>
+        <option name="push" value="vendor/lib64/drm-vts-test-libs/libvtswidevine.so->/data/local/tmp/64/lib/libvtswidevine.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
+    <multi_target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
-        <option name="test-module-name" value="VtsHalRadioV1_1Target"/>
-        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalRadioV1_1TargetTest/VtsHalRadioV1_1TargetTest"/>
-        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalRadioV1_1TargetTest/VtsHalRadioV1_1TargetTest"/>
+        <option name="test-module-name" value="VtsHalDrmV1_1Target"/>
+        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalDrmV1_1TargetTest/VtsHalDrmV1_1TargetTest"/>
+        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalDrmV1_1TargetTest/VtsHalDrmV1_1TargetTest"/>
         <option name="binary-test-type" value="hal_hidl_gtest"/>
-        <option name="binary-test-disable-framework" value="true"/>
-        <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.radio@1.1"/>
         <option name="test-timeout" value="15m"/>
     </test>
 </configuration>
diff --git a/radio/V1_1/target/Android.mk b/drm/V1_1/target_profiling/Android.mk
similarity index 82%
copy from radio/V1_1/target/Android.mk
copy to drm/V1_1/target_profiling/Android.mk
index bd1a0f1..1588246 100644
--- a/radio/V1_1/target/Android.mk
+++ b/drm/V1_1/target_profiling/Android.mk
@@ -16,8 +16,11 @@
 
 LOCAL_PATH := $(call my-dir)
 
+include $(call all-subdir-makefiles)
+
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalDrmV1_1TargetProfiling
+VTS_CONFIG_SRC_DIR := testcases/hal/drm/V1_1/target_profiling
+
 include test/vts/tools/build/Android.host_config.mk
diff --git a/drm/V1_1/target_profiling/AndroidTest.xml b/drm/V1_1/target_profiling/AndroidTest.xml
new file mode 100644
index 0000000..dda5a49
--- /dev/null
+++ b/drm/V1_1/target_profiling/AndroidTest.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2017 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS VtsHalDrmV1_1TargetProfiling test cases">
+    <option name="config-descriptor:metadata" key="plan" value="vts-hal-profiling" />
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="abort-on-push-failure" value="false"/>
+        <option name="push-group" value="HalHidlTargetProfilingTest.push"/>
+        <option name="cleanup" value="true"/>
+        <option name="push" value="vendor/lib/drm-vts-test-libs/libvtswidevine.so->/data/local/tmp/32/lib/libvtswidevine.so"/>
+        <option name="push" value="vendor/lib64/drm-vts-test-libs/libvtswidevine.so->/data/local/tmp/64/lib/libvtswidevine.so"/>
+        <option name="push" value="DATA/lib/android.hardware.drm@1.1-vts.profiler.so->/data/local/tmp/32/android.hardware.drm@1.1-vts.profiler.so"/>
+        <option name="push" value="DATA/lib64/android.hardware.drm@1.1-vts.profiler.so->/data/local/tmp/64/android.hardware.drm@1.1-vts.profiler.so"/>
+    </target_preparer>
+    <multi_target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
+    <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+        <option name="test-module-name" value="VtsHalDrmV1_1TargetProfiling"/>
+        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalDrmV1_1TargetTest/VtsHalDrmV1_1TargetTest"/>
+        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalDrmV1_1TargetTest/VtsHalDrmV1_1TargetTest"/>
+        <option name="binary-test-type" value="hal_hidl_gtest"/>
+        <option name="enable-profiling" value="true"/>
+        <option name="test-timeout" value="15m"/>
+    </test>
+</configuration>
diff --git a/dumpstate/Android.bp b/dumpstate/Android.bp
deleted file mode 100644
index cdc8905..0000000
--- a/dumpstate/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "V1_0",
-]
diff --git a/dumpstate/V1_0/Android.bp b/dumpstate/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/dumpstate/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/dumpstate/V1_0/build/Android.bp b/dumpstate/V1_0/build/Android.bp
index 27c5f48..ac72639 100644
--- a/dumpstate/V1_0/build/Android.bp
+++ b/dumpstate/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.dumpstate@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.dumpstate@1.0_hal",
     ],
@@ -16,7 +17,7 @@
 genrule {
     name: "android.hardware.dumpstate@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.dumpstate@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/dumpstate/1.0/ $(genDir)/android/hardware/dumpstate/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.dumpstate@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/dumpstate/1.0/ $(genDir)/android/hardware/dumpstate/1.0/",
     srcs: [
         ":android.hardware.dumpstate@1.0_hal",
     ],
@@ -28,7 +29,7 @@
 genrule {
     name: "android.hardware.dumpstate@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.dumpstate@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/dumpstate/1.0/ $(genDir)/android/hardware/dumpstate/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.dumpstate@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/dumpstate/1.0/ $(genDir)/android/hardware/dumpstate/1.0/",
     srcs: [
         ":android.hardware.dumpstate@1.0_hal",
     ],
@@ -42,36 +43,10 @@
     generated_sources: ["android.hardware.dumpstate@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.dumpstate@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.dumpstate@1.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.dumpstate@1.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -79,7 +54,7 @@
 genrule {
     name: "android.hardware.dumpstate@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.dumpstate@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/dumpstate/1.0/ $(genDir)/android/hardware/dumpstate/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.dumpstate@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/dumpstate/1.0/ $(genDir)/android/hardware/dumpstate/1.0/",
     srcs: [
         ":android.hardware.dumpstate@1.0_hal",
     ],
@@ -91,7 +66,7 @@
 genrule {
     name: "android.hardware.dumpstate@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.dumpstate@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/dumpstate/1.0/ $(genDir)/android/hardware/dumpstate/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.dumpstate@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/dumpstate/1.0/ $(genDir)/android/hardware/dumpstate/1.0/",
     srcs: [
         ":android.hardware.dumpstate@1.0_hal",
     ],
@@ -105,27 +80,10 @@
     generated_sources: ["android.hardware.dumpstate@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.dumpstate@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.dumpstate@1.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.dumpstate@1.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/dumpstate/V1_0/target/AndroidTest.xml b/dumpstate/V1_0/target/AndroidTest.xml
index 97041ef..f239957 100644
--- a/dumpstate/V1_0/target/AndroidTest.xml
+++ b/dumpstate/V1_0/target/AndroidTest.xml
@@ -19,14 +19,12 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalDumpstateV1_0Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalDumpstateV1_0TargetTest/VtsHalDumpstateV1_0TargetTest"/>
         <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalDumpstateV1_0TargetTest/VtsHalDumpstateV1_0TargetTest"/>
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.dumpstate@1.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/gatekeeper/Android.bp b/gatekeeper/Android.bp
deleted file mode 100644
index cdc8905..0000000
--- a/gatekeeper/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "V1_0",
-]
diff --git a/gatekeeper/V1_0/Android.bp b/gatekeeper/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/gatekeeper/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/gatekeeper/V1_0/build/Android.bp b/gatekeeper/V1_0/build/Android.bp
index b9d3330..7ace62f 100644
--- a/gatekeeper/V1_0/build/Android.bp
+++ b/gatekeeper/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.gatekeeper@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.gatekeeper@1.0_hal",
     ],
@@ -17,7 +18,7 @@
 genrule {
     name: "android.hardware.gatekeeper@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.gatekeeper@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/gatekeeper/1.0/ $(genDir)/android/hardware/gatekeeper/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.gatekeeper@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/gatekeeper/1.0/ $(genDir)/android/hardware/gatekeeper/1.0/",
     srcs: [
         ":android.hardware.gatekeeper@1.0_hal",
     ],
@@ -30,7 +31,7 @@
 genrule {
     name: "android.hardware.gatekeeper@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.gatekeeper@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/gatekeeper/1.0/ $(genDir)/android/hardware/gatekeeper/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.gatekeeper@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/gatekeeper/1.0/ $(genDir)/android/hardware/gatekeeper/1.0/",
     srcs: [
         ":android.hardware.gatekeeper@1.0_hal",
     ],
@@ -45,36 +46,10 @@
     generated_sources: ["android.hardware.gatekeeper@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.gatekeeper@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.gatekeeper@1.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.gatekeeper@1.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -82,7 +57,7 @@
 genrule {
     name: "android.hardware.gatekeeper@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.gatekeeper@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/gatekeeper/1.0/ $(genDir)/android/hardware/gatekeeper/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.gatekeeper@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/gatekeeper/1.0/ $(genDir)/android/hardware/gatekeeper/1.0/",
     srcs: [
         ":android.hardware.gatekeeper@1.0_hal",
     ],
@@ -95,7 +70,7 @@
 genrule {
     name: "android.hardware.gatekeeper@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.gatekeeper@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/gatekeeper/1.0/ $(genDir)/android/hardware/gatekeeper/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.gatekeeper@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/gatekeeper/1.0/ $(genDir)/android/hardware/gatekeeper/1.0/",
     srcs: [
         ":android.hardware.gatekeeper@1.0_hal",
     ],
@@ -110,27 +85,10 @@
     generated_sources: ["android.hardware.gatekeeper@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.gatekeeper@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.gatekeeper@1.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.gatekeeper@1.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/gatekeeper/V1_0/target/AndroidTest.xml b/gatekeeper/V1_0/target/AndroidTest.xml
index 32ee611..685904c 100644
--- a/gatekeeper/V1_0/target/AndroidTest.xml
+++ b/gatekeeper/V1_0/target/AndroidTest.xml
@@ -19,7 +19,6 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalGatekeeperV1_0Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalGatekeeperV1_0TargetTest/VtsHalGatekeeperV1_0TargetTest"/>
@@ -27,7 +26,6 @@
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.gatekeeper@1.0"/>
         <option name="test-timeout" value="15m"/>
     </test>
 </configuration>
diff --git a/gatekeeper/V1_0/target_profiling/AndroidTest.xml b/gatekeeper/V1_0/target_profiling/AndroidTest.xml
index 07f5600..55403a2 100644
--- a/gatekeeper/V1_0/target_profiling/AndroidTest.xml
+++ b/gatekeeper/V1_0/target_profiling/AndroidTest.xml
@@ -22,7 +22,6 @@
         <option name="push" value="DATA/lib/android.hardware.gatekeeper@1.0-vts.profiler.so->/data/local/tmp/32/android.hardware.gatekeeper@1.0-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.gatekeeper@1.0-vts.profiler.so->/data/local/tmp/64/android.hardware.gatekeeper@1.0-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalGatekeeperV1_0TargetProfiling"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalGatekeeperV1_0TargetTest/VtsHalGatekeeperV1_0TargetTest"/>
@@ -31,7 +30,6 @@
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.gatekeeper@1.0"/>
         <option name="test-timeout" value="15m"/>
     </test>
 </configuration>
diff --git a/gatekeeper/V1_0/target_replay/AndroidTest.xml b/gatekeeper/V1_0/target_replay/AndroidTest.xml
index e7f22bf..a7d5b52 100644
--- a/gatekeeper/V1_0/target_replay/AndroidTest.xml
+++ b/gatekeeper/V1_0/target_replay/AndroidTest.xml
@@ -24,14 +24,11 @@
         <option name="push" value="DATA/lib/android.hardware.gatekeeper@1.0-vts.driver.so->/data/local/tmp/32/android.hardware.gatekeeper@1.0-vts.driver.so"/>
         <option name="push" value="DATA/lib64/android.hardware.gatekeeper@1.0-vts.driver.so->/data/local/tmp/64/android.hardware.gatekeeper@1.0-vts.driver.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalGatekeeperV1_0TargetReplay"/>
         <option name="binary-test-type" value="hal_hidl_replay_test"/>
         <option name="hal-hidl-replay-test-trace-path" value="test/vts-testcase/hal-trace/gatekeeper/V1_0/android.hardware.gatekeeper_1.0_450525506023.vts.trace"/>
         <option name="hal-hidl-replay-test-trace-path" value="test/vts-testcase/hal-trace/gatekeeper/V1_0/android.hardware.gatekeeper_1.0_39493054816.vts.trace"/>
-        <option name="hal-hidl-package-name" value="android.hardware.gatekeeper@1.0"/>
-        <option name="precondition-lshal" value="android.hardware.gatekeeper@1.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/gnss/Android.bp b/gnss/Android.bp
deleted file mode 100644
index cdc8905..0000000
--- a/gnss/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "V1_0",
-]
diff --git a/gnss/V1_0/Android.bp b/gnss/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/gnss/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/gnss/V1_0/build/Android.bp b/gnss/V1_0/build/Android.bp
index 338033f..58e4549 100644
--- a/gnss/V1_0/build/Android.bp
+++ b/gnss/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.gnss@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.gnss@1.0_hal",
     ],
@@ -36,7 +37,7 @@
 genrule {
     name: "android.hardware.gnss@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.gnss@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/gnss/1.0/ $(genDir)/android/hardware/gnss/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.gnss@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/gnss/1.0/ $(genDir)/android/hardware/gnss/1.0/",
     srcs: [
         ":android.hardware.gnss@1.0_hal",
     ],
@@ -68,7 +69,7 @@
 genrule {
     name: "android.hardware.gnss@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.gnss@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/gnss/1.0/ $(genDir)/android/hardware/gnss/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.gnss@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/gnss/1.0/ $(genDir)/android/hardware/gnss/1.0/",
     srcs: [
         ":android.hardware.gnss@1.0_hal",
     ],
@@ -102,36 +103,10 @@
     generated_sources: ["android.hardware.gnss@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.gnss@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.gnss@1.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.gnss@1.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -139,7 +114,7 @@
 genrule {
     name: "android.hardware.gnss@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.gnss@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/gnss/1.0/ $(genDir)/android/hardware/gnss/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.gnss@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/gnss/1.0/ $(genDir)/android/hardware/gnss/1.0/",
     srcs: [
         ":android.hardware.gnss@1.0_hal",
     ],
@@ -171,7 +146,7 @@
 genrule {
     name: "android.hardware.gnss@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.gnss@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/gnss/1.0/ $(genDir)/android/hardware/gnss/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.gnss@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/gnss/1.0/ $(genDir)/android/hardware/gnss/1.0/",
     srcs: [
         ":android.hardware.gnss@1.0_hal",
     ],
@@ -205,27 +180,10 @@
     generated_sources: ["android.hardware.gnss@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.gnss@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.gnss@1.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.gnss@1.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/gnss/V1_0/host/VtsHalGnssV1_0HostTest.py b/gnss/V1_0/host/VtsHalGnssV1_0HostTest.py
index 3c7d5dc..5a36220 100644
--- a/gnss/V1_0/host/VtsHalGnssV1_0HostTest.py
+++ b/gnss/V1_0/host/VtsHalGnssV1_0HostTest.py
@@ -18,31 +18,24 @@
 import logging
 
 from vts.runners.host import asserts
-from vts.runners.host import base_test
 from vts.runners.host import keys
 from vts.runners.host import test_runner
-from vts.utils.python.precondition import precondition_utils
+from vts.testcases.template.hal_hidl_host_test import hal_hidl_host_test
 
-
-class VtsHalGnssV1_0HostTest(base_test.BaseTestClass):
+class VtsHalGnssV1_0HostTest(hal_hidl_host_test.HalHidlHostTest):
     """A simple testcase for the GNSS HIDL HAL."""
-    SYSPROP_GETSTUB = "vts.hal.vts.hidl.get_stub"
 
+    SYSPROP_GETSTUB = "vts.hal.vts.hidl.get_stub"
+    TEST_HAL_SERVICES = {"android.hardware.gnss@1.0::IGnss"}
     def setUpClass(self):
         """Creates a mirror and turns on the framework-layer GNSS service."""
-        self.dut = self.android_devices[0]
+        super(VtsHalGnssV1_0HostTest, self).setUpClass()
 
         self.passthrough_mode = self.getUserParam(
             keys.ConfigKeys.IKEY_PASSTHROUGH_MODE, default_value=True)
 
-        self.dut.shell.Execute("setenforce 0")  # SELinux permissive mode
-        if not precondition_utils.CanRunHidlHalTest(
-            self, self.dut, self.dut.shell.default):
-            self._skip_all_testcases = True
-            return
-
         mode = "true" if self.passthrough_mode else "false"
-        self.dut.shell.Execute(
+        self.shell.Execute(
             "setprop %s %s" % (self.SYSPROP_GETSTUB, mode))
 
         self.dut.hal.InitHidlHal(
@@ -53,10 +46,6 @@
             target_component_name="IGnss",
             bits=int(self.abi_bitness))
 
-        if self.coverage.enabled:
-            self.coverage.LoadArtifacts()
-            self.coverage.InitializeDeviceCoverage(self.dut)
-
     def SetCallback(self):
         """Utility function to set the callbacks."""
 
diff --git a/gnss/V1_0/host/binderize/AndroidTest.xml b/gnss/V1_0/host/binderize/AndroidTest.xml
index fcad899..3e68b03 100644
--- a/gnss/V1_0/host/binderize/AndroidTest.xml
+++ b/gnss/V1_0/host/binderize/AndroidTest.xml
@@ -44,11 +44,10 @@
         <option name="push" value="DATA/lib/android.hardware.gnss@1.0-vts.driver.so->/data/local/tmp/32/android.hardware.gnss@1.0-vts.driver.so"/>
         <option name="push" value="DATA/lib64/android.hardware.gnss@1.0-vts.driver.so->/data/local/tmp/64/android.hardware.gnss@1.0-vts.driver.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalGnssV1_0HostBinderize" />
         <option name="test-case-path" value="vts/testcases/hal/gnss/V1_0/host/VtsHalGnssV1_0HostTest" />
-        <option name="test-config-path" value="vts/testcases/hal/gnss/V1_0/host/binderize/VtsHalGnssV1_0HostTest.config" />
+        <option name="test-config-path" value="vts/testcases/hal/gnss/V1_0/host/binderize/VtsHalGnssV1_0HostTest.runner_conf" />
         <option name="skip-on-64bit-abi" value="true"/>
         <option name="test-timeout" value="10m"/>
     </test>
diff --git a/gnss/V1_0/host/binderize/VtsHalGnssV1_0HostTest.config b/gnss/V1_0/host/binderize/VtsHalGnssV1_0HostTest.runner_conf
similarity index 100%
rename from gnss/V1_0/host/binderize/VtsHalGnssV1_0HostTest.config
rename to gnss/V1_0/host/binderize/VtsHalGnssV1_0HostTest.runner_conf
diff --git a/gnss/V1_0/target/AndroidTest.xml b/gnss/V1_0/target/AndroidTest.xml
index ef6297a..14fe29f 100644
--- a/gnss/V1_0/target/AndroidTest.xml
+++ b/gnss/V1_0/target/AndroidTest.xml
@@ -19,7 +19,6 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalGnssV1_0Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalGnssV1_0TargetTest/VtsHalGnssV1_0TargetTest"/>
@@ -27,7 +26,6 @@
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.gnss@1.0"/>
         <option name="test-timeout" value="15m"/>
     </test>
 </configuration>
diff --git a/gnss/V1_0/target_profiling/AndroidTest.xml b/gnss/V1_0/target_profiling/AndroidTest.xml
index 6191fb0..2bb922e 100644
--- a/gnss/V1_0/target_profiling/AndroidTest.xml
+++ b/gnss/V1_0/target_profiling/AndroidTest.xml
@@ -22,7 +22,6 @@
         <option name="push" value="DATA/lib/android.hardware.gnss@1.0-vts.profiler.so->/data/local/tmp/32/android.hardware.gnss@1.0-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.gnss@1.0-vts.profiler.so->/data/local/tmp/64/android.hardware.gnss@1.0-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalGnssV1_0TargetProfiling"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalGnssV1_0TargetTest/VtsHalGnssV1_0TargetTest"/>
@@ -31,7 +30,6 @@
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.gnss@1.0"/>
         <option name="test-timeout" value="15m"/>
     </test>
 </configuration>
diff --git a/radio/V1_1/target/Android.mk b/gnss/V1_1/adapter/Android.mk
similarity index 81%
copy from radio/V1_1/target/Android.mk
copy to gnss/V1_1/adapter/Android.mk
index bd1a0f1..abfb48d 100644
--- a/radio/V1_1/target/Android.mk
+++ b/gnss/V1_1/adapter/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalGnssV1_1Adapter
+VTS_CONFIG_SRC_DIR := testcases/hal/gnss/V1_1/adapter
 include test/vts/tools/build/Android.host_config.mk
diff --git a/gnss/V1_1/adapter/AndroidTest.xml b/gnss/V1_1/adapter/AndroidTest.xml
new file mode 100644
index 0000000..8b431f2
--- /dev/null
+++ b/gnss/V1_1/adapter/AndroidTest.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS VtsHalGnssV1_1Adapter test cases">
+    <option key="plan" name="config-descriptor:metadata" value="vts-hal-adapter"/>
+    <object class="com.android.tradefed.module.VtsHalAdapterModuleController" type="module_controller">
+        <option name="hal-package-name" value="android.hardware.gnss@1.1"/>
+    </object>
+    <target_preparer class="com.android.tradefed.targetprep.VtsHalAdapterPreparer">
+        <option name="adapter-binary-name" value="android.hardware.gnss@1.0-adapter"/>
+        <option name="hal-package-name" value="android.hardware.gnss@1.1"/>
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest">
+        <option name="package" value="com.android.devicehealth.tests"/>
+        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner"/>
+    </test>
+    <include name="CtsLocationTestCases.config"/>
+    <include name="CtsStatsdHostTestCases.config"/>
+</configuration>
diff --git a/gnss/V1_1/build/Android.bp b/gnss/V1_1/build/Android.bp
new file mode 100644
index 0000000..64ed9fb
--- /dev/null
+++ b/gnss/V1_1/build/Android.bp
@@ -0,0 +1,115 @@
+// This file was auto-generated. Do not edit manually.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
+
+// Generate .vts spec files.
+hal2vts {
+    name: "android.hardware.gnss@1.1-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
+    srcs: [
+        ":android.hardware.gnss@1.1_hal",
+    ],
+    out: [
+        "android/hardware/gnss/1.1/Gnss.vts",
+        "android/hardware/gnss/1.1/GnssCallback.vts",
+        "android/hardware/gnss/1.1/GnssConfiguration.vts",
+        "android/hardware/gnss/1.1/GnssMeasurement.vts",
+        "android/hardware/gnss/1.1/GnssMeasurementCallback.vts",
+    ],
+}
+
+// Build VTS driver.
+genrule {
+    name: "android.hardware.gnss@1.1-vts.driver_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.gnss@1.1 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/gnss/1.1/ $(genDir)/android/hardware/gnss/1.1/",
+    srcs: [
+        ":android.hardware.gnss@1.1_hal",
+    ],
+    out: [
+        "android/hardware/gnss/1.1/Gnss.vts.cpp",
+        "android/hardware/gnss/1.1/GnssCallback.vts.cpp",
+        "android/hardware/gnss/1.1/GnssConfiguration.vts.cpp",
+        "android/hardware/gnss/1.1/GnssMeasurement.vts.cpp",
+        "android/hardware/gnss/1.1/GnssMeasurementCallback.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.gnss@1.1-vts.driver_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.gnss@1.1 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/gnss/1.1/ $(genDir)/android/hardware/gnss/1.1/",
+    srcs: [
+        ":android.hardware.gnss@1.1_hal",
+    ],
+    out: [
+        "android/hardware/gnss/1.1/Gnss.vts.h",
+        "android/hardware/gnss/1.1/GnssCallback.vts.h",
+        "android/hardware/gnss/1.1/GnssConfiguration.vts.h",
+        "android/hardware/gnss/1.1/GnssMeasurement.vts.h",
+        "android/hardware/gnss/1.1/GnssMeasurementCallback.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.gnss@1.1-vts.driver",
+    generated_sources: ["android.hardware.gnss@1.1-vts.driver_genc++"],
+    generated_headers: ["android.hardware.gnss@1.1-vts.driver_genc++_headers"],
+    export_generated_headers: ["android.hardware.gnss@1.1-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [
+        "android.hardware.gnss@1.0-vts.driver",
+    ],
+    static_libs: [
+        "android.hardware.gnss@1.0",
+        "android.hardware.gnss@1.1",
+    ],
+}
+
+// Build VTS profiler.
+genrule {
+    name: "android.hardware.gnss@1.1-vts.profiler_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.gnss@1.1 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/gnss/1.1/ $(genDir)/android/hardware/gnss/1.1/",
+    srcs: [
+        ":android.hardware.gnss@1.1_hal",
+    ],
+    out: [
+        "android/hardware/gnss/1.1/Gnss.vts.cpp",
+        "android/hardware/gnss/1.1/GnssCallback.vts.cpp",
+        "android/hardware/gnss/1.1/GnssConfiguration.vts.cpp",
+        "android/hardware/gnss/1.1/GnssMeasurement.vts.cpp",
+        "android/hardware/gnss/1.1/GnssMeasurementCallback.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.gnss@1.1-vts.profiler_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.gnss@1.1 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/gnss/1.1/ $(genDir)/android/hardware/gnss/1.1/",
+    srcs: [
+        ":android.hardware.gnss@1.1_hal",
+    ],
+    out: [
+        "android/hardware/gnss/1.1/Gnss.vts.h",
+        "android/hardware/gnss/1.1/GnssCallback.vts.h",
+        "android/hardware/gnss/1.1/GnssConfiguration.vts.h",
+        "android/hardware/gnss/1.1/GnssMeasurement.vts.h",
+        "android/hardware/gnss/1.1/GnssMeasurementCallback.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.gnss@1.1-vts.profiler",
+    generated_sources: ["android.hardware.gnss@1.1-vts.profiler_genc++"],
+    generated_headers: ["android.hardware.gnss@1.1-vts.profiler_genc++_headers"],
+    export_generated_headers: ["android.hardware.gnss@1.1-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [
+        "android.hardware.gnss@1.0-vts.profiler",
+    ],
+    static_libs: [
+        "android.hardware.gnss@1.0",
+        "android.hardware.gnss@1.1",
+    ],
+}
+
diff --git a/radio/V1_1/target/Android.mk b/gnss/V1_1/target/Android.mk
similarity index 88%
copy from radio/V1_1/target/Android.mk
copy to gnss/V1_1/target/Android.mk
index bd1a0f1..3b546e4 100644
--- a/radio/V1_1/target/Android.mk
+++ b/gnss/V1_1/target/Android.mk
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalGnssV1_1Target
+VTS_CONFIG_SRC_DIR := testcases/hal/gnss/V1_1/target
 include test/vts/tools/build/Android.host_config.mk
diff --git a/radio/V1_1/target/AndroidTest.xml b/gnss/V1_1/target/AndroidTest.xml
similarity index 72%
copy from radio/V1_1/target/AndroidTest.xml
copy to gnss/V1_1/target/AndroidTest.xml
index 76b339d..9b262ca 100644
--- a/radio/V1_1/target/AndroidTest.xml
+++ b/gnss/V1_1/target/AndroidTest.xml
@@ -13,21 +13,22 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Config for VTS VtsHalRadioV1_1Target test cases">
+<configuration description="Config for VTS VtsHalGnssV1_1Target test cases">
     <option name="config-descriptor:metadata" key="plan" value="vts-hal" />
     <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
+    <multi_target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
-        <option name="test-module-name" value="VtsHalRadioV1_1Target"/>
-        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalRadioV1_1TargetTest/VtsHalRadioV1_1TargetTest"/>
-        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalRadioV1_1TargetTest/VtsHalRadioV1_1TargetTest"/>
+        <option name="test-module-name" value="VtsHalGnssV1_1Target"/>
+        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalGnssV1_1TargetTest/VtsHalGnssV1_1TargetTest"/>
+        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalGnssV1_1TargetTest/VtsHalGnssV1_1TargetTest"/>
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.radio@1.1"/>
         <option name="test-timeout" value="15m"/>
+        <!-- TODO(b/113276383): re-enable GetLocationLowPower when b/112611179 is fixed. -->
+        <option name="exclude-filter" value="GnssHalTest.GetLocationLowPower" />
     </test>
 </configuration>
diff --git a/graphics/Android.bp b/graphics/Android.bp
deleted file mode 100644
index 5e19b96..0000000
--- a/graphics/Android.bp
+++ /dev/null
@@ -1,10 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "allocator/V2_0",
-    "bufferqueue/V1_0",
-    "common/V1_0",
-    "composer/V2_1",
-    "mapper/V2_0",
-]
diff --git a/graphics/allocator/V2_0/Android.bp b/graphics/allocator/V2_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/graphics/allocator/V2_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/graphics/allocator/V2_0/build/Android.bp b/graphics/allocator/V2_0/build/Android.bp
index ed5ddd2..15fd22f 100644
--- a/graphics/allocator/V2_0/build/Android.bp
+++ b/graphics/allocator/V2_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.graphics.allocator@2.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.graphics.allocator@2.0_hal",
     ],
@@ -16,7 +17,7 @@
 genrule {
     name: "android.hardware.graphics.allocator@2.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.allocator@2.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/graphics/allocator/2.0/ $(genDir)/android/hardware/graphics/allocator/2.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.graphics.allocator@2.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/graphics/allocator/2.0/ $(genDir)/android/hardware/graphics/allocator/2.0/",
     srcs: [
         ":android.hardware.graphics.allocator@2.0_hal",
     ],
@@ -28,7 +29,7 @@
 genrule {
     name: "android.hardware.graphics.allocator@2.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.allocator@2.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/graphics/allocator/2.0/ $(genDir)/android/hardware/graphics/allocator/2.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.graphics.allocator@2.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/graphics/allocator/2.0/ $(genDir)/android/hardware/graphics/allocator/2.0/",
     srcs: [
         ":android.hardware.graphics.allocator@2.0_hal",
     ],
@@ -42,38 +43,13 @@
     generated_sources: ["android.hardware.graphics.allocator@2.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.graphics.allocator@2.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.graphics.allocator@2.0-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
     shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+        "android.hardware.graphics.mapper@2.0-vts.driver",
+    ],
+    static_libs: [
         "android.hardware.graphics.allocator@2.0",
         "android.hardware.graphics.mapper@2.0",
-        "android.hardware.graphics.mapper@2.0-vts.driver",
-    ],
-    export_shared_lib_headers: [
-        "android.hardware.graphics.mapper@2.0",
-        "android.hardware.graphics.mapper@2.0-vts.driver",
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -81,7 +57,7 @@
 genrule {
     name: "android.hardware.graphics.allocator@2.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.allocator@2.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/graphics/allocator/2.0/ $(genDir)/android/hardware/graphics/allocator/2.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.graphics.allocator@2.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/graphics/allocator/2.0/ $(genDir)/android/hardware/graphics/allocator/2.0/",
     srcs: [
         ":android.hardware.graphics.allocator@2.0_hal",
     ],
@@ -93,7 +69,7 @@
 genrule {
     name: "android.hardware.graphics.allocator@2.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.allocator@2.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/graphics/allocator/2.0/ $(genDir)/android/hardware/graphics/allocator/2.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.graphics.allocator@2.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/graphics/allocator/2.0/ $(genDir)/android/hardware/graphics/allocator/2.0/",
     srcs: [
         ":android.hardware.graphics.allocator@2.0_hal",
     ],
@@ -107,28 +83,13 @@
     generated_sources: ["android.hardware.graphics.allocator@2.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.graphics.allocator@2.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.graphics.allocator@2.0-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
     shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
-        "android.hardware.graphics.allocator@2.0",
-        "android.hardware.graphics.mapper@2.0",
         "android.hardware.graphics.mapper@2.0-vts.profiler",
     ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
+    static_libs: [
+        "android.hardware.graphics.allocator@2.0",
+        "android.hardware.graphics.mapper@2.0",
     ],
 }
 
diff --git a/graphics/bufferqueue/V1_0/Android.bp b/graphics/bufferqueue/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/graphics/bufferqueue/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/graphics/bufferqueue/V1_0/build/Android.bp b/graphics/bufferqueue/V1_0/build/Android.bp
index d9a996c..464dfa5 100644
--- a/graphics/bufferqueue/V1_0/build/Android.bp
+++ b/graphics/bufferqueue/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.graphics.bufferqueue@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.graphics.bufferqueue@1.0_hal",
     ],
@@ -17,7 +18,7 @@
 genrule {
     name: "android.hardware.graphics.bufferqueue@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.bufferqueue@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/graphics/bufferqueue/1.0/ $(genDir)/android/hardware/graphics/bufferqueue/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.graphics.bufferqueue@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/graphics/bufferqueue/1.0/ $(genDir)/android/hardware/graphics/bufferqueue/1.0/",
     srcs: [
         ":android.hardware.graphics.bufferqueue@1.0_hal",
     ],
@@ -30,7 +31,7 @@
 genrule {
     name: "android.hardware.graphics.bufferqueue@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.bufferqueue@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/graphics/bufferqueue/1.0/ $(genDir)/android/hardware/graphics/bufferqueue/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.graphics.bufferqueue@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/graphics/bufferqueue/1.0/ $(genDir)/android/hardware/graphics/bufferqueue/1.0/",
     srcs: [
         ":android.hardware.graphics.bufferqueue@1.0_hal",
     ],
@@ -45,42 +46,15 @@
     generated_sources: ["android.hardware.graphics.bufferqueue@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.graphics.bufferqueue@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.graphics.bufferqueue@1.0-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
     shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+        "android.hardware.graphics.common@1.0-vts.driver",
+        "android.hardware.media@1.0-vts.driver",
+    ],
+    static_libs: [
         "android.hardware.graphics.bufferqueue@1.0",
         "android.hardware.graphics.common@1.0",
-        "android.hardware.graphics.common@1.0-vts.driver",
         "android.hardware.media@1.0",
-        "android.hardware.media@1.0-vts.driver",
-    ],
-    export_shared_lib_headers: [
-        "android.hardware.graphics.common@1.0",
-        "android.hardware.graphics.common@1.0-vts.driver",
-        "android.hardware.media@1.0",
-        "android.hardware.media@1.0-vts.driver",
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -88,7 +62,7 @@
 genrule {
     name: "android.hardware.graphics.bufferqueue@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.bufferqueue@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/graphics/bufferqueue/1.0/ $(genDir)/android/hardware/graphics/bufferqueue/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.graphics.bufferqueue@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/graphics/bufferqueue/1.0/ $(genDir)/android/hardware/graphics/bufferqueue/1.0/",
     srcs: [
         ":android.hardware.graphics.bufferqueue@1.0_hal",
     ],
@@ -101,7 +75,7 @@
 genrule {
     name: "android.hardware.graphics.bufferqueue@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.bufferqueue@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/graphics/bufferqueue/1.0/ $(genDir)/android/hardware/graphics/bufferqueue/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.graphics.bufferqueue@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/graphics/bufferqueue/1.0/ $(genDir)/android/hardware/graphics/bufferqueue/1.0/",
     srcs: [
         ":android.hardware.graphics.bufferqueue@1.0_hal",
     ],
@@ -116,30 +90,15 @@
     generated_sources: ["android.hardware.graphics.bufferqueue@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.graphics.bufferqueue@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.graphics.bufferqueue@1.0-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
     shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
-        "android.hardware.graphics.bufferqueue@1.0",
-        "android.hardware.graphics.common@1.0",
         "android.hardware.graphics.common@1.0-vts.profiler",
-        "android.hardware.media@1.0",
         "android.hardware.media@1.0-vts.profiler",
     ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
+    static_libs: [
+        "android.hardware.graphics.bufferqueue@1.0",
+        "android.hardware.graphics.common@1.0",
+        "android.hardware.media@1.0",
     ],
 }
 
diff --git a/graphics/common/V1_0/Android.bp b/graphics/common/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/graphics/common/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/graphics/common/V1_0/build/Android.bp b/graphics/common/V1_0/build/Android.bp
index e5c1d82..a619348 100644
--- a/graphics/common/V1_0/build/Android.bp
+++ b/graphics/common/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.graphics.common@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.graphics.common@1.0_hal",
     ],
@@ -16,7 +17,7 @@
 genrule {
     name: "android.hardware.graphics.common@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.common@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/graphics/common/1.0/ $(genDir)/android/hardware/graphics/common/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.graphics.common@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/graphics/common/1.0/ $(genDir)/android/hardware/graphics/common/1.0/",
     srcs: [
         ":android.hardware.graphics.common@1.0_hal",
     ],
@@ -28,7 +29,7 @@
 genrule {
     name: "android.hardware.graphics.common@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.common@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/graphics/common/1.0/ $(genDir)/android/hardware/graphics/common/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.graphics.common@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/graphics/common/1.0/ $(genDir)/android/hardware/graphics/common/1.0/",
     srcs: [
         ":android.hardware.graphics.common@1.0_hal",
     ],
@@ -42,36 +43,10 @@
     generated_sources: ["android.hardware.graphics.common@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.graphics.common@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.graphics.common@1.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.graphics.common@1.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -79,7 +54,7 @@
 genrule {
     name: "android.hardware.graphics.common@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.common@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/graphics/common/1.0/ $(genDir)/android/hardware/graphics/common/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.graphics.common@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/graphics/common/1.0/ $(genDir)/android/hardware/graphics/common/1.0/",
     srcs: [
         ":android.hardware.graphics.common@1.0_hal",
     ],
@@ -91,7 +66,7 @@
 genrule {
     name: "android.hardware.graphics.common@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.common@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/graphics/common/1.0/ $(genDir)/android/hardware/graphics/common/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.graphics.common@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/graphics/common/1.0/ $(genDir)/android/hardware/graphics/common/1.0/",
     srcs: [
         ":android.hardware.graphics.common@1.0_hal",
     ],
@@ -105,27 +80,10 @@
     generated_sources: ["android.hardware.graphics.common@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.graphics.common@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.graphics.common@1.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.graphics.common@1.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/radio/V1_1/target/Android.mk b/graphics/common/V1_1/adapter/Android.mk
similarity index 79%
copy from radio/V1_1/target/Android.mk
copy to graphics/common/V1_1/adapter/Android.mk
index bd1a0f1..26c1926 100644
--- a/radio/V1_1/target/Android.mk
+++ b/graphics/common/V1_1/adapter/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalGraphicsCommonV1_1Adapter
+VTS_CONFIG_SRC_DIR := testcases/hal/graphics/common/V1_1/adapter
 include test/vts/tools/build/Android.host_config.mk
diff --git a/graphics/common/V1_1/adapter/AndroidTest.xml b/graphics/common/V1_1/adapter/AndroidTest.xml
new file mode 100644
index 0000000..a9f341b
--- /dev/null
+++ b/graphics/common/V1_1/adapter/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS VtsHalGraphicsCommonV1_1Adapter test cases">
+    <option key="plan" name="config-descriptor:metadata" value="vts-hal-adapter"/>
+    <object class="com.android.tradefed.module.VtsHalAdapterModuleController" type="module_controller">
+        <option name="hal-package-name" value="android.hardware.graphics.common@1.1"/>
+    </object>
+    <target_preparer class="com.android.tradefed.targetprep.VtsHalAdapterPreparer">
+        <option name="adapter-binary-name" value="android.hardware.graphics.common@1.0-adapter"/>
+        <option name="hal-package-name" value="android.hardware.graphics.common@1.1"/>
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest">
+        <option name="package" value="com.android.devicehealth.tests"/>
+        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner"/>
+    </test>
+</configuration>
diff --git a/graphics/common/V1_1/build/Android.bp b/graphics/common/V1_1/build/Android.bp
new file mode 100644
index 0000000..3f6b984
--- /dev/null
+++ b/graphics/common/V1_1/build/Android.bp
@@ -0,0 +1,95 @@
+// This file was auto-generated. Do not edit manually.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
+
+// Generate .vts spec files.
+hal2vts {
+    name: "android.hardware.graphics.common@1.1-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
+    srcs: [
+        ":android.hardware.graphics.common@1.1_hal",
+    ],
+    out: [
+        "android/hardware/graphics/common/1.1/types.vts",
+    ],
+}
+
+// Build VTS driver.
+genrule {
+    name: "android.hardware.graphics.common@1.1-vts.driver_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.graphics.common@1.1 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/graphics/common/1.1/ $(genDir)/android/hardware/graphics/common/1.1/",
+    srcs: [
+        ":android.hardware.graphics.common@1.1_hal",
+    ],
+    out: [
+        "android/hardware/graphics/common/1.1/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.graphics.common@1.1-vts.driver_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.graphics.common@1.1 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/graphics/common/1.1/ $(genDir)/android/hardware/graphics/common/1.1/",
+    srcs: [
+        ":android.hardware.graphics.common@1.1_hal",
+    ],
+    out: [
+        "android/hardware/graphics/common/1.1/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.graphics.common@1.1-vts.driver",
+    generated_sources: ["android.hardware.graphics.common@1.1-vts.driver_genc++"],
+    generated_headers: ["android.hardware.graphics.common@1.1-vts.driver_genc++_headers"],
+    export_generated_headers: ["android.hardware.graphics.common@1.1-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [
+        "android.hardware.graphics.common@1.0-vts.driver",
+    ],
+    static_libs: [
+        "android.hardware.graphics.common@1.0",
+        "android.hardware.graphics.common@1.1",
+    ],
+}
+
+// Build VTS profiler.
+genrule {
+    name: "android.hardware.graphics.common@1.1-vts.profiler_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.graphics.common@1.1 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/graphics/common/1.1/ $(genDir)/android/hardware/graphics/common/1.1/",
+    srcs: [
+        ":android.hardware.graphics.common@1.1_hal",
+    ],
+    out: [
+        "android/hardware/graphics/common/1.1/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.graphics.common@1.1-vts.profiler_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.graphics.common@1.1 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/graphics/common/1.1/ $(genDir)/android/hardware/graphics/common/1.1/",
+    srcs: [
+        ":android.hardware.graphics.common@1.1_hal",
+    ],
+    out: [
+        "android/hardware/graphics/common/1.1/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.graphics.common@1.1-vts.profiler",
+    generated_sources: ["android.hardware.graphics.common@1.1-vts.profiler_genc++"],
+    generated_headers: ["android.hardware.graphics.common@1.1-vts.profiler_genc++_headers"],
+    export_generated_headers: ["android.hardware.graphics.common@1.1-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [
+        "android.hardware.graphics.common@1.0-vts.profiler",
+    ],
+    static_libs: [
+        "android.hardware.graphics.common@1.0",
+        "android.hardware.graphics.common@1.1",
+    ],
+}
+
diff --git a/graphics/composer/V2_1/Android.bp b/graphics/composer/V2_1/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/graphics/composer/V2_1/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/graphics/composer/V2_1/build/Android.bp b/graphics/composer/V2_1/build/Android.bp
index 9ed171a..efa3e2e 100644
--- a/graphics/composer/V2_1/build/Android.bp
+++ b/graphics/composer/V2_1/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.graphics.composer@2.1-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.graphics.composer@2.1_hal",
     ],
@@ -19,7 +20,7 @@
 genrule {
     name: "android.hardware.graphics.composer@2.1-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.composer@2.1 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/graphics/composer/2.1/ $(genDir)/android/hardware/graphics/composer/2.1/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.graphics.composer@2.1 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/graphics/composer/2.1/ $(genDir)/android/hardware/graphics/composer/2.1/",
     srcs: [
         ":android.hardware.graphics.composer@2.1_hal",
     ],
@@ -34,7 +35,7 @@
 genrule {
     name: "android.hardware.graphics.composer@2.1-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.composer@2.1 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/graphics/composer/2.1/ $(genDir)/android/hardware/graphics/composer/2.1/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.graphics.composer@2.1 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/graphics/composer/2.1/ $(genDir)/android/hardware/graphics/composer/2.1/",
     srcs: [
         ":android.hardware.graphics.composer@2.1_hal",
     ],
@@ -51,38 +52,13 @@
     generated_sources: ["android.hardware.graphics.composer@2.1-vts.driver_genc++"],
     generated_headers: ["android.hardware.graphics.composer@2.1-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.graphics.composer@2.1-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
     shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+        "android.hardware.graphics.common@1.0-vts.driver",
+    ],
+    static_libs: [
+        "android.hardware.graphics.common@1.0",
         "android.hardware.graphics.composer@2.1",
-        "android.hardware.graphics.common@1.0",
-        "android.hardware.graphics.common@1.0-vts.driver",
-    ],
-    export_shared_lib_headers: [
-        "android.hardware.graphics.common@1.0",
-        "android.hardware.graphics.common@1.0-vts.driver",
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -90,7 +66,7 @@
 genrule {
     name: "android.hardware.graphics.composer@2.1-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.composer@2.1 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/graphics/composer/2.1/ $(genDir)/android/hardware/graphics/composer/2.1/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.graphics.composer@2.1 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/graphics/composer/2.1/ $(genDir)/android/hardware/graphics/composer/2.1/",
     srcs: [
         ":android.hardware.graphics.composer@2.1_hal",
     ],
@@ -105,7 +81,7 @@
 genrule {
     name: "android.hardware.graphics.composer@2.1-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.composer@2.1 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/graphics/composer/2.1/ $(genDir)/android/hardware/graphics/composer/2.1/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.graphics.composer@2.1 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/graphics/composer/2.1/ $(genDir)/android/hardware/graphics/composer/2.1/",
     srcs: [
         ":android.hardware.graphics.composer@2.1_hal",
     ],
@@ -122,28 +98,13 @@
     generated_sources: ["android.hardware.graphics.composer@2.1-vts.profiler_genc++"],
     generated_headers: ["android.hardware.graphics.composer@2.1-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.graphics.composer@2.1-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
     shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
-        "android.hardware.graphics.composer@2.1",
-        "android.hardware.graphics.common@1.0",
         "android.hardware.graphics.common@1.0-vts.profiler",
     ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
+    static_libs: [
+        "android.hardware.graphics.common@1.0",
+        "android.hardware.graphics.composer@2.1",
     ],
 }
 
diff --git a/graphics/composer/V2_1/target/AndroidTest.xml b/graphics/composer/V2_1/target/AndroidTest.xml
index dcdc67c..b27fb24 100644
--- a/graphics/composer/V2_1/target/AndroidTest.xml
+++ b/graphics/composer/V2_1/target/AndroidTest.xml
@@ -19,7 +19,6 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalGraphicsComposerV2_1Target"/>
         <option name="binary-test-working-directory" value="_32bit::/data/nativetest/" />
@@ -27,8 +26,7 @@
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalGraphicsComposerV2_1TargetTest/VtsHalGraphicsComposerV2_1TargetTest"/>
         <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalGraphicsComposerV2_1TargetTest/VtsHalGraphicsComposerV2_1TargetTest"/>
         <option name="binary-test-type" value="hal_hidl_gtest"/>
-        <option name="exclude-filter" value="r(.*/default.*)" />
-        <option name="precondition-lshal" value="android.hardware.graphics.composer@2.1"/>
+        <option name="exclude-filter" value="r(.*\(default\).*)" />
         <option name="test-timeout" value="5m"/>
     </test>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
@@ -40,8 +38,7 @@
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="exclude-filter" value="r(.*/vr.*)" />
-        <option name="precondition-lshal" value="android.hardware.graphics.composer@2.1"/>
+        <option name="exclude-filter" value="r(.*\(vr\).*)" />
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/graphics/composer/V2_1/target_profiling/AndroidTest.xml b/graphics/composer/V2_1/target_profiling/AndroidTest.xml
index d6c8279..6797f80 100644
--- a/graphics/composer/V2_1/target_profiling/AndroidTest.xml
+++ b/graphics/composer/V2_1/target_profiling/AndroidTest.xml
@@ -24,7 +24,6 @@
         <option name="push" value="DATA/lib/android.hardware.graphics.composer@2.1-vts.profiler.so->/data/local/tmp/32/android.hardware.graphics.composer@2.1-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.graphics.composer@2.1-vts.profiler.so->/data/local/tmp/64/android.hardware.graphics.composer@2.1-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalGraphicsComposerV2_1TargetProfiling"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalGraphicsComposerV2_1TargetTest/VtsHalGraphicsComposerV2_1TargetTest"/>
@@ -34,7 +33,6 @@
         <option name="binary-test-stop-native-servers" value="true"/>
         <option name="enable-profiling" value="true"/>
         <option name="exclude-filter" value="r(.*/vr.*)" />
-        <option name="precondition-lshal" value="android.hardware.graphics.composer@2.1"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/radio/V1_1/target/Android.mk b/graphics/composer/V2_2/adapter/Android.mk
similarity index 79%
copy from radio/V1_1/target/Android.mk
copy to graphics/composer/V2_2/adapter/Android.mk
index bd1a0f1..3717a18 100644
--- a/radio/V1_1/target/Android.mk
+++ b/graphics/composer/V2_2/adapter/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalGraphicsComposerV2_2Adapter
+VTS_CONFIG_SRC_DIR := testcases/hal/graphics/composer/V2_2/adapter
 include test/vts/tools/build/Android.host_config.mk
diff --git a/graphics/composer/V2_2/adapter/AndroidTest.xml b/graphics/composer/V2_2/adapter/AndroidTest.xml
new file mode 100644
index 0000000..fd140ad
--- /dev/null
+++ b/graphics/composer/V2_2/adapter/AndroidTest.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS VtsHalGraphicsComposerV2_2Adapter test cases">
+    <option key="plan" name="config-descriptor:metadata" value="vts-hal-adapter"/>
+    <object class="com.android.tradefed.module.VtsHalAdapterModuleController" type="module_controller">
+        <option name="hal-package-name" value="android.hardware.graphics.composer@2.2"/>
+    </object>
+    <target_preparer class="com.android.tradefed.targetprep.VtsHalAdapterPreparer">
+        <option name="adapter-binary-name" value="android.hardware.graphics.composer@2.1-adapter"/>
+        <option name="hal-package-name" value="android.hardware.graphics.composer@2.2"/>
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest">
+        <option name="package" value="com.android.devicehealth.tests"/>
+        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner"/>
+    </test>
+    <include name="CtsJniTestCases.config"/>
+</configuration>
diff --git a/graphics/composer/V2_2/build/Android.bp b/graphics/composer/V2_2/build/Android.bp
new file mode 100644
index 0000000..57efbf3
--- /dev/null
+++ b/graphics/composer/V2_2/build/Android.bp
@@ -0,0 +1,108 @@
+// This file was auto-generated. Do not edit manually.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
+
+// Generate .vts spec files.
+hal2vts {
+    name: "android.hardware.graphics.composer@2.2-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
+    srcs: [
+        ":android.hardware.graphics.composer@2.2_hal",
+    ],
+    out: [
+        "android/hardware/graphics/composer/2.2/Composer.vts",
+        "android/hardware/graphics/composer/2.2/ComposerClient.vts",
+    ],
+}
+
+// Build VTS driver.
+genrule {
+    name: "android.hardware.graphics.composer@2.2-vts.driver_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.graphics.composer@2.2 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/graphics/composer/2.2/ $(genDir)/android/hardware/graphics/composer/2.2/",
+    srcs: [
+        ":android.hardware.graphics.composer@2.2_hal",
+    ],
+    out: [
+        "android/hardware/graphics/composer/2.2/Composer.vts.cpp",
+        "android/hardware/graphics/composer/2.2/ComposerClient.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.graphics.composer@2.2-vts.driver_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.graphics.composer@2.2 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/graphics/composer/2.2/ $(genDir)/android/hardware/graphics/composer/2.2/",
+    srcs: [
+        ":android.hardware.graphics.composer@2.2_hal",
+    ],
+    out: [
+        "android/hardware/graphics/composer/2.2/Composer.vts.h",
+        "android/hardware/graphics/composer/2.2/ComposerClient.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.graphics.composer@2.2-vts.driver",
+    generated_sources: ["android.hardware.graphics.composer@2.2-vts.driver_genc++"],
+    generated_headers: ["android.hardware.graphics.composer@2.2-vts.driver_genc++_headers"],
+    export_generated_headers: ["android.hardware.graphics.composer@2.2-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [
+        "android.hardware.graphics.common@1.0-vts.driver",
+        "android.hardware.graphics.common@1.1-vts.driver",
+        "android.hardware.graphics.composer@2.1-vts.driver",
+    ],
+    static_libs: [
+        "android.hardware.graphics.common@1.0",
+        "android.hardware.graphics.common@1.1",
+        "android.hardware.graphics.composer@2.1",
+        "android.hardware.graphics.composer@2.2",
+    ],
+}
+
+// Build VTS profiler.
+genrule {
+    name: "android.hardware.graphics.composer@2.2-vts.profiler_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.graphics.composer@2.2 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/graphics/composer/2.2/ $(genDir)/android/hardware/graphics/composer/2.2/",
+    srcs: [
+        ":android.hardware.graphics.composer@2.2_hal",
+    ],
+    out: [
+        "android/hardware/graphics/composer/2.2/Composer.vts.cpp",
+        "android/hardware/graphics/composer/2.2/ComposerClient.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.graphics.composer@2.2-vts.profiler_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.graphics.composer@2.2 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/graphics/composer/2.2/ $(genDir)/android/hardware/graphics/composer/2.2/",
+    srcs: [
+        ":android.hardware.graphics.composer@2.2_hal",
+    ],
+    out: [
+        "android/hardware/graphics/composer/2.2/Composer.vts.h",
+        "android/hardware/graphics/composer/2.2/ComposerClient.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.graphics.composer@2.2-vts.profiler",
+    generated_sources: ["android.hardware.graphics.composer@2.2-vts.profiler_genc++"],
+    generated_headers: ["android.hardware.graphics.composer@2.2-vts.profiler_genc++_headers"],
+    export_generated_headers: ["android.hardware.graphics.composer@2.2-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [
+        "android.hardware.graphics.common@1.0-vts.profiler",
+        "android.hardware.graphics.common@1.1-vts.profiler",
+        "android.hardware.graphics.composer@2.1-vts.profiler",
+    ],
+    static_libs: [
+        "android.hardware.graphics.common@1.0",
+        "android.hardware.graphics.common@1.1",
+        "android.hardware.graphics.composer@2.1",
+        "android.hardware.graphics.composer@2.2",
+    ],
+}
+
diff --git a/radio/V1_1/target/Android.mk b/graphics/composer/V2_2/target/Android.mk
similarity index 79%
copy from radio/V1_1/target/Android.mk
copy to graphics/composer/V2_2/target/Android.mk
index bd1a0f1..538d80c 100644
--- a/radio/V1_1/target/Android.mk
+++ b/graphics/composer/V2_2/target/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalGraphicsComposerV2_2Target
+VTS_CONFIG_SRC_DIR := testcases/hal/graphics/composer/V2_2/target
 include test/vts/tools/build/Android.host_config.mk
diff --git a/radio/V1_1/target/AndroidTest.xml b/graphics/composer/V2_2/target/AndroidTest.xml
similarity index 70%
copy from radio/V1_1/target/AndroidTest.xml
copy to graphics/composer/V2_2/target/AndroidTest.xml
index 76b339d..82d9d06 100644
--- a/radio/V1_1/target/AndroidTest.xml
+++ b/graphics/composer/V2_2/target/AndroidTest.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2017 The Android Open Source Project
+<!-- Copyright (C) 2018 The Android Open Source Project
 
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
@@ -13,21 +13,20 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Config for VTS VtsHalRadioV1_1Target test cases">
+<configuration description="Config for VTS VtsHalGraphicsComposerV2_2Target test cases">
     <option name="config-descriptor:metadata" key="plan" value="vts-hal" />
     <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
+    <multi_target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
-        <option name="test-module-name" value="VtsHalRadioV1_1Target"/>
-        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalRadioV1_1TargetTest/VtsHalRadioV1_1TargetTest"/>
-        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalRadioV1_1TargetTest/VtsHalRadioV1_1TargetTest"/>
+        <option name="test-module-name" value="VtsHalGraphicsComposerV2_2Target"/>
+        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalGraphicsComposerV2_2TargetTest/VtsHalGraphicsComposerV2_2TargetTest"/>
+        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalGraphicsComposerV2_2TargetTest/VtsHalGraphicsComposerV2_2TargetTest"/>
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.radio@1.1"/>
-        <option name="test-timeout" value="15m"/>
+        <option name="test-timeout" value="1m"/>
     </test>
 </configuration>
diff --git a/graphics/mapper/V2_0/Android.bp b/graphics/mapper/V2_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/graphics/mapper/V2_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/graphics/mapper/V2_0/build/Android.bp b/graphics/mapper/V2_0/build/Android.bp
index 0af0d66..87254cd 100644
--- a/graphics/mapper/V2_0/build/Android.bp
+++ b/graphics/mapper/V2_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.graphics.mapper@2.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.graphics.mapper@2.0_hal",
     ],
@@ -17,7 +18,7 @@
 genrule {
     name: "android.hardware.graphics.mapper@2.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.mapper@2.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/graphics/mapper/2.0/ $(genDir)/android/hardware/graphics/mapper/2.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.graphics.mapper@2.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/graphics/mapper/2.0/ $(genDir)/android/hardware/graphics/mapper/2.0/",
     srcs: [
         ":android.hardware.graphics.mapper@2.0_hal",
     ],
@@ -30,7 +31,7 @@
 genrule {
     name: "android.hardware.graphics.mapper@2.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.mapper@2.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/graphics/mapper/2.0/ $(genDir)/android/hardware/graphics/mapper/2.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.graphics.mapper@2.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/graphics/mapper/2.0/ $(genDir)/android/hardware/graphics/mapper/2.0/",
     srcs: [
         ":android.hardware.graphics.mapper@2.0_hal",
     ],
@@ -45,38 +46,13 @@
     generated_sources: ["android.hardware.graphics.mapper@2.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.graphics.mapper@2.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.graphics.mapper@2.0-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
     shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+        "android.hardware.graphics.common@1.0-vts.driver",
+    ],
+    static_libs: [
+        "android.hardware.graphics.common@1.0",
         "android.hardware.graphics.mapper@2.0",
-        "android.hardware.graphics.common@1.0",
-        "android.hardware.graphics.common@1.0-vts.driver",
-    ],
-    export_shared_lib_headers: [
-        "android.hardware.graphics.common@1.0",
-        "android.hardware.graphics.common@1.0-vts.driver",
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -84,7 +60,7 @@
 genrule {
     name: "android.hardware.graphics.mapper@2.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.mapper@2.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/graphics/mapper/2.0/ $(genDir)/android/hardware/graphics/mapper/2.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.graphics.mapper@2.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/graphics/mapper/2.0/ $(genDir)/android/hardware/graphics/mapper/2.0/",
     srcs: [
         ":android.hardware.graphics.mapper@2.0_hal",
     ],
@@ -97,7 +73,7 @@
 genrule {
     name: "android.hardware.graphics.mapper@2.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.mapper@2.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/graphics/mapper/2.0/ $(genDir)/android/hardware/graphics/mapper/2.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.graphics.mapper@2.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/graphics/mapper/2.0/ $(genDir)/android/hardware/graphics/mapper/2.0/",
     srcs: [
         ":android.hardware.graphics.mapper@2.0_hal",
     ],
@@ -112,28 +88,13 @@
     generated_sources: ["android.hardware.graphics.mapper@2.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.graphics.mapper@2.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.graphics.mapper@2.0-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
     shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
-        "android.hardware.graphics.mapper@2.0",
-        "android.hardware.graphics.common@1.0",
         "android.hardware.graphics.common@1.0-vts.profiler",
     ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
+    static_libs: [
+        "android.hardware.graphics.common@1.0",
+        "android.hardware.graphics.mapper@2.0",
     ],
 }
 
diff --git a/graphics/mapper/V2_0/target/AndroidTest.xml b/graphics/mapper/V2_0/target/AndroidTest.xml
index 8a7aded..f381ff4 100644
--- a/graphics/mapper/V2_0/target/AndroidTest.xml
+++ b/graphics/mapper/V2_0/target/AndroidTest.xml
@@ -19,7 +19,6 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalGraphicsMapperV2_0Target"/>
         <option name="binary-test-working-directory" value="_32bit::/data/nativetest/" />
@@ -29,7 +28,6 @@
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.graphics.mapper@2.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/graphics/mapper/V2_0/target_profiling/AndroidTest.xml b/graphics/mapper/V2_0/target_profiling/AndroidTest.xml
index 6f94402..c768c24 100644
--- a/graphics/mapper/V2_0/target_profiling/AndroidTest.xml
+++ b/graphics/mapper/V2_0/target_profiling/AndroidTest.xml
@@ -24,7 +24,6 @@
         <option name="push" value="DATA/lib/android.hardware.graphics.mapper@2.0-vts.profiler.so->/data/local/tmp/32/android.hardware.graphics.mapper@2.0-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.graphics.mapper@2.0-vts.profiler.so->/data/local/tmp/64/android.hardware.graphics.mapper@2.0-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalGraphicsMapperV2_0TargetProfiling"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalGraphicsMapperV2_0TargetTest/VtsHalGraphicsMapperV2_0TargetTest"/>
@@ -33,7 +32,6 @@
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.graphics.mapper@2.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/radio/V1_1/target/Android.mk b/graphics/mapper/V2_1/adapter/Android.mk
similarity index 79%
copy from radio/V1_1/target/Android.mk
copy to graphics/mapper/V2_1/adapter/Android.mk
index bd1a0f1..402453e 100644
--- a/radio/V1_1/target/Android.mk
+++ b/graphics/mapper/V2_1/adapter/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalGraphicsMapperV2_1Adapter
+VTS_CONFIG_SRC_DIR := testcases/hal/graphics/mapper/V2_1/adapter
 include test/vts/tools/build/Android.host_config.mk
diff --git a/graphics/mapper/V2_1/adapter/AndroidTest.xml b/graphics/mapper/V2_1/adapter/AndroidTest.xml
new file mode 100644
index 0000000..35417de
--- /dev/null
+++ b/graphics/mapper/V2_1/adapter/AndroidTest.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS VtsHalGraphicsMapperV2_1Adapter test cases">
+    <option key="plan" name="config-descriptor:metadata" value="vts-hal-adapter"/>
+    <object class="com.android.tradefed.module.VtsHalAdapterModuleController" type="module_controller">
+        <option name="hal-package-name" value="android.hardware.graphics.mapper@2.1"/>
+    </object>
+    <target_preparer class="com.android.tradefed.targetprep.VtsHalAdapterPreparer">
+        <option name="adapter-binary-name" value="android.hardware.graphics.mapper@2.0-adapter"/>
+        <option name="hal-package-name" value="android.hardware.graphics.mapper@2.1"/>
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest">
+        <option name="package" value="com.android.devicehealth.tests"/>
+        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner"/>
+    </test>
+    <include name="CtsMediaTestCases.config"/>
+</configuration>
diff --git a/graphics/mapper/V2_1/build/Android.bp b/graphics/mapper/V2_1/build/Android.bp
new file mode 100644
index 0000000..85b781f
--- /dev/null
+++ b/graphics/mapper/V2_1/build/Android.bp
@@ -0,0 +1,103 @@
+// This file was auto-generated. Do not edit manually.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
+
+// Generate .vts spec files.
+hal2vts {
+    name: "android.hardware.graphics.mapper@2.1-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
+    srcs: [
+        ":android.hardware.graphics.mapper@2.1_hal",
+    ],
+    out: [
+        "android/hardware/graphics/mapper/2.1/Mapper.vts",
+    ],
+}
+
+// Build VTS driver.
+genrule {
+    name: "android.hardware.graphics.mapper@2.1-vts.driver_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.graphics.mapper@2.1 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/graphics/mapper/2.1/ $(genDir)/android/hardware/graphics/mapper/2.1/",
+    srcs: [
+        ":android.hardware.graphics.mapper@2.1_hal",
+    ],
+    out: [
+        "android/hardware/graphics/mapper/2.1/Mapper.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.graphics.mapper@2.1-vts.driver_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.graphics.mapper@2.1 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/graphics/mapper/2.1/ $(genDir)/android/hardware/graphics/mapper/2.1/",
+    srcs: [
+        ":android.hardware.graphics.mapper@2.1_hal",
+    ],
+    out: [
+        "android/hardware/graphics/mapper/2.1/Mapper.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.graphics.mapper@2.1-vts.driver",
+    generated_sources: ["android.hardware.graphics.mapper@2.1-vts.driver_genc++"],
+    generated_headers: ["android.hardware.graphics.mapper@2.1-vts.driver_genc++_headers"],
+    export_generated_headers: ["android.hardware.graphics.mapper@2.1-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [
+        "android.hardware.graphics.common@1.0-vts.driver",
+        "android.hardware.graphics.common@1.1-vts.driver",
+        "android.hardware.graphics.mapper@2.0-vts.driver",
+    ],
+    static_libs: [
+        "android.hardware.graphics.common@1.0",
+        "android.hardware.graphics.common@1.1",
+        "android.hardware.graphics.mapper@2.0",
+        "android.hardware.graphics.mapper@2.1",
+    ],
+}
+
+// Build VTS profiler.
+genrule {
+    name: "android.hardware.graphics.mapper@2.1-vts.profiler_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.graphics.mapper@2.1 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/graphics/mapper/2.1/ $(genDir)/android/hardware/graphics/mapper/2.1/",
+    srcs: [
+        ":android.hardware.graphics.mapper@2.1_hal",
+    ],
+    out: [
+        "android/hardware/graphics/mapper/2.1/Mapper.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.graphics.mapper@2.1-vts.profiler_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.graphics.mapper@2.1 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/graphics/mapper/2.1/ $(genDir)/android/hardware/graphics/mapper/2.1/",
+    srcs: [
+        ":android.hardware.graphics.mapper@2.1_hal",
+    ],
+    out: [
+        "android/hardware/graphics/mapper/2.1/Mapper.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.graphics.mapper@2.1-vts.profiler",
+    generated_sources: ["android.hardware.graphics.mapper@2.1-vts.profiler_genc++"],
+    generated_headers: ["android.hardware.graphics.mapper@2.1-vts.profiler_genc++_headers"],
+    export_generated_headers: ["android.hardware.graphics.mapper@2.1-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [
+        "android.hardware.graphics.common@1.0-vts.profiler",
+        "android.hardware.graphics.common@1.1-vts.profiler",
+        "android.hardware.graphics.mapper@2.0-vts.profiler",
+    ],
+    static_libs: [
+        "android.hardware.graphics.common@1.0",
+        "android.hardware.graphics.common@1.1",
+        "android.hardware.graphics.mapper@2.0",
+        "android.hardware.graphics.mapper@2.1",
+    ],
+}
+
diff --git a/radio/V1_1/target/Android.mk b/graphics/mapper/V2_1/target/Android.mk
similarity index 86%
copy from radio/V1_1/target/Android.mk
copy to graphics/mapper/V2_1/target/Android.mk
index bd1a0f1..c12cc9a 100644
--- a/radio/V1_1/target/Android.mk
+++ b/graphics/mapper/V2_1/target/Android.mk
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalGraphicsMapperV2_1Target
+VTS_CONFIG_SRC_DIR := testcases/hal/graphics/mapper/V2_1/target
 include test/vts/tools/build/Android.host_config.mk
diff --git a/radio/V1_1/target/AndroidTest.xml b/graphics/mapper/V2_1/target/AndroidTest.xml
similarity index 68%
copy from radio/V1_1/target/AndroidTest.xml
copy to graphics/mapper/V2_1/target/AndroidTest.xml
index 76b339d..fe08332 100644
--- a/radio/V1_1/target/AndroidTest.xml
+++ b/graphics/mapper/V2_1/target/AndroidTest.xml
@@ -13,21 +13,22 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Config for VTS VtsHalRadioV1_1Target test cases">
+<configuration description="Config for VTS VtsHalGraphicsMapperV2_1Target test cases">
     <option name="config-descriptor:metadata" key="plan" value="vts-hal" />
     <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
+    <multi_target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
-        <option name="test-module-name" value="VtsHalRadioV1_1Target"/>
-        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalRadioV1_1TargetTest/VtsHalRadioV1_1TargetTest"/>
-        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalRadioV1_1TargetTest/VtsHalRadioV1_1TargetTest"/>
+        <option name="test-module-name" value="VtsHalGraphicsMapperV2_1Target"/>
+        <option name="binary-test-working-directory" value="_32bit::/data/nativetest/" />
+        <option name="binary-test-working-directory" value="_64bit::/data/nativetest64/" />
+        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalGraphicsMapperV2_1TargetTest/VtsHalGraphicsMapperV2_1TargetTest"/>
+        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalGraphicsMapperV2_1TargetTest/VtsHalGraphicsMapperV2_1TargetTest"/>
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.radio@1.1"/>
-        <option name="test-timeout" value="15m"/>
+        <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/radio/V1_1/target/Android.mk b/graphics/mapper/V2_1/target_profiling/Android.mk
similarity index 84%
copy from radio/V1_1/target/Android.mk
copy to graphics/mapper/V2_1/target_profiling/Android.mk
index bd1a0f1..4d884d8 100644
--- a/radio/V1_1/target/Android.mk
+++ b/graphics/mapper/V2_1/target_profiling/Android.mk
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalGraphicsMapperV2_1TargetProfiling
+VTS_CONFIG_SRC_DIR := testcases/hal/graphics/mapper/V2_1/target_profiling
 include test/vts/tools/build/Android.host_config.mk
diff --git a/graphics/mapper/V2_1/target_profiling/AndroidTest.xml b/graphics/mapper/V2_1/target_profiling/AndroidTest.xml
new file mode 100644
index 0000000..c192993
--- /dev/null
+++ b/graphics/mapper/V2_1/target_profiling/AndroidTest.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2017 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS VtsHalGraphicsMapperV2_1TargetProfiling test cases">
+    <option name="config-descriptor:metadata" key="plan" value="vts-hal-profiling" />
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="abort-on-push-failure" value="false"/>
+        <option name="push-group" value="HalHidlTargetProfilingTest.push"/>
+        <option name="cleanup" value="true"/>
+        <option name="push" value="DATA/lib/android.hardware.graphics.common@1.0-vts.profiler.so->/data/local/tmp/32/android.hardware.graphics.common@1.0-vts.profiler.so"/>
+        <option name="push" value="DATA/lib64/android.hardware.graphics.common@1.0-vts.profiler.so->/data/local/tmp/64/android.hardware.graphics.common@1.0-vts.profiler.so"/>
+        <option name="push" value="DATA/lib/android.hardware.graphics.common@1.1-vts.profiler.so->/data/local/tmp/32/android.hardware.graphics.common@1.1-vts.profiler.so"/>
+        <option name="push" value="DATA/lib64/android.hardware.graphics.common@1.1-vts.profiler.so->/data/local/tmp/64/android.hardware.graphics.common@1.1-vts.profiler.so"/>
+        <option name="push" value="DATA/lib/android.hardware.graphics.mapper@2.0-vts.profiler.so->/data/local/tmp/32/android.hardware.graphics.mapper@2.0-vts.profiler.so"/>
+        <option name="push" value="DATA/lib64/android.hardware.graphics.mapper@2.0-vts.profiler.so->/data/local/tmp/64/android.hardware.graphics.mapper@2.0-vts.profiler.so"/>
+        <option name="push" value="DATA/lib/android.hardware.graphics.mapper@2.1-vts.profiler.so->/data/local/tmp/32/android.hardware.graphics.mapper@2.1-vts.profiler.so"/>
+        <option name="push" value="DATA/lib64/android.hardware.graphics.mapper@2.1-vts.profiler.so->/data/local/tmp/64/android.hardware.graphics.mapper@2.1-vts.profiler.so"/>
+    </target_preparer>
+    <multi_target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
+    <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+        <option name="test-module-name" value="VtsHalGraphicsMapperV2_1TargetProfiling"/>
+        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalGraphicsMapperV2_1TargetTest/VtsHalGraphicsMapperV2_1TargetTest"/>
+        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalGraphicsMapperV2_1TargetTest/VtsHalGraphicsMapperV2_1TargetTest"/>
+        <option name="binary-test-type" value="hal_hidl_gtest"/>
+        <option name="binary-test-disable-framework" value="true"/>
+        <option name="binary-test-stop-native-servers" value="true"/>
+        <option name="enable-profiling" value="true"/>
+        <option name="test-timeout" value="5m"/>
+    </test>
+</configuration>
diff --git a/health/Android.bp b/health/Android.bp
deleted file mode 100644
index cdc8905..0000000
--- a/health/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "V1_0",
-]
diff --git a/health/V1_0/Android.bp b/health/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/health/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/health/V1_0/build/Android.bp b/health/V1_0/build/Android.bp
index ea7c913..ab8c0d5 100644
--- a/health/V1_0/build/Android.bp
+++ b/health/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.health@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.health@1.0_hal",
     ],
@@ -17,7 +18,7 @@
 genrule {
     name: "android.hardware.health@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.health@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/health/1.0/ $(genDir)/android/hardware/health/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.health@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/health/1.0/ $(genDir)/android/hardware/health/1.0/",
     srcs: [
         ":android.hardware.health@1.0_hal",
     ],
@@ -30,7 +31,7 @@
 genrule {
     name: "android.hardware.health@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.health@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/health/1.0/ $(genDir)/android/hardware/health/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.health@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/health/1.0/ $(genDir)/android/hardware/health/1.0/",
     srcs: [
         ":android.hardware.health@1.0_hal",
     ],
@@ -45,36 +46,10 @@
     generated_sources: ["android.hardware.health@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.health@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.health@1.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.health@1.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -82,7 +57,7 @@
 genrule {
     name: "android.hardware.health@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.health@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/health/1.0/ $(genDir)/android/hardware/health/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.health@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/health/1.0/ $(genDir)/android/hardware/health/1.0/",
     srcs: [
         ":android.hardware.health@1.0_hal",
     ],
@@ -95,7 +70,7 @@
 genrule {
     name: "android.hardware.health@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.health@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/health/1.0/ $(genDir)/android/hardware/health/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.health@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/health/1.0/ $(genDir)/android/hardware/health/1.0/",
     srcs: [
         ":android.hardware.health@1.0_hal",
     ],
@@ -110,27 +85,10 @@
     generated_sources: ["android.hardware.health@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.health@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.health@1.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.health@1.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/health/V1_0/target/AndroidTest.xml b/health/V1_0/target/AndroidTest.xml
index 6b70568..d4f7b6b 100644
--- a/health/V1_0/target/AndroidTest.xml
+++ b/health/V1_0/target/AndroidTest.xml
@@ -19,7 +19,6 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalHealthV1_0Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalHealthV1_0TargetTest/VtsHalHealthV1_0TargetTest"/>
@@ -27,7 +26,6 @@
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.health@1.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/health/V1_0/target_profiling/AndroidTest.xml b/health/V1_0/target_profiling/AndroidTest.xml
index 8171472..dd34242 100644
--- a/health/V1_0/target_profiling/AndroidTest.xml
+++ b/health/V1_0/target_profiling/AndroidTest.xml
@@ -22,7 +22,6 @@
         <option name="push" value="DATA/lib/android.hardware.health@1.0-vts.profiler.so->/data/local/tmp/32/android.hardware.health@1.0-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.health@1.0-vts.profiler.so->/data/local/tmp/64/android.hardware.health@1.0-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalHealthV1_0TargetProfiling"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalHealthV1_0TargetTest/VtsHalHealthV1_0TargetTest"/>
@@ -31,7 +30,6 @@
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.health@1.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/health/V2_0/build/Android.bp b/health/V2_0/build/Android.bp
new file mode 100644
index 0000000..81b17f4
--- /dev/null
+++ b/health/V2_0/build/Android.bp
@@ -0,0 +1,105 @@
+// This file was auto-generated. Do not edit manually.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
+
+// Generate .vts spec files.
+hal2vts {
+    name: "android.hardware.health@2.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
+    srcs: [
+        ":android.hardware.health@2.0_hal",
+    ],
+    out: [
+        "android/hardware/health/2.0/Health.vts",
+        "android/hardware/health/2.0/HealthInfoCallback.vts",
+        "android/hardware/health/2.0/types.vts",
+    ],
+}
+
+// Build VTS driver.
+genrule {
+    name: "android.hardware.health@2.0-vts.driver_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.health@2.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/health/2.0/ $(genDir)/android/hardware/health/2.0/",
+    srcs: [
+        ":android.hardware.health@2.0_hal",
+    ],
+    out: [
+        "android/hardware/health/2.0/Health.vts.cpp",
+        "android/hardware/health/2.0/HealthInfoCallback.vts.cpp",
+        "android/hardware/health/2.0/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.health@2.0-vts.driver_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.health@2.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/health/2.0/ $(genDir)/android/hardware/health/2.0/",
+    srcs: [
+        ":android.hardware.health@2.0_hal",
+    ],
+    out: [
+        "android/hardware/health/2.0/Health.vts.h",
+        "android/hardware/health/2.0/HealthInfoCallback.vts.h",
+        "android/hardware/health/2.0/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.health@2.0-vts.driver",
+    generated_sources: ["android.hardware.health@2.0-vts.driver_genc++"],
+    generated_headers: ["android.hardware.health@2.0-vts.driver_genc++_headers"],
+    export_generated_headers: ["android.hardware.health@2.0-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [
+        "android.hardware.health@1.0-vts.driver",
+    ],
+    static_libs: [
+        "android.hardware.health@1.0",
+        "android.hardware.health@2.0",
+    ],
+}
+
+// Build VTS profiler.
+genrule {
+    name: "android.hardware.health@2.0-vts.profiler_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.health@2.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/health/2.0/ $(genDir)/android/hardware/health/2.0/",
+    srcs: [
+        ":android.hardware.health@2.0_hal",
+    ],
+    out: [
+        "android/hardware/health/2.0/Health.vts.cpp",
+        "android/hardware/health/2.0/HealthInfoCallback.vts.cpp",
+        "android/hardware/health/2.0/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.health@2.0-vts.profiler_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.health@2.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/health/2.0/ $(genDir)/android/hardware/health/2.0/",
+    srcs: [
+        ":android.hardware.health@2.0_hal",
+    ],
+    out: [
+        "android/hardware/health/2.0/Health.vts.h",
+        "android/hardware/health/2.0/HealthInfoCallback.vts.h",
+        "android/hardware/health/2.0/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.health@2.0-vts.profiler",
+    generated_sources: ["android.hardware.health@2.0-vts.profiler_genc++"],
+    generated_headers: ["android.hardware.health@2.0-vts.profiler_genc++_headers"],
+    export_generated_headers: ["android.hardware.health@2.0-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [
+        "android.hardware.health@1.0-vts.profiler",
+    ],
+    static_libs: [
+        "android.hardware.health@1.0",
+        "android.hardware.health@2.0",
+    ],
+}
+
diff --git a/radio/V1_1/target/Android.mk b/health/V2_0/target/Android.mk
similarity index 88%
copy from radio/V1_1/target/Android.mk
copy to health/V2_0/target/Android.mk
index bd1a0f1..9724c2d 100644
--- a/radio/V1_1/target/Android.mk
+++ b/health/V2_0/target/Android.mk
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalHealthV2_0Target
+VTS_CONFIG_SRC_DIR := testcases/hal/health/V2_0/target
 include test/vts/tools/build/Android.host_config.mk
diff --git a/radio/V1_1/target/AndroidTest.xml b/health/V2_0/target/AndroidTest.xml
similarity index 73%
copy from radio/V1_1/target/AndroidTest.xml
copy to health/V2_0/target/AndroidTest.xml
index 76b339d..c4b8d5f 100644
--- a/radio/V1_1/target/AndroidTest.xml
+++ b/health/V2_0/target/AndroidTest.xml
@@ -13,21 +13,20 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Config for VTS VtsHalRadioV1_1Target test cases">
+<configuration description="Config for VTS VtsHalHealthV2_0Target test cases">
     <option name="config-descriptor:metadata" key="plan" value="vts-hal" />
     <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
+    <multi_target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
-        <option name="test-module-name" value="VtsHalRadioV1_1Target"/>
-        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalRadioV1_1TargetTest/VtsHalRadioV1_1TargetTest"/>
-        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalRadioV1_1TargetTest/VtsHalRadioV1_1TargetTest"/>
+        <option name="test-module-name" value="VtsHalHealthV2_0Target"/>
+        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalHealthV2_0TargetTest/VtsHalHealthV2_0TargetTest"/>
+        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalHealthV2_0TargetTest/VtsHalHealthV2_0TargetTest"/>
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.radio@1.1"/>
-        <option name="test-timeout" value="15m"/>
+        <option name="test-timeout" value="1m"/>
     </test>
 </configuration>
diff --git a/ir/Android.bp b/ir/Android.bp
deleted file mode 100644
index cdc8905..0000000
--- a/ir/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "V1_0",
-]
diff --git a/ir/V1_0/Android.bp b/ir/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/ir/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/ir/V1_0/build/Android.bp b/ir/V1_0/build/Android.bp
index 2b91e17..4186225 100644
--- a/ir/V1_0/build/Android.bp
+++ b/ir/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.ir@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.ir@1.0_hal",
     ],
@@ -17,7 +18,7 @@
 genrule {
     name: "android.hardware.ir@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.ir@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/ir/1.0/ $(genDir)/android/hardware/ir/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.ir@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/ir/1.0/ $(genDir)/android/hardware/ir/1.0/",
     srcs: [
         ":android.hardware.ir@1.0_hal",
     ],
@@ -30,7 +31,7 @@
 genrule {
     name: "android.hardware.ir@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.ir@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/ir/1.0/ $(genDir)/android/hardware/ir/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.ir@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/ir/1.0/ $(genDir)/android/hardware/ir/1.0/",
     srcs: [
         ":android.hardware.ir@1.0_hal",
     ],
@@ -45,36 +46,10 @@
     generated_sources: ["android.hardware.ir@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.ir@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.ir@1.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.ir@1.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -82,7 +57,7 @@
 genrule {
     name: "android.hardware.ir@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.ir@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/ir/1.0/ $(genDir)/android/hardware/ir/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.ir@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/ir/1.0/ $(genDir)/android/hardware/ir/1.0/",
     srcs: [
         ":android.hardware.ir@1.0_hal",
     ],
@@ -95,7 +70,7 @@
 genrule {
     name: "android.hardware.ir@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.ir@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/ir/1.0/ $(genDir)/android/hardware/ir/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.ir@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/ir/1.0/ $(genDir)/android/hardware/ir/1.0/",
     srcs: [
         ":android.hardware.ir@1.0_hal",
     ],
@@ -110,27 +85,10 @@
     generated_sources: ["android.hardware.ir@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.ir@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.ir@1.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.ir@1.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/ir/V1_0/target/AndroidTest.xml b/ir/V1_0/target/AndroidTest.xml
index 8342117..e88f0a6 100644
--- a/ir/V1_0/target/AndroidTest.xml
+++ b/ir/V1_0/target/AndroidTest.xml
@@ -19,7 +19,6 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalIrV1_0Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalIrV1_0TargetTest/VtsHalIrV1_0TargetTest"/>
@@ -27,7 +26,6 @@
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.ir@1.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/ir/V1_0/target_profiling/AndroidTest.xml b/ir/V1_0/target_profiling/AndroidTest.xml
index 27533e6..af51c8f 100644
--- a/ir/V1_0/target_profiling/AndroidTest.xml
+++ b/ir/V1_0/target_profiling/AndroidTest.xml
@@ -22,7 +22,6 @@
         <option name="push" value="DATA/lib/android.hardware.ir@1.0-vts.profiler.so->/data/local/tmp/32/android.hardware.ir@1.0-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.ir@1.0-vts.profiler.so->/data/local/tmp/64/android.hardware.ir@1.0-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalIrV1_0TargetProfiling"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalIrV1_0TargetTest/VtsHalIrV1_0TargetTest"/>
@@ -31,7 +30,6 @@
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.ir@1.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/keymaster/Android.bp b/keymaster/Android.bp
deleted file mode 100644
index 6f7b8de..0000000
--- a/keymaster/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "V3_0",
-]
diff --git a/keymaster/V3_0/Android.bp b/keymaster/V3_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/keymaster/V3_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/keymaster/V3_0/build/Android.bp b/keymaster/V3_0/build/Android.bp
index c8f9127..13015d1 100644
--- a/keymaster/V3_0/build/Android.bp
+++ b/keymaster/V3_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.keymaster@3.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.keymaster@3.0_hal",
     ],
@@ -17,7 +18,7 @@
 genrule {
     name: "android.hardware.keymaster@3.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.keymaster@3.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/keymaster/3.0/ $(genDir)/android/hardware/keymaster/3.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.keymaster@3.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/keymaster/3.0/ $(genDir)/android/hardware/keymaster/3.0/",
     srcs: [
         ":android.hardware.keymaster@3.0_hal",
     ],
@@ -30,7 +31,7 @@
 genrule {
     name: "android.hardware.keymaster@3.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.keymaster@3.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/keymaster/3.0/ $(genDir)/android/hardware/keymaster/3.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.keymaster@3.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/keymaster/3.0/ $(genDir)/android/hardware/keymaster/3.0/",
     srcs: [
         ":android.hardware.keymaster@3.0_hal",
     ],
@@ -45,36 +46,10 @@
     generated_sources: ["android.hardware.keymaster@3.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.keymaster@3.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.keymaster@3.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.keymaster@3.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -82,7 +57,7 @@
 genrule {
     name: "android.hardware.keymaster@3.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.keymaster@3.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/keymaster/3.0/ $(genDir)/android/hardware/keymaster/3.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.keymaster@3.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/keymaster/3.0/ $(genDir)/android/hardware/keymaster/3.0/",
     srcs: [
         ":android.hardware.keymaster@3.0_hal",
     ],
@@ -95,7 +70,7 @@
 genrule {
     name: "android.hardware.keymaster@3.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.keymaster@3.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/keymaster/3.0/ $(genDir)/android/hardware/keymaster/3.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.keymaster@3.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/keymaster/3.0/ $(genDir)/android/hardware/keymaster/3.0/",
     srcs: [
         ":android.hardware.keymaster@3.0_hal",
     ],
@@ -110,27 +85,10 @@
     generated_sources: ["android.hardware.keymaster@3.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.keymaster@3.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.keymaster@3.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.keymaster@3.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/keymaster/V3_0/target/AndroidTest.xml b/keymaster/V3_0/target/AndroidTest.xml
index 440962c..9a2de0d 100644
--- a/keymaster/V3_0/target/AndroidTest.xml
+++ b/keymaster/V3_0/target/AndroidTest.xml
@@ -19,13 +19,11 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlHostTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalKeymasterV3_0Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalKeymasterV3_0TargetTest/VtsHalKeymasterV3_0TargetTest" />
         <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalKeymasterV3_0TargetTest/VtsHalKeymasterV3_0TargetTest" />
         <option name="binary-test-type" value="hal_hidl_gtest"/>
-        <option name="precondition-lshal" value="android.hardware.keymaster@3.0"/>
         <option name="test-timeout" value="15m"/>
     </test>
 </configuration>
diff --git a/keymaster/V3_0/target_profiling/AndroidTest.xml b/keymaster/V3_0/target_profiling/AndroidTest.xml
index 2c04d10..f9680b9 100644
--- a/keymaster/V3_0/target_profiling/AndroidTest.xml
+++ b/keymaster/V3_0/target_profiling/AndroidTest.xml
@@ -17,17 +17,15 @@
     <option name="config-descriptor:metadata" key="plan" value="vts-hal-profiling" />
     <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
         <option name="abort-on-push-failure" value="false"/>
-        <option name="push-group" value="HalHidlHostTest.push"/>
+        <option name="push-group" value="HalHidlTargetProfilingTest.push"/>
         <option name="push" value="DATA/lib/android.hardware.keymaster@3.0-vts.profiler.so->/data/local/tmp/32/android.hardware.keymaster@3.0-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.keymaster@3.0-vts.profiler.so->/data/local/tmp/64/android.hardware.keymaster@3.0-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalKeymasterV3_0TargetProfiling"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalKeymasterV3_0TargetTest/VtsHalKeymasterV3_0TargetTest" />
         <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalKeymasterV3_0TargetTest/VtsHalKeymasterV3_0TargetTest" />
         <option name="binary-test-type" value="hal_hidl_gtest"/>
-        <option name="precondition-lshal" value="android.hardware.keymaster@3.0"/>
         <option name="enable-profiling" value="true"/>
         <option name="test-timeout" value="15m"/>
     </test>
diff --git a/keymaster/V3_0/target_replay/AndroidTest.xml b/keymaster/V3_0/target_replay/AndroidTest.xml
index a368a65..1ad3960 100644
--- a/keymaster/V3_0/target_replay/AndroidTest.xml
+++ b/keymaster/V3_0/target_replay/AndroidTest.xml
@@ -24,14 +24,11 @@
         <option name="push" value="DATA/lib/android.hardware.keymaster@3.0-vts.driver.so->/data/local/tmp/32/android.hardware.keymaster@3.0-vts.driver.so"/>
         <option name="push" value="DATA/lib64/android.hardware.keymaster@3.0-vts.driver.so->/data/local/tmp/64/android.hardware.keymaster@3.0-vts.driver.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalKeymasterV3_0TargetReplay"/>
         <option name="binary-test-type" value="hal_hidl_replay_test"/>
         <option name="hal-hidl-replay-test-trace-path" value="test/vts-testcase/hal-trace/keymaster/V3_0/android.hardware.keymaster_3.0_40741352389.vts.trace"/>
         <option name="hal-hidl-replay-test-trace-path" value="test/vts-testcase/hal-trace/keymaster/V3_0/android.hardware.keymaster_3.0_203096852418.vts.trace"/>
-        <option name="hal-hidl-package-name" value="android.hardware.keymaster@3.0"/>
-        <option name="precondition-lshal" value="android.hardware.keymaster@3.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/keymaster/V4_0/build/Android.bp b/keymaster/V4_0/build/Android.bp
new file mode 100644
index 0000000..b5256f9
--- /dev/null
+++ b/keymaster/V4_0/build/Android.bp
@@ -0,0 +1,94 @@
+// This file was auto-generated. Do not edit manually.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
+
+// Generate .vts spec files.
+hal2vts {
+    name: "android.hardware.keymaster@4.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
+    srcs: [
+        ":android.hardware.keymaster@4.0_hal",
+    ],
+    out: [
+        "android/hardware/keymaster/4.0/KeymasterDevice.vts",
+        "android/hardware/keymaster/4.0/types.vts",
+    ],
+}
+
+// Build VTS driver.
+genrule {
+    name: "android.hardware.keymaster@4.0-vts.driver_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.keymaster@4.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/keymaster/4.0/ $(genDir)/android/hardware/keymaster/4.0/",
+    srcs: [
+        ":android.hardware.keymaster@4.0_hal",
+    ],
+    out: [
+        "android/hardware/keymaster/4.0/KeymasterDevice.vts.cpp",
+        "android/hardware/keymaster/4.0/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.keymaster@4.0-vts.driver_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.keymaster@4.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/keymaster/4.0/ $(genDir)/android/hardware/keymaster/4.0/",
+    srcs: [
+        ":android.hardware.keymaster@4.0_hal",
+    ],
+    out: [
+        "android/hardware/keymaster/4.0/KeymasterDevice.vts.h",
+        "android/hardware/keymaster/4.0/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.keymaster@4.0-vts.driver",
+    generated_sources: ["android.hardware.keymaster@4.0-vts.driver_genc++"],
+    generated_headers: ["android.hardware.keymaster@4.0-vts.driver_genc++_headers"],
+    export_generated_headers: ["android.hardware.keymaster@4.0-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
+        "android.hardware.keymaster@4.0",
+    ],
+}
+
+// Build VTS profiler.
+genrule {
+    name: "android.hardware.keymaster@4.0-vts.profiler_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.keymaster@4.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/keymaster/4.0/ $(genDir)/android/hardware/keymaster/4.0/",
+    srcs: [
+        ":android.hardware.keymaster@4.0_hal",
+    ],
+    out: [
+        "android/hardware/keymaster/4.0/KeymasterDevice.vts.cpp",
+        "android/hardware/keymaster/4.0/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.keymaster@4.0-vts.profiler_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.keymaster@4.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/keymaster/4.0/ $(genDir)/android/hardware/keymaster/4.0/",
+    srcs: [
+        ":android.hardware.keymaster@4.0_hal",
+    ],
+    out: [
+        "android/hardware/keymaster/4.0/KeymasterDevice.vts.h",
+        "android/hardware/keymaster/4.0/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.keymaster@4.0-vts.profiler",
+    generated_sources: ["android.hardware.keymaster@4.0-vts.profiler_genc++"],
+    generated_headers: ["android.hardware.keymaster@4.0-vts.profiler_genc++_headers"],
+    export_generated_headers: ["android.hardware.keymaster@4.0-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
+        "android.hardware.keymaster@4.0",
+    ],
+}
+
diff --git a/radio/V1_1/target/Android.mk b/keymaster/V4_0/target/Android.mk
similarity index 80%
copy from radio/V1_1/target/Android.mk
copy to keymaster/V4_0/target/Android.mk
index bd1a0f1..05d5f8f 100644
--- a/radio/V1_1/target/Android.mk
+++ b/keymaster/V4_0/target/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalKeymasterV4_0Target
+VTS_CONFIG_SRC_DIR := testcases/hal/keymaster/V4_0/target
 include test/vts/tools/build/Android.host_config.mk
diff --git a/radio/V1_1/target/AndroidTest.xml b/keymaster/V4_0/target/AndroidTest.xml
similarity index 62%
copy from radio/V1_1/target/AndroidTest.xml
copy to keymaster/V4_0/target/AndroidTest.xml
index 76b339d..bc26d87 100644
--- a/radio/V1_1/target/AndroidTest.xml
+++ b/keymaster/V4_0/target/AndroidTest.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2017 The Android Open Source Project
+<!-- Copyright (C) 2018 The Android Open Source Project
 
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
@@ -13,21 +13,18 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Config for VTS VtsHalRadioV1_1Target test cases">
+<configuration description="Config for VTS VtsHalKeymasterV4_0Target test cases">
     <option name="config-descriptor:metadata" key="plan" value="vts-hal" />
     <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
         <option name="abort-on-push-failure" value="false"/>
-        <option name="push-group" value="HalHidlTargetTest.push"/>
+        <option name="push-group" value="HalHidlHostTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
+    <multi_target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
-        <option name="test-module-name" value="VtsHalRadioV1_1Target"/>
-        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalRadioV1_1TargetTest/VtsHalRadioV1_1TargetTest"/>
-        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalRadioV1_1TargetTest/VtsHalRadioV1_1TargetTest"/>
+        <option name="test-module-name" value="VtsHalKeymasterV4_0Target"/>
+        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalKeymasterV4_0TargetTest/VtsHalKeymasterV4_0TargetTest" />
+        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalKeymasterV4_0TargetTest/VtsHalKeymasterV4_0TargetTest" />
         <option name="binary-test-type" value="hal_hidl_gtest"/>
-        <option name="binary-test-disable-framework" value="true"/>
-        <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.radio@1.1"/>
         <option name="test-timeout" value="15m"/>
     </test>
 </configuration>
diff --git a/radio/V1_1/target/Android.mk b/keymaster/V4_0/target_profiling/Android.mk
similarity index 78%
copy from radio/V1_1/target/Android.mk
copy to keymaster/V4_0/target_profiling/Android.mk
index bd1a0f1..7e3f2e4 100644
--- a/radio/V1_1/target/Android.mk
+++ b/keymaster/V4_0/target_profiling/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalKeymasterV4_0TargetProfiling
+VTS_CONFIG_SRC_DIR := testcases/hal/keymaster/V4_0/target_profiling
 include test/vts/tools/build/Android.host_config.mk
diff --git a/keymaster/V4_0/target_profiling/AndroidTest.xml b/keymaster/V4_0/target_profiling/AndroidTest.xml
new file mode 100644
index 0000000..0bbb497
--- /dev/null
+++ b/keymaster/V4_0/target_profiling/AndroidTest.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS VtsHalKeymasterV4_0TargetProfiling test cases">
+    <option name="config-descriptor:metadata" key="plan" value="vts-hal-profiling" />
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="abort-on-push-failure" value="false"/>
+        <option name="push-group" value="HalHidlTargetProfilingTest.push"/>
+        <option name="push" value="DATA/lib/android.hardware.keymaster@4.0-vts.profiler.so->/data/local/tmp/32/android.hardware.keymaster@4.0-vts.profiler.so"/>
+        <option name="push" value="DATA/lib64/android.hardware.keymaster@4.0-vts.profiler.so->/data/local/tmp/64/android.hardware.keymaster@4.0-vts.profiler.so"/>
+    </target_preparer>
+    <multi_target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
+    <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+        <option name="test-module-name" value="VtsHalKeymasterV4_0TargetProfiling"/>
+        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalKeymasterV4_0TargetTest/VtsHalKeymasterV4_0TargetTest" />
+        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalKeymasterV4_0TargetTest/VtsHalKeymasterV4_0TargetTest" />
+        <option name="binary-test-type" value="hal_hidl_gtest"/>
+        <option name="enable-profiling" value="true"/>
+        <option name="test-timeout" value="15m"/>
+    </test>
+</configuration>
diff --git a/light/Android.bp b/light/Android.bp
deleted file mode 100644
index fb60e6b..0000000
--- a/light/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "V2_0",
-]
diff --git a/light/V2_0/Android.bp b/light/V2_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/light/V2_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/light/V2_0/build/Android.bp b/light/V2_0/build/Android.bp
index ea2a888..715d9bc 100644
--- a/light/V2_0/build/Android.bp
+++ b/light/V2_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.light@2.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.light@2.0_hal",
     ],
@@ -17,7 +18,7 @@
 genrule {
     name: "android.hardware.light@2.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.light@2.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/light/2.0/ $(genDir)/android/hardware/light/2.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.light@2.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/light/2.0/ $(genDir)/android/hardware/light/2.0/",
     srcs: [
         ":android.hardware.light@2.0_hal",
     ],
@@ -30,7 +31,7 @@
 genrule {
     name: "android.hardware.light@2.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.light@2.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/light/2.0/ $(genDir)/android/hardware/light/2.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.light@2.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/light/2.0/ $(genDir)/android/hardware/light/2.0/",
     srcs: [
         ":android.hardware.light@2.0_hal",
     ],
@@ -45,36 +46,10 @@
     generated_sources: ["android.hardware.light@2.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.light@2.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.light@2.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.light@2.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -82,7 +57,7 @@
 genrule {
     name: "android.hardware.light@2.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.light@2.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/light/2.0/ $(genDir)/android/hardware/light/2.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.light@2.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/light/2.0/ $(genDir)/android/hardware/light/2.0/",
     srcs: [
         ":android.hardware.light@2.0_hal",
     ],
@@ -95,7 +70,7 @@
 genrule {
     name: "android.hardware.light@2.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.light@2.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/light/2.0/ $(genDir)/android/hardware/light/2.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.light@2.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/light/2.0/ $(genDir)/android/hardware/light/2.0/",
     srcs: [
         ":android.hardware.light@2.0_hal",
     ],
@@ -110,27 +85,10 @@
     generated_sources: ["android.hardware.light@2.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.light@2.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.light@2.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.light@2.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/light/V2_0/target/AndroidTest.xml b/light/V2_0/target/AndroidTest.xml
index d10b6a2..4e482ab 100644
--- a/light/V2_0/target/AndroidTest.xml
+++ b/light/V2_0/target/AndroidTest.xml
@@ -19,7 +19,6 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalLightV2_0Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalLightV2_0TargetTest/VtsHalLightV2_0TargetTest"/>
@@ -27,7 +26,6 @@
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.light@2.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/light/V2_0/target_profiling/AndroidTest.xml b/light/V2_0/target_profiling/AndroidTest.xml
index c89bdbb..5d900ae 100644
--- a/light/V2_0/target_profiling/AndroidTest.xml
+++ b/light/V2_0/target_profiling/AndroidTest.xml
@@ -22,7 +22,6 @@
         <option name="push" value="DATA/lib/android.hardware.light@2.0-vts.profiler.so->/data/local/tmp/32/android.hardware.light@2.0-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.light@2.0-vts.profiler.so->/data/local/tmp/64/android.hardware.light@2.0-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalLightV2_0TargetProfiling"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalLightV2_0TargetTest/VtsHalLightV2_0TargetTest"/>
@@ -31,7 +30,6 @@
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.light@2.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/light/V2_0/target_replay/AndroidTest.xml b/light/V2_0/target_replay/AndroidTest.xml
index cbe4ab5..3924899 100644
--- a/light/V2_0/target_replay/AndroidTest.xml
+++ b/light/V2_0/target_replay/AndroidTest.xml
@@ -24,14 +24,11 @@
         <option name="push" value="DATA/lib/android.hardware.light@2.0-vts.driver.so->/data/local/tmp/32/android.hardware.light@2.0-vts.driver.so"/>
         <option name="push" value="DATA/lib64/android.hardware.light@2.0-vts.driver.so->/data/local/tmp/64/android.hardware.light@2.0-vts.driver.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalLightV2_0TargetReplay"/>
         <option name="binary-test-type" value="hal_hidl_replay_test"/>
         <option name="hal-hidl-replay-test-trace-path" value="test/vts-testcase/hal-trace/light/V2_0/android.hardware.light_2.0_19050569395.vts.trace"/>
         <option name="hal-hidl-replay-test-trace-path" value="test/vts-testcase/hal-trace/light/V2_0/android.hardware.light_2.0_17887988342.vts.trace"/>
-        <option name="hal-hidl-package-name" value="android.hardware.light@2.0"/>
-        <option name="precondition-lshal" value="android.hardware.light@2.0"/>
         <option name="test-timeout" value="5m" />
     </test>
 </configuration>
diff --git a/media/Android.bp b/media/Android.bp
deleted file mode 100644
index 341491e..0000000
--- a/media/Android.bp
+++ /dev/null
@@ -1,7 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "V1_0",
-    "omx/V1_0",
-]
diff --git a/media/V1_0/Android.bp b/media/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/media/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/media/V1_0/build/Android.bp b/media/V1_0/build/Android.bp
index 1ea4f95..4699b8c 100644
--- a/media/V1_0/build/Android.bp
+++ b/media/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.media@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.media@1.0_hal",
     ],
@@ -16,7 +17,7 @@
 genrule {
     name: "android.hardware.media@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.media@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/media/1.0/ $(genDir)/android/hardware/media/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.media@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/media/1.0/ $(genDir)/android/hardware/media/1.0/",
     srcs: [
         ":android.hardware.media@1.0_hal",
     ],
@@ -28,7 +29,7 @@
 genrule {
     name: "android.hardware.media@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.media@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/media/1.0/ $(genDir)/android/hardware/media/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.media@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/media/1.0/ $(genDir)/android/hardware/media/1.0/",
     srcs: [
         ":android.hardware.media@1.0_hal",
     ],
@@ -42,38 +43,13 @@
     generated_sources: ["android.hardware.media@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.media@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.media@1.0-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
     shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+        "android.hardware.graphics.common@1.0-vts.driver",
+    ],
+    static_libs: [
+        "android.hardware.graphics.common@1.0",
         "android.hardware.media@1.0",
-        "android.hardware.graphics.common@1.0",
-        "android.hardware.graphics.common@1.0-vts.driver",
-    ],
-    export_shared_lib_headers: [
-        "android.hardware.graphics.common@1.0",
-        "android.hardware.graphics.common@1.0-vts.driver",
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -81,7 +57,7 @@
 genrule {
     name: "android.hardware.media@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.media@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/media/1.0/ $(genDir)/android/hardware/media/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.media@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/media/1.0/ $(genDir)/android/hardware/media/1.0/",
     srcs: [
         ":android.hardware.media@1.0_hal",
     ],
@@ -93,7 +69,7 @@
 genrule {
     name: "android.hardware.media@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.media@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/media/1.0/ $(genDir)/android/hardware/media/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.media@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/media/1.0/ $(genDir)/android/hardware/media/1.0/",
     srcs: [
         ":android.hardware.media@1.0_hal",
     ],
@@ -107,28 +83,13 @@
     generated_sources: ["android.hardware.media@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.media@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.media@1.0-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
     shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
-        "android.hardware.media@1.0",
-        "android.hardware.graphics.common@1.0",
         "android.hardware.graphics.common@1.0-vts.profiler",
     ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
+    static_libs: [
+        "android.hardware.graphics.common@1.0",
+        "android.hardware.media@1.0",
     ],
 }
 
diff --git a/media/bufferpool/V1_0/build/Android.bp b/media/bufferpool/V1_0/build/Android.bp
new file mode 100644
index 0000000..a585f2d
--- /dev/null
+++ b/media/bufferpool/V1_0/build/Android.bp
@@ -0,0 +1,104 @@
+// This file was auto-generated. Do not edit manually.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
+
+// Generate .vts spec files.
+hal2vts {
+    name: "android.hardware.media.bufferpool@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
+    srcs: [
+        ":android.hardware.media.bufferpool@1.0_hal",
+    ],
+    out: [
+        "android/hardware/media/bufferpool/1.0/Accessor.vts",
+        "android/hardware/media/bufferpool/1.0/ClientManager.vts",
+        "android/hardware/media/bufferpool/1.0/Connection.vts",
+        "android/hardware/media/bufferpool/1.0/types.vts",
+    ],
+}
+
+// Build VTS driver.
+genrule {
+    name: "android.hardware.media.bufferpool@1.0-vts.driver_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.media.bufferpool@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/media/bufferpool/1.0/ $(genDir)/android/hardware/media/bufferpool/1.0/",
+    srcs: [
+        ":android.hardware.media.bufferpool@1.0_hal",
+    ],
+    out: [
+        "android/hardware/media/bufferpool/1.0/Accessor.vts.cpp",
+        "android/hardware/media/bufferpool/1.0/ClientManager.vts.cpp",
+        "android/hardware/media/bufferpool/1.0/Connection.vts.cpp",
+        "android/hardware/media/bufferpool/1.0/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.media.bufferpool@1.0-vts.driver_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.media.bufferpool@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/media/bufferpool/1.0/ $(genDir)/android/hardware/media/bufferpool/1.0/",
+    srcs: [
+        ":android.hardware.media.bufferpool@1.0_hal",
+    ],
+    out: [
+        "android/hardware/media/bufferpool/1.0/Accessor.vts.h",
+        "android/hardware/media/bufferpool/1.0/ClientManager.vts.h",
+        "android/hardware/media/bufferpool/1.0/Connection.vts.h",
+        "android/hardware/media/bufferpool/1.0/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.media.bufferpool@1.0-vts.driver",
+    generated_sources: ["android.hardware.media.bufferpool@1.0-vts.driver_genc++"],
+    generated_headers: ["android.hardware.media.bufferpool@1.0-vts.driver_genc++_headers"],
+    export_generated_headers: ["android.hardware.media.bufferpool@1.0-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
+        "android.hardware.media.bufferpool@1.0",
+    ],
+}
+
+// Build VTS profiler.
+genrule {
+    name: "android.hardware.media.bufferpool@1.0-vts.profiler_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.media.bufferpool@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/media/bufferpool/1.0/ $(genDir)/android/hardware/media/bufferpool/1.0/",
+    srcs: [
+        ":android.hardware.media.bufferpool@1.0_hal",
+    ],
+    out: [
+        "android/hardware/media/bufferpool/1.0/Accessor.vts.cpp",
+        "android/hardware/media/bufferpool/1.0/ClientManager.vts.cpp",
+        "android/hardware/media/bufferpool/1.0/Connection.vts.cpp",
+        "android/hardware/media/bufferpool/1.0/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.media.bufferpool@1.0-vts.profiler_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.media.bufferpool@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/media/bufferpool/1.0/ $(genDir)/android/hardware/media/bufferpool/1.0/",
+    srcs: [
+        ":android.hardware.media.bufferpool@1.0_hal",
+    ],
+    out: [
+        "android/hardware/media/bufferpool/1.0/Accessor.vts.h",
+        "android/hardware/media/bufferpool/1.0/ClientManager.vts.h",
+        "android/hardware/media/bufferpool/1.0/Connection.vts.h",
+        "android/hardware/media/bufferpool/1.0/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.media.bufferpool@1.0-vts.profiler",
+    generated_sources: ["android.hardware.media.bufferpool@1.0-vts.profiler_genc++"],
+    generated_headers: ["android.hardware.media.bufferpool@1.0-vts.profiler_genc++_headers"],
+    export_generated_headers: ["android.hardware.media.bufferpool@1.0-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
+        "android.hardware.media.bufferpool@1.0",
+    ],
+}
+
diff --git a/media/omx/V1_0/Android.bp b/media/omx/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/media/omx/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/media/omx/V1_0/build/Android.bp b/media/omx/V1_0/build/Android.bp
index 0465545..a58fff3 100644
--- a/media/omx/V1_0/build/Android.bp
+++ b/media/omx/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.media.omx@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.media.omx@1.0_hal",
     ],
@@ -22,7 +23,7 @@
 genrule {
     name: "android.hardware.media.omx@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.media.omx@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/media/omx/1.0/ $(genDir)/android/hardware/media/omx/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.media.omx@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/media/omx/1.0/ $(genDir)/android/hardware/media/omx/1.0/",
     srcs: [
         ":android.hardware.media.omx@1.0_hal",
     ],
@@ -40,7 +41,7 @@
 genrule {
     name: "android.hardware.media.omx@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.media.omx@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/media/omx/1.0/ $(genDir)/android/hardware/media/omx/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.media.omx@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/media/omx/1.0/ $(genDir)/android/hardware/media/omx/1.0/",
     srcs: [
         ":android.hardware.media.omx@1.0_hal",
     ],
@@ -60,46 +61,17 @@
     generated_sources: ["android.hardware.media.omx@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.media.omx@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.media.omx@1.0-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
     shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+        "android.hardware.graphics.bufferqueue@1.0-vts.driver",
+        "android.hardware.graphics.common@1.0-vts.driver",
+        "android.hardware.media@1.0-vts.driver",
+    ],
+    static_libs: [
+        "android.hardware.graphics.bufferqueue@1.0",
+        "android.hardware.graphics.common@1.0",
         "android.hardware.media.omx@1.0",
-        "android.hardware.graphics.bufferqueue@1.0",
-        "android.hardware.graphics.bufferqueue@1.0-vts.driver",
-        "android.hardware.graphics.common@1.0",
-        "android.hardware.graphics.common@1.0-vts.driver",
         "android.hardware.media@1.0",
-        "android.hardware.media@1.0-vts.driver",
-    ],
-    export_shared_lib_headers: [
-        "android.hardware.graphics.bufferqueue@1.0",
-        "android.hardware.graphics.bufferqueue@1.0-vts.driver",
-        "android.hardware.graphics.common@1.0",
-        "android.hardware.graphics.common@1.0-vts.driver",
-        "android.hardware.media@1.0",
-        "android.hardware.media@1.0-vts.driver",
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -107,7 +79,7 @@
 genrule {
     name: "android.hardware.media.omx@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.media.omx@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/media/omx/1.0/ $(genDir)/android/hardware/media/omx/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.media.omx@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/media/omx/1.0/ $(genDir)/android/hardware/media/omx/1.0/",
     srcs: [
         ":android.hardware.media.omx@1.0_hal",
     ],
@@ -125,7 +97,7 @@
 genrule {
     name: "android.hardware.media.omx@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.media.omx@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/media/omx/1.0/ $(genDir)/android/hardware/media/omx/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.media.omx@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/media/omx/1.0/ $(genDir)/android/hardware/media/omx/1.0/",
     srcs: [
         ":android.hardware.media.omx@1.0_hal",
     ],
@@ -145,32 +117,17 @@
     generated_sources: ["android.hardware.media.omx@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.media.omx@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.media.omx@1.0-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
     shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
-        "android.hardware.media.omx@1.0",
-        "android.hardware.graphics.bufferqueue@1.0",
         "android.hardware.graphics.bufferqueue@1.0-vts.profiler",
-        "android.hardware.graphics.common@1.0",
         "android.hardware.graphics.common@1.0-vts.profiler",
-        "android.hardware.media@1.0",
         "android.hardware.media@1.0-vts.profiler",
     ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
+    static_libs: [
+        "android.hardware.graphics.bufferqueue@1.0",
+        "android.hardware.graphics.common@1.0",
+        "android.hardware.media.omx@1.0",
+        "android.hardware.media@1.0",
     ],
 }
 
diff --git a/media/omx/V1_0/host/AndroidTest.xml b/media/omx/V1_0/host/AndroidTest.xml
index 212af0a..3e82fed 100644
--- a/media/omx/V1_0/host/AndroidTest.xml
+++ b/media/omx/V1_0/host/AndroidTest.xml
@@ -86,7 +86,6 @@
         <option name="push" value="DATA/media/res/bbb_raw_1ch_8khz_s32le.raw->/sdcard/media/bbb_raw_1ch_8khz_s32le.raw"/>
         <option name="push" value="DATA/media/res/bbb_raw_1ch_8khz_s32le.info->/sdcard/media/bbb_raw_1ch_8khz_s32le.info"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalMediaOmxV1_0Host"/>
         <option name="test-case-path" value="vts/testcases/hal/media/omx/V1_0/host/VtsHalMediaOmxV1_0HostTest"/>
@@ -103,8 +102,6 @@
         <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalMediaOmxV1_0TargetVideoDecTest/VtsHalMediaOmxV1_0TargetVideoDecTest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="hal-hidl-package-name" value="android.hardware.media.omx@1.0"/>
-        <option name="precondition-lshal" value="android.hardware.media.omx@1.0"/>
         <option name="test-timeout" value="2h"/>
         <option name="runtime-hint" value="10m"/>
     </test>
diff --git a/media/omx/V1_0/host/VtsHalMediaOmxV1_0HostTest.py b/media/omx/V1_0/host/VtsHalMediaOmxV1_0HostTest.py
index 338c1d9..96939fa 100644
--- a/media/omx/V1_0/host/VtsHalMediaOmxV1_0HostTest.py
+++ b/media/omx/V1_0/host/VtsHalMediaOmxV1_0HostTest.py
@@ -15,6 +15,7 @@
 # limitations under the License.
 #
 
+import copy
 import logging
 import time
 
@@ -22,7 +23,6 @@
 from vts.runners.host import keys
 from vts.runners.host import test_runner
 from vts.testcases.template.hal_hidl_gtest import hal_hidl_gtest
-import VtsHalMediaOmxV1_0TestCase as omx_test_case
 
 
 class VtsHalMediaOmxV1_0Host(hal_hidl_gtest.HidlHalGTest):
@@ -116,12 +116,11 @@
                         continue
                     if self.VIDEO_DEC_TEST in test_suite and not "video_decoder" in role:
                         continue
-                    test_name = component + '_' + role
-                    # TODO (zhuoyao): get instance name using lshal.
-                    instance_name = "default"
-                    test_case = omx_test_case.VtsHalMediaOmxV1_0TestCase(
-                        component, role, instance_name, test_suite, test_name,
-                        path, tag)
+
+                    test_case = copy.copy(gtest_case)
+                    test_case.args += " -C " + component
+                    test_case.args += " -R " + role
+                    test_case.name_appendix = '_' + component + '_' + role + test_case.name_appendix
                     test_cases.append(test_case)
         logging.info("num of test_testcases: %s", len(test_cases))
         return test_cases
diff --git a/media/omx/V1_0/host/VtsHalMediaOmxV1_0TestCase.py b/media/omx/V1_0/host/VtsHalMediaOmxV1_0TestCase.py
deleted file mode 100644
index 53b2189..0000000
--- a/media/omx/V1_0/host/VtsHalMediaOmxV1_0TestCase.py
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-# Copyright (C) 2017 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-import logging
-import os
-
-from vts.testcases.template.gtest_binary_test import gtest_test_case
-
-class VtsHalMediaOmxV1_0TestCase(gtest_test_case.GtestTestCase):
-    """A class to represent a media_omx test case.
-
-    Attributes:
-        component: string, name of a IOmxNode component.
-        role: string, role of a IOmxNode component.
-        instance: string, name of the binderized hal server instance.
-    """
-
-    def __init__(self, component, role, instance, *args, **kwargs):
-        super(VtsHalMediaOmxV1_0TestCase, self).__init__(*args, **kwargs)
-        self._component = component
-        self._role = role
-        self._instance = instance
-
-    # @Override
-    def GetRunCommand(self):
-        """Get the command to run the test. """
-
-        orig_cmds = super(VtsHalMediaOmxV1_0TestCase,
-                          self).GetRunCommand(test_name=self.test_suite),
-
-        new_cmd = [('{cmd} -I {instance} -C {component} -R {role}').format(
-            cmd=orig_cmds[0][0],
-            instance=self._instance,
-            component=self._component,
-            role=self._role), orig_cmds[0][1]]
-
-        return new_cmd
diff --git a/media/omx/V1_0/host_basic/Android.mk b/media/omx/V1_0/host_basic/Android.mk
deleted file mode 100644
index 16535d5..0000000
--- a/media/omx/V1_0/host_basic/Android.mk
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-# Copyright (C) 2017 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := VtsHalMediaOmxV1_0HostBasic
-VTS_CONFIG_SRC_DIR := testcases/hal/media/omx/V1_0/host_basic
-include test/vts/tools/build/Android.host_config.mk
diff --git a/media/omx/V1_0/host_basic/AndroidTest.xml b/media/omx/V1_0/host_basic/AndroidTest.xml
deleted file mode 100644
index 803e33b..0000000
--- a/media/omx/V1_0/host_basic/AndroidTest.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2017 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-<configuration description="Config for VTS VtsHalMediaOmxV1_0HostBasic test cases">
-    <option name="config-descriptor:metadata" key="plan" value="vts-misc" />
-    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
-        <option name="abort-on-push-failure" value="true"/>
-        <option name="push-group" value="HalHidlHostTest.push"/>
-        <option name="cleanup" value="true"/>
-        <option name="push" value="spec/hardware/interfaces/media/omx/1.0/vts/GraphicBufferSource.vts->/data/local/tmp/spec/android/hardware/media/omx/1.0/GraphicBufferSource.vts"/>
-        <option name="push" value="spec/hardware/interfaces/media/omx/1.0/vts/Omx.vts->/data/local/tmp/spec/android/hardware/media/omx/1.0/Omx.vts"/>
-        <option name="push" value="spec/hardware/interfaces/media/omx/1.0/vts/OmxBufferSource.vts->/data/local/tmp/spec/android/hardware/media/omx/1.0/OmxBufferSource.vts"/>
-        <option name="push" value="spec/hardware/interfaces/media/omx/1.0/vts/OmxNode.vts->/data/local/tmp/spec/android/hardware/media/omx/1.0/OmxNode.vts"/>
-        <option name="push" value="spec/hardware/interfaces/media/omx/1.0/vts/OmxObserver.vts->/data/local/tmp/spec/android/hardware/media/omx/1.0/OmxObserver.vts"/>
-        <option name="push" value="spec/hardware/interfaces/media/omx/1.0/vts/OmxStore.vts->/data/local/tmp/spec/android/hardware/media/omx/1.0/OmxStore.vts"/>
-        <option name="push" value="spec/hardware/interfaces/media/omx/1.0/vts/types.vts->/data/local/tmp/spec/android/hardware/media/omx/1.0/types.vts"/>
-        <option name="push" value="spec/hardware/interfaces/graphics/common/1.0/vts/types.vts->/data/local/tmp/spec/android/hardware/graphics/common/1.0/types.vts"/>
-        <option name="push" value="spec/hardware/interfaces/media/1.0/vts/types.vts->/data/local/tmp/spec/android/hardware/media/1.0/types.vts"/>
-        <option name="push" value="DATA/lib/android.hardware.graphics.bufferqueue@1.0-vts.driver.so->/data/local/tmp/32/android.hardware.graphics.bufferqueue@1.0-vts.driver.so"/>
-        <option name="push" value="DATA/lib64/android.hardware.graphics.bufferqueue@1.0-vts.driver.so->/data/local/tmp/64/android.hardware.graphics.bufferqueue@1.0-vts.driver.so"/>
-        <option name="push" value="DATA/lib/android.hardware.graphics.common@1.0-vts.driver.so->/data/local/tmp/32/android.hardware.graphics.common@1.0-vts.driver.so"/>
-        <option name="push" value="DATA/lib64/android.hardware.graphics.common@1.0-vts.driver.so->/data/local/tmp/64/android.hardware.graphics.common@1.0-vts.driver.so"/>
-        <option name="push" value="DATA/lib/android.hardware.media@1.0-vts.driver.so->/data/local/tmp/32/android.hardware.media@1.0-vts.driver.so"/>
-        <option name="push" value="DATA/lib64/android.hardware.media@1.0-vts.driver.so->/data/local/tmp/64/android.hardware.media@1.0-vts.driver.so"/>
-        <option name="push" value="DATA/lib/android.hardware.media.omx@1.0-vts.driver.so->/data/local/tmp/32/android.hardware.media.omx@1.0-vts.driver.so"/>
-        <option name="push" value="DATA/lib64/android.hardware.media.omx@1.0-vts.driver.so->/data/local/tmp/64/android.hardware.media.omx@1.0-vts.driver.so"/>
-    </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
-    <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
-        <option name="test-module-name" value="VtsHalMediaOmxV1_0HostBasic"/>
-        <option name="test-case-path" value="vts/testcases/hal/media/omx/V1_0/host_basic/VtsHalMediaOmxV1_0HostBasicTest"/>
-        <option name="hal-hidl-package-name" value="android.hardware.media.omx@1.0"/>
-        <option name="precondition-lshal" value="android.hardware.media.omx@1.0"/>
-        <option name="test-timeout" value="1m"/>
-    </test>
-</configuration>
diff --git a/media/omx/V1_0/host_basic/VtsHalMediaOmxV1_0HostBasicTest.py b/media/omx/V1_0/host_basic/VtsHalMediaOmxV1_0HostBasicTest.py
deleted file mode 100644
index 0175368..0000000
--- a/media/omx/V1_0/host_basic/VtsHalMediaOmxV1_0HostBasicTest.py
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright (C) 2017 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-import logging
-import time
-
-from vts.runners.host import asserts
-from vts.runners.host import base_test
-from vts.runners.host import keys
-from vts.runners.host import test_runner
-from vts.utils.python.controllers import android_device
-from vts.utils.python.precondition import precondition_utils
-
-class VtsHalMediaOmxV1_0HostBasic(base_test.BaseTestClass):
-    """Host test class to run the Media_Omx HAL."""
-
-    def setUpClass(self):
-        self.dut = self.registerController(android_device)[0]
-
-        self.dut.shell.InvokeTerminal("one")
-        self.dut.shell.one.Execute("setenforce 0")  # SELinux permissive mode
-        if not precondition_utils.CanRunHidlHalTest(
-            self, self.dut, self.dut.shell.one):
-            self._skip_all_testcases = True
-            return
-
-        self.dut.hal.InitHidlHal(
-            target_type="media_omx",
-            target_basepaths=self.dut.libPaths,
-            target_version=1.0,
-            target_package="android.hardware.media.omx",
-            target_component_name="IOmxStore",
-            bits=int(self.abi_bitness))
-
-        if self.coverage.enabled:
-            self.coverage.LoadArtifacts()
-            self.coverage.InitializeDeviceCoverage(self.dut)
-
-    def testIOmxStoreBase(self):
-        """A simple test case which just calls each registered function."""
-
-        self.vtypes = self.dut.hal.media_omx.GetHidlTypeInterface("types")
-        status, attributes = self.dut.hal.media_omx.listServiceAttributes()
-        asserts.assertEqual(self.vtypes.Status.OK, status)
-
-        prefix = self.dut.hal.media_omx.getNodePrefix()
-        logging.info("getNodePrefix: %s", prefix)
-
-        roles = self.dut.hal.media_omx.listRoles()
-        logging.info("roles: %s", roles)
-
-        omx = self.dut.hal.media_omx.getOmx("default")
-        logging.info("omx: %s", omx)
-
-if __name__ == "__main__":
-    test_runner.main()
diff --git a/media/omx/V1_0/host_basic/__init__.py b/media/omx/V1_0/host_basic/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/media/omx/V1_0/host_basic/__init__.py
+++ /dev/null
diff --git a/media/omx/V1_0/host_omxstore/AndroidTest.xml b/media/omx/V1_0/host_omxstore/AndroidTest.xml
index 7ab988d..4dbec0f 100644
--- a/media/omx/V1_0/host_omxstore/AndroidTest.xml
+++ b/media/omx/V1_0/host_omxstore/AndroidTest.xml
@@ -37,12 +37,9 @@
         <option name="push" value="DATA/lib/android.hardware.media.omx@1.0-vts.driver.so->/data/local/tmp/32/android.hardware.media.omx@1.0-vts.driver.so"/>
         <option name="push" value="DATA/lib64/android.hardware.media.omx@1.0-vts.driver.so->/data/local/tmp/64/android.hardware.media.omx@1.0-vts.driver.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalMediaOmxStoreV1_0Host"/>
         <option name="test-case-path" value="vts/testcases/hal/media/omx/V1_0/host_omxstore/VtsHalMediaOmxStoreV1_0HostTest"/>
-        <option name="hal-hidl-package-name" value="android.hardware.media.omx@1.0"/>
-        <option name="precondition-lshal" value="android.hardware.media.omx@1.0"/>
         <option name="test-timeout" value="1m"/>
     </test>
 </configuration>
diff --git a/media/omx/V1_0/host_omxstore/VtsHalMediaOmxStoreV1_0HostTest.py b/media/omx/V1_0/host_omxstore/VtsHalMediaOmxStoreV1_0HostTest.py
index fe855b5..b54a902 100644
--- a/media/omx/V1_0/host_omxstore/VtsHalMediaOmxStoreV1_0HostTest.py
+++ b/media/omx/V1_0/host_omxstore/VtsHalMediaOmxStoreV1_0HostTest.py
@@ -29,24 +29,18 @@
 import re
 
 from vts.runners.host import asserts
-from vts.runners.host import base_test
 from vts.runners.host import test_runner
-from vts.utils.python.controllers import android_device
-from vts.utils.python.precondition import precondition_utils
+from vts.testcases.template.hal_hidl_host_test import hal_hidl_host_test
 
+OMXSTORE_V1_0_HAL = "android.hardware.media.omx@1.0::IOmxStore"
 
-class VtsHalMediaOmxStoreV1_0Host(base_test.BaseTestClass):
+class VtsHalMediaOmxStoreV1_0Host(hal_hidl_host_test.HalHidlHostTest):
     """Host test class to run the Media_OmxStore HAL."""
 
-    def setUpClass(self):
-        self.dut = self.registerController(android_device)[0]
+    TEST_HAL_SERVICES = {OMXSTORE_V1_0_HAL}
 
-        self.dut.shell.InvokeTerminal('one')
-        self.dut.shell.one.Execute('setenforce 0')  # SELinux permissive mode
-        if not precondition_utils.CanRunHidlHalTest(
-            self, self.dut, self.dut.shell.one):
-            self._skip_all_testcases = True
-            return
+    def setUpClass(self):
+        super(VtsHalMediaOmxStoreV1_0Host, self).setUpClass()
 
         self.dut.hal.InitHidlHal(
             target_type='media_omx',
@@ -54,15 +48,12 @@
             target_version=1.0,
             target_package='android.hardware.media.omx',
             target_component_name='IOmxStore',
+            hw_binder_service_name=self.getHalServiceName(OMXSTORE_V1_0_HAL),
             bits=int(self.abi_bitness))
 
         self.omxstore = self.dut.hal.media_omx
         self.vtypes = self.omxstore.GetHidlTypeInterface('types')
 
-        if self.coverage.enabled:
-            self.coverage.LoadArtifacts()
-            self.coverage.InitializeDeviceCoverage(self.dut)
-
     def testListServiceAttributes(self):
         """Test IOmxStore::listServiceAttributes().
 
@@ -111,7 +102,7 @@
             attr_value = attr['value']
 
             # attr_key must not have been seen before.
-            assert(
+            asserts.assertTrue(
                 attr_key not in key_set,
                 'Service attribute "' + attr_key + '" has duplicates.')
             key_set.add(attr_key)
@@ -221,31 +212,34 @@
         # Mapping from mime types to roles.
         # These values come from MediaDefs.cpp and OMXUtils.cpp
         audio_mime_to_role = {
-            '3gpp'          : 'amrnb',
-            'ac3'           : 'ac3',
-            'amr-wb'        : 'amrwb',
-            'eac3'          : 'eac3',
-            'flac'          : 'flac',
-            'g711-alaw'     : 'g711alaw',
-            'g711-mlaw'     : 'g711mlaw',
-            'gsm'           : 'gsm',
-            'mp4a-latm'     : 'aac',
-            'mpeg'          : 'mp3',
-            'mpeg-L1'       : 'mp1',
-            'mpeg-L2'       : 'mp2',
-            'opus'          : 'opus',
-            'raw'           : 'raw',
-            'vorbis'        : 'vorbis',
+            '3gpp'             : 'amrnb',
+            'ac3'              : 'ac3',
+            'amr-wb'           : 'amrwb',
+            'eac3'             : 'eac3',
+            'flac'             : 'flac',
+            'g711-alaw'        : 'g711alaw',
+            'g711-mlaw'        : 'g711mlaw',
+            'gsm'              : 'gsm',
+            'mp4a-latm'        : 'aac',
+            'mpeg'             : 'mp3',
+            'mpeg-L1'          : 'mp1',
+            'mpeg-L2'          : 'mp2',
+            'opus'             : 'opus',
+            'raw'              : 'raw',
+            'vorbis'           : 'vorbis',
         }
         video_mime_to_role = {
-            '3gpp'          : 'h263',
-            'avc'           : 'avc',
-            'dolby-vision'  : 'dolby-vision',
-            'hevc'          : 'hevc',
-            'mp4v-es'       : 'mpeg4',
-            'mpeg2'         : 'mpeg2',
-            'x-vnd.on2.vp8' : 'vp8',
-            'x-vnd.on2.vp9' : 'vp9',
+            '3gpp'             : 'h263',
+            'avc'              : 'avc',
+            'dolby-vision'     : 'dolby-vision',
+            'hevc'             : 'hevc',
+            'mp4v-es'          : 'mpeg4',
+            'mpeg2'            : 'mpeg2',
+            'x-vnd.on2.vp8'    : 'vp8',
+            'x-vnd.on2.vp9'    : 'vp9',
+        }
+        image_mime_to_role = {
+            'vnd.android.heic' : 'heic',
         }
         def get_role(is_encoder, mime):
             """Returns the role based on is_encoder and mime.
@@ -277,6 +271,11 @@
                     return None
                 prefix = 'video_'
                 suffix = video_mime_to_role[mime_suffix]
+            elif mime.startswith('image/'):
+                if mime_suffix not in image_mime_to_role:
+                    return None
+                prefix = 'image_'
+                suffix = image_mime_to_role[mime_suffix]
             else:
                 return None
             return prefix + middle + suffix
@@ -445,6 +444,14 @@
                     'does not report some roles for node "' + node + '": ' +
                     ', '.join(node2roles[node] - role_set))
 
+                # Try creating the node.
+                status, omxNode = omx.allocateNode(node, None)
+                asserts.assertEqual(
+                    self.vtypes.Status.OK, status,
+                    'IOmx::allocateNode() for IOmx instance "' + owner + '" ' +
+                    'fails to allocate node "' + node +'".')
+                status = omxNode.freeNode()
+
             # Check that all nodes obtained from IOmxStore::listRoles() are
             # supported by the their corresponding IOmx instances.
             node_set_diff = owner2nodes[owner] - node_set
diff --git a/memtrack/Android.bp b/memtrack/Android.bp
deleted file mode 100644
index cdc8905..0000000
--- a/memtrack/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "V1_0",
-]
diff --git a/memtrack/V1_0/Android.bp b/memtrack/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/memtrack/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/memtrack/V1_0/build/Android.bp b/memtrack/V1_0/build/Android.bp
index 0da1ffe..bc7237a 100644
--- a/memtrack/V1_0/build/Android.bp
+++ b/memtrack/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.memtrack@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.memtrack@1.0_hal",
     ],
@@ -17,7 +18,7 @@
 genrule {
     name: "android.hardware.memtrack@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.memtrack@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/memtrack/1.0/ $(genDir)/android/hardware/memtrack/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.memtrack@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/memtrack/1.0/ $(genDir)/android/hardware/memtrack/1.0/",
     srcs: [
         ":android.hardware.memtrack@1.0_hal",
     ],
@@ -30,7 +31,7 @@
 genrule {
     name: "android.hardware.memtrack@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.memtrack@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/memtrack/1.0/ $(genDir)/android/hardware/memtrack/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.memtrack@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/memtrack/1.0/ $(genDir)/android/hardware/memtrack/1.0/",
     srcs: [
         ":android.hardware.memtrack@1.0_hal",
     ],
@@ -45,36 +46,10 @@
     generated_sources: ["android.hardware.memtrack@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.memtrack@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.memtrack@1.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.memtrack@1.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -82,7 +57,7 @@
 genrule {
     name: "android.hardware.memtrack@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.memtrack@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/memtrack/1.0/ $(genDir)/android/hardware/memtrack/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.memtrack@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/memtrack/1.0/ $(genDir)/android/hardware/memtrack/1.0/",
     srcs: [
         ":android.hardware.memtrack@1.0_hal",
     ],
@@ -95,7 +70,7 @@
 genrule {
     name: "android.hardware.memtrack@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.memtrack@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/memtrack/1.0/ $(genDir)/android/hardware/memtrack/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.memtrack@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/memtrack/1.0/ $(genDir)/android/hardware/memtrack/1.0/",
     srcs: [
         ":android.hardware.memtrack@1.0_hal",
     ],
@@ -110,27 +85,10 @@
     generated_sources: ["android.hardware.memtrack@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.memtrack@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.memtrack@1.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.memtrack@1.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/memtrack/V1_0/target/AndroidTest.xml b/memtrack/V1_0/target/AndroidTest.xml
index fe28cbf..77f0bc0 100644
--- a/memtrack/V1_0/target/AndroidTest.xml
+++ b/memtrack/V1_0/target/AndroidTest.xml
@@ -19,7 +19,6 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalMemtrackV1_0Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalMemtrackV1_0TargetTest/VtsHalMemtrackV1_0TargetTest"/>
@@ -27,7 +26,6 @@
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.memtrack@1.0"/>
         <option name="test-timeout" value="15m"/>
     </test>
 </configuration>
diff --git a/memtrack/V1_0/target_profiling/AndroidTest.xml b/memtrack/V1_0/target_profiling/AndroidTest.xml
index 5e4e5e3..e80c40c 100644
--- a/memtrack/V1_0/target_profiling/AndroidTest.xml
+++ b/memtrack/V1_0/target_profiling/AndroidTest.xml
@@ -22,7 +22,6 @@
         <option name="push" value="DATA/lib/android.hardware.memtrack@1.0-vts.profiler.so->/data/local/tmp/32/android.hardware.memtrack@1.0-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.memtrack@1.0-vts.profiler.so->/data/local/tmp/64/android.hardware.memtrack@1.0-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalMemtrackV1_0TargetProfiling"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalMemtrackV1_0TargetTest/VtsHalMemtrackV1_0TargetTest"/>
@@ -31,7 +30,6 @@
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.memtrack@1.0"/>
         <option name="test-timeout" value="15m"/>
     </test>
 </configuration>
diff --git a/memtrack/V1_0/target_replay/AndroidTest.xml b/memtrack/V1_0/target_replay/AndroidTest.xml
index 17ad1a2..36155a6 100644
--- a/memtrack/V1_0/target_replay/AndroidTest.xml
+++ b/memtrack/V1_0/target_replay/AndroidTest.xml
@@ -24,14 +24,11 @@
         <option name="push" value="DATA/lib/android.hardware.memtrack@1.0-vts.driver.so->/data/local/tmp/32/android.hardware.memtrack@1.0-vts.driver.so"/>
         <option name="push" value="DATA/lib64/android.hardware.memtrack@1.0-vts.driver.so->/data/local/tmp/64/android.hardware.memtrack@1.0-vts.driver.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalMemtrackV1_0TargetReplay"/>
         <option name="binary-test-type" value="hal_hidl_replay_test"/>
         <option name="hal-hidl-replay-test-trace-path" value="test/vts-testcase/hal-trace/memtrack/V1_0/android.hardware.memtrack_1.0_17494978824.vts.trace"/>
         <option name="hal-hidl-replay-test-trace-path" value="test/vts-testcase/hal-trace/memtrack/V1_0/android.hardware.memtrack_1.0_18679173942.vts.trace"/>
-        <option name="hal-hidl-package-name" value="android.hardware.memtrack@1.0"/>
-        <option name="precondition-lshal" value="android.hardware.memtrack@1.0"/>
         <option name="test-timeout" value="15m"/>
     </test>
 </configuration>
diff --git a/net/netd/V1_0/build/Android.bp b/net/netd/V1_0/build/Android.bp
new file mode 100644
index 0000000..f0f52ac
--- /dev/null
+++ b/net/netd/V1_0/build/Android.bp
@@ -0,0 +1,89 @@
+// This file was auto-generated. Do not edit manually.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
+
+// Generate .vts spec files.
+hal2vts {
+    name: "android.system.net.netd@1.0-vts.spec",
+    hidl_gen_args: "-r android.system:system/hardware/interfaces",
+    srcs: [
+        ":android.system.net.netd@1.0_hal",
+    ],
+    out: [
+        "android/system/net/netd/1.0/Netd.vts",
+    ],
+}
+
+// Build VTS driver.
+genrule {
+    name: "android.system.net.netd@1.0-vts.driver_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.system:system/hardware/interfaces android.system.net.netd@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/system/net/netd/1.0/ $(genDir)/android/system/net/netd/1.0/",
+    srcs: [
+        ":android.system.net.netd@1.0_hal",
+    ],
+    out: [
+        "android/system/net/netd/1.0/Netd.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.system.net.netd@1.0-vts.driver_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.system:system/hardware/interfaces android.system.net.netd@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/system/net/netd/1.0/ $(genDir)/android/system/net/netd/1.0/",
+    srcs: [
+        ":android.system.net.netd@1.0_hal",
+    ],
+    out: [
+        "android/system/net/netd/1.0/Netd.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.system.net.netd@1.0-vts.driver",
+    generated_sources: ["android.system.net.netd@1.0-vts.driver_genc++"],
+    generated_headers: ["android.system.net.netd@1.0-vts.driver_genc++_headers"],
+    export_generated_headers: ["android.system.net.netd@1.0-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
+        "android.system.net.netd@1.0",
+    ],
+}
+
+// Build VTS profiler.
+genrule {
+    name: "android.system.net.netd@1.0-vts.profiler_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.system:system/hardware/interfaces android.system.net.netd@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/system/net/netd/1.0/ $(genDir)/android/system/net/netd/1.0/",
+    srcs: [
+        ":android.system.net.netd@1.0_hal",
+    ],
+    out: [
+        "android/system/net/netd/1.0/Netd.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.system.net.netd@1.0-vts.profiler_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.system:system/hardware/interfaces android.system.net.netd@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/system/net/netd/1.0/ $(genDir)/android/system/net/netd/1.0/",
+    srcs: [
+        ":android.system.net.netd@1.0_hal",
+    ],
+    out: [
+        "android/system/net/netd/1.0/Netd.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.system.net.netd@1.0-vts.profiler",
+    generated_sources: ["android.system.net.netd@1.0-vts.profiler_genc++"],
+    generated_headers: ["android.system.net.netd@1.0-vts.profiler_genc++_headers"],
+    export_generated_headers: ["android.system.net.netd@1.0-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
+        "android.system.net.netd@1.0",
+    ],
+}
+
diff --git a/treble/hidl_shim/Android.mk b/net/netd/V1_0/target/Android.mk
similarity index 87%
rename from treble/hidl_shim/Android.mk
rename to net/netd/V1_0/target/Android.mk
index 01bacd7..0f81c38 100644
--- a/treble/hidl_shim/Android.mk
+++ b/net/netd/V1_0/target/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,5 +18,5 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsTrebleHidlShim
-include test/vts/tools/build/Android.host_config.mk
\ No newline at end of file
+LOCAL_MODULE := VtsHalNetNetdV1_0Target
+include test/vts/tools/build/Android.host_config.mk
diff --git a/radio/V1_1/target/AndroidTest.xml b/net/netd/V1_0/target/AndroidTest.xml
similarity index 60%
copy from radio/V1_1/target/AndroidTest.xml
copy to net/netd/V1_0/target/AndroidTest.xml
index 76b339d..79b89af 100644
--- a/radio/V1_1/target/AndroidTest.xml
+++ b/net/netd/V1_0/target/AndroidTest.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2017 The Android Open Source Project
+<!-- Copyright (C) 2018 The Android Open Source Project
 
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
@@ -13,21 +13,17 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Config for VTS VtsHalRadioV1_1Target test cases">
-    <option name="config-descriptor:metadata" key="plan" value="vts-hal" />
+<configuration description="Config for VTS VtsHalNetNetdV1_0Target test cases">
+    <option key="plan" name="config-descriptor:metadata" value="vts-staging-default"/>
     <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
-        <option name="test-module-name" value="VtsHalRadioV1_1Target"/>
-        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalRadioV1_1TargetTest/VtsHalRadioV1_1TargetTest"/>
-        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalRadioV1_1TargetTest/VtsHalRadioV1_1TargetTest"/>
+        <option name="test-module-name" value="VtsHalNetNetdV1_0Target"/>
+        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalNetNetdV1_0TargetTest/VtsHalNetNetdV1_0TargetTest"/>
+        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalNetNetdV1_0TargetTest/VtsHalNetNetdV1_0TargetTest"/>
         <option name="binary-test-type" value="hal_hidl_gtest"/>
-        <option name="binary-test-disable-framework" value="true"/>
-        <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.radio@1.1"/>
-        <option name="test-timeout" value="15m"/>
+        <option name="test-timeout" value="1m"/>
     </test>
 </configuration>
diff --git a/treble/hidl_shim/Android.mk b/net/netd/V1_0/target_profiling/Android.mk
similarity index 86%
copy from treble/hidl_shim/Android.mk
copy to net/netd/V1_0/target_profiling/Android.mk
index 01bacd7..40c1577 100644
--- a/treble/hidl_shim/Android.mk
+++ b/net/netd/V1_0/target_profiling/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,5 +18,5 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsTrebleHidlShim
-include test/vts/tools/build/Android.host_config.mk
\ No newline at end of file
+LOCAL_MODULE := VtsHalNetNetdV1_0TargetProfiling
+include test/vts/tools/build/Android.host_config.mk
diff --git a/net/netd/V1_0/target_profiling/AndroidTest.xml b/net/netd/V1_0/target_profiling/AndroidTest.xml
new file mode 100644
index 0000000..c44269a
--- /dev/null
+++ b/net/netd/V1_0/target_profiling/AndroidTest.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS VtsHalNetNetdV1_0TargetProfiling test cases">
+    <option key="plan" name="config-descriptor:metadata" value="vts-hal-profiling"/>
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="abort-on-push-failure" value="false"/>
+        <option name="push-group" value="HalHidlTargetProfilingTest.push"/>
+        <option name="cleanup" value="true"/>
+        <option name="push" value="DATA/lib/android.system.net.netd@1.0-vts.profiler.so->/data/local/tmp/32/android.system.net.netd@1.0-vts.profiler.so"/>
+        <option name="push" value="DATA/lib64/android.system.net.netd@1.0-vts.profiler.so->/data/local/tmp/64/android.system.net.netd@1.0-vts.profiler.so"/>
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+        <option name="test-module-name" value="VtsHalNetNetdV1_0TargetProfiling"/>
+        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalNetNetdV1_0TargetTest/VtsHalNetNetdV1_0TargetTest"/>
+        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalNetNetdV1_0TargetTest/VtsHalNetNetdV1_0TargetTest"/>
+        <option name="binary-test-type" value="hal_hidl_gtest"/>
+        <option name="enable-profiling" value="true"/>
+        <option name="test-timeout" value="1m"/>
+    </test>
+</configuration>
diff --git a/net/netd/V1_1/build/Android.bp b/net/netd/V1_1/build/Android.bp
new file mode 100644
index 0000000..653af25
--- /dev/null
+++ b/net/netd/V1_1/build/Android.bp
@@ -0,0 +1,95 @@
+// This file was auto-generated. Do not edit manually.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
+
+// Generate .vts spec files.
+hal2vts {
+    name: "android.system.net.netd@1.1-vts.spec",
+    hidl_gen_args: "-r android.system:system/hardware/interfaces",
+    srcs: [
+        ":android.system.net.netd@1.1_hal",
+    ],
+    out: [
+        "android/system/net/netd/1.1/Netd.vts",
+    ],
+}
+
+// Build VTS driver.
+genrule {
+    name: "android.system.net.netd@1.1-vts.driver_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.system:system/hardware/interfaces android.system.net.netd@1.1 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/system/net/netd/1.1/ $(genDir)/android/system/net/netd/1.1/",
+    srcs: [
+        ":android.system.net.netd@1.1_hal",
+    ],
+    out: [
+        "android/system/net/netd/1.1/Netd.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.system.net.netd@1.1-vts.driver_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.system:system/hardware/interfaces android.system.net.netd@1.1 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/system/net/netd/1.1/ $(genDir)/android/system/net/netd/1.1/",
+    srcs: [
+        ":android.system.net.netd@1.1_hal",
+    ],
+    out: [
+        "android/system/net/netd/1.1/Netd.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.system.net.netd@1.1-vts.driver",
+    generated_sources: ["android.system.net.netd@1.1-vts.driver_genc++"],
+    generated_headers: ["android.system.net.netd@1.1-vts.driver_genc++_headers"],
+    export_generated_headers: ["android.system.net.netd@1.1-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [
+        "android.system.net.netd@1.0-vts.driver",
+    ],
+    static_libs: [
+        "android.system.net.netd@1.0",
+        "android.system.net.netd@1.1",
+    ],
+}
+
+// Build VTS profiler.
+genrule {
+    name: "android.system.net.netd@1.1-vts.profiler_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.system:system/hardware/interfaces android.system.net.netd@1.1 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/system/net/netd/1.1/ $(genDir)/android/system/net/netd/1.1/",
+    srcs: [
+        ":android.system.net.netd@1.1_hal",
+    ],
+    out: [
+        "android/system/net/netd/1.1/Netd.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.system.net.netd@1.1-vts.profiler_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.system:system/hardware/interfaces android.system.net.netd@1.1 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/system/net/netd/1.1/ $(genDir)/android/system/net/netd/1.1/",
+    srcs: [
+        ":android.system.net.netd@1.1_hal",
+    ],
+    out: [
+        "android/system/net/netd/1.1/Netd.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.system.net.netd@1.1-vts.profiler",
+    generated_sources: ["android.system.net.netd@1.1-vts.profiler_genc++"],
+    generated_headers: ["android.system.net.netd@1.1-vts.profiler_genc++_headers"],
+    export_generated_headers: ["android.system.net.netd@1.1-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [
+        "android.system.net.netd@1.0-vts.profiler",
+    ],
+    static_libs: [
+        "android.system.net.netd@1.0",
+        "android.system.net.netd@1.1",
+    ],
+}
+
diff --git a/treble/hidl_shim/Android.mk b/net/netd/V1_1/target/Android.mk
similarity index 87%
copy from treble/hidl_shim/Android.mk
copy to net/netd/V1_1/target/Android.mk
index 01bacd7..5696f88 100644
--- a/treble/hidl_shim/Android.mk
+++ b/net/netd/V1_1/target/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,5 +18,5 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsTrebleHidlShim
-include test/vts/tools/build/Android.host_config.mk
\ No newline at end of file
+LOCAL_MODULE := VtsHalNetNetdV1_1Target
+include test/vts/tools/build/Android.host_config.mk
diff --git a/radio/V1_1/target/AndroidTest.xml b/net/netd/V1_1/target/AndroidTest.xml
similarity index 60%
copy from radio/V1_1/target/AndroidTest.xml
copy to net/netd/V1_1/target/AndroidTest.xml
index 76b339d..8a99036 100644
--- a/radio/V1_1/target/AndroidTest.xml
+++ b/net/netd/V1_1/target/AndroidTest.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2017 The Android Open Source Project
+<!-- Copyright (C) 2018 The Android Open Source Project
 
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
@@ -13,21 +13,17 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Config for VTS VtsHalRadioV1_1Target test cases">
-    <option name="config-descriptor:metadata" key="plan" value="vts-hal" />
+<configuration description="Config for VTS VtsHalNetNetdV1_1Target test cases">
+    <option key="plan" name="config-descriptor:metadata" value="vts-staging-default"/>
     <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
-        <option name="test-module-name" value="VtsHalRadioV1_1Target"/>
-        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalRadioV1_1TargetTest/VtsHalRadioV1_1TargetTest"/>
-        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalRadioV1_1TargetTest/VtsHalRadioV1_1TargetTest"/>
+        <option name="test-module-name" value="VtsHalNetNetdV1_1Target"/>
+        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalNetNetdV1_1TargetTest/VtsHalNetNetdV1_1TargetTest"/>
+        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalNetNetdV1_1TargetTest/VtsHalNetNetdV1_1TargetTest"/>
         <option name="binary-test-type" value="hal_hidl_gtest"/>
-        <option name="binary-test-disable-framework" value="true"/>
-        <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.radio@1.1"/>
-        <option name="test-timeout" value="15m"/>
+        <option name="test-timeout" value="1m"/>
     </test>
 </configuration>
diff --git a/treble/hidl_shim/Android.mk b/net/netd/V1_1/target_profiling/Android.mk
similarity index 86%
copy from treble/hidl_shim/Android.mk
copy to net/netd/V1_1/target_profiling/Android.mk
index 01bacd7..d6b4080 100644
--- a/treble/hidl_shim/Android.mk
+++ b/net/netd/V1_1/target_profiling/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,5 +18,5 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsTrebleHidlShim
-include test/vts/tools/build/Android.host_config.mk
\ No newline at end of file
+LOCAL_MODULE := VtsHalNetNetdV1_1TargetProfiling
+include test/vts/tools/build/Android.host_config.mk
diff --git a/net/netd/V1_1/target_profiling/AndroidTest.xml b/net/netd/V1_1/target_profiling/AndroidTest.xml
new file mode 100644
index 0000000..b774054
--- /dev/null
+++ b/net/netd/V1_1/target_profiling/AndroidTest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS VtsHalNetNetdV1_1TargetProfiling test cases">
+    <option key="plan" name="config-descriptor:metadata" value="vts-hal-profiling"/>
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="abort-on-push-failure" value="false"/>
+        <option name="push-group" value="HalHidlTargetProfilingTest.push"/>
+        <option name="cleanup" value="true"/>
+        <option name="push" value="DATA/lib/android.system.net.netd@1.0-vts.profiler.so->/data/local/tmp/32/android.system.net.netd@1.0-vts.profiler.so"/>
+        <option name="push" value="DATA/lib64/android.system.net.netd@1.0-vts.profiler.so->/data/local/tmp/64/android.system.net.netd@1.0-vts.profiler.so"/>
+        <option name="push" value="DATA/lib/android.system.net.netd@1.1-vts.profiler.so->/data/local/tmp/32/android.system.net.netd@1.1-vts.profiler.so"/>
+        <option name="push" value="DATA/lib64/android.system.net.netd@1.1-vts.profiler.so->/data/local/tmp/64/android.system.net.netd@1.1-vts.profiler.so"/>
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+        <option name="test-module-name" value="VtsHalNetNetdV1_1TargetProfiling"/>
+        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalNetNetdV1_1TargetTest/VtsHalNetNetdV1_1TargetTest"/>
+        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalNetNetdV1_1TargetTest/VtsHalNetNetdV1_1TargetTest"/>
+        <option name="binary-test-type" value="hal_hidl_gtest"/>
+        <option name="enable-profiling" value="true"/>
+        <option name="test-timeout" value="1m"/>
+    </test>
+</configuration>
diff --git a/neuralnetworks/Android.bp b/neuralnetworks/Android.bp
deleted file mode 100644
index cdc8905..0000000
--- a/neuralnetworks/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "V1_0",
-]
diff --git a/neuralnetworks/V1_0/Android.bp b/neuralnetworks/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/neuralnetworks/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/neuralnetworks/V1_0/build/Android.bp b/neuralnetworks/V1_0/build/Android.bp
index c2ca1b3..799f72f 100644
--- a/neuralnetworks/V1_0/build/Android.bp
+++ b/neuralnetworks/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.neuralnetworks@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.neuralnetworks@1.0_hal",
     ],
@@ -20,7 +21,7 @@
 genrule {
     name: "android.hardware.neuralnetworks@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.neuralnetworks@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/neuralnetworks/1.0/ $(genDir)/android/hardware/neuralnetworks/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.neuralnetworks@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/neuralnetworks/1.0/ $(genDir)/android/hardware/neuralnetworks/1.0/",
     srcs: [
         ":android.hardware.neuralnetworks@1.0_hal",
     ],
@@ -36,7 +37,7 @@
 genrule {
     name: "android.hardware.neuralnetworks@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.neuralnetworks@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/neuralnetworks/1.0/ $(genDir)/android/hardware/neuralnetworks/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.neuralnetworks@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/neuralnetworks/1.0/ $(genDir)/android/hardware/neuralnetworks/1.0/",
     srcs: [
         ":android.hardware.neuralnetworks@1.0_hal",
     ],
@@ -54,36 +55,10 @@
     generated_sources: ["android.hardware.neuralnetworks@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.neuralnetworks@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.neuralnetworks@1.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.neuralnetworks@1.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -91,7 +66,7 @@
 genrule {
     name: "android.hardware.neuralnetworks@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.neuralnetworks@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/neuralnetworks/1.0/ $(genDir)/android/hardware/neuralnetworks/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.neuralnetworks@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/neuralnetworks/1.0/ $(genDir)/android/hardware/neuralnetworks/1.0/",
     srcs: [
         ":android.hardware.neuralnetworks@1.0_hal",
     ],
@@ -107,7 +82,7 @@
 genrule {
     name: "android.hardware.neuralnetworks@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.neuralnetworks@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/neuralnetworks/1.0/ $(genDir)/android/hardware/neuralnetworks/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.neuralnetworks@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/neuralnetworks/1.0/ $(genDir)/android/hardware/neuralnetworks/1.0/",
     srcs: [
         ":android.hardware.neuralnetworks@1.0_hal",
     ],
@@ -125,27 +100,10 @@
     generated_sources: ["android.hardware.neuralnetworks@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.neuralnetworks@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.neuralnetworks@1.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.neuralnetworks@1.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/neuralnetworks/V1_0/target/AndroidTest.xml b/neuralnetworks/V1_0/target/AndroidTest.xml
index 587eadb..61416f4 100644
--- a/neuralnetworks/V1_0/target/AndroidTest.xml
+++ b/neuralnetworks/V1_0/target/AndroidTest.xml
@@ -19,13 +19,11 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalNeuralnetworksV1_0Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalNeuralnetworksV1_0TargetTest/VtsHalNeuralnetworksV1_0TargetTest"/>
         <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalNeuralnetworksV1_0TargetTest/VtsHalNeuralnetworksV1_0TargetTest"/>
         <option name="binary-test-type" value="hal_hidl_gtest"/>
-        <option name="precondition-lshal" value="android.hardware.neuralnetworks@1.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/neuralnetworks/V1_0/target_profiling/AndroidTest.xml b/neuralnetworks/V1_0/target_profiling/AndroidTest.xml
index d6ad792..a6417eb 100644
--- a/neuralnetworks/V1_0/target_profiling/AndroidTest.xml
+++ b/neuralnetworks/V1_0/target_profiling/AndroidTest.xml
@@ -22,14 +22,12 @@
         <option name="push" value="DATA/lib/android.hardware.neuralnetworks@1.0-vts.profiler.so->/data/local/tmp/32/android.hardware.neuralnetworks@1.0-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.neuralnetworks@1.0-vts.profiler.so->/data/local/tmp/64/android.hardware.neuralnetworks@1.0-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalNeuralnetworksV1_0TargetProfiling"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalNeuralnetworksV1_0TargetTest/VtsHalNeuralnetworksV1_0TargetTest"/>
         <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalNeuralnetworksV1_0TargetTest/VtsHalNeuralnetworksV1_0TargetTest"/>
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.neuralnetworks@1.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/radio/V1_1/target/Android.mk b/neuralnetworks/V1_1/adapter/Android.mk
similarity index 79%
copy from radio/V1_1/target/Android.mk
copy to neuralnetworks/V1_1/adapter/Android.mk
index bd1a0f1..00fa00d 100644
--- a/radio/V1_1/target/Android.mk
+++ b/neuralnetworks/V1_1/adapter/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalNeuralnetworksV1_1Adapter
+VTS_CONFIG_SRC_DIR := testcases/hal/neuralnetworks/V1_1/adapter
 include test/vts/tools/build/Android.host_config.mk
diff --git a/neuralnetworks/V1_1/adapter/AndroidTest.xml b/neuralnetworks/V1_1/adapter/AndroidTest.xml
new file mode 100644
index 0000000..1b9ef4f
--- /dev/null
+++ b/neuralnetworks/V1_1/adapter/AndroidTest.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS VtsHalNeuralnetworksV1_1Adapter test cases">
+    <option key="plan" name="config-descriptor:metadata" value="vts-hal-adapter"/>
+    <object class="com.android.tradefed.module.VtsHalAdapterModuleController" type="module_controller">
+        <option name="hal-package-name" value="android.hardware.neuralnetworks@1.1"/>
+    </object>
+    <target_preparer class="com.android.tradefed.targetprep.VtsHalAdapterPreparer">
+        <option name="adapter-binary-name" value="android.hardware.neuralnetworks@1.0-adapter"/>
+        <option name="hal-package-name" value="android.hardware.neuralnetworks@1.1"/>
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest">
+        <option name="package" value="com.android.devicehealth.tests"/>
+        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner"/>
+    </test>
+    <include name="CtsNNAPITestCases.config"/>
+</configuration>
diff --git a/neuralnetworks/V1_1/build/Android.bp b/neuralnetworks/V1_1/build/Android.bp
new file mode 100644
index 0000000..2a4aafd
--- /dev/null
+++ b/neuralnetworks/V1_1/build/Android.bp
@@ -0,0 +1,100 @@
+// This file was auto-generated. Do not edit manually.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
+
+// Generate .vts spec files.
+hal2vts {
+    name: "android.hardware.neuralnetworks@1.1-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
+    srcs: [
+        ":android.hardware.neuralnetworks@1.1_hal",
+    ],
+    out: [
+        "android/hardware/neuralnetworks/1.1/Device.vts",
+        "android/hardware/neuralnetworks/1.1/types.vts",
+    ],
+}
+
+// Build VTS driver.
+genrule {
+    name: "android.hardware.neuralnetworks@1.1-vts.driver_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.neuralnetworks@1.1 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/neuralnetworks/1.1/ $(genDir)/android/hardware/neuralnetworks/1.1/",
+    srcs: [
+        ":android.hardware.neuralnetworks@1.1_hal",
+    ],
+    out: [
+        "android/hardware/neuralnetworks/1.1/Device.vts.cpp",
+        "android/hardware/neuralnetworks/1.1/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.neuralnetworks@1.1-vts.driver_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.neuralnetworks@1.1 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/neuralnetworks/1.1/ $(genDir)/android/hardware/neuralnetworks/1.1/",
+    srcs: [
+        ":android.hardware.neuralnetworks@1.1_hal",
+    ],
+    out: [
+        "android/hardware/neuralnetworks/1.1/Device.vts.h",
+        "android/hardware/neuralnetworks/1.1/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.neuralnetworks@1.1-vts.driver",
+    generated_sources: ["android.hardware.neuralnetworks@1.1-vts.driver_genc++"],
+    generated_headers: ["android.hardware.neuralnetworks@1.1-vts.driver_genc++_headers"],
+    export_generated_headers: ["android.hardware.neuralnetworks@1.1-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [
+        "android.hardware.neuralnetworks@1.0-vts.driver",
+    ],
+    static_libs: [
+        "android.hardware.neuralnetworks@1.0",
+        "android.hardware.neuralnetworks@1.1",
+    ],
+}
+
+// Build VTS profiler.
+genrule {
+    name: "android.hardware.neuralnetworks@1.1-vts.profiler_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.neuralnetworks@1.1 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/neuralnetworks/1.1/ $(genDir)/android/hardware/neuralnetworks/1.1/",
+    srcs: [
+        ":android.hardware.neuralnetworks@1.1_hal",
+    ],
+    out: [
+        "android/hardware/neuralnetworks/1.1/Device.vts.cpp",
+        "android/hardware/neuralnetworks/1.1/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.neuralnetworks@1.1-vts.profiler_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.neuralnetworks@1.1 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/neuralnetworks/1.1/ $(genDir)/android/hardware/neuralnetworks/1.1/",
+    srcs: [
+        ":android.hardware.neuralnetworks@1.1_hal",
+    ],
+    out: [
+        "android/hardware/neuralnetworks/1.1/Device.vts.h",
+        "android/hardware/neuralnetworks/1.1/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.neuralnetworks@1.1-vts.profiler",
+    generated_sources: ["android.hardware.neuralnetworks@1.1-vts.profiler_genc++"],
+    generated_headers: ["android.hardware.neuralnetworks@1.1-vts.profiler_genc++_headers"],
+    export_generated_headers: ["android.hardware.neuralnetworks@1.1-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [
+        "android.hardware.neuralnetworks@1.0-vts.profiler",
+    ],
+    static_libs: [
+        "android.hardware.neuralnetworks@1.0",
+        "android.hardware.neuralnetworks@1.1",
+    ],
+}
+
diff --git a/radio/V1_1/target/Android.mk b/neuralnetworks/V1_1/target/Android.mk
similarity index 79%
copy from radio/V1_1/target/Android.mk
copy to neuralnetworks/V1_1/target/Android.mk
index bd1a0f1..61b5db3 100644
--- a/radio/V1_1/target/Android.mk
+++ b/neuralnetworks/V1_1/target/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalNeuralnetworksV1_1Target
+VTS_CONFIG_SRC_DIR := testcases/hal/neuralnetworks/V1_1/target
 include test/vts/tools/build/Android.host_config.mk
diff --git a/radio/V1_1/target/AndroidTest.xml b/neuralnetworks/V1_1/target/AndroidTest.xml
similarity index 66%
copy from radio/V1_1/target/AndroidTest.xml
copy to neuralnetworks/V1_1/target/AndroidTest.xml
index 76b339d..ca331da 100644
--- a/radio/V1_1/target/AndroidTest.xml
+++ b/neuralnetworks/V1_1/target/AndroidTest.xml
@@ -13,21 +13,18 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Config for VTS VtsHalRadioV1_1Target test cases">
+<configuration description="Config for VTS VtsHalNeuralnetworksV1_1Target test cases">
     <option name="config-descriptor:metadata" key="plan" value="vts-hal" />
     <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
+    <multi_target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
-        <option name="test-module-name" value="VtsHalRadioV1_1Target"/>
-        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalRadioV1_1TargetTest/VtsHalRadioV1_1TargetTest"/>
-        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalRadioV1_1TargetTest/VtsHalRadioV1_1TargetTest"/>
+        <option name="test-module-name" value="VtsHalNeuralnetworksV1_1Target"/>
+        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalNeuralnetworksV1_1TargetTest/VtsHalNeuralnetworksV1_1TargetTest"/>
+        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalNeuralnetworksV1_1TargetTest/VtsHalNeuralnetworksV1_1TargetTest"/>
         <option name="binary-test-type" value="hal_hidl_gtest"/>
-        <option name="binary-test-disable-framework" value="true"/>
-        <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.radio@1.1"/>
-        <option name="test-timeout" value="15m"/>
+        <option name="test-timeout" value="7m"/>
     </test>
 </configuration>
diff --git a/radio/V1_1/target/Android.mk b/neuralnetworks/V1_1/target_profiling/Android.mk
similarity index 78%
copy from radio/V1_1/target/Android.mk
copy to neuralnetworks/V1_1/target_profiling/Android.mk
index bd1a0f1..33c96c9 100644
--- a/radio/V1_1/target/Android.mk
+++ b/neuralnetworks/V1_1/target_profiling/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalNeuralnetworksV1_1TargetProfiling
+VTS_CONFIG_SRC_DIR := testcases/hal/neuralnetworks/V1_1/target_profiling
 include test/vts/tools/build/Android.host_config.mk
diff --git a/neuralnetworks/V1_1/target_profiling/AndroidTest.xml b/neuralnetworks/V1_1/target_profiling/AndroidTest.xml
new file mode 100644
index 0000000..02271c8
--- /dev/null
+++ b/neuralnetworks/V1_1/target_profiling/AndroidTest.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS VtsHalNeuralnetworksV1_1TargetProfiling test cases">
+    <option name="config-descriptor:metadata" key="plan" value="vts-hal-profiling" />
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="abort-on-push-failure" value="false"/>
+        <option name="push-group" value="HalHidlTargetProfilingTest.push"/>
+        <option name="cleanup" value="true"/>
+        <option name="push" value="DATA/lib/android.hardware.neuralnetworks@1.1-vts.profiler.so->/data/local/tmp/32/android.hardware.neuralnetworks@1.1-vts.profiler.so"/>
+        <option name="push" value="DATA/lib64/android.hardware.neuralnetworks@1.1-vts.profiler.so->/data/local/tmp/64/android.hardware.neuralnetworks@1.1-vts.profiler.so"/>
+    </target_preparer>
+    <multi_target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
+    <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+        <option name="test-module-name" value="VtsHalNeuralnetworksV1_1TargetProfiling"/>
+        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalNeuralnetworksV1_1TargetTest/VtsHalNeuralnetworksV1_1TargetTest"/>
+        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalNeuralnetworksV1_1TargetTest/VtsHalNeuralnetworksV1_1TargetTest"/>
+        <option name="binary-test-type" value="hal_hidl_gtest"/>
+        <option name="enable-profiling" value="true"/>
+        <option name="test-timeout" value="5m"/>
+    </test>
+</configuration>
diff --git a/nfc/Android.bp b/nfc/Android.bp
deleted file mode 100644
index cdc8905..0000000
--- a/nfc/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "V1_0",
-]
diff --git a/nfc/V1_0/Android.bp b/nfc/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/nfc/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/nfc/V1_0/build/Android.bp b/nfc/V1_0/build/Android.bp
index 53209c9..ac0a952 100644
--- a/nfc/V1_0/build/Android.bp
+++ b/nfc/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.nfc@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.nfc@1.0_hal",
     ],
@@ -18,7 +19,7 @@
 genrule {
     name: "android.hardware.nfc@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.nfc@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/nfc/1.0/ $(genDir)/android/hardware/nfc/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.nfc@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/nfc/1.0/ $(genDir)/android/hardware/nfc/1.0/",
     srcs: [
         ":android.hardware.nfc@1.0_hal",
     ],
@@ -32,7 +33,7 @@
 genrule {
     name: "android.hardware.nfc@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.nfc@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/nfc/1.0/ $(genDir)/android/hardware/nfc/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.nfc@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/nfc/1.0/ $(genDir)/android/hardware/nfc/1.0/",
     srcs: [
         ":android.hardware.nfc@1.0_hal",
     ],
@@ -48,36 +49,10 @@
     generated_sources: ["android.hardware.nfc@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.nfc@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.nfc@1.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.nfc@1.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -85,7 +60,7 @@
 genrule {
     name: "android.hardware.nfc@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.nfc@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/nfc/1.0/ $(genDir)/android/hardware/nfc/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.nfc@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/nfc/1.0/ $(genDir)/android/hardware/nfc/1.0/",
     srcs: [
         ":android.hardware.nfc@1.0_hal",
     ],
@@ -99,7 +74,7 @@
 genrule {
     name: "android.hardware.nfc@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.nfc@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/nfc/1.0/ $(genDir)/android/hardware/nfc/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.nfc@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/nfc/1.0/ $(genDir)/android/hardware/nfc/1.0/",
     srcs: [
         ":android.hardware.nfc@1.0_hal",
     ],
@@ -115,27 +90,10 @@
     generated_sources: ["android.hardware.nfc@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.nfc@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.nfc@1.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.nfc@1.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/nfc/V1_0/host/VtsHalNfcV1_0HostTest.py b/nfc/V1_0/host/VtsHalNfcV1_0HostTest.py
index 03f195d..b14b12b 100644
--- a/nfc/V1_0/host/VtsHalNfcV1_0HostTest.py
+++ b/nfc/V1_0/host/VtsHalNfcV1_0HostTest.py
@@ -19,38 +19,29 @@
 import time
 
 from vts.runners.host import asserts
-from vts.runners.host import base_test
 from vts.runners.host import test_runner
-from vts.utils.python.controllers import android_device
-from vts.utils.python.precondition import precondition_utils
+from vts.testcases.template.hal_hidl_host_test import hal_hidl_host_test
 
 PASSTHROUGH_MODE_KEY = "passthrough_mode"
 
 
-class NfcHidlBasicTest(base_test.BaseTestClass):
+class NfcHidlBasicTest(hal_hidl_host_test.HalHidlHostTest):
     """A simple testcase for the NFC HIDL HAL."""
 
+    TEST_HAL_SERVICES = {"android.hardware.nfc@1.0::INfc"}
     def setUpClass(self):
-        """Creates a mirror and turns on the framework-layer NFC service."""
-        self.dut = self.registerController(android_device)[0]
+        """Creates a mirror and turns on the framework-layer VIBRATOR service."""
+        super(NfcHidlBasicTest, self).setUpClass()
 
-        self.getUserParams(opt_param_names=[PASSTHROUGH_MODE_KEY])
-
-        self.dut.shell.InvokeTerminal("one")
-        self.dut.shell.one.Execute("setenforce 0")  # SELinux permissive mode
-        if not precondition_utils.CanRunHidlHalTest(
-            self, self.dut, self.dut.shell.one):
-            self._skip_all_testcases = True
-            return
-
-        self.dut.shell.one.Execute("svc nfc disable")  # Turn off
+        self.shell.Execute("svc nfc disable")  # Turn off
         time.sleep(5)
 
+        self.getUserParams(opt_param_names=[PASSTHROUGH_MODE_KEY])
         if getattr(self, PASSTHROUGH_MODE_KEY, True):
-            self.dut.shell.one.Execute(
+            self.shell.Execute(
                 "setprop vts.hal.vts.hidl.get_stub true")
         else:
-            self.dut.shell.one.Execute(
+            self.shell.Execute(
                 "setprop vts.hal.vts.hidl.get_stub false")
 
         self.dut.hal.InitHidlHal(
@@ -61,16 +52,13 @@
             target_component_name="INfc",
             bits=int(self.abi_bitness))
 
-        if self.coverage.enabled:
-            self.coverage.LoadArtifacts()
-            self.coverage.InitializeDeviceCoverage(self.dut)
-
     def tearDownClass(self):
         """Turns off the framework-layer NFC service."""
         # Ideally, we would want to store the nfc service's state before
         # turning that off in setUpClass and restore the original state.
-        if not self._skip_all_testcases:
-            self.dut.shell.one.Execute("svc nfc disable")  # make sure it's off
+        if not self.isSkipAllTests():
+            self.shell.Execute("svc nfc disable")  # make sure it's off
+        super(NfcHidlBasicTest, self).tearDownClass()
 
     def testBase(self):
         """A simple test case which just calls each registered function."""
diff --git a/nfc/V1_0/host/binderize/AndroidTest.xml b/nfc/V1_0/host/binderize/AndroidTest.xml
index 3cd099a..430c3b2 100644
--- a/nfc/V1_0/host/binderize/AndroidTest.xml
+++ b/nfc/V1_0/host/binderize/AndroidTest.xml
@@ -25,11 +25,10 @@
         <option name="push" value="DATA/lib/android.hardware.nfc@1.0-vts.driver.so->/data/local/tmp/32/android.hardware.nfc@1.0-vts.driver.so"/>
         <option name="push" value="DATA/lib64/android.hardware.nfc@1.0-vts.driver.so->/data/local/tmp/64/android.hardware.nfc@1.0-vts.driver.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalNfcV1_0HostBinderize" />
         <option name="test-case-path" value="vts/testcases/hal/nfc/V1_0/host/VtsHalNfcV1_0HostTest" />
-        <option name="test-config-path" value="vts/testcases/hal/nfc/V1_0/host/binderize/NfcHidlBinderizeBasicTest.config" />
+        <option name="test-config-path" value="vts/testcases/hal/nfc/V1_0/host/binderize/NfcHidlBinderizeBasicTest.runner_conf" />
         <option name="test-timeout" value="30m"/>
     </test>
 </configuration>
diff --git a/nfc/V1_0/host/binderize/NfcHidlBinderizeBasicTest.config b/nfc/V1_0/host/binderize/NfcHidlBinderizeBasicTest.runner_conf
similarity index 100%
rename from nfc/V1_0/host/binderize/NfcHidlBinderizeBasicTest.config
rename to nfc/V1_0/host/binderize/NfcHidlBinderizeBasicTest.runner_conf
diff --git a/nfc/V1_0/host/passthrough/AndroidTest.xml b/nfc/V1_0/host/passthrough/AndroidTest.xml
index aa717d3..b2d6b62 100644
--- a/nfc/V1_0/host/passthrough/AndroidTest.xml
+++ b/nfc/V1_0/host/passthrough/AndroidTest.xml
@@ -25,11 +25,10 @@
         <option name="push" value="DATA/lib/android.hardware.nfc@1.0-vts.driver.so->/data/local/tmp/32/android.hardware.nfc@1.0-vts.driver.so"/>
         <option name="push" value="DATA/lib64/android.hardware.nfc@1.0-vts.driver.so->/data/local/tmp/64/android.hardware.nfc@1.0-vts.driver.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalNfcV1_0HostPassthrough" />
         <option name="test-case-path" value="vts/testcases/hal/nfc/V1_0/host/VtsHalNfcV1_0HostTest" />
-        <option name="test-config-path" value="vts/testcases/hal/nfc/V1_0/host/passthrough/NfcHidlPassthroughBasicTest.config" />
+        <option name="test-config-path" value="vts/testcases/hal/nfc/V1_0/host/passthrough/NfcHidlPassthroughBasicTest.runner_conf" />
         <option name="test-timeout" value="30m"/>
     </test>
 </configuration>
diff --git a/nfc/V1_0/host/passthrough/NfcHidlPassthroughBasicTest.config b/nfc/V1_0/host/passthrough/NfcHidlPassthroughBasicTest.runner_conf
similarity index 100%
rename from nfc/V1_0/host/passthrough/NfcHidlPassthroughBasicTest.config
rename to nfc/V1_0/host/passthrough/NfcHidlPassthroughBasicTest.runner_conf
diff --git a/nfc/V1_0/host_profiling/AndroidTest.xml b/nfc/V1_0/host_profiling/AndroidTest.xml
index 0045fa8..717fad9 100644
--- a/nfc/V1_0/host_profiling/AndroidTest.xml
+++ b/nfc/V1_0/host_profiling/AndroidTest.xml
@@ -27,12 +27,10 @@
         <option name="push" value="DATA/lib/android.hardware.nfc@1.0-vts.profiler.so->/data/local/tmp/32/android.hardware.nfc@1.0-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.nfc@1.0-vts.profiler.so->/data/local/tmp/64/android.hardware.nfc@1.0-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalNfcV1_0HostProfiling"/>
         <option name="test-case-path" value="vts/testcases/hal/nfc/V1_0/host/VtsHalNfcV1_0HostTest"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.nfc@1.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/nfc/V1_0/target/AndroidTest.xml b/nfc/V1_0/target/AndroidTest.xml
index d3aff14..098c34f 100644
--- a/nfc/V1_0/target/AndroidTest.xml
+++ b/nfc/V1_0/target/AndroidTest.xml
@@ -19,7 +19,6 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalNfcV1_0Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalNfcV1_0TargetTest/VtsHalNfcV1_0TargetTest"/>
@@ -27,7 +26,10 @@
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.nfc@1.0"/>
+        <option name="exclude-coverage-path" value="frameworks/av/media"/>
+        <option name="exclude-coverage-path" value="frameworks/rs"/>
+        <!-- b/77998208: Flaky test; requires a fix in vendor code -->
+        <option name="exclude-filter" value="NfcHidlTest.CoreInitialized" />
         <option name="test-timeout" value="15m"/>
         <option name="runtime-hint" value="5m"/>
     </test>
diff --git a/nfc/V1_0/target_profiling/AndroidTest.xml b/nfc/V1_0/target_profiling/AndroidTest.xml
index 4711c69..ec334d7 100644
--- a/nfc/V1_0/target_profiling/AndroidTest.xml
+++ b/nfc/V1_0/target_profiling/AndroidTest.xml
@@ -22,7 +22,6 @@
         <option name="push" value="DATA/lib/android.hardware.nfc@1.0-vts.profiler.so->/data/local/tmp/32/android.hardware.nfc@1.0-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.nfc@1.0-vts.profiler.so->/data/local/tmp/64/android.hardware.nfc@1.0-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalNfcV1_0TargetProfiling"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalNfcV1_0TargetTest/VtsHalNfcV1_0TargetTest"/>
@@ -31,7 +30,6 @@
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.nfc@1.0"/>
         <option name="test-timeout" value="30m"/>
     </test>
 </configuration>
diff --git a/nfc/V1_0/target_replay/AndroidTest.xml b/nfc/V1_0/target_replay/AndroidTest.xml
index d1e93d8..3e5f2a3 100644
--- a/nfc/V1_0/target_replay/AndroidTest.xml
+++ b/nfc/V1_0/target_replay/AndroidTest.xml
@@ -25,14 +25,13 @@
         <option name="push" value="DATA/lib/android.hardware.nfc@1.0-vts.driver.so->/data/local/tmp/32/android.hardware.nfc@1.0-vts.driver.so"/>
         <option name="push" value="DATA/lib64/android.hardware.nfc@1.0-vts.driver.so->/data/local/tmp/64/android.hardware.nfc@1.0-vts.driver.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalNfcV1_0TargetReplay"/>
         <option name="binary-test-type" value="hal_hidl_replay_test"/>
         <option name="hal-hidl-replay-test-trace-path" value="test/vts-testcase/hal-trace/nfc/V1_0/android.hardware.nfc_1.0_17270843854.vts.trace"/>
         <option name="hal-hidl-replay-test-trace-path" value="test/vts-testcase/hal-trace/nfc/V1_0/android.hardware.nfc_1.0_17261139999.vts.trace"/>
-        <option name="hal-hidl-package-name" value="android.hardware.nfc@1.0"/>
-        <option name="precondition-lshal" value="android.hardware.nfc@1.0"/>
+        <!-- b/80191171 -->
+        <option name="exclude-filter" value="replay_test_android.hardware.nfc_1.0_17261139999.vts.trace" />
         <option name="test-timeout" value="15m"/>
     </test>
 </configuration>
diff --git a/radio/V1_1/target/Android.mk b/nfc/V1_1/adapter/Android.mk
similarity index 81%
copy from radio/V1_1/target/Android.mk
copy to nfc/V1_1/adapter/Android.mk
index bd1a0f1..ec1b8f3 100644
--- a/radio/V1_1/target/Android.mk
+++ b/nfc/V1_1/adapter/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalNfcV1_1Adapter
+VTS_CONFIG_SRC_DIR := testcases/hal/nfc/V1_1/adapter
 include test/vts/tools/build/Android.host_config.mk
diff --git a/nfc/V1_1/adapter/AndroidTest.xml b/nfc/V1_1/adapter/AndroidTest.xml
new file mode 100644
index 0000000..bdb72ba
--- /dev/null
+++ b/nfc/V1_1/adapter/AndroidTest.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS VtsHalNfcV1_1Adapter test cases">
+    <option key="plan" name="config-descriptor:metadata" value="vts-hal-adapter"/>
+    <object class="com.android.tradefed.module.VtsHalAdapterModuleController" type="module_controller">
+        <option name="hal-package-name" value="android.hardware.nfc@1.1"/>
+    </object>
+    <target_preparer class="com.android.tradefed.targetprep.VtsHalAdapterPreparer">
+        <option name="adapter-binary-name" value="android.hardware.nfc@1.0-adapter"/>
+        <option name="hal-package-name" value="android.hardware.nfc@1.1"/>
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest">
+        <option name="package" value="com.android.devicehealth.tests"/>
+        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner"/>
+    </test>
+    <include name="CtsDevicePolicyManagerTestCases.config"/>
+</configuration>
diff --git a/nfc/V1_1/build/Android.bp b/nfc/V1_1/build/Android.bp
new file mode 100644
index 0000000..0c14d22
--- /dev/null
+++ b/nfc/V1_1/build/Android.bp
@@ -0,0 +1,105 @@
+// This file was auto-generated. Do not edit manually.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
+
+// Generate .vts spec files.
+hal2vts {
+    name: "android.hardware.nfc@1.1-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
+    srcs: [
+        ":android.hardware.nfc@1.1_hal",
+    ],
+    out: [
+        "android/hardware/nfc/1.1/Nfc.vts",
+        "android/hardware/nfc/1.1/NfcClientCallback.vts",
+        "android/hardware/nfc/1.1/types.vts",
+    ],
+}
+
+// Build VTS driver.
+genrule {
+    name: "android.hardware.nfc@1.1-vts.driver_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.nfc@1.1 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/nfc/1.1/ $(genDir)/android/hardware/nfc/1.1/",
+    srcs: [
+        ":android.hardware.nfc@1.1_hal",
+    ],
+    out: [
+        "android/hardware/nfc/1.1/Nfc.vts.cpp",
+        "android/hardware/nfc/1.1/NfcClientCallback.vts.cpp",
+        "android/hardware/nfc/1.1/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.nfc@1.1-vts.driver_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.nfc@1.1 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/nfc/1.1/ $(genDir)/android/hardware/nfc/1.1/",
+    srcs: [
+        ":android.hardware.nfc@1.1_hal",
+    ],
+    out: [
+        "android/hardware/nfc/1.1/Nfc.vts.h",
+        "android/hardware/nfc/1.1/NfcClientCallback.vts.h",
+        "android/hardware/nfc/1.1/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.nfc@1.1-vts.driver",
+    generated_sources: ["android.hardware.nfc@1.1-vts.driver_genc++"],
+    generated_headers: ["android.hardware.nfc@1.1-vts.driver_genc++_headers"],
+    export_generated_headers: ["android.hardware.nfc@1.1-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [
+        "android.hardware.nfc@1.0-vts.driver",
+    ],
+    static_libs: [
+        "android.hardware.nfc@1.0",
+        "android.hardware.nfc@1.1",
+    ],
+}
+
+// Build VTS profiler.
+genrule {
+    name: "android.hardware.nfc@1.1-vts.profiler_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.nfc@1.1 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/nfc/1.1/ $(genDir)/android/hardware/nfc/1.1/",
+    srcs: [
+        ":android.hardware.nfc@1.1_hal",
+    ],
+    out: [
+        "android/hardware/nfc/1.1/Nfc.vts.cpp",
+        "android/hardware/nfc/1.1/NfcClientCallback.vts.cpp",
+        "android/hardware/nfc/1.1/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.nfc@1.1-vts.profiler_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.nfc@1.1 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/nfc/1.1/ $(genDir)/android/hardware/nfc/1.1/",
+    srcs: [
+        ":android.hardware.nfc@1.1_hal",
+    ],
+    out: [
+        "android/hardware/nfc/1.1/Nfc.vts.h",
+        "android/hardware/nfc/1.1/NfcClientCallback.vts.h",
+        "android/hardware/nfc/1.1/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.nfc@1.1-vts.profiler",
+    generated_sources: ["android.hardware.nfc@1.1-vts.profiler_genc++"],
+    generated_headers: ["android.hardware.nfc@1.1-vts.profiler_genc++_headers"],
+    export_generated_headers: ["android.hardware.nfc@1.1-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [
+        "android.hardware.nfc@1.0-vts.profiler",
+    ],
+    static_libs: [
+        "android.hardware.nfc@1.0",
+        "android.hardware.nfc@1.1",
+    ],
+}
+
diff --git a/radio/V1_1/target/Android.mk b/nfc/V1_1/target/Android.mk
similarity index 81%
copy from radio/V1_1/target/Android.mk
copy to nfc/V1_1/target/Android.mk
index bd1a0f1..3a0a340 100644
--- a/radio/V1_1/target/Android.mk
+++ b/nfc/V1_1/target/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalNfcV1_1Target
+VTS_CONFIG_SRC_DIR := testcases/hal/nfc/V1_1/target
 include test/vts/tools/build/Android.host_config.mk
diff --git a/radio/V1_1/target/AndroidTest.xml b/nfc/V1_1/target/AndroidTest.xml
similarity index 73%
copy from radio/V1_1/target/AndroidTest.xml
copy to nfc/V1_1/target/AndroidTest.xml
index 76b339d..6ebe1e5 100644
--- a/radio/V1_1/target/AndroidTest.xml
+++ b/nfc/V1_1/target/AndroidTest.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2017 The Android Open Source Project
+<!-- Copyright (C) 2018 The Android Open Source Project
 
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
@@ -13,21 +13,22 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Config for VTS VtsHalRadioV1_1Target test cases">
+<configuration description="Config for VTS VtsHalNfcV1_1Target test cases">
     <option name="config-descriptor:metadata" key="plan" value="vts-hal" />
     <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
-        <option name="test-module-name" value="VtsHalRadioV1_1Target"/>
-        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalRadioV1_1TargetTest/VtsHalRadioV1_1TargetTest"/>
-        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalRadioV1_1TargetTest/VtsHalRadioV1_1TargetTest"/>
+        <option name="test-module-name" value="VtsHalNfcV1_1Target"/>
+        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalNfcV1_1TargetTest/VtsHalNfcV1_1TargetTest"/>
+        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalNfcV1_1TargetTest/VtsHalNfcV1_1TargetTest"/>
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.radio@1.1"/>
+        <option name="exclude-coverage-path" value="frameworks/av/media"/>
+        <option name="exclude-coverage-path" value="frameworks/rs"/>
         <option name="test-timeout" value="15m"/>
+        <option name="runtime-hint" value="5m"/>
     </test>
 </configuration>
diff --git a/radio/V1_1/target/Android.mk b/nfc/V1_1/target_profiling/Android.mk
similarity index 80%
copy from radio/V1_1/target/Android.mk
copy to nfc/V1_1/target_profiling/Android.mk
index bd1a0f1..bad3c63 100644
--- a/radio/V1_1/target/Android.mk
+++ b/nfc/V1_1/target_profiling/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalNfcV1_1TargetProfiling
+VTS_CONFIG_SRC_DIR := testcases/hal/nfc/V1_1/target_profiling
 include test/vts/tools/build/Android.host_config.mk
diff --git a/nfc/V1_1/target_profiling/AndroidTest.xml b/nfc/V1_1/target_profiling/AndroidTest.xml
new file mode 100644
index 0000000..547ae1b
--- /dev/null
+++ b/nfc/V1_1/target_profiling/AndroidTest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS VtsHalNfcV1_1TargetProfiling test cases">
+    <option name="config-descriptor:metadata" key="plan" value="vts-hal-profiling" />
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="abort-on-push-failure" value="false"/>
+        <option name="push-group" value="HalHidlTargetProfilingTest.push"/>
+        <option name="cleanup" value="true"/>
+        <option name="push" value="DATA/lib/android.hardware.nfc@1.1-vts.profiler.so->/data/local/tmp/32/android.hardware.nfc@1.1-vts.profiler.so"/>
+        <option name="push" value="DATA/lib64/android.hardware.nfc@1.1-vts.profiler.so->/data/local/tmp/64/android.hardware.nfc@1.1-vts.profiler.so"/>
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+        <option name="test-module-name" value="VtsHalNfcV1_1TargetProfiling"/>
+        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalNfcV1_1TargetTest/VtsHalNfcV1_1TargetTest"/>
+        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalNfcV1_1TargetTest/VtsHalNfcV1_1TargetTest"/>
+        <option name="binary-test-type" value="hal_hidl_gtest"/>
+        <option name="binary-test-disable-framework" value="true"/>
+        <option name="binary-test-stop-native-servers" value="true"/>
+        <option name="enable-profiling" value="true"/>
+        <option name="test-timeout" value="30m"/>
+    </test>
+</configuration>
diff --git a/oemlock/Android.bp b/oemlock/Android.bp
deleted file mode 100644
index cdc8905..0000000
--- a/oemlock/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "V1_0",
-]
diff --git a/oemlock/V1_0/Android.bp b/oemlock/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/oemlock/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/oemlock/V1_0/build/Android.bp b/oemlock/V1_0/build/Android.bp
index 3dfaa93..0b7a346 100644
--- a/oemlock/V1_0/build/Android.bp
+++ b/oemlock/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.oemlock@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.oemlock@1.0_hal",
     ],
@@ -17,7 +18,7 @@
 genrule {
     name: "android.hardware.oemlock@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.oemlock@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/oemlock/1.0/ $(genDir)/android/hardware/oemlock/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.oemlock@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/oemlock/1.0/ $(genDir)/android/hardware/oemlock/1.0/",
     srcs: [
         ":android.hardware.oemlock@1.0_hal",
     ],
@@ -30,7 +31,7 @@
 genrule {
     name: "android.hardware.oemlock@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.oemlock@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/oemlock/1.0/ $(genDir)/android/hardware/oemlock/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.oemlock@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/oemlock/1.0/ $(genDir)/android/hardware/oemlock/1.0/",
     srcs: [
         ":android.hardware.oemlock@1.0_hal",
     ],
@@ -45,36 +46,10 @@
     generated_sources: ["android.hardware.oemlock@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.oemlock@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.oemlock@1.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.oemlock@1.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -82,7 +57,7 @@
 genrule {
     name: "android.hardware.oemlock@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.oemlock@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/oemlock/1.0/ $(genDir)/android/hardware/oemlock/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.oemlock@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/oemlock/1.0/ $(genDir)/android/hardware/oemlock/1.0/",
     srcs: [
         ":android.hardware.oemlock@1.0_hal",
     ],
@@ -95,7 +70,7 @@
 genrule {
     name: "android.hardware.oemlock@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.oemlock@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/oemlock/1.0/ $(genDir)/android/hardware/oemlock/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.oemlock@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/oemlock/1.0/ $(genDir)/android/hardware/oemlock/1.0/",
     srcs: [
         ":android.hardware.oemlock@1.0_hal",
     ],
@@ -110,27 +85,10 @@
     generated_sources: ["android.hardware.oemlock@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.oemlock@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.oemlock@1.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.oemlock@1.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/oemlock/V1_0/target/AndroidTest.xml b/oemlock/V1_0/target/AndroidTest.xml
index 0ad4189..caa8adb 100644
--- a/oemlock/V1_0/target/AndroidTest.xml
+++ b/oemlock/V1_0/target/AndroidTest.xml
@@ -19,14 +19,12 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalOemLockV1_0Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalOemLockV1_0TargetTest/VtsHalOemLockV1_0TargetTest"/>
         <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalOemLockV1_0TargetTest/VtsHalOemLockV1_0TargetTest"/>
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.oemlock@1.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/oemlock/V1_0/target_profiling/AndroidTest.xml b/oemlock/V1_0/target_profiling/AndroidTest.xml
index ec03c93..d1e0a06 100644
--- a/oemlock/V1_0/target_profiling/AndroidTest.xml
+++ b/oemlock/V1_0/target_profiling/AndroidTest.xml
@@ -22,7 +22,6 @@
         <option name="push" value="DATA/lib/android.hardware.oemlock@1.0-vts.profiler.so->/data/local/tmp/32/android.hardware.oemlock@1.0-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.oemlock@1.0-vts.profiler.so->/data/local/tmp/64/android.hardware.oemlock@1.0-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalOemLockV1_0TargetProfiling"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalOemLockV1_0TargetTest/VtsHalOemLockV1_0TargetTest"/>
@@ -31,7 +30,6 @@
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.oemlock@1.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/power/Android.bp b/power/Android.bp
deleted file mode 100644
index 2e98897..0000000
--- a/power/Android.bp
+++ /dev/null
@@ -1,7 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "V1_0",
-    "V1_1",
-]
diff --git a/power/V1_0/Android.bp b/power/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/power/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/power/V1_0/build/Android.bp b/power/V1_0/build/Android.bp
index a2c74b8..500860d 100644
--- a/power/V1_0/build/Android.bp
+++ b/power/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.power@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.power@1.0_hal",
     ],
@@ -17,7 +18,7 @@
 genrule {
     name: "android.hardware.power@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.power@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/power/1.0/ $(genDir)/android/hardware/power/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.power@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/power/1.0/ $(genDir)/android/hardware/power/1.0/",
     srcs: [
         ":android.hardware.power@1.0_hal",
     ],
@@ -30,7 +31,7 @@
 genrule {
     name: "android.hardware.power@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.power@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/power/1.0/ $(genDir)/android/hardware/power/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.power@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/power/1.0/ $(genDir)/android/hardware/power/1.0/",
     srcs: [
         ":android.hardware.power@1.0_hal",
     ],
@@ -45,36 +46,10 @@
     generated_sources: ["android.hardware.power@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.power@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.power@1.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.power@1.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -82,7 +57,7 @@
 genrule {
     name: "android.hardware.power@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.power@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/power/1.0/ $(genDir)/android/hardware/power/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.power@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/power/1.0/ $(genDir)/android/hardware/power/1.0/",
     srcs: [
         ":android.hardware.power@1.0_hal",
     ],
@@ -95,7 +70,7 @@
 genrule {
     name: "android.hardware.power@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.power@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/power/1.0/ $(genDir)/android/hardware/power/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.power@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/power/1.0/ $(genDir)/android/hardware/power/1.0/",
     srcs: [
         ":android.hardware.power@1.0_hal",
     ],
@@ -110,27 +85,10 @@
     generated_sources: ["android.hardware.power@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.power@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.power@1.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.power@1.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/power/V1_0/target/AndroidTest.xml b/power/V1_0/target/AndroidTest.xml
index 0ceb76f..27ffcfd 100644
--- a/power/V1_0/target/AndroidTest.xml
+++ b/power/V1_0/target/AndroidTest.xml
@@ -19,7 +19,6 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalPowerV1_0Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalPowerV1_0TargetTest/VtsHalPowerV1_0TargetTest"/>
@@ -27,7 +26,7 @@
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.power@1.0"/>
+        <option name="disable-cpu-frequency-scaling" value="false"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/power/V1_0/target_profiling/AndroidTest.xml b/power/V1_0/target_profiling/AndroidTest.xml
index 9cda6e9..af4f55f 100644
--- a/power/V1_0/target_profiling/AndroidTest.xml
+++ b/power/V1_0/target_profiling/AndroidTest.xml
@@ -22,7 +22,6 @@
         <option name="push" value="DATA/lib/android.hardware.power@1.0-vts.profiler.so->/data/local/tmp/32/android.hardware.power@1.0-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.power@1.0-vts.profiler.so->/data/local/tmp/64/android.hardware.power@1.0-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalPowerV1_0TargetProfiling"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalPowerV1_0TargetTest/VtsHalPowerV1_0TargetTest"/>
@@ -30,8 +29,8 @@
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
+        <option name="disable-cpu-frequency-scaling" value="false"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.power@1.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/power/V1_0/target_replay/AndroidTest.xml b/power/V1_0/target_replay/AndroidTest.xml
index 95d6d31..74309e4 100644
--- a/power/V1_0/target_replay/AndroidTest.xml
+++ b/power/V1_0/target_replay/AndroidTest.xml
@@ -24,7 +24,6 @@
         <option name="push" value="DATA/lib/android.hardware.power@1.0-vts.driver.so->/data/local/tmp/32/android.hardware.power@1.0-vts.driver.so"/>
         <option name="push" value="DATA/lib64/android.hardware.power@1.0-vts.driver.so->/data/local/tmp/64/android.hardware.power@1.0-vts.driver.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalPowerV1_0TargetReplay"/>
         <option name="binary-test-type" value="hal_hidl_replay_test"/>
@@ -32,8 +31,6 @@
         <option name="hal-hidl-replay-test-trace-path" value="test/vts-testcase/hal-trace/power/V1_0/android.hardware.power_1.0_16558631751.vts.trace"/>
         <option name="hal-hidl-replay-test-trace-path" value="test/vts-testcase/hal-trace/power/V1_0/android.hardware.power_1.0_16053566180.vts.trace"/>
         <option name="hal-hidl-replay-test-trace-path" value="test/vts-testcase/hal-trace/power/V1_0/android.hardware.power_1.0_16273110837.vts.trace"/>
-        <option name="hal-hidl-package-name" value="android.hardware.power@1.0"/>
-        <option name="precondition-lshal" value="android.hardware.power@1.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/power/V1_1/Android.bp b/power/V1_1/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/power/V1_1/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/radio/V1_1/target/Android.mk b/power/V1_1/adapter/Android.mk
similarity index 81%
copy from radio/V1_1/target/Android.mk
copy to power/V1_1/adapter/Android.mk
index bd1a0f1..13bd2b9 100644
--- a/radio/V1_1/target/Android.mk
+++ b/power/V1_1/adapter/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalPowerV1_1Adapter
+VTS_CONFIG_SRC_DIR := testcases/hal/power/V1_1/adapter
 include test/vts/tools/build/Android.host_config.mk
diff --git a/power/V1_1/adapter/AndroidTest.xml b/power/V1_1/adapter/AndroidTest.xml
new file mode 100644
index 0000000..d85639f
--- /dev/null
+++ b/power/V1_1/adapter/AndroidTest.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS VtsHalPowerV1_1Adapter test cases">
+    <option key="plan" name="config-descriptor:metadata" value="vts-hal-adapter"/>
+    <object class="com.android.tradefed.module.VtsHalAdapterModuleController" type="module_controller">
+        <option name="hal-package-name" value="android.hardware.power@1.1"/>
+    </object>
+    <target_preparer class="com.android.tradefed.targetprep.VtsHalAdapterPreparer">
+        <option name="adapter-binary-name" value="android.hardware.power@1.0-adapter"/>
+        <option name="hal-package-name" value="android.hardware.power@1.1"/>
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest">
+        <option name="package" value="com.android.devicehealth.tests"/>
+        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner"/>
+    </test>
+    <include name="CtsDevicePolicyManagerTestCases.config"/>
+</configuration>
diff --git a/power/V1_1/build/Android.bp b/power/V1_1/build/Android.bp
index 6e9ab9e..2236803 100644
--- a/power/V1_1/build/Android.bp
+++ b/power/V1_1/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.power@1.1-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.power@1.1_hal",
     ],
@@ -17,7 +18,7 @@
 genrule {
     name: "android.hardware.power@1.1-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.power@1.1 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/power/1.1/ $(genDir)/android/hardware/power/1.1/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.power@1.1 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/power/1.1/ $(genDir)/android/hardware/power/1.1/",
     srcs: [
         ":android.hardware.power@1.1_hal",
     ],
@@ -30,7 +31,7 @@
 genrule {
     name: "android.hardware.power@1.1-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.power@1.1 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/power/1.1/ $(genDir)/android/hardware/power/1.1/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.power@1.1 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/power/1.1/ $(genDir)/android/hardware/power/1.1/",
     srcs: [
         ":android.hardware.power@1.1_hal",
     ],
@@ -45,38 +46,13 @@
     generated_sources: ["android.hardware.power@1.1-vts.driver_genc++"],
     generated_headers: ["android.hardware.power@1.1-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.power@1.1-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
     shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+        "android.hardware.power@1.0-vts.driver",
+    ],
+    static_libs: [
+        "android.hardware.power@1.0",
         "android.hardware.power@1.1",
-        "android.hardware.power@1.0",
-        "android.hardware.power@1.0-vts.driver",
-    ],
-    export_shared_lib_headers: [
-        "android.hardware.power@1.0",
-        "android.hardware.power@1.0-vts.driver",
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -84,7 +60,7 @@
 genrule {
     name: "android.hardware.power@1.1-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.power@1.1 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/power/1.1/ $(genDir)/android/hardware/power/1.1/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.power@1.1 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/power/1.1/ $(genDir)/android/hardware/power/1.1/",
     srcs: [
         ":android.hardware.power@1.1_hal",
     ],
@@ -97,7 +73,7 @@
 genrule {
     name: "android.hardware.power@1.1-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.power@1.1 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/power/1.1/ $(genDir)/android/hardware/power/1.1/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.power@1.1 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/power/1.1/ $(genDir)/android/hardware/power/1.1/",
     srcs: [
         ":android.hardware.power@1.1_hal",
     ],
@@ -112,28 +88,13 @@
     generated_sources: ["android.hardware.power@1.1-vts.profiler_genc++"],
     generated_headers: ["android.hardware.power@1.1-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.power@1.1-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
     shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
-        "android.hardware.power@1.1",
-        "android.hardware.power@1.0",
         "android.hardware.power@1.0-vts.profiler",
     ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
+    static_libs: [
+        "android.hardware.power@1.0",
+        "android.hardware.power@1.1",
     ],
 }
 
diff --git a/power/V1_1/target/AndroidTest.xml b/power/V1_1/target/AndroidTest.xml
index 530d3ef..86ec424 100644
--- a/power/V1_1/target/AndroidTest.xml
+++ b/power/V1_1/target/AndroidTest.xml
@@ -19,7 +19,6 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalPowerV1_1Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalPowerV1_1TargetTest/VtsHalPowerV1_1TargetTest"/>
@@ -27,7 +26,7 @@
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.power@1.1"/>
+        <option name="disable-cpu-frequency-scaling" value="false"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/power/V1_1/target_profiling/AndroidTest.xml b/power/V1_1/target_profiling/AndroidTest.xml
index 7a6aa6f..fbddc17 100644
--- a/power/V1_1/target_profiling/AndroidTest.xml
+++ b/power/V1_1/target_profiling/AndroidTest.xml
@@ -24,7 +24,6 @@
         <option name="push" value="DATA/lib/android.hardware.power@1.1-vts.profiler.so->/data/local/tmp/32/android.hardware.power@1.1-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.power@1.1-vts.profiler.so->/data/local/tmp/64/android.hardware.power@1.1-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalPowerV1_1TargetProfiling"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalPowerV1_1TargetTest/VtsHalPowerV1_1TargetTest"/>
@@ -33,7 +32,6 @@
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.power@1.1"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/radio/V1_1/target/Android.mk b/power/V1_2/adapter/Android.mk
similarity index 81%
copy from radio/V1_1/target/Android.mk
copy to power/V1_2/adapter/Android.mk
index bd1a0f1..75d9f52 100644
--- a/radio/V1_1/target/Android.mk
+++ b/power/V1_2/adapter/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalPowerV1_2Adapter
+VTS_CONFIG_SRC_DIR := testcases/hal/power/V1_2/adapter
 include test/vts/tools/build/Android.host_config.mk
diff --git a/power/V1_2/adapter/AndroidTest.xml b/power/V1_2/adapter/AndroidTest.xml
new file mode 100644
index 0000000..4542192
--- /dev/null
+++ b/power/V1_2/adapter/AndroidTest.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS VtsHalPowerV1_2Adapter test cases">
+    <option key="plan" name="config-descriptor:metadata" value="vts-hal-adapter"/>
+    <object class="com.android.tradefed.module.VtsHalAdapterModuleController" type="module_controller">
+        <option name="hal-package-name" value="android.hardware.power@1.2"/>
+    </object>
+    <target_preparer class="com.android.tradefed.targetprep.VtsHalAdapterPreparer">
+        <option name="adapter-binary-name" value="android.hardware.power@1.1-adapter"/>
+        <option name="hal-package-name" value="android.hardware.power@1.2"/>
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest">
+        <option name="package" value="com.android.devicehealth.tests"/>
+        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner"/>
+    </test>
+    <include name="CtsActivityManagerDeviceTestCases.config"/>
+</configuration>
diff --git a/power/V1_2/build/Android.bp b/power/V1_2/build/Android.bp
new file mode 100644
index 0000000..52ef995
--- /dev/null
+++ b/power/V1_2/build/Android.bp
@@ -0,0 +1,104 @@
+// This file was auto-generated. Do not edit manually.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
+
+// Generate .vts spec files.
+hal2vts {
+    name: "android.hardware.power@1.2-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
+    srcs: [
+        ":android.hardware.power@1.2_hal",
+    ],
+    out: [
+        "android/hardware/power/1.2/Power.vts",
+        "android/hardware/power/1.2/types.vts",
+    ],
+}
+
+// Build VTS driver.
+genrule {
+    name: "android.hardware.power@1.2-vts.driver_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.power@1.2 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/power/1.2/ $(genDir)/android/hardware/power/1.2/",
+    srcs: [
+        ":android.hardware.power@1.2_hal",
+    ],
+    out: [
+        "android/hardware/power/1.2/Power.vts.cpp",
+        "android/hardware/power/1.2/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.power@1.2-vts.driver_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.power@1.2 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/power/1.2/ $(genDir)/android/hardware/power/1.2/",
+    srcs: [
+        ":android.hardware.power@1.2_hal",
+    ],
+    out: [
+        "android/hardware/power/1.2/Power.vts.h",
+        "android/hardware/power/1.2/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.power@1.2-vts.driver",
+    generated_sources: ["android.hardware.power@1.2-vts.driver_genc++"],
+    generated_headers: ["android.hardware.power@1.2-vts.driver_genc++_headers"],
+    export_generated_headers: ["android.hardware.power@1.2-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [
+        "android.hardware.power@1.0-vts.driver",
+        "android.hardware.power@1.1-vts.driver",
+    ],
+    static_libs: [
+        "android.hardware.power@1.0",
+        "android.hardware.power@1.1",
+        "android.hardware.power@1.2",
+    ],
+}
+
+// Build VTS profiler.
+genrule {
+    name: "android.hardware.power@1.2-vts.profiler_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.power@1.2 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/power/1.2/ $(genDir)/android/hardware/power/1.2/",
+    srcs: [
+        ":android.hardware.power@1.2_hal",
+    ],
+    out: [
+        "android/hardware/power/1.2/Power.vts.cpp",
+        "android/hardware/power/1.2/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.power@1.2-vts.profiler_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.power@1.2 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/power/1.2/ $(genDir)/android/hardware/power/1.2/",
+    srcs: [
+        ":android.hardware.power@1.2_hal",
+    ],
+    out: [
+        "android/hardware/power/1.2/Power.vts.h",
+        "android/hardware/power/1.2/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.power@1.2-vts.profiler",
+    generated_sources: ["android.hardware.power@1.2-vts.profiler_genc++"],
+    generated_headers: ["android.hardware.power@1.2-vts.profiler_genc++_headers"],
+    export_generated_headers: ["android.hardware.power@1.2-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [
+        "android.hardware.power@1.0-vts.profiler",
+        "android.hardware.power@1.1-vts.profiler",
+    ],
+    static_libs: [
+        "android.hardware.power@1.0",
+        "android.hardware.power@1.1",
+        "android.hardware.power@1.2",
+    ],
+}
+
diff --git a/radio/V1_1/target/Android.mk b/power/V1_2/target/Android.mk
similarity index 81%
copy from radio/V1_1/target/Android.mk
copy to power/V1_2/target/Android.mk
index bd1a0f1..1ce85cf 100644
--- a/radio/V1_1/target/Android.mk
+++ b/power/V1_2/target/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalPowerV1_2Target
+VTS_CONFIG_SRC_DIR := testcases/hal/power/V1_2/target
 include test/vts/tools/build/Android.host_config.mk
diff --git a/radio/V1_1/target/AndroidTest.xml b/power/V1_2/target/AndroidTest.xml
similarity index 72%
copy from radio/V1_1/target/AndroidTest.xml
copy to power/V1_2/target/AndroidTest.xml
index 76b339d..fe17d0f 100644
--- a/radio/V1_1/target/AndroidTest.xml
+++ b/power/V1_2/target/AndroidTest.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2017 The Android Open Source Project
+<!-- Copyright (C) 2018 The Android Open Source Project
 
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
@@ -13,21 +13,20 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Config for VTS VtsHalRadioV1_1Target test cases">
+<configuration description="Config for VTS VtsHalPowerV1_2Target test cases">
     <option name="config-descriptor:metadata" key="plan" value="vts-hal" />
     <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
+    <multi_target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
-        <option name="test-module-name" value="VtsHalRadioV1_1Target"/>
-        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalRadioV1_1TargetTest/VtsHalRadioV1_1TargetTest"/>
-        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalRadioV1_1TargetTest/VtsHalRadioV1_1TargetTest"/>
+        <option name="test-module-name" value="VtsHalPowerV1_2Target"/>
+        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalPowerV1_2TargetTest/VtsHalPowerV1_2TargetTest"/>
+        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalPowerV1_2TargetTest/VtsHalPowerV1_2TargetTest"/>
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.radio@1.1"/>
-        <option name="test-timeout" value="15m"/>
+        <option name="test-timeout" value="1m"/>
     </test>
 </configuration>
diff --git a/power/V1_3/build/Android.bp b/power/V1_3/build/Android.bp
new file mode 100644
index 0000000..7c7b27f
--- /dev/null
+++ b/power/V1_3/build/Android.bp
@@ -0,0 +1,108 @@
+// This file was auto-generated. Do not edit manually.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
+
+// Generate .vts spec files.
+hal2vts {
+    name: "android.hardware.power@1.3-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
+    srcs: [
+        ":android.hardware.power@1.3_hal",
+    ],
+    out: [
+        "android/hardware/power/1.3/Power.vts",
+        "android/hardware/power/1.3/types.vts",
+    ],
+}
+
+// Build VTS driver.
+genrule {
+    name: "android.hardware.power@1.3-vts.driver_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.power@1.3 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/power/1.3/ $(genDir)/android/hardware/power/1.3/",
+    srcs: [
+        ":android.hardware.power@1.3_hal",
+    ],
+    out: [
+        "android/hardware/power/1.3/Power.vts.cpp",
+        "android/hardware/power/1.3/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.power@1.3-vts.driver_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.power@1.3 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/power/1.3/ $(genDir)/android/hardware/power/1.3/",
+    srcs: [
+        ":android.hardware.power@1.3_hal",
+    ],
+    out: [
+        "android/hardware/power/1.3/Power.vts.h",
+        "android/hardware/power/1.3/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.power@1.3-vts.driver",
+    generated_sources: ["android.hardware.power@1.3-vts.driver_genc++"],
+    generated_headers: ["android.hardware.power@1.3-vts.driver_genc++_headers"],
+    export_generated_headers: ["android.hardware.power@1.3-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [
+        "android.hardware.power@1.0-vts.driver",
+        "android.hardware.power@1.1-vts.driver",
+        "android.hardware.power@1.2-vts.driver",
+    ],
+    static_libs: [
+        "android.hardware.power@1.0",
+        "android.hardware.power@1.1",
+        "android.hardware.power@1.2",
+        "android.hardware.power@1.3",
+    ],
+}
+
+// Build VTS profiler.
+genrule {
+    name: "android.hardware.power@1.3-vts.profiler_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.power@1.3 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/power/1.3/ $(genDir)/android/hardware/power/1.3/",
+    srcs: [
+        ":android.hardware.power@1.3_hal",
+    ],
+    out: [
+        "android/hardware/power/1.3/Power.vts.cpp",
+        "android/hardware/power/1.3/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.power@1.3-vts.profiler_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.power@1.3 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/power/1.3/ $(genDir)/android/hardware/power/1.3/",
+    srcs: [
+        ":android.hardware.power@1.3_hal",
+    ],
+    out: [
+        "android/hardware/power/1.3/Power.vts.h",
+        "android/hardware/power/1.3/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.power@1.3-vts.profiler",
+    generated_sources: ["android.hardware.power@1.3-vts.profiler_genc++"],
+    generated_headers: ["android.hardware.power@1.3-vts.profiler_genc++_headers"],
+    export_generated_headers: ["android.hardware.power@1.3-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [
+        "android.hardware.power@1.0-vts.profiler",
+        "android.hardware.power@1.1-vts.profiler",
+        "android.hardware.power@1.2-vts.profiler",
+    ],
+    static_libs: [
+        "android.hardware.power@1.0",
+        "android.hardware.power@1.1",
+        "android.hardware.power@1.2",
+        "android.hardware.power@1.3",
+    ],
+}
+
diff --git a/radio/V1_1/target/Android.mk b/power/V1_3/target/Android.mk
similarity index 81%
copy from radio/V1_1/target/Android.mk
copy to power/V1_3/target/Android.mk
index bd1a0f1..812df84 100644
--- a/radio/V1_1/target/Android.mk
+++ b/power/V1_3/target/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalPowerV1_3Target
+VTS_CONFIG_SRC_DIR := testcases/hal/power/V1_3/target
 include test/vts/tools/build/Android.host_config.mk
diff --git a/radio/V1_1/target/AndroidTest.xml b/power/V1_3/target/AndroidTest.xml
similarity index 72%
copy from radio/V1_1/target/AndroidTest.xml
copy to power/V1_3/target/AndroidTest.xml
index 76b339d..1be863a 100644
--- a/radio/V1_1/target/AndroidTest.xml
+++ b/power/V1_3/target/AndroidTest.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2017 The Android Open Source Project
+<!-- Copyright (C) 2018 The Android Open Source Project
 
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
@@ -13,21 +13,20 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Config for VTS VtsHalRadioV1_1Target test cases">
+<configuration description="Config for VTS VtsHalPowerV1_3Target test cases">
     <option name="config-descriptor:metadata" key="plan" value="vts-hal" />
     <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
+    <multi_target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
-        <option name="test-module-name" value="VtsHalRadioV1_1Target"/>
-        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalRadioV1_1TargetTest/VtsHalRadioV1_1TargetTest"/>
-        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalRadioV1_1TargetTest/VtsHalRadioV1_1TargetTest"/>
+        <option name="test-module-name" value="VtsHalPowerV1_3Target"/>
+        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalPowerV1_3TargetTest/VtsHalPowerV1_3TargetTest"/>
+        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalPowerV1_3TargetTest/VtsHalPowerV1_3TargetTest"/>
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.radio@1.1"/>
-        <option name="test-timeout" value="15m"/>
+        <option name="test-timeout" value="1m"/>
     </test>
 </configuration>
diff --git a/radio/Android.bp b/radio/Android.bp
deleted file mode 100644
index af8e475..0000000
--- a/radio/Android.bp
+++ /dev/null
@@ -1,8 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "V1_0",
-    "V1_1",
-    "deprecated/V1_0",
-]
diff --git a/radio/V1_0/Android.bp b/radio/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/radio/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/radio/V1_0/build/Android.bp b/radio/V1_0/build/Android.bp
index e6f03ef..360c610 100644
--- a/radio/V1_0/build/Android.bp
+++ b/radio/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.radio@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.radio@1.0_hal",
     ],
@@ -21,7 +22,7 @@
 genrule {
     name: "android.hardware.radio@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/radio/1.0/ $(genDir)/android/hardware/radio/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.radio@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/radio/1.0/ $(genDir)/android/hardware/radio/1.0/",
     srcs: [
         ":android.hardware.radio@1.0_hal",
     ],
@@ -38,7 +39,7 @@
 genrule {
     name: "android.hardware.radio@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/radio/1.0/ $(genDir)/android/hardware/radio/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.radio@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/radio/1.0/ $(genDir)/android/hardware/radio/1.0/",
     srcs: [
         ":android.hardware.radio@1.0_hal",
     ],
@@ -57,36 +58,10 @@
     generated_sources: ["android.hardware.radio@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.radio@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.radio@1.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.radio@1.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -94,7 +69,7 @@
 genrule {
     name: "android.hardware.radio@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/radio/1.0/ $(genDir)/android/hardware/radio/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.radio@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/radio/1.0/ $(genDir)/android/hardware/radio/1.0/",
     srcs: [
         ":android.hardware.radio@1.0_hal",
     ],
@@ -111,7 +86,7 @@
 genrule {
     name: "android.hardware.radio@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/radio/1.0/ $(genDir)/android/hardware/radio/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.radio@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/radio/1.0/ $(genDir)/android/hardware/radio/1.0/",
     srcs: [
         ":android.hardware.radio@1.0_hal",
     ],
@@ -130,27 +105,10 @@
     generated_sources: ["android.hardware.radio@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.radio@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.radio@1.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.radio@1.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/radio/V1_0/host/AndroidTest.xml b/radio/V1_0/host/AndroidTest.xml
index 7ff734f..fd12d6c 100644
--- a/radio/V1_0/host/AndroidTest.xml
+++ b/radio/V1_0/host/AndroidTest.xml
@@ -28,11 +28,9 @@
         <option name="push" value="DATA/lib/android.hardware.radio@1.0-vts.driver.so->/data/local/tmp/32/android.hardware.radio@1.0-vts.driver.so"/>
         <option name="push" value="DATA/lib64/android.hardware.radio@1.0-vts.driver.so->/data/local/tmp/64/android.hardware.radio@1.0-vts.driver.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalRadioV1_0Host"/>
         <option name="test-case-path" value="vts/testcases/hal/radio/V1_0/host/VtsHalRadioV1_0HostTest"/>
-        <option name="precondition-lshal" value="android.hardware.radio@1.0"/>
         <option name="test-timeout" value="30m"/>
     </test>
 </configuration>
diff --git a/radio/V1_0/host/VtsHalRadioV1_0HostTest.py b/radio/V1_0/host/VtsHalRadioV1_0HostTest.py
index f295c72..77cdb85 100644
--- a/radio/V1_0/host/VtsHalRadioV1_0HostTest.py
+++ b/radio/V1_0/host/VtsHalRadioV1_0HostTest.py
@@ -16,31 +16,19 @@
 #
 
 import logging
-import time
 
 from vts.runners.host import asserts
-from vts.runners.host import base_test
 from vts.runners.host import test_runner
-from vts.utils.python.controllers import android_device
-from vts.utils.python.precondition import precondition_utils
+from vts.testcases.template.hal_hidl_host_test import hal_hidl_host_test
 
 
-class VtsHalRadioV1_0HostTest(base_test.BaseTestClass):
-    """A simple testcase for the VEHICLE HIDL HAL."""
+class VtsHalRadioV1_0HostTest(hal_hidl_host_test.HalHidlHostTest):
+    """A simple testcase for the Radio HIDL HAL."""
 
+    TEST_HAL_SERVICES = {"android.hardware.radio@1.0::IRadio"}
     def setUpClass(self):
-        """Creates a mirror and init vehicle hal."""
-        self.dut = self.registerController(android_device)[0]
-
-        self.dut.shell.InvokeTerminal("one")
-        self.dut.shell.one.Execute("setenforce 0")  # SELinux permissive mode
-        if not precondition_utils.CanRunHidlHalTest(
-            self, self.dut, self.dut.shell.one):
-            self._skip_all_testcases = True
-            return
-
-        if self.profiling.enabled:
-            self.profiling.EnableVTSProfiling(self.dut.shell.one)
+        """Creates a mirror and init radio hal."""
+        super(VtsHalRadioV1_0HostTest, self).setUpClass()
 
         self.dut.hal.InitHidlHal(
             target_type="radio",
@@ -55,20 +43,6 @@
         self.radio_types = self.dut.hal.radio.GetHidlTypeInterface("types")
         logging.info("Radio types: %s", self.radio_types)
 
-    def tearDownClass(self):
-        """ If profiling is enabled for the test, collect the profiling data
-            and disable profiling after the test is done.
-        """
-        if not self._skip_all_testcases and self.profiling.enabled:
-            self.profiling.ProcessAndUploadTraceData()
-
-    def tearDown(self):
-        """Process trace data.
-        """
-        if self.profiling.enabled:
-            self.profiling.ProcessTraceDataForTestCase(self.dut)
-            self.profiling.DisableVTSProfiling(self.dut.shell.one)
-
     def testHelloWorld(self):
         logging.info('hello world')
 
diff --git a/radio/V1_0/target/radio/AndroidTest.xml b/radio/V1_0/target/radio/AndroidTest.xml
index 66640aa..55c2ce4 100644
--- a/radio/V1_0/target/radio/AndroidTest.xml
+++ b/radio/V1_0/target/radio/AndroidTest.xml
@@ -19,7 +19,6 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalRadioV1_0Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalRadioV1_0TargetTest/VtsHalRadioV1_0TargetTest"/>
@@ -27,9 +26,12 @@
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.radio@1.0"/>
         <option name="test-timeout" value="15m"/>
         <!-- The following test is disabled due to b/64734869 -->
         <option name="exclude-filter" value="RadioHidlTest.requestShutdown" />
+        <!-- b/109889468: Requires a live SIM card or a vendor code update -->
+        <option name="exclude-filter" value="RadioHidlTest.getImsiForApp" />
+        <!-- b/79930549: Flaky test -->
+        <option name="exclude-filter" value="RadioHidlTest.setAllowedCarriers" />
     </test>
 </configuration>
diff --git a/radio/V1_0/target/sap/AndroidTest.xml b/radio/V1_0/target/sap/AndroidTest.xml
index f3bd0bf..967592c 100644
--- a/radio/V1_0/target/sap/AndroidTest.xml
+++ b/radio/V1_0/target/sap/AndroidTest.xml
@@ -19,7 +19,6 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalSapV1_0Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalSapV1_0TargetTest/VtsHalSapV1_0TargetTest"/>
@@ -27,8 +26,6 @@
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.radio@1.0::ISap"/>
-        <option name="exclude-filter" value="SapHidlTest.transferAtrReq" />
         <option name="test-timeout" value="15m"/>
     </test>
 </configuration>
diff --git a/radio/V1_0/target_profiling/radio/AndroidTest.xml b/radio/V1_0/target_profiling/radio/AndroidTest.xml
index 6408871..479207d 100644
--- a/radio/V1_0/target_profiling/radio/AndroidTest.xml
+++ b/radio/V1_0/target_profiling/radio/AndroidTest.xml
@@ -22,7 +22,6 @@
         <option name="push" value="DATA/lib/android.hardware.radio@1.0-vts.profiler.so->/data/local/tmp/32/android.hardware.radio@1.0-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.radio@1.0-vts.profiler.so->/data/local/tmp/64/android.hardware.radio@1.0-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalRadioV1_0TargetProfiling"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalRadioV1_0TargetTest/VtsHalRadioV1_0TargetTest"/>
@@ -31,7 +30,6 @@
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.radio@1.0"/>
         <option name="test-timeout" value="15m"/>
     </test>
 </configuration>
diff --git a/radio/V1_0/target_profiling/sap/AndroidTest.xml b/radio/V1_0/target_profiling/sap/AndroidTest.xml
index 52d310c..a258f81 100644
--- a/radio/V1_0/target_profiling/sap/AndroidTest.xml
+++ b/radio/V1_0/target_profiling/sap/AndroidTest.xml
@@ -14,7 +14,7 @@
      limitations under the License.
 -->
 <configuration description="Config for VTS VtsHalSapV1_0TargetProfiling test cases">
-    <option name="config-descriptor:metadata" key="plan" value="vts-misc" />
+    <option name="config-descriptor:metadata" key="plan" value="vts-hal-profiling" />
     <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetProfilingTest.push"/>
@@ -22,7 +22,6 @@
         <option name="push" value="DATA/lib/android.hardware.radio@1.0-vts.profiler.so->/data/local/tmp/32/android.hardware.radio@1.0-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.radio@1.0-vts.profiler.so->/data/local/tmp/64/android.hardware.radio@1.0-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalSapV1_0TargetProfiling"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalSapV1_0TargetTest/VtsHalSapV1_0TargetTest"/>
@@ -31,7 +30,6 @@
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.radio@1.0::ISap"/>
         <option name="test-timeout" value="15m"/>
     </test>
 </configuration>
diff --git a/radio/V1_1/Android.bp b/radio/V1_1/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/radio/V1_1/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/radio/V1_1/target/Android.mk b/radio/V1_1/adapter/Android.mk
similarity index 81%
copy from radio/V1_1/target/Android.mk
copy to radio/V1_1/adapter/Android.mk
index bd1a0f1..52e4a0e 100644
--- a/radio/V1_1/target/Android.mk
+++ b/radio/V1_1/adapter/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalRadioV1_1Adapter
+VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/adapter
 include test/vts/tools/build/Android.host_config.mk
diff --git a/radio/V1_1/adapter/AndroidTest.xml b/radio/V1_1/adapter/AndroidTest.xml
new file mode 100644
index 0000000..1e1d782
--- /dev/null
+++ b/radio/V1_1/adapter/AndroidTest.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS VtsHalRadioV1_1Adapter test cases">
+    <option key="plan" name="config-descriptor:metadata" value="vts-hal-adapter"/>
+    <object class="com.android.tradefed.module.VtsHalAdapterModuleController" type="module_controller">
+        <option name="hal-package-name" value="android.hardware.radio@1.1"/>
+    </object>
+    <target_preparer class="com.android.tradefed.targetprep.VtsHalAdapterPreparer">
+        <option name="adapter-binary-name" value="android.hardware.radio@1.0-adapter"/>
+        <option name="hal-package-name" value="android.hardware.radio@1.1"/>
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest">
+        <option name="package" value="com.android.devicehealth.tests"/>
+        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner"/>
+    </test>
+    <include name="CtsDevicePolicyManagerTestCases.config"/>
+    <include name="CtsJobSchedulerTestCases.config"/>
+    <include name="CtsTelephonyTestCases.config"/>
+</configuration>
diff --git a/radio/V1_1/build/Android.bp b/radio/V1_1/build/Android.bp
index 2689191..9783e46 100644
--- a/radio/V1_1/build/Android.bp
+++ b/radio/V1_1/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.radio@1.1-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.radio@1.1_hal",
     ],
@@ -20,7 +21,7 @@
 genrule {
     name: "android.hardware.radio@1.1-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio@1.1 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/radio/1.1/ $(genDir)/android/hardware/radio/1.1/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.radio@1.1 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/radio/1.1/ $(genDir)/android/hardware/radio/1.1/",
     srcs: [
         ":android.hardware.radio@1.1_hal",
     ],
@@ -36,7 +37,7 @@
 genrule {
     name: "android.hardware.radio@1.1-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio@1.1 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/radio/1.1/ $(genDir)/android/hardware/radio/1.1/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.radio@1.1 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/radio/1.1/ $(genDir)/android/hardware/radio/1.1/",
     srcs: [
         ":android.hardware.radio@1.1_hal",
     ],
@@ -54,38 +55,13 @@
     generated_sources: ["android.hardware.radio@1.1-vts.driver_genc++"],
     generated_headers: ["android.hardware.radio@1.1-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.radio@1.1-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
     shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+        "android.hardware.radio@1.0-vts.driver",
+    ],
+    static_libs: [
+        "android.hardware.radio@1.0",
         "android.hardware.radio@1.1",
-        "android.hardware.radio@1.0",
-        "android.hardware.radio@1.0-vts.driver",
-    ],
-    export_shared_lib_headers: [
-        "android.hardware.radio@1.0",
-        "android.hardware.radio@1.0-vts.driver",
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -93,7 +69,7 @@
 genrule {
     name: "android.hardware.radio@1.1-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio@1.1 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/radio/1.1/ $(genDir)/android/hardware/radio/1.1/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.radio@1.1 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/radio/1.1/ $(genDir)/android/hardware/radio/1.1/",
     srcs: [
         ":android.hardware.radio@1.1_hal",
     ],
@@ -109,7 +85,7 @@
 genrule {
     name: "android.hardware.radio@1.1-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio@1.1 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/radio/1.1/ $(genDir)/android/hardware/radio/1.1/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.radio@1.1 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/radio/1.1/ $(genDir)/android/hardware/radio/1.1/",
     srcs: [
         ":android.hardware.radio@1.1_hal",
     ],
@@ -127,28 +103,13 @@
     generated_sources: ["android.hardware.radio@1.1-vts.profiler_genc++"],
     generated_headers: ["android.hardware.radio@1.1-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.radio@1.1-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
     shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
-        "android.hardware.radio@1.1",
-        "android.hardware.radio@1.0",
         "android.hardware.radio@1.0-vts.profiler",
     ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
+    static_libs: [
+        "android.hardware.radio@1.0",
+        "android.hardware.radio@1.1",
     ],
 }
 
diff --git a/radio/V1_1/target/Android.mk b/radio/V1_1/target/radio/Android.mk
similarity index 92%
rename from radio/V1_1/target/Android.mk
rename to radio/V1_1/target/radio/Android.mk
index bd1a0f1..bcc71d2 100644
--- a/radio/V1_1/target/Android.mk
+++ b/radio/V1_1/target/radio/Android.mk
@@ -19,5 +19,5 @@
 include $(CLEAR_VARS)
 
 LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target/radio
 include test/vts/tools/build/Android.host_config.mk
diff --git a/radio/V1_1/target/AndroidTest.xml b/radio/V1_1/target/radio/AndroidTest.xml
similarity index 90%
rename from radio/V1_1/target/AndroidTest.xml
rename to radio/V1_1/target/radio/AndroidTest.xml
index 76b339d..08fc1fa 100644
--- a/radio/V1_1/target/AndroidTest.xml
+++ b/radio/V1_1/target/radio/AndroidTest.xml
@@ -19,7 +19,6 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalRadioV1_1Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalRadioV1_1TargetTest/VtsHalRadioV1_1TargetTest"/>
@@ -27,7 +26,6 @@
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.radio@1.1"/>
         <option name="test-timeout" value="15m"/>
     </test>
 </configuration>
diff --git a/radio/V1_1/target/Android.mk b/radio/V1_2/adapter/Android.mk
similarity index 81%
copy from radio/V1_1/target/Android.mk
copy to radio/V1_2/adapter/Android.mk
index bd1a0f1..210d8ff 100644
--- a/radio/V1_1/target/Android.mk
+++ b/radio/V1_2/adapter/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalRadioV1_2Adapter
+VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_2/adapter
 include test/vts/tools/build/Android.host_config.mk
diff --git a/radio/V1_2/adapter/AndroidTest.xml b/radio/V1_2/adapter/AndroidTest.xml
new file mode 100644
index 0000000..edde14e
--- /dev/null
+++ b/radio/V1_2/adapter/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS VtsHalRadioV1_2Adapter test cases">
+    <option key="plan" name="config-descriptor:metadata" value="vts-hal-adapter"/>
+    <object class="com.android.tradefed.module.VtsHalAdapterModuleController" type="module_controller">
+        <option name="hal-package-name" value="android.hardware.radio@1.2"/>
+    </object>
+    <target_preparer class="com.android.tradefed.targetprep.VtsHalAdapterPreparer">
+        <option name="adapter-binary-name" value="android.hardware.radio@1.1-adapter"/>
+        <option name="hal-package-name" value="android.hardware.radio@1.2"/>
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest">
+        <option name="package" value="com.android.devicehealth.tests"/>
+        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner"/>
+    </test>
+</configuration>
diff --git a/radio/V1_2/build/Android.bp b/radio/V1_2/build/Android.bp
new file mode 100644
index 0000000..2654c1e
--- /dev/null
+++ b/radio/V1_2/build/Android.bp
@@ -0,0 +1,119 @@
+// This file was auto-generated. Do not edit manually.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
+
+// Generate .vts spec files.
+hal2vts {
+    name: "android.hardware.radio@1.2-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
+    srcs: [
+        ":android.hardware.radio@1.2_hal",
+    ],
+    out: [
+        "android/hardware/radio/1.2/Radio.vts",
+        "android/hardware/radio/1.2/RadioIndication.vts",
+        "android/hardware/radio/1.2/RadioResponse.vts",
+        "android/hardware/radio/1.2/Sap.vts",
+        "android/hardware/radio/1.2/types.vts",
+    ],
+}
+
+// Build VTS driver.
+genrule {
+    name: "android.hardware.radio@1.2-vts.driver_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.radio@1.2 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/radio/1.2/ $(genDir)/android/hardware/radio/1.2/",
+    srcs: [
+        ":android.hardware.radio@1.2_hal",
+    ],
+    out: [
+        "android/hardware/radio/1.2/Radio.vts.cpp",
+        "android/hardware/radio/1.2/RadioIndication.vts.cpp",
+        "android/hardware/radio/1.2/RadioResponse.vts.cpp",
+        "android/hardware/radio/1.2/Sap.vts.cpp",
+        "android/hardware/radio/1.2/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.radio@1.2-vts.driver_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.radio@1.2 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/radio/1.2/ $(genDir)/android/hardware/radio/1.2/",
+    srcs: [
+        ":android.hardware.radio@1.2_hal",
+    ],
+    out: [
+        "android/hardware/radio/1.2/Radio.vts.h",
+        "android/hardware/radio/1.2/RadioIndication.vts.h",
+        "android/hardware/radio/1.2/RadioResponse.vts.h",
+        "android/hardware/radio/1.2/Sap.vts.h",
+        "android/hardware/radio/1.2/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.radio@1.2-vts.driver",
+    generated_sources: ["android.hardware.radio@1.2-vts.driver_genc++"],
+    generated_headers: ["android.hardware.radio@1.2-vts.driver_genc++_headers"],
+    export_generated_headers: ["android.hardware.radio@1.2-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [
+        "android.hardware.radio@1.0-vts.driver",
+        "android.hardware.radio@1.1-vts.driver",
+    ],
+    static_libs: [
+        "android.hardware.radio@1.0",
+        "android.hardware.radio@1.1",
+        "android.hardware.radio@1.2",
+    ],
+}
+
+// Build VTS profiler.
+genrule {
+    name: "android.hardware.radio@1.2-vts.profiler_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.radio@1.2 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/radio/1.2/ $(genDir)/android/hardware/radio/1.2/",
+    srcs: [
+        ":android.hardware.radio@1.2_hal",
+    ],
+    out: [
+        "android/hardware/radio/1.2/Radio.vts.cpp",
+        "android/hardware/radio/1.2/RadioIndication.vts.cpp",
+        "android/hardware/radio/1.2/RadioResponse.vts.cpp",
+        "android/hardware/radio/1.2/Sap.vts.cpp",
+        "android/hardware/radio/1.2/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.radio@1.2-vts.profiler_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.radio@1.2 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/radio/1.2/ $(genDir)/android/hardware/radio/1.2/",
+    srcs: [
+        ":android.hardware.radio@1.2_hal",
+    ],
+    out: [
+        "android/hardware/radio/1.2/Radio.vts.h",
+        "android/hardware/radio/1.2/RadioIndication.vts.h",
+        "android/hardware/radio/1.2/RadioResponse.vts.h",
+        "android/hardware/radio/1.2/Sap.vts.h",
+        "android/hardware/radio/1.2/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.radio@1.2-vts.profiler",
+    generated_sources: ["android.hardware.radio@1.2-vts.profiler_genc++"],
+    generated_headers: ["android.hardware.radio@1.2-vts.profiler_genc++_headers"],
+    export_generated_headers: ["android.hardware.radio@1.2-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [
+        "android.hardware.radio@1.0-vts.profiler",
+        "android.hardware.radio@1.1-vts.profiler",
+    ],
+    static_libs: [
+        "android.hardware.radio@1.0",
+        "android.hardware.radio@1.1",
+        "android.hardware.radio@1.2",
+    ],
+}
+
diff --git a/radio/V1_1/target/Android.mk b/radio/V1_2/target/radio/Android.mk
similarity index 81%
copy from radio/V1_1/target/Android.mk
copy to radio/V1_2/target/radio/Android.mk
index bd1a0f1..546b2e8 100644
--- a/radio/V1_1/target/Android.mk
+++ b/radio/V1_2/target/radio/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalRadioV1_2Target
+VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_2/target/radio
 include test/vts/tools/build/Android.host_config.mk
diff --git a/radio/V1_1/target/AndroidTest.xml b/radio/V1_2/target/radio/AndroidTest.xml
similarity index 70%
copy from radio/V1_1/target/AndroidTest.xml
copy to radio/V1_2/target/radio/AndroidTest.xml
index 76b339d..182c325 100644
--- a/radio/V1_1/target/AndroidTest.xml
+++ b/radio/V1_2/target/radio/AndroidTest.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2017 The Android Open Source Project
+<!-- Copyright (C) 2018 The Android Open Source Project
 
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
@@ -13,21 +13,22 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Config for VTS VtsHalRadioV1_1Target test cases">
+<configuration description="Config for VTS VtsHalRadioV1_2Target test cases">
     <option name="config-descriptor:metadata" key="plan" value="vts-hal" />
     <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
-        <option name="test-module-name" value="VtsHalRadioV1_1Target"/>
-        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalRadioV1_1TargetTest/VtsHalRadioV1_1TargetTest"/>
-        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalRadioV1_1TargetTest/VtsHalRadioV1_1TargetTest"/>
+        <option name="test-module-name" value="VtsHalRadioV1_2Target"/>
+        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalRadioV1_2TargetTest/VtsHalRadioV1_2TargetTest"/>
+        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalRadioV1_2TargetTest/VtsHalRadioV1_2TargetTest"/>
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.radio@1.1"/>
         <option name="test-timeout" value="15m"/>
+        <!-- b/64734869: a known incompatibility with new tests (waiver) -->
+        <option name="exclude-filter" value="RadioHidlTest_v1_2.startNetworkScan_GoodRequest1" />
+        <option name="exclude-filter" value="RadioHidlTest_v1_2.startNetworkScan_GoodRequest2" />
     </test>
 </configuration>
diff --git a/radio/config/V1_0/build/Android.bp b/radio/config/V1_0/build/Android.bp
new file mode 100644
index 0000000..44aab85
--- /dev/null
+++ b/radio/config/V1_0/build/Android.bp
@@ -0,0 +1,110 @@
+// This file was auto-generated. Do not edit manually.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
+
+// Generate .vts spec files.
+hal2vts {
+    name: "android.hardware.radio.config@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
+    srcs: [
+        ":android.hardware.radio.config@1.0_hal",
+    ],
+    out: [
+        "android/hardware/radio/config/1.0/RadioConfig.vts",
+        "android/hardware/radio/config/1.0/RadioConfigIndication.vts",
+        "android/hardware/radio/config/1.0/RadioConfigResponse.vts",
+        "android/hardware/radio/config/1.0/types.vts",
+    ],
+}
+
+// Build VTS driver.
+genrule {
+    name: "android.hardware.radio.config@1.0-vts.driver_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.radio.config@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/radio/config/1.0/ $(genDir)/android/hardware/radio/config/1.0/",
+    srcs: [
+        ":android.hardware.radio.config@1.0_hal",
+    ],
+    out: [
+        "android/hardware/radio/config/1.0/RadioConfig.vts.cpp",
+        "android/hardware/radio/config/1.0/RadioConfigIndication.vts.cpp",
+        "android/hardware/radio/config/1.0/RadioConfigResponse.vts.cpp",
+        "android/hardware/radio/config/1.0/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.radio.config@1.0-vts.driver_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.radio.config@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/radio/config/1.0/ $(genDir)/android/hardware/radio/config/1.0/",
+    srcs: [
+        ":android.hardware.radio.config@1.0_hal",
+    ],
+    out: [
+        "android/hardware/radio/config/1.0/RadioConfig.vts.h",
+        "android/hardware/radio/config/1.0/RadioConfigIndication.vts.h",
+        "android/hardware/radio/config/1.0/RadioConfigResponse.vts.h",
+        "android/hardware/radio/config/1.0/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.radio.config@1.0-vts.driver",
+    generated_sources: ["android.hardware.radio.config@1.0-vts.driver_genc++"],
+    generated_headers: ["android.hardware.radio.config@1.0-vts.driver_genc++_headers"],
+    export_generated_headers: ["android.hardware.radio.config@1.0-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [
+        "android.hardware.radio@1.0-vts.driver",
+    ],
+    static_libs: [
+        "android.hardware.radio.config@1.0",
+        "android.hardware.radio@1.0",
+    ],
+}
+
+// Build VTS profiler.
+genrule {
+    name: "android.hardware.radio.config@1.0-vts.profiler_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.radio.config@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/radio/config/1.0/ $(genDir)/android/hardware/radio/config/1.0/",
+    srcs: [
+        ":android.hardware.radio.config@1.0_hal",
+    ],
+    out: [
+        "android/hardware/radio/config/1.0/RadioConfig.vts.cpp",
+        "android/hardware/radio/config/1.0/RadioConfigIndication.vts.cpp",
+        "android/hardware/radio/config/1.0/RadioConfigResponse.vts.cpp",
+        "android/hardware/radio/config/1.0/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.radio.config@1.0-vts.profiler_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.radio.config@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/radio/config/1.0/ $(genDir)/android/hardware/radio/config/1.0/",
+    srcs: [
+        ":android.hardware.radio.config@1.0_hal",
+    ],
+    out: [
+        "android/hardware/radio/config/1.0/RadioConfig.vts.h",
+        "android/hardware/radio/config/1.0/RadioConfigIndication.vts.h",
+        "android/hardware/radio/config/1.0/RadioConfigResponse.vts.h",
+        "android/hardware/radio/config/1.0/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.radio.config@1.0-vts.profiler",
+    generated_sources: ["android.hardware.radio.config@1.0-vts.profiler_genc++"],
+    generated_headers: ["android.hardware.radio.config@1.0-vts.profiler_genc++_headers"],
+    export_generated_headers: ["android.hardware.radio.config@1.0-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [
+        "android.hardware.radio@1.0-vts.profiler",
+    ],
+    static_libs: [
+        "android.hardware.radio.config@1.0",
+        "android.hardware.radio@1.0",
+    ],
+}
+
diff --git a/radio/deprecated/V1_0/Android.bp b/radio/deprecated/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/radio/deprecated/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/radio/deprecated/V1_0/build/Android.bp b/radio/deprecated/V1_0/build/Android.bp
index da9ffc2..f7bb3f6 100644
--- a/radio/deprecated/V1_0/build/Android.bp
+++ b/radio/deprecated/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.radio.deprecated@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.radio.deprecated@1.0_hal",
     ],
@@ -18,7 +19,7 @@
 genrule {
     name: "android.hardware.radio.deprecated@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio.deprecated@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/radio/deprecated/1.0/ $(genDir)/android/hardware/radio/deprecated/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.radio.deprecated@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/radio/deprecated/1.0/ $(genDir)/android/hardware/radio/deprecated/1.0/",
     srcs: [
         ":android.hardware.radio.deprecated@1.0_hal",
     ],
@@ -32,7 +33,7 @@
 genrule {
     name: "android.hardware.radio.deprecated@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio.deprecated@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/radio/deprecated/1.0/ $(genDir)/android/hardware/radio/deprecated/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.radio.deprecated@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/radio/deprecated/1.0/ $(genDir)/android/hardware/radio/deprecated/1.0/",
     srcs: [
         ":android.hardware.radio.deprecated@1.0_hal",
     ],
@@ -48,38 +49,13 @@
     generated_sources: ["android.hardware.radio.deprecated@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.radio.deprecated@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.radio.deprecated@1.0-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
     shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+        "android.hardware.radio@1.0-vts.driver",
+    ],
+    static_libs: [
         "android.hardware.radio.deprecated@1.0",
         "android.hardware.radio@1.0",
-        "android.hardware.radio@1.0-vts.driver",
-    ],
-    export_shared_lib_headers: [
-        "android.hardware.radio@1.0",
-        "android.hardware.radio@1.0-vts.driver",
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -87,7 +63,7 @@
 genrule {
     name: "android.hardware.radio.deprecated@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio.deprecated@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/radio/deprecated/1.0/ $(genDir)/android/hardware/radio/deprecated/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.radio.deprecated@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/radio/deprecated/1.0/ $(genDir)/android/hardware/radio/deprecated/1.0/",
     srcs: [
         ":android.hardware.radio.deprecated@1.0_hal",
     ],
@@ -101,7 +77,7 @@
 genrule {
     name: "android.hardware.radio.deprecated@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio.deprecated@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/radio/deprecated/1.0/ $(genDir)/android/hardware/radio/deprecated/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.radio.deprecated@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/radio/deprecated/1.0/ $(genDir)/android/hardware/radio/deprecated/1.0/",
     srcs: [
         ":android.hardware.radio.deprecated@1.0_hal",
     ],
@@ -117,28 +93,13 @@
     generated_sources: ["android.hardware.radio.deprecated@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.radio.deprecated@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.radio.deprecated@1.0-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
     shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
-        "android.hardware.radio.deprecated@1.0",
-        "android.hardware.radio@1.0",
         "android.hardware.radio@1.0-vts.profiler",
     ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
+    static_libs: [
+        "android.hardware.radio.deprecated@1.0",
+        "android.hardware.radio@1.0",
     ],
 }
 
diff --git a/renderscript/Android.bp b/renderscript/Android.bp
deleted file mode 100644
index cdc8905..0000000
--- a/renderscript/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "V1_0",
-]
diff --git a/renderscript/V1_0/Android.bp b/renderscript/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/renderscript/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/renderscript/V1_0/build/Android.bp b/renderscript/V1_0/build/Android.bp
index 32e4db8..b9cd635 100644
--- a/renderscript/V1_0/build/Android.bp
+++ b/renderscript/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.renderscript@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.renderscript@1.0_hal",
     ],
@@ -18,7 +19,7 @@
 genrule {
     name: "android.hardware.renderscript@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.renderscript@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/renderscript/1.0/ $(genDir)/android/hardware/renderscript/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.renderscript@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/renderscript/1.0/ $(genDir)/android/hardware/renderscript/1.0/",
     srcs: [
         ":android.hardware.renderscript@1.0_hal",
     ],
@@ -32,7 +33,7 @@
 genrule {
     name: "android.hardware.renderscript@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.renderscript@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/renderscript/1.0/ $(genDir)/android/hardware/renderscript/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.renderscript@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/renderscript/1.0/ $(genDir)/android/hardware/renderscript/1.0/",
     srcs: [
         ":android.hardware.renderscript@1.0_hal",
     ],
@@ -48,36 +49,10 @@
     generated_sources: ["android.hardware.renderscript@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.renderscript@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.renderscript@1.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.renderscript@1.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -85,7 +60,7 @@
 genrule {
     name: "android.hardware.renderscript@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.renderscript@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/renderscript/1.0/ $(genDir)/android/hardware/renderscript/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.renderscript@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/renderscript/1.0/ $(genDir)/android/hardware/renderscript/1.0/",
     srcs: [
         ":android.hardware.renderscript@1.0_hal",
     ],
@@ -99,7 +74,7 @@
 genrule {
     name: "android.hardware.renderscript@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.renderscript@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/renderscript/1.0/ $(genDir)/android/hardware/renderscript/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.renderscript@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/renderscript/1.0/ $(genDir)/android/hardware/renderscript/1.0/",
     srcs: [
         ":android.hardware.renderscript@1.0_hal",
     ],
@@ -115,27 +90,10 @@
     generated_sources: ["android.hardware.renderscript@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.renderscript@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.renderscript@1.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.renderscript@1.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/renderscript/V1_0/target/AndroidTest.xml b/renderscript/V1_0/target/AndroidTest.xml
index f1c99ad..68eda67 100644
--- a/renderscript/V1_0/target/AndroidTest.xml
+++ b/renderscript/V1_0/target/AndroidTest.xml
@@ -19,7 +19,6 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalRenderscriptV1_0Target"/>
         <option name="binary-test-working-directory" value="_32bit::/data/nativetest/" />
@@ -27,7 +26,9 @@
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalRenderscriptV1_0TargetTest/VtsHalRenderscriptV1_0TargetTest"/>
         <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalRenderscriptV1_0TargetTest/VtsHalRenderscriptV1_0TargetTest"/>
         <option name="binary-test-type" value="hal_hidl_gtest"/>
-        <option name="precondition-lshal" value="android.hardware.renderscript@1.0"/>
+        <option name="exclude-coverage-path" value="frameworks/av/media" />
+        <option name="exclude-coverage-path" value="hardware/interfaces/graphics/mapper/2.0" />
+        <option name="exclude-coverage-path" value="hardware/qcom/display" />
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/renderscript/V1_0/target_profiling/AndroidTest.xml b/renderscript/V1_0/target_profiling/AndroidTest.xml
index fc787e1..5cb5f74 100644
--- a/renderscript/V1_0/target_profiling/AndroidTest.xml
+++ b/renderscript/V1_0/target_profiling/AndroidTest.xml
@@ -22,14 +22,12 @@
         <option name="push" value="DATA/lib/android.hardware.renderscript@1.0-vts.profiler.so->/data/local/tmp/32/android.hardware.renderscript@1.0-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.renderscript@1.0-vts.profiler.so->/data/local/tmp/64/android.hardware.renderscript@1.0-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalRenderscriptV1_0TargetProfiling"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalRenderscriptV1_0TargetTest/VtsHalRenderscriptV1_0TargetTest"/>
         <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalRenderscriptV1_0TargetTest/VtsHalRenderscriptV1_0TargetTest"/>
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.renderscript@1.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/script/build/build_rule_gen.py b/script/build/build_rule_gen.py
index afcf5ad..c8f6b6e 100755
--- a/script/build/build_rule_gen.py
+++ b/script/build/build_rule_gen.py
@@ -16,7 +16,9 @@
 #
 
 import os
+import re
 
+from utils.const import Constant
 from vts_spec_parser import VtsSpecParser
 import build_rule_gen_utils as utils
 
@@ -32,48 +34,32 @@
     _VTS_BUILD_TEMPLATE = os.path.join(_PROJECT_PATH, 'script', 'build',
                                        'template', 'vts_build_template.bp')
 
-    def __init__(self, warning_header):
+    def __init__(self, warning_header, package_root, path_root):
         """BuildRuleGen constructor.
 
         Args:
             warning_header: string, warning header for every generated file.
+            package_root: string, prefix of the hal package.
+            path_root: string, root path that stores the hal definition.
         """
         self._warning_header = warning_header
-        self._vts_spec_parser = VtsSpecParser()
+        self._vts_spec_parser = VtsSpecParser(package_root, path_root)
+        self._package_root = package_root
+        self._path_root = path_root
 
-    def UpdateBuildRule(self):
-        """Updates build rules under test/vts-testcase/hal."""
+    def UpdateBuildRule(self, test_config_dir):
+        """Updates build rules under the configuration directory.
+
+        Args:
+            test_config_dir: string, directory storing the configurations.
+        """
         utils.RemoveFilesInDirIf(
-            self._PROJECT_PATH,
+            os.path.join(self._ANDROID_BUILD_TOP, test_config_dir),
             lambda x: self._IsAutoGenerated(x))
         hal_list = self._vts_spec_parser.HalNamesAndVersions()
-        self.UpdateTopLevelBuildRule()
-        self.UpdateSecondLevelBuildRule(hal_list)
-        self.UpdateHalDirBuildRule(hal_list)
+        self.UpdateHalDirBuildRule(hal_list, test_config_dir)
 
-    def UpdateTopLevelBuildRule(self):
-        """Updates test/vts-testcase/hal/Android.bp"""
-        utils.WriteBuildRule(
-            os.path.join(self._PROJECT_PATH, 'Android.bp'),
-            utils.OnlySubdirsBpRule(self._warning_header, ['*']))
-
-    def UpdateSecondLevelBuildRule(self, hal_list):
-        """Updates test/vts-testcase/hal/<hal_name>/Android.bp"""
-        top_level_dirs = dict()
-        for target in hal_list:
-            hal_dir = os.path.join(
-                utils.HalNameDir(target[0]), utils.HalVerDir(target[1]))
-            top_dir = hal_dir.split('/', 1)[0]
-            top_level_dirs.setdefault(
-                top_dir, []).append(os.path.relpath(hal_dir, top_dir))
-
-        for k, v in top_level_dirs.items():
-            file_path = os.path.join(self._PROJECT_PATH, k, 'Android.bp')
-            utils.WriteBuildRule(
-                file_path,
-                utils.OnlySubdirsBpRule(self._warning_header, v))
-
-    def UpdateHalDirBuildRule(self, hal_list):
+    def UpdateHalDirBuildRule(self, hal_list, test_config_dir):
         """Updates build rules for vts drivers/profilers.
 
         Updates vts drivers/profilers for each pair of (hal_name, hal_version)
@@ -82,19 +68,15 @@
         Args:
             hal_list: list of tuple of strings. For example,
                 [('vibrator', '1.3'), ('sensors', '1.7')]
+            test_config_dir: string, directory storing the configurations.
         """
         for target in hal_list:
             hal_name = target[0]
             hal_version = target[1]
 
-            hal_dir = os.path.join(self._PROJECT_PATH,
-                                   utils.HalNameDir(hal_name),
-                                   utils.HalVerDir(hal_version))
-
-            file_path = os.path.join(hal_dir, 'Android.bp')
-            utils.WriteBuildRule(
-                file_path,
-                utils.OnlySubdirsBpRule(self._warning_header, ['*']))
+            hal_dir = os.path.join(
+                self._ANDROID_BUILD_TOP, test_config_dir,
+                utils.HalNameDir(hal_name), utils.HalVerDir(hal_version))
 
             file_path = os.path.join(hal_dir, 'build', 'Android.bp')
             utils.WriteBuildRule(file_path, self._VtsBuildRuleFromTemplate(
@@ -129,6 +111,7 @@
         Returns:
           string, complete build rule in string form.
         """
+        package_root_dir = self._package_root.replace(".", "/")
 
         def GeneratedOutput(hal_name, hal_version, extension):
             """Formats list of vts spec names into a string.
@@ -148,10 +131,10 @@
             vts_spec_names = self._vts_spec_parser.VtsSpecNames(hal_name,
                                                                 hal_version)
             for vts_spec in vts_spec_names:
-                result.append('"android/hardware/%s/%s/%s%s",' %
-                              (utils.HalNameDir(hal_name), hal_version,
-                               vts_spec, extension))
-            return '\n        '.join(result)
+                result.append('%s/%s/%s/%s%s' %
+                              (package_root_dir, utils.HalNameDir(hal_name),
+                               hal_version, vts_spec, extension))
+            return ListToBuildString(result, 2)
 
         def ImportedPackages(vts_pkg_type, imported_packages):
             """Formats list of imported packages into a string.
@@ -168,24 +151,23 @@
             """
             result = []
             for package in imported_packages:
-                if package in ["android.hidl.base@1.0",
-                               "android.hidl.manager@1.0"]:
-                    continue
-                prefix = 'android.hardware.'
-                if package.startswith(prefix):
-                    # TODO(b/36475863)
-                    result.append('"%s",' % package)
+                if re.match(Constant.HAL_PACKAGE_NAME_PATTERN, package):
                     vts_pkg_name = package + '-vts.' + vts_pkg_type
-                    result.append('"%s",' % vts_pkg_name)
+                    result.append(vts_pkg_name)
                 else:
-                    result.append('"%s",' % package)
-            return '\n        '.join(result)
+                    result.append(package)
+            return ListToBuildString(result, 2)
 
         build_rule = self._warning_header + template
         build_rule = build_rule.replace('{HAL_NAME}', hal_name)
         build_rule = build_rule.replace('{HAL_NAME_DIR}',
                                         utils.HalNameDir(hal_name))
         build_rule = build_rule.replace('{HAL_VERSION}', hal_version)
+        build_rule = build_rule.replace('{PACKAGE_ROOT}', self._package_root)
+        build_rule = build_rule.replace('{PACKAGE_ROOT_DIR}', package_root_dir)
+        build_rule = build_rule.replace(
+            '{HIDL_GEN_ARGS}',
+            "-r %s:%s" % (self._package_root, self._path_root))
         build_rule = build_rule.replace(
             '{GENERATED_VTS_SPECS}',
             GeneratedOutput(hal_name, hal_version, ''))
@@ -204,6 +186,13 @@
             '{IMPORTED_PROFILER_PACKAGES}',
             ImportedPackages('profiler', imported_packages))
 
+        this_package = '%s.%s@%s' % (self._package_root, hal_name, hal_version)
+        imported_packages.append(this_package)
+        hal_libs = sorted(imported_packages)
+
+        build_rule = build_rule.replace(
+            '{HAL_LIBS}', ListToBuildString(hal_libs, 2))
+
         return build_rule
 
     def _IsAutoGenerated(self, abs_file_path):
@@ -220,3 +209,20 @@
             return False
         with open(abs_file_path) as myfile:
             return self._warning_header in myfile.read()
+
+def ListToBuildString(lst, indent_lvl):
+    """Formats a list of item into a string to be inserted into build rule.
+
+    Args:
+        lst: string list, e.g. [a, b, c].
+        indent_lvl: int, indentation level of the output list.
+
+    Returns:
+        string to be inserted into build rule.
+    """
+    single_indent = '    '
+    indent = single_indent * indent_lvl
+    result = ''.join(map(lambda x: '\n%s"%s",' % (indent, x), sorted(lst)))
+    if result:
+        result += '\n' + single_indent * (indent_lvl - 1)
+    return result
diff --git a/script/build/template/vts_build_template.bp b/script/build/template/vts_build_template.bp
index a9070f9..9993dae 100644
--- a/script/build/template/vts_build_template.bp
+++ b/script/build/template/vts_build_template.bp
@@ -1,128 +1,72 @@
 // Generate .vts spec files.
 hal2vts {
-    name: "android.hardware.{HAL_NAME}@{HAL_VERSION}-vts.spec",
+    name: "{PACKAGE_ROOT}.{HAL_NAME}@{HAL_VERSION}-vts.spec",
+    hidl_gen_args: "{HIDL_GEN_ARGS}",
     srcs: [
-        ":android.hardware.{HAL_NAME}@{HAL_VERSION}_hal",
+        ":{PACKAGE_ROOT}.{HAL_NAME}@{HAL_VERSION}_hal",
     ],
-    out: [
-        {GENERATED_VTS_SPECS}
-    ],
+    out: [{GENERATED_VTS_SPECS}],
 }
 
 // Build VTS driver.
 genrule {
-    name: "android.hardware.{HAL_NAME}@{HAL_VERSION}-vts.driver_genc++",
+    name: "{PACKAGE_ROOT}.{HAL_NAME}@{HAL_VERSION}-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.{HAL_NAME}@{HAL_VERSION} && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/{HAL_NAME_DIR}/{HAL_VERSION}/ $(genDir)/android/hardware/{HAL_NAME_DIR}/{HAL_VERSION}/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts {HIDL_GEN_ARGS} {PACKAGE_ROOT}.{HAL_NAME}@{HAL_VERSION} && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) {PACKAGE_ROOT_DIR}/{HAL_NAME_DIR}/{HAL_VERSION}/ $(genDir)/{PACKAGE_ROOT_DIR}/{HAL_NAME_DIR}/{HAL_VERSION}/",
     srcs: [
-        ":android.hardware.{HAL_NAME}@{HAL_VERSION}_hal",
+        ":{PACKAGE_ROOT}.{HAL_NAME}@{HAL_VERSION}_hal",
     ],
-    out: [
-        {GENERATED_SOURCES}
-    ],
+    out: [{GENERATED_SOURCES}],
 }
 
 genrule {
-    name: "android.hardware.{HAL_NAME}@{HAL_VERSION}-vts.driver_genc++_headers",
+    name: "{PACKAGE_ROOT}.{HAL_NAME}@{HAL_VERSION}-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.{HAL_NAME}@{HAL_VERSION} && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/{HAL_NAME_DIR}/{HAL_VERSION}/ $(genDir)/android/hardware/{HAL_NAME_DIR}/{HAL_VERSION}/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts {HIDL_GEN_ARGS} {PACKAGE_ROOT}.{HAL_NAME}@{HAL_VERSION} && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) {PACKAGE_ROOT_DIR}/{HAL_NAME_DIR}/{HAL_VERSION}/ $(genDir)/{PACKAGE_ROOT_DIR}/{HAL_NAME_DIR}/{HAL_VERSION}/",
     srcs: [
-        ":android.hardware.{HAL_NAME}@{HAL_VERSION}_hal",
+        ":{PACKAGE_ROOT}.{HAL_NAME}@{HAL_VERSION}_hal",
     ],
-    out: [
-        {GENERATED_HEADERS}
-    ],
+    out: [{GENERATED_HEADERS}],
 }
 
 cc_library_shared {
-    name: "android.hardware.{HAL_NAME}@{HAL_VERSION}-vts.driver",
-    generated_sources: ["android.hardware.{HAL_NAME}@{HAL_VERSION}-vts.driver_genc++"],
-    generated_headers: ["android.hardware.{HAL_NAME}@{HAL_VERSION}-vts.driver_genc++_headers"],
-    export_generated_headers: ["android.hardware.{HAL_NAME}@{HAL_VERSION}-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
-        "android.hardware.{HAL_NAME}@{HAL_VERSION}",
-        {IMPORTED_DRIVER_PACKAGES}
-    ],
-    export_shared_lib_headers: [
-        {IMPORTED_DRIVER_PACKAGES}
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
-    ],
+    name: "{PACKAGE_ROOT}.{HAL_NAME}@{HAL_VERSION}-vts.driver",
+    generated_sources: ["{PACKAGE_ROOT}.{HAL_NAME}@{HAL_VERSION}-vts.driver_genc++"],
+    generated_headers: ["{PACKAGE_ROOT}.{HAL_NAME}@{HAL_VERSION}-vts.driver_genc++_headers"],
+    export_generated_headers: ["{PACKAGE_ROOT}.{HAL_NAME}@{HAL_VERSION}-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [{IMPORTED_DRIVER_PACKAGES}],
+    static_libs: [{HAL_LIBS}],
 }
 
 // Build VTS profiler.
 genrule {
-    name: "android.hardware.{HAL_NAME}@{HAL_VERSION}-vts.profiler_genc++",
+    name: "{PACKAGE_ROOT}.{HAL_NAME}@{HAL_VERSION}-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.{HAL_NAME}@{HAL_VERSION} && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/{HAL_NAME_DIR}/{HAL_VERSION}/ $(genDir)/android/hardware/{HAL_NAME_DIR}/{HAL_VERSION}/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts {HIDL_GEN_ARGS} {PACKAGE_ROOT}.{HAL_NAME}@{HAL_VERSION} && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) {PACKAGE_ROOT_DIR}/{HAL_NAME_DIR}/{HAL_VERSION}/ $(genDir)/{PACKAGE_ROOT_DIR}/{HAL_NAME_DIR}/{HAL_VERSION}/",
     srcs: [
-        ":android.hardware.{HAL_NAME}@{HAL_VERSION}_hal",
+        ":{PACKAGE_ROOT}.{HAL_NAME}@{HAL_VERSION}_hal",
     ],
-    out: [
-        {GENERATED_SOURCES}
-    ],
+    out: [{GENERATED_SOURCES}],
 }
 
 genrule {
-    name: "android.hardware.{HAL_NAME}@{HAL_VERSION}-vts.profiler_genc++_headers",
+    name: "{PACKAGE_ROOT}.{HAL_NAME}@{HAL_VERSION}-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.{HAL_NAME}@{HAL_VERSION} && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/{HAL_NAME_DIR}/{HAL_VERSION}/ $(genDir)/android/hardware/{HAL_NAME_DIR}/{HAL_VERSION}/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts {HIDL_GEN_ARGS} {PACKAGE_ROOT}.{HAL_NAME}@{HAL_VERSION} && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) {PACKAGE_ROOT_DIR}/{HAL_NAME_DIR}/{HAL_VERSION}/ $(genDir)/{PACKAGE_ROOT_DIR}/{HAL_NAME_DIR}/{HAL_VERSION}/",
     srcs: [
-        ":android.hardware.{HAL_NAME}@{HAL_VERSION}_hal",
+        ":{PACKAGE_ROOT}.{HAL_NAME}@{HAL_VERSION}_hal",
     ],
-    out: [
-        {GENERATED_HEADERS}
-    ],
+    out: [{GENERATED_HEADERS}],
 }
 
 cc_library_shared {
-    name: "android.hardware.{HAL_NAME}@{HAL_VERSION}-vts.profiler",
-    generated_sources: ["android.hardware.{HAL_NAME}@{HAL_VERSION}-vts.profiler_genc++"],
-    generated_headers: ["android.hardware.{HAL_NAME}@{HAL_VERSION}-vts.profiler_genc++_headers"],
-    export_generated_headers: ["android.hardware.{HAL_NAME}@{HAL_VERSION}-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
-        "android.hardware.{HAL_NAME}@{HAL_VERSION}",
-        {IMPORTED_PROFILER_PACKAGES}
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
-    ],
+    name: "{PACKAGE_ROOT}.{HAL_NAME}@{HAL_VERSION}-vts.profiler",
+    generated_sources: ["{PACKAGE_ROOT}.{HAL_NAME}@{HAL_VERSION}-vts.profiler_genc++"],
+    generated_headers: ["{PACKAGE_ROOT}.{HAL_NAME}@{HAL_VERSION}-vts.profiler_genc++_headers"],
+    export_generated_headers: ["{PACKAGE_ROOT}.{HAL_NAME}@{HAL_VERSION}-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [{IMPORTED_PROFILER_PACKAGES}],
+    static_libs: [{HAL_LIBS}],
 }
 
diff --git a/script/build/vts_spec_parser.py b/script/build/vts_spec_parser.py
index 7554fe6..f4001df 100644
--- a/script/build/vts_spec_parser.py
+++ b/script/build/vts_spec_parser.py
@@ -15,13 +15,15 @@
 # limitations under the License.
 #
 
-import fnmatch
 import os
+import re
 import shutil
 import subprocess
 import sys
 import tempfile
 
+from utils.const import Constant
+
 ANDROID_BUILD_TOP = os.environ.get('ANDROID_BUILD_TOP')
 if not ANDROID_BUILD_TOP:
     print 'Run "lunch" command first.'
@@ -37,19 +39,22 @@
 
 class VtsSpecParser(object):
     """Provides an API to generate a parse .vts spec files."""
-    HW_IFACE_DIR = os.path.join(ANDROID_BUILD_TOP, 'hardware', 'interfaces')
 
-    def __init__(self):
+    def __init__(self,
+                 package_root=Constant.HAL_PACKAGE_PREFIX,
+                 path_root=Constant.HAL_INTERFACE_PATH):
         """VtsSpecParser constructor.
 
         For every unique pair of (hal name, hal version) available under
-        hardware/interfaces, generates .vts files using hidl-gen.
+        path_root, generates .vts files using hidl-gen.
 
         Args:
             tmp_dir: string, temporary directory to which to write .vts files.
         """
         self._cache = set()
         self._tmp_dir = tempfile.mkdtemp()
+        self._package_root = package_root
+        self._path_root = path_root
         hal_list = self.HalNamesAndVersions()
 
     def __del__(self):
@@ -81,11 +86,13 @@
                 package = package.split('::')[0]
                 imported_packages.add(package)
 
-        this_package = 'android.hardware.%s@%s' % (hal_name, hal_version)
-        if this_package in imported_packages:
-            imported_packages.remove(this_package)
+        # Exclude the current package and packages with no corresponding libs.
+        exclude_packages = [
+            "android.hidl.base@1.0", "android.hidl.manager@1.0",
+            '%s.%s@%s' % (self._package_root, hal_name, hal_version)
+        ]
 
-        return sorted(imported_packages)
+        return sorted(list(set(imported_packages) - set(exclude_packages)))
 
     def GenerateVtsSpecs(self, hal_name, hal_version):
         """Generates VTS specs.
@@ -100,29 +107,41 @@
         if (hal_name, hal_version) in self._cache:
             return
         hidl_gen_cmd = (
-            'hidl-gen -o {TEMP_DIR} -L vts '
-            'android.hardware.{HAL_NAME}@{HAL_VERSION}').format(
+            'hidl-gen -o {TEMP_DIR} -L vts -r {PACKAGE_ROOT}:{PATH_ROOT} '
+            '{PACKAGE_ROOT}.{HAL_NAME}@{HAL_VERSION}').format(
                 TEMP_DIR=self._tmp_dir,
+                PACKAGE_ROOT=self._package_root,
+                PATH_ROOT=self._path_root,
                 HAL_NAME=hal_name,
                 HAL_VERSION=hal_version)
         subprocess.call(hidl_gen_cmd, shell=True)
         self._cache.add((hal_name, hal_version))
 
     def HalNamesAndVersions(self):
-        """Returns a list of hals and version present under hardware/interfaces.
+        """Returns a list of hals and versions under hal interface directory.
 
         Returns:
-          List of tuples of strings containing hal names and hal versions.
-          For example, [('vibrator', '1.3'), ('sensors', '1.7')]
+            List of tuples of strings containing hal names and hal versions.
+            For example, [('vibrator', '1.3'), ('sensors', '1.7')]
         """
-        result = []
-        for base, dirs, files in os.walk(self.HW_IFACE_DIR):
-            pattern = self.HW_IFACE_DIR + '*/[0-9].[0-9]'
-            if fnmatch.fnmatch(base, pattern) and 'example' not in base:
-                hal_dir = os.path.relpath(base, self.HW_IFACE_DIR)
-                (hal_name, hal_version) = os.path.split(hal_dir)
-                hal_name = hal_name.replace('/', '.')
-                result.append((hal_name, hal_version))
+        full_path_root = os.path.join(ANDROID_BUILD_TOP, self._path_root)
+        result = set()
+        # Walk through ANDROID_BUILD_TOP/self._path_root and heuristically
+        # figure out all the HAL names and versions in the source tree.
+        for base, dirs, files in os.walk(full_path_root):
+            has_hals = any(f.endswith('.hal') for f in files)
+            if not has_hals:
+                continue
+
+            hal_dir = os.path.relpath(base, full_path_root)
+            # Find the first occurance of version in directory path.
+            match = re.search("(\d+)\.(\d+)", hal_dir)
+            if match and 'example' not in hal_dir:
+                hal_version = match.group(0)
+                # Name of the hal preceds hal version in the directory path.
+                hal_dir = hal_dir[:match.end()]
+                hal_name = os.path.dirname(hal_dir).replace('/', '.')
+                result.add((hal_name, hal_version))
         return sorted(result)
 
     def VtsSpecNames(self, hal_name, hal_version):
@@ -136,7 +155,8 @@
               e.g. ['Vibrator.vts', 'types.vts']
         """
         self.GenerateVtsSpecs(hal_name, hal_version)
-        vts_spec_dir = os.path.join(self._tmp_dir, 'android', 'hardware',
+        vts_spec_dir = os.path.join(self._tmp_dir,
+                                    self._package_root.replace('.', '/'),
                                     utils.HalNameDir(hal_name), hal_version)
         vts_spec_names = filter(lambda x: x.endswith('.vts'),
                                 os.listdir(vts_spec_dir))
@@ -152,7 +172,8 @@
           list of ComponentSpecificationMessages
         """
         self.GenerateVtsSpecs(hal_name, hal_version)
-        vts_spec_dir = os.path.join(self._tmp_dir, 'android', 'hardware',
+        vts_spec_dir = os.path.join(self._tmp_dir,
+                                    self._package_root.replace('.', '/'),
                                     utils.HalNameDir(hal_name), hal_version)
         vts_spec_protos = []
         for vts_spec in self.VtsSpecNames(hal_name, hal_version):
diff --git a/script/configure/test_case_creator.py b/script/configure/test_case_creator.py
index c9b2f50..04bfeb4 100755
--- a/script/configure/test_case_creator.py
+++ b/script/configure/test_case_creator.py
@@ -27,11 +27,7 @@
 from xml.dom import minidom
 from xml.etree import cElementTree as ET
 from xml.sax.saxutils import unescape
-
-VTS_TEST_CASE_PATH = 'test/vts-testcase/hal'
-HAL_INTERFACE_PATH = 'hardware/interfaces'
-HAL_TRACE_PATH = 'test/vts-testcase/hal-trace'
-HAL_PACKAGE_PREFIX = 'android.hardware.'
+from utils.const import Constant
 
 ANDROID_MK_FILE_NAME = 'Android.mk'
 ANDROID_TEST_XML_FILE_NAME = 'AndroidTest.xml'
@@ -45,8 +41,14 @@
         hal_name: name of the testing hal, derived from hal_package_name. e.g. nfc.
         hal_version: version of the testing hal, derived from hal_package_name.
         test_type: string, type of the test, currently support host and target.
+        package_root: String, prefix of the hal package, e.g. android.hardware.
+        path_root: String, root path that stores the hal definition, e.g. hardware/interfaces
+        test_binary_file: String, test binary name for target-side hal test.
+        test_script_file: String, test script name for host-side hal test.
+        test_config_dir: String, directory path to store the configure files.
         test_name_prefix: prefix of generated test name. e.g. android.hardware.nfc@1.0-test-target.
         test_name: test name generated. e.g. android.hardware.nfc@1.0-test-target-profiling.
+        test_plan: string, the plan that the test belongs to.
         test_dir: string, test case absolute directory.
         time_out: string, timeout of the test, default is 1m.
         is_profiling: boolean, whether to create a profiling test case.
@@ -68,10 +70,6 @@
         self._build_top = build_top
         self._vts_spec_parser = vts_spec_parser
 
-        [package, version] = hal_package_name.split('@')
-        self._hal_name = package[len(HAL_PACKAGE_PREFIX):]
-        self._hal_version = version
-
         self._current_year = datetime.datetime.now().year
 
     def LaunchTestCase(self,
@@ -80,7 +78,13 @@
                        is_profiling=False,
                        is_replay=False,
                        stop_runtime=False,
-                       update_only=False):
+                       update_only=False,
+                       mapping_dir_path="",
+                       test_binary_file=None,
+                       test_script_file=None,
+                       test_config_dir=Constant.VTS_HAL_TEST_CASE_PATH,
+                       package_root=Constant.HAL_PACKAGE_PREFIX,
+                       path_root=Constant.HAL_INTERFACE_PATH):
         """Create the necessary configuration files to launch a test case.
 
         Args:
@@ -89,6 +93,8 @@
           is_profiling: whether to create a profiling test case.
           stop_runtime: whether to stop framework before the test.
           update_only: flag to only update existing test configure.
+          mapping_dir_path: directory that stores the cts_hal_mapping files.
+                            Used for adapter test only.
 
         Returns:
           boolean, whether created/updated a test case successfully.
@@ -98,28 +104,47 @@
         self._is_profiling = is_profiling
         self._is_replay = is_replay
         self._stop_runtime = stop_runtime
+        self._mapping_dir_path = mapping_dir_path
+        self._test_binary_file = test_binary_file
+        self._test_script_file = test_script_file
+        self._test_config_dir = test_config_dir
+        self._package_root = package_root
+        self._path_root = path_root
+
+        [package, version] = self._hal_package_name.split('@')
+        self._hal_name = package[len(self._package_root) + 1:]
+        self._hal_version = version
 
         self._test_module_name = self.GetVtsHalTestModuleName()
         self._test_name = self._test_module_name
+        self._test_plan = 'vts-staging-default'
         if is_replay:
             self._test_name = self._test_module_name + 'Replay'
+            self._test_plan = 'vts-hal-replay'
         if is_profiling:
             self._test_name = self._test_module_name + 'Profiling'
+            self._test_plan = 'vts-hal-profiling'
+        if self._test_type == 'adapter':
+            self._test_plan = 'vts-hal-adapter'
 
         self._test_dir = self.GetHalTestCasePath()
         # Check whether the host side test script and target test binary is available.
         if self._test_type == 'host':
-            test_script_file = self.GetVtsHostTestScriptFileName()
-            if not os.path.exists(test_script_file):
-                print('Could not find the host side test script: %s.' %
-                      test_script_file)
-                return False
-        else:
-            test_binary_file = self.GetVtsTargetTestSourceFileName()
-            if not os.path.exists(test_binary_file):
-                print('Could not find the target side test binary: %s.' %
-                      test_binary_file)
-                return False
+            if not self._test_script_file:
+                test_script_file = self.GetVtsHostTestScriptFileName()
+                if not os.path.exists(test_script_file):
+                    print('Could not find the host side test script: %s.' %
+                          test_script_file)
+                    return False
+                self._test_script_file = os.path.basename(test_script_file)
+        elif self._test_type == 'target':
+            if not self._test_binary_file:
+                test_binary_file = self.GetVtsTargetTestSourceFileName()
+                if not os.path.exists(test_binary_file):
+                    print('Could not find the target side test binary: %s.' %
+                          test_binary_file)
+                    return False
+                self._test_binary_file = os.path.basename(test_binary_file)
 
         if os.path.exists(self._test_dir):
             print 'WARNING: Test directory already exists. Continuing...'
@@ -128,7 +153,7 @@
                 os.makedirs(self._test_dir)
             except:
                 print('Error: Failed to create test directory at %s. '
-                      'Exiting...' % self.test_dir)
+                      'Exiting...' % self._test_dir)
                 return False
         else:
             print('WARNING: Test directory does not exists, stop updating.')
@@ -175,7 +200,7 @@
 
     def GetHalInterfacePath(self):
         """Get the directory that stores the .hal files."""
-        return os.path.join(self._build_top, HAL_INTERFACE_PATH,
+        return os.path.join(self._build_top, self._path_root,
                             self.GetHalPath(), self._hal_version)
 
     def GetHalTestCasePath(self, ignore_profiling=False):
@@ -185,47 +210,52 @@
             test_dir = test_dir + '_replay'
         if self._is_profiling and not ignore_profiling:
             test_dir = test_dir + '_profiling'
-        return os.path.join(self._build_top, VTS_TEST_CASE_PATH,
-                            self.GetHalPath(),
-                            self.GetHalVersionToken(), test_dir)
+        return os.path.join(self._build_top, self._test_config_dir,
+                            self.GetHalPath(), self.GetHalVersionToken(),
+                            test_dir)
 
     def GetHalTracePath(self):
         """Get the directory that stores the hal trace files."""
-        return os.path.join(self._build_top, HAL_TRACE_PATH,
+        return os.path.join(self._build_top, Constant.HAL_TRACE_PATH,
                             self.GetHalPath(), self.GetHalVersionToken())
 
     def CreateAndroidMk(self):
         """Create Android.mk."""
-        vts_dir = os.path.join(self._build_top, VTS_TEST_CASE_PATH)
         target = os.path.join(self._test_dir, ANDROID_MK_FILE_NAME)
-
         with open(target, 'w') as f:
             print 'Creating %s' % target
             f.write(LICENSE_STATEMENT_POUND.format(year=self._current_year))
             f.write('\n')
-            f.write(
-                ANDROID_MK_TEMPLATE.format(
-                    test_name=self._test_name,
-                    config_src_dir=self._test_dir[len(vts_dir) + 1:]))
+            f.write(ANDROID_MK_TEMPLATE.format(test_name=self._test_name))
 
     def CreateAndroidTestXml(self):
         """Create AndroidTest.xml."""
         VTS_FILE_PUSHER = 'com.android.compatibility.common.tradefed.targetprep.VtsFilePusher'
-        VTS_PYTHON_PREPARER = 'com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer'
         VTS_TEST_CLASS = 'com.android.tradefed.testtype.VtsMultiDeviceTest'
 
         configuration = ET.Element('configuration', {
-            'description': 'Config for VTS ' + self._test_name + ' test cases'
+            'description':
+            'Config for VTS ' + self._test_name + ' test cases'
         })
-        file_pusher = ET.SubElement(configuration, 'target_preparer',
-                                    {'class': VTS_FILE_PUSHER})
 
-        self.GeneratePushFileConfigure(file_pusher)
-        python_preparer = ET.SubElement(configuration, 'target_preparer',
-                                        {'class': VTS_PYTHON_PREPARER})
-        test = ET.SubElement(configuration, 'test', {'class': VTS_TEST_CLASS})
+        ET.SubElement(
+            configuration, 'option', {
+                'name': 'config-descriptor:metadata',
+                'key': 'plan',
+                'value': self._test_plan
+            })
 
-        self.GenerateTestOptionConfigure(test)
+        if self._test_type == 'adapter':
+            self.CreateAndroidTestXmlForAdapterTest(configuration)
+        else:
+            file_pusher = ET.SubElement(configuration, 'target_preparer',
+                                        {'class': VTS_FILE_PUSHER})
+
+            self.GeneratePushFileConfigure(file_pusher)
+            test = ET.SubElement(configuration, 'test',
+                                 {'class': VTS_TEST_CLASS})
+
+            self.GenerateTestOptionConfigure(test)
 
         target = os.path.join(self._test_dir, ANDROID_TEST_XML_FILE_NAME)
         with open(target, 'w') as f:
@@ -234,15 +264,81 @@
             f.write(LICENSE_STATEMENT_XML.format(year=self._current_year))
             f.write(self.Prettify(configuration))
 
+    def CreateAndroidTestXmlForAdapterTest(self, configuration):
+        """Create the test configuration within AndroidTest.xml for adapter test.
+
+        Args:
+          configuration: parent xml element for test configure.
+        """
+
+        # Configure VtsHalAdapterPreparer.
+        adapter_module_controller = ET.SubElement(configuration, 'object',
+                                         {'type': 'module_controller',
+                                          'class': VTA_HAL_ADAPTER_MODULE_CONTROLLER})
+        ET.SubElement(adapter_module_controller, 'option', {
+            'name': 'hal-package-name',
+            'value': self._hal_package_name
+        })
+        adapter_preparer = ET.SubElement(configuration, 'target_preparer',
+                                         {'class': VTA_HAL_ADAPTER_PREPARER})
+        (major_version, minor_version) = self._hal_version.split('.')
+        adapter_version = major_version + '.' + str(int(minor_version) - 1)
+        ET.SubElement(
+            adapter_preparer, 'option', {
+                'name':
+                'adapter-binary-name',
+                'value':
+                Constant.HAL_PACKAGE_PREFIX + '.' + self._hal_name + '@' +
+                adapter_version + '-adapter'
+            })
+        ET.SubElement(adapter_preparer, 'option', {
+            'name': 'hal-package-name',
+            'value': self._hal_package_name
+        })
+        # Configure device health tests.
+        test = ET.SubElement(configuration, 'test',
+                             {'class': ANDROID_JUNIT_TEST})
+        ET.SubElement(test, 'option', {
+            'name': 'package',
+            'value': 'com.android.devicehealth.tests'
+        })
+        ET.SubElement(
+            test, 'option', {
+                'name': 'runner',
+                'value': 'android.support.test.runner.AndroidJUnitRunner'
+            })
+
+        # Configure CTS tests.
+        list_of_files = os.listdir(self._mapping_dir_path)
+        # Use the latest mapping file.
+        latest_file = max(
+            [
+                os.path.join(self._mapping_dir_path, basename)
+                for basename in list_of_files
+            ],
+            key=os.path.getctime)
+
+        with open(latest_file, 'r') as cts_hal_map_file:
+            for line in cts_hal_map_file.readlines():
+                if line.startswith(Constant.HAL_PACKAGE_PREFIX + '.' +
+                                   self._hal_name + '@' + adapter_version):
+                    cts_tests = line.split(':')[1].split(',')
+                    for cts_test in cts_tests:
+                        test_config_name = cts_test[0:cts_test.find(
+                            '(')] + '.config'
+                        ET.SubElement(configuration, 'include',
+                                      {'name': test_config_name})
+
     def GeneratePushFileConfigure(self, file_pusher):
         """Create the push file configuration within AndroidTest.xml
 
         Args:
           file_pusher: parent xml element for push file configure.
         """
-        ET.SubElement(file_pusher, 'option',
-                      {'name': 'abort-on-push-failure',
-                       'value': 'false'})
+        ET.SubElement(file_pusher, 'option', {
+            'name': 'abort-on-push-failure',
+            'value': 'false'
+        })
 
         if self._test_type == 'target':
             if self._is_replay:
@@ -251,10 +347,11 @@
                     'value': 'HalHidlHostTest.push'
                 })
             elif self._is_profiling:
-                ET.SubElement(file_pusher, 'option', {
-                    'name': 'push-group',
-                    'value': 'HalHidlTargetProfilingTest.push'
-                })
+                ET.SubElement(
+                    file_pusher, 'option', {
+                        'name': 'push-group',
+                        'value': 'HalHidlTargetProfilingTest.push'
+                    })
             else:
                 ET.SubElement(file_pusher, 'option', {
                     'name': 'push-group',
@@ -277,58 +374,62 @@
         imported_package_lists.append(self._hal_package_name)
         # Generate additional push files e.g driver/profiler/vts_spec
         if self._test_type == 'host' or self._is_replay:
-            ET.SubElement(file_pusher, 'option',
-                          {'name': 'cleanup',
-                           'value': 'true'})
+            ET.SubElement(file_pusher, 'option', {
+                'name': 'cleanup',
+                'value': 'true'
+            })
             for imported_package in imported_package_lists:
-                if imported_package.startswith(HAL_PACKAGE_PREFIX):
-                    imported_package_str, imported_package_version = imported_package.split(
-                        '@')
-                    imported_package_name = imported_package_str[len(
-                        HAL_PACKAGE_PREFIX):]
-                    imported_vts_spec_lists = self._vts_spec_parser.VtsSpecNames(
-                        imported_package_name, imported_package_version)
-                    for vts_spec in imported_vts_spec_lists:
-                        push_spec = VTS_SPEC_PUSH_TEMPLATE.format(
-                            hal_path=imported_package_name.replace('.', '/'),
-                            hal_version=imported_package_version,
-                            package_path=imported_package_str.replace('.',
-                                                                      '/'),
-                            vts_file=vts_spec)
-                        ET.SubElement(file_pusher, 'option',
-                                      {'name': 'push',
-                                       'value': push_spec})
+                imported_package_str, imported_package_version = imported_package.split(
+                    '@')
+                imported_package_name = imported_package_str[
+                    len(self._package_root) + 1:]
+                imported_vts_spec_lists = self._vts_spec_parser.VtsSpecNames(
+                    imported_package_name, imported_package_version)
+                for vts_spec in imported_vts_spec_lists:
+                    push_spec = VTS_SPEC_PUSH_TEMPLATE.format(
+                        hal_path=imported_package_name.replace('.', '/'),
+                        hal_version=imported_package_version,
+                        package_path=imported_package_str.replace('.', '/'),
+                        vts_file=vts_spec)
+                    ET.SubElement(file_pusher, 'option', {
+                        'name': 'push',
+                        'value': push_spec
+                    })
 
-                    dirver_package_name = imported_package + '-vts.driver.so'
-                    push_driver = VTS_LIB_PUSH_TEMPLATE_32.format(
-                        lib_name=dirver_package_name)
-                    ET.SubElement(file_pusher, 'option',
-                                  {'name': 'push',
-                                   'value': push_driver})
-                    push_driver = VTS_LIB_PUSH_TEMPLATE_64.format(
-                        lib_name=dirver_package_name)
-                    ET.SubElement(file_pusher, 'option',
-                                  {'name': 'push',
-                                   'value': push_driver})
+                dirver_package_name = imported_package + '-vts.driver.so'
+                push_driver = VTS_LIB_PUSH_TEMPLATE_32.format(
+                    lib_name=dirver_package_name)
+                ET.SubElement(file_pusher, 'option', {
+                    'name': 'push',
+                    'value': push_driver
+                })
+                push_driver = VTS_LIB_PUSH_TEMPLATE_64.format(
+                    lib_name=dirver_package_name)
+                ET.SubElement(file_pusher, 'option', {
+                    'name': 'push',
+                    'value': push_driver
+                })
 
         if self._is_profiling:
             if self._test_type == 'target':
-                ET.SubElement(file_pusher, 'option',
-                              {'name': 'cleanup',
-                               'value': 'true'})
+                ET.SubElement(file_pusher, 'option', {
+                    'name': 'cleanup',
+                    'value': 'true'
+                })
             for imported_package in imported_package_lists:
-                if imported_package.startswith(HAL_PACKAGE_PREFIX):
-                    profiler_package_name = imported_package + '-vts.profiler.so'
-                    push_profiler = VTS_LIB_PUSH_TEMPLATE_32.format(
-                        lib_name=profiler_package_name)
-                    ET.SubElement(file_pusher, 'option',
-                                  {'name': 'push',
-                                   'value': push_profiler})
-                    push_profiler = VTS_LIB_PUSH_TEMPLATE_64.format(
-                        lib_name=profiler_package_name)
-                    ET.SubElement(file_pusher, 'option',
-                                  {'name': 'push',
-                                   'value': push_profiler})
+                profiler_package_name = imported_package + '-vts.profiler.so'
+                push_profiler = VTS_LIB_PUSH_TEMPLATE_32.format(
+                    lib_name=profiler_package_name)
+                ET.SubElement(file_pusher, 'option', {
+                    'name': 'push',
+                    'value': push_profiler
+                })
+                push_profiler = VTS_LIB_PUSH_TEMPLATE_64.format(
+                    lib_name=profiler_package_name)
+                ET.SubElement(file_pusher, 'option', {
+                    'name': 'push',
+                    'value': push_profiler
+                })
 
     def GenerateTestOptionConfigure(self, test):
         """Create the test option configuration within AndroidTest.xml
@@ -336,9 +437,10 @@
         Args:
           test: parent xml element for test option configure.
         """
-        ET.SubElement(test, 'option',
-                      {'name': 'test-module-name',
-                       'value': self._test_name})
+        ET.SubElement(test, 'option', {
+            'name': 'test-module-name',
+            'value': self._test_name
+        })
 
         if self._test_type == 'target':
             if self._is_replay:
@@ -348,30 +450,32 @@
                 })
                 for trace in self.GetVtsHalReplayTraceFiles():
                     ET.SubElement(
-                        test,
-                        'option', {
-                            'name': 'hal-hidl-replay-test-trace-path',
-                            'value': TEST_TRACE_TEMPLATE.format(
+                        test, 'option', {
+                            'name':
+                            'hal-hidl-replay-test-trace-path',
+                            'value':
+                            TEST_TRACE_TEMPLATE.format(
                                 hal_path=self.GetHalPath(),
                                 hal_version=self.GetHalVersionToken(),
                                 trace_file=trace)
                         })
-                ET.SubElement(test, 'option', {
-                    'name': 'hal-hidl-package-name',
-                    'value': self._hal_package_name
-                })
+                ET.SubElement(
+                    test, 'option', {
+                        'name': 'hal-hidl-package-name',
+                        'value': self._hal_package_name
+                    })
             else:
-                test_binary = TEST_BINEARY_TEMPLATE_32.format(
-                    test_name=self._test_module_name + 'Test')
+                test_binary_file = TEST_BINEARY_TEMPLATE_32.format(
+                    test_binary=self._test_binary_file[:-len('.cpp')])
                 ET.SubElement(test, 'option', {
                     'name': 'binary-test-source',
-                    'value': test_binary
+                    'value': test_binary_file
                 })
-                test_binary = TEST_BINEARY_TEMPLATE_64.format(
-                    test_name=self._test_module_name + 'Test')
+                test_binary_file = TEST_BINEARY_TEMPLATE_64.format(
+                    test_binary=self._test_binary_file[:-len('.cpp')])
                 ET.SubElement(test, 'option', {
                     'name': 'binary-test-source',
-                    'value': test_binary
+                    'value': test_binary_file
                 })
                 ET.SubElement(test, 'option', {
                     'name': 'binary-test-type',
@@ -387,26 +491,25 @@
                         'value': 'true'
                     })
         else:
-            test_script = TEST_SCRIPT_TEMPLATE.format(
+            test_script_file = TEST_SCRIPT_TEMPLATE.format(
                 hal_path=self.GetHalPath(),
                 hal_version=self.GetHalVersionToken(),
-                test_name=self._test_module_name + 'Test')
-            ET.SubElement(test, 'option',
-                          {'name': 'test-case-path',
-                           'value': test_script})
+                test_script=self._test_script_file[:-len('.py')])
+            ET.SubElement(test, 'option', {
+                'name': 'test-case-path',
+                'value': test_script_file
+            })
 
         if self._is_profiling:
-            ET.SubElement(test, 'option',
-                          {'name': 'enable-profiling',
-                           'value': 'true'})
+            ET.SubElement(test, 'option', {
+                'name': 'enable-profiling',
+                'value': 'true'
+            })
 
         ET.SubElement(test, 'option', {
-            'name': 'precondition-lshal',
-            'value': self._hal_package_name
+            'name': 'test-timeout',
+            'value': self._time_out
         })
-        ET.SubElement(test, 'option',
-                      {'name': 'test-timeout',
-                       'value': self._time_out})
 
     def Prettify(self, elem):
         """Create a pretty-printed XML string for the Element.
@@ -464,20 +567,23 @@
 include $(CLEAR_VARS)
 
 LOCAL_MODULE := {test_name}
-VTS_CONFIG_SRC_DIR := testcases/hal/{config_src_dir}
 include test/vts/tools/build/Android.host_config.mk
 """
 
 XML_HEADER = """<?xml version="1.0" encoding="utf-8"?>
 """
 
-TEST_BINEARY_TEMPLATE_32 = '_32bit::DATA/nativetest/{test_name}/{test_name}'
-TEST_BINEARY_TEMPLATE_64 = '_64bit::DATA/nativetest64/{test_name}/{test_name}'
+TEST_BINEARY_TEMPLATE_32 = '_32bit::DATA/nativetest/{test_binary}/{test_binary}'
+TEST_BINEARY_TEMPLATE_64 = '_64bit::DATA/nativetest64/{test_binary}/{test_binary}'
 
-TEST_SCRIPT_TEMPLATE = 'vts/testcases/hal/{hal_path}/{hal_version}/host/{test_name}'
+TEST_SCRIPT_TEMPLATE = 'vts/testcases/hal/{hal_path}/{hal_version}/host/{test_script}'
 TEST_TRACE_TEMPLATE = 'test/vts-testcase/hal-trace/{hal_path}/{hal_version}/{trace_file}'
 VTS_SPEC_PUSH_TEMPLATE = (
     'spec/hardware/interfaces/{hal_path}/{hal_version}/vts/{vts_file}->'
     '/data/local/tmp/spec/{package_path}/{hal_version}/{vts_file}')
 VTS_LIB_PUSH_TEMPLATE_32 = 'DATA/lib/{lib_name}->/data/local/tmp/32/{lib_name}'
 VTS_LIB_PUSH_TEMPLATE_64 = 'DATA/lib64/{lib_name}->/data/local/tmp/64/{lib_name}'
+
+VTA_HAL_ADAPTER_MODULE_CONTROLLER = 'com.android.tradefed.module.VtsHalAdapterModuleController'
+VTA_HAL_ADAPTER_PREPARER = 'com.android.tradefed.targetprep.VtsHalAdapterPreparer'
+ANDROID_JUNIT_TEST = 'com.android.tradefed.testtype.AndroidJUnitTest'
diff --git a/script/launch_hal_test.py b/script/launch_hal_test.py
index 880789f..9cbff00 100755
--- a/script/launch_hal_test.py
+++ b/script/launch_hal_test.py
@@ -20,21 +20,36 @@
 import re
 import sys
 
+from build.build_rule_gen import BuildRuleGen
 from build.vts_spec_parser import VtsSpecParser
 from configure.test_case_creator import TestCaseCreator
+from utils.const import Constant
 
-HAL_PACKAGE_PREFIX = 'android.hardware.'
-HAL_PACKAGE_NAME_PATTERN = '(([a-zA-Z_0-9]*)(?:[.][a-zA-Z_0-9]*)*)@([0-9]+)[.]([0-9]+)'
 TEST_TIME_OUT_PATTERN = '(([0-9]+)(m|s|h))+'
-"""Generate Android.mk and AndroidTest.xml files for given hal
+
+"""Generate Android.mk, Android.bp, and AndroidTest.xml files for given hal
 
 Usage:
-  python launch_hal_test.py [--test_type=host/target] [--time_out=estimated_test_time] [--enable_profiling] hal_package name
+  python launch_hal_test.py [--options] hal_package name
 
+  where options are:
+  --test_type: Test type, currently support two types: target and host.
+  --time_out: Timeout for the test, default is 1m.
+  --package_root: Prefix of the HAL package. default is android.hardware
+  --path_root: Root path that stores the HAL definition. default is hardware/interfaces
+  --test_binary_file: Test binary file for target-side HAL test.
+  --test_script_file: Test script file for host-side HAL test.
+  --test_config_dir: Directory path to store the test configure files.
+  --enable_profiling: Whether this is a profiling test.
+  --replay: Whether this is a replay test.
+  --disable_stop_runtime: Whether to stop framework before the test.
 Example:
   python launch_hal_test.py android.hardware.nfc@1.0
   python launch_hal_test.py --enable_profiling android.hardware.nfc@1.0
   python launch_hal_test.py --test_type=host --time_out=5m android.hardware.nfc@1.0
+  python launch_hal_test.py --package_root com.qualcomm.qti
+  --path_root vendor/qcom/proprietary/interfaces/com/qualcomm/qti/
+  --test_configure_dir temp/ com.qualcomm.qti.qcril.qcrilhook@1.0
 """
 
 
@@ -44,11 +59,13 @@
         '--test_type',
         dest='test_type',
         required=False,
-        help='Test type, such as HidlHalTest, HostDrivenTest, etc.')
+        default='target',
+        help='Test type, currently support two types: target and host.')
     parser.add_argument(
         '--time_out',
         dest='time_out',
         required=False,
+        default='1m',
         help='Timeout for the test, default is 1m.')
     parser.add_argument(
         '--enable_profiling',
@@ -69,64 +86,95 @@
         required=False,
         help='Whether to stop framework before the test.')
     parser.add_argument(
+        '--package_root',
+        dest='package_root',
+        required=False,
+        default=Constant.HAL_PACKAGE_PREFIX,
+        help='Prefix of the HAL package. e.g. android.hardware')
+    parser.add_argument(
+        '--path_root',
+        dest='path_root',
+        required=False,
+        default=Constant.HAL_INTERFACE_PATH,
+        help=
+        'Root path that stores the HAL definition. e.g. hardware/interfaces')
+    parser.add_argument(
+        '--test_binary_file',
+        dest='test_binary_file',
+        required=False,
+        help='Test binary file for target-side HAL test.')
+    parser.add_argument(
+        '--test_script_file',
+        dest='test_script_file',
+        required=False,
+        help='Test script file for host-side HAL test.')
+    parser.add_argument(
+        '--test_config_dir',
+        dest='test_config_dir',
+        required=False,
+        help='Directory path to store the test configure files.')
+    parser.add_argument(
         'hal_package_name',
         help='hal package name (e.g. android.hardware.nfc@1.0).')
     args = parser.parse_args()
 
-    regex = re.compile(HAL_PACKAGE_NAME_PATTERN)
+    regex = re.compile(Constant.HAL_PACKAGE_NAME_PATTERN)
     result = re.match(regex, args.hal_package_name)
     if not result:
         print 'Invalid hal package name. Exiting..'
         sys.exit(1)
-    if not args.hal_package_name.startswith(HAL_PACKAGE_PREFIX):
-        print 'hal package name does not start with android.hardware. Exiting...'
+
+    if not args.hal_package_name.startswith(args.package_root + '.'):
+        print 'hal_package_name does not start with package_root. Exiting...'
         sys.exit(1)
 
-    if not args.test_type:
-        args.test_type = 'target'
-    elif args.test_type != 'target' and args.test_type != 'host':
+    if args.test_type != 'target' and args.test_type != 'host':
         print 'Unsupported test type. Exiting...'
         sys.exit(1)
     elif args.test_type == 'host' and args.is_replay:
         print 'Host side replay test is not supported yet. Exiting...'
         sys.exit(1)
 
-    if not args.time_out:
-        args.time_out = '1m'
-    else:
-        regex = re.compile(TEST_TIME_OUT_PATTERN)
-        result = re.match(regex, args.time_out)
-        if not result:
-            print 'Invalid test time out format. Exiting...'
-            sys.exit(1)
+    regex = re.compile(TEST_TIME_OUT_PATTERN)
+    result = re.match(regex, args.time_out)
+    if not result:
+        print 'Invalid test time out format. Exiting...'
+        sys.exit(1)
+
+    if not args.test_config_dir:
+        if args.package_root == Constant.HAL_PACKAGE_PREFIX:
+            args.test_config_dir = Constant.VTS_HAL_TEST_CASE_PATH
+        else:
+            args.test_config_dir = args.path_root
 
     stop_runtime = False
     if args.test_type == 'target' and not args.disable_stop_runtime:
         stop_runtime = True
 
-    vts_spec_parser = VtsSpecParser()
+    vts_spec_parser = VtsSpecParser(
+        package_root=args.package_root, path_root=args.path_root)
     test_case_creater = TestCaseCreator(vts_spec_parser, args.hal_package_name)
     if not test_case_creater.LaunchTestCase(
             args.test_type,
             args.time_out,
             is_replay=args.is_replay,
-            stop_runtime=stop_runtime):
+            is_profiling=args.enable_profiling,
+            stop_runtime=stop_runtime,
+            test_binary_file=args.test_binary_file,
+            test_script_file=args.test_script_file,
+            test_config_dir=args.test_config_dir,
+            package_root=args.package_root,
+            path_root=args.path_root):
         print('Error: Failed to launch test for %s. Exiting...' %
               args.hal_package_name)
         sys.exit(1)
 
-    # Create additional profiling test case if enable_profiling is specified.
-    if (args.enable_profiling):
-        if not test_case_creater.LaunchTestCase(
-                args.test_type,
-                args.time_out,
-                is_replay=args.is_replay,
-                is_profiling=True,
-                stop_runtime=stop_runtime):
-            print('Error: Failed to launch profiling test for %s. Exiting...' %
-                  args.hal_package_name)
-            sys.exit(1)
-
+    if args.test_type == "host" or args.enable_profiling:
+        build_rule_gen = BuildRuleGen(
+            Constant.BP_WARNING_HEADER, args.package_root, args.path_root)
+        name_version = args.hal_package_name[len(args.package_root) + 1:]
+        build_rule_gen.UpdateHalDirBuildRule(
+            [name_version.split('@')], args.test_config_dir)
 
 if __name__ == '__main__':
     main()
diff --git a/script/update_hal_adapter_tests.py b/script/update_hal_adapter_tests.py
new file mode 100755
index 0000000..8cc91f7
--- /dev/null
+++ b/script/update_hal_adapter_tests.py
@@ -0,0 +1,61 @@
+#!/usr/bin/env python
+#
+# Copyright 2018 - The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+import argparse
+import os
+import sys
+
+from build.vts_spec_parser import VtsSpecParser
+from configure.test_case_creator import TestCaseCreator
+"""Regenerate test configures for all hal adapter tests.
+
+Usage:
+  python update_hal_adapter_tests.py [-h] cts_hal_mapping_dir
+"""
+
+
+def main():
+    build_top = os.getenv('ANDROID_BUILD_TOP')
+    if not build_top:
+        print('Error: Missing ANDROID_BUILD_TOP env variable. Please run '
+              '\'. build/envsetup.sh; lunch <build target>\' Exiting...')
+        sys.exit(1)
+
+    parser = argparse.ArgumentParser(
+        description='Update vts hal adapter tests.')
+    parser.add_argument(
+        'cts_hal_mapping_dir',
+        help='Directory that stores cts_hal_mapping files.')
+    args = parser.parse_args()
+
+    vts_spec_parser = VtsSpecParser()
+    hal_list = vts_spec_parser.HalNamesAndVersions()
+
+    for hal_name, hal_version in hal_list:
+        hal_package_name = 'android.hardware.' + hal_name + '@' + hal_version
+        major_version, minor_version = hal_version.split('.')
+        if int(minor_version) > 0:
+            lower_version = major_version + '.' + str(int(minor_version) - 1)
+            if (hal_name, lower_version) in hal_list:
+                test_case_creater = TestCaseCreator(vts_spec_parser,
+                                                    hal_package_name)
+                test_case_creater.LaunchTestCase(
+                    test_type='adapter',
+                    mapping_dir_path=args.cts_hal_mapping_dir)
+
+
+if __name__ == '__main__':
+    main()
diff --git a/script/update_makefiles.py b/script/update_makefiles.py
index 57035bd..ce20dce 100755
--- a/script/update_makefiles.py
+++ b/script/update_makefiles.py
@@ -25,13 +25,11 @@
 """
 
 from build.build_rule_gen import BuildRuleGen
-import os
-import sys
+from utils.const import Constant
 
 if __name__ == "__main__":
     print 'Updating build rules.'
-    warning_header = (
-        '// This file was auto-generated. Do not edit manually.\n'
-        '// Use test/vts-testcase/hal/update_makefiles.py to generate this file.\n\n')
-    build_rule_gen = BuildRuleGen(warning_header)
-    build_rule_gen.UpdateBuildRule()
+    build_rule_gen = BuildRuleGen(Constant.BP_WARNING_HEADER,
+                                  Constant.HAL_PACKAGE_PREFIX,
+                                  Constant.HAL_INTERFACE_PATH)
+    build_rule_gen.UpdateBuildRule(Constant.VTS_HAL_TEST_CASE_PATH)
diff --git a/treble/hidl_shim/__init__.py b/script/utils/__init__.py
similarity index 100%
rename from treble/hidl_shim/__init__.py
rename to script/utils/__init__.py
diff --git a/script/utils/const.py b/script/utils/const.py
new file mode 100644
index 0000000..0b63017
--- /dev/null
+++ b/script/utils/const.py
@@ -0,0 +1,33 @@
+#
+# Copyright 2018 - The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+class Constant(object):
+    """Constant values used in scripts. """
+
+    # Header of the .bp files generated by scripts.
+    BP_WARNING_HEADER = (
+        '// This file was auto-generated. Do not edit manually.\n'
+        '// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.\n\n')
+    # Default path that stores the Google defined HAL interface.
+    HAL_INTERFACE_PATH = 'hardware/interfaces'
+    # Regular expression for HAL package names.
+    HAL_PACKAGE_NAME_PATTERN = '(([a-zA-Z_0-9]*)(?:[.][a-zA-Z_0-9]*)*)@([0-9]+)[.]([0-9]+)'
+    # Default package root for Google defined HAL interface.
+    HAL_PACKAGE_PREFIX = 'android.hardware'
+    # Default path that stores HAL traces, used for replay tests.
+    HAL_TRACE_PATH = 'test/vts-testcase/hal-trace'
+    # Default path for VTS test configure files.
+    VTS_HAL_TEST_CASE_PATH = 'test/vts-testcase/hal'
diff --git a/secure_element/V1_0/build/Android.bp b/secure_element/V1_0/build/Android.bp
new file mode 100644
index 0000000..b8fa697
--- /dev/null
+++ b/secure_element/V1_0/build/Android.bp
@@ -0,0 +1,99 @@
+// This file was auto-generated. Do not edit manually.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
+
+// Generate .vts spec files.
+hal2vts {
+    name: "android.hardware.secure_element@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
+    srcs: [
+        ":android.hardware.secure_element@1.0_hal",
+    ],
+    out: [
+        "android/hardware/secure_element/1.0/SecureElement.vts",
+        "android/hardware/secure_element/1.0/SecureElementHalCallback.vts",
+        "android/hardware/secure_element/1.0/types.vts",
+    ],
+}
+
+// Build VTS driver.
+genrule {
+    name: "android.hardware.secure_element@1.0-vts.driver_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.secure_element@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/secure_element/1.0/ $(genDir)/android/hardware/secure_element/1.0/",
+    srcs: [
+        ":android.hardware.secure_element@1.0_hal",
+    ],
+    out: [
+        "android/hardware/secure_element/1.0/SecureElement.vts.cpp",
+        "android/hardware/secure_element/1.0/SecureElementHalCallback.vts.cpp",
+        "android/hardware/secure_element/1.0/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.secure_element@1.0-vts.driver_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.secure_element@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/secure_element/1.0/ $(genDir)/android/hardware/secure_element/1.0/",
+    srcs: [
+        ":android.hardware.secure_element@1.0_hal",
+    ],
+    out: [
+        "android/hardware/secure_element/1.0/SecureElement.vts.h",
+        "android/hardware/secure_element/1.0/SecureElementHalCallback.vts.h",
+        "android/hardware/secure_element/1.0/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.secure_element@1.0-vts.driver",
+    generated_sources: ["android.hardware.secure_element@1.0-vts.driver_genc++"],
+    generated_headers: ["android.hardware.secure_element@1.0-vts.driver_genc++_headers"],
+    export_generated_headers: ["android.hardware.secure_element@1.0-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
+        "android.hardware.secure_element@1.0",
+    ],
+}
+
+// Build VTS profiler.
+genrule {
+    name: "android.hardware.secure_element@1.0-vts.profiler_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.secure_element@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/secure_element/1.0/ $(genDir)/android/hardware/secure_element/1.0/",
+    srcs: [
+        ":android.hardware.secure_element@1.0_hal",
+    ],
+    out: [
+        "android/hardware/secure_element/1.0/SecureElement.vts.cpp",
+        "android/hardware/secure_element/1.0/SecureElementHalCallback.vts.cpp",
+        "android/hardware/secure_element/1.0/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.secure_element@1.0-vts.profiler_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.secure_element@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/secure_element/1.0/ $(genDir)/android/hardware/secure_element/1.0/",
+    srcs: [
+        ":android.hardware.secure_element@1.0_hal",
+    ],
+    out: [
+        "android/hardware/secure_element/1.0/SecureElement.vts.h",
+        "android/hardware/secure_element/1.0/SecureElementHalCallback.vts.h",
+        "android/hardware/secure_element/1.0/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.secure_element@1.0-vts.profiler",
+    generated_sources: ["android.hardware.secure_element@1.0-vts.profiler_genc++"],
+    generated_headers: ["android.hardware.secure_element@1.0-vts.profiler_genc++_headers"],
+    export_generated_headers: ["android.hardware.secure_element@1.0-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
+        "android.hardware.secure_element@1.0",
+    ],
+}
+
diff --git a/radio/V1_1/target/Android.mk b/secure_element/V1_0/target/Android.mk
similarity index 79%
copy from radio/V1_1/target/Android.mk
copy to secure_element/V1_0/target/Android.mk
index bd1a0f1..5f95e3c 100644
--- a/radio/V1_1/target/Android.mk
+++ b/secure_element/V1_0/target/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalSecureElementV1_0Target
+VTS_CONFIG_SRC_DIR := testcases/hal/secure_element/config/V1_0/target
 include test/vts/tools/build/Android.host_config.mk
diff --git a/radio/V1_1/target/AndroidTest.xml b/secure_element/V1_0/target/AndroidTest.xml
similarity index 67%
copy from radio/V1_1/target/AndroidTest.xml
copy to secure_element/V1_0/target/AndroidTest.xml
index 76b339d..d757c8a 100644
--- a/radio/V1_1/target/AndroidTest.xml
+++ b/secure_element/V1_0/target/AndroidTest.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2017 The Android Open Source Project
+<!-- Copyright (C) 2018 The Android Open Source Project
 
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
@@ -13,21 +13,19 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Config for VTS VtsHalRadioV1_1Target test cases">
+<configuration description="Config for VTS VtsHalSecureElementV1_0Target test cases">
     <option name="config-descriptor:metadata" key="plan" value="vts-hal" />
     <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
-        <option name="test-module-name" value="VtsHalRadioV1_1Target"/>
-        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalRadioV1_1TargetTest/VtsHalRadioV1_1TargetTest"/>
-        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalRadioV1_1TargetTest/VtsHalRadioV1_1TargetTest"/>
+        <option name="test-module-name" value="VtsHalSecureElementV1_0Target"/>
+        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalSecureElementV1_0TargetTest/VtsHalSecureElementV1_0TargetTest"/>
+        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalSecureElementV1_0TargetTest/VtsHalSecureElementV1_0TargetTest"/>
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
-        <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.radio@1.1"/>
-        <option name="test-timeout" value="15m"/>
+        <option name="test-timeout" value="5m"/>
+        <option name="runtime-hint" value="2m"/>
     </test>
 </configuration>
diff --git a/radio/V1_1/target/Android.mk b/secure_element/V1_0/target_profiling/Android.mk
similarity index 77%
copy from radio/V1_1/target/Android.mk
copy to secure_element/V1_0/target_profiling/Android.mk
index bd1a0f1..ab8aef2 100644
--- a/radio/V1_1/target/Android.mk
+++ b/secure_element/V1_0/target_profiling/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalSecureElementV1_0TargetProfiling
+VTS_CONFIG_SRC_DIR := testcases/hal/secure_element/config/V1_0/target_profiling
 include test/vts/tools/build/Android.host_config.mk
diff --git a/secure_element/V1_0/target_profiling/AndroidTest.xml b/secure_element/V1_0/target_profiling/AndroidTest.xml
new file mode 100644
index 0000000..29dc569
--- /dev/null
+++ b/secure_element/V1_0/target_profiling/AndroidTest.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS VtsHalSecureElementV1_0TargetProfiling test cases">
+    <option name="config-descriptor:metadata" key="plan" value="vts-hal-profiling" />
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="abort-on-push-failure" value="false"/>
+        <option name="push-group" value="HalHidlTargetProfilingTest.push"/>
+        <option name="cleanup" value="true"/>
+        <option name="push" value="DATA/lib/android.hardware.secure_element@1.0-vts.profiler.so->/data/local/tmp/32/android.hardware.secure_element@1.0-vts.profiler.so"/>
+        <option name="push" value="DATA/lib64/android.hardware.secure_element@1.0-vts.profiler.so->/data/local/tmp/64/android.hardware.secure_element@1.0-vts.profiler.so"/>
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+        <option name="test-module-name" value="VtsHalSecureElementV1_0TargetProfiling"/>
+        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalSecureElementV1_0TargetTest/VtsHalSecureElementV1_0TargetTest"/>
+        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalSecureElementV1_0TargetTest/VtsHalSecureElementV1_0TargetTest"/>
+        <option name="binary-test-type" value="hal_hidl_gtest"/>
+        <option name="binary-test-disable-framework" value="true"/>
+        <option name="enable-profiling" value="true"/>
+        <option name="test-timeout" value="15m"/>
+    </test>
+</configuration>
diff --git a/sensors/Android.bp b/sensors/Android.bp
deleted file mode 100644
index cdc8905..0000000
--- a/sensors/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "V1_0",
-]
diff --git a/sensors/V1_0/Android.bp b/sensors/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/sensors/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/sensors/V1_0/build/Android.bp b/sensors/V1_0/build/Android.bp
index 100ac11..17d4e79 100644
--- a/sensors/V1_0/build/Android.bp
+++ b/sensors/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.sensors@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.sensors@1.0_hal",
     ],
@@ -17,7 +18,7 @@
 genrule {
     name: "android.hardware.sensors@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.sensors@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/sensors/1.0/ $(genDir)/android/hardware/sensors/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.sensors@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/sensors/1.0/ $(genDir)/android/hardware/sensors/1.0/",
     srcs: [
         ":android.hardware.sensors@1.0_hal",
     ],
@@ -30,7 +31,7 @@
 genrule {
     name: "android.hardware.sensors@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.sensors@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/sensors/1.0/ $(genDir)/android/hardware/sensors/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.sensors@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/sensors/1.0/ $(genDir)/android/hardware/sensors/1.0/",
     srcs: [
         ":android.hardware.sensors@1.0_hal",
     ],
@@ -45,36 +46,10 @@
     generated_sources: ["android.hardware.sensors@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.sensors@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.sensors@1.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.sensors@1.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -82,7 +57,7 @@
 genrule {
     name: "android.hardware.sensors@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.sensors@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/sensors/1.0/ $(genDir)/android/hardware/sensors/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.sensors@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/sensors/1.0/ $(genDir)/android/hardware/sensors/1.0/",
     srcs: [
         ":android.hardware.sensors@1.0_hal",
     ],
@@ -95,7 +70,7 @@
 genrule {
     name: "android.hardware.sensors@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.sensors@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/sensors/1.0/ $(genDir)/android/hardware/sensors/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.sensors@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/sensors/1.0/ $(genDir)/android/hardware/sensors/1.0/",
     srcs: [
         ":android.hardware.sensors@1.0_hal",
     ],
@@ -110,27 +85,10 @@
     generated_sources: ["android.hardware.sensors@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.sensors@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.sensors@1.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.sensors@1.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/sensors/V1_0/host/AndroidTest.xml b/sensors/V1_0/host/AndroidTest.xml
index 6ac5288..95e258a 100644
--- a/sensors/V1_0/host/AndroidTest.xml
+++ b/sensors/V1_0/host/AndroidTest.xml
@@ -24,11 +24,9 @@
         <option name="push" value="DATA/lib/android.hardware.sensors@1.0-vts.driver.so->/data/local/tmp/32/android.hardware.sensors@1.0-vts.driver.so"/>
         <option name="push" value="DATA/lib64/android.hardware.sensors@1.0-vts.driver.so->/data/local/tmp/64/android.hardware.sensors@1.0-vts.driver.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalSensorsV1_0Host"/>
         <option name="test-case-path" value="vts/testcases/hal/sensors/V1_0/host/VtsHalSensorsV1_0HostTest"/>
-        <option name="precondition-lshal" value="android.hardware.sensors@1.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/sensors/V1_0/host/VtsHalSensorsV1_0HostTest.py b/sensors/V1_0/host/VtsHalSensorsV1_0HostTest.py
index d65da77..cd788de 100644
--- a/sensors/V1_0/host/VtsHalSensorsV1_0HostTest.py
+++ b/sensors/V1_0/host/VtsHalSensorsV1_0HostTest.py
@@ -16,36 +16,23 @@
 #
 
 import logging
-import time
 
 from vts.runners.host import asserts
-from vts.runners.host import base_test
 from vts.runners.host import test_runner
-from vts.utils.python.controllers import android_device
-from vts.utils.python.precondition import precondition_utils
+from vts.testcases.template.hal_hidl_host_test import hal_hidl_host_test
 
 
-class SensorsHidlTest(base_test.BaseTestClass):
+class SensorsHidlTest(hal_hidl_host_test.HalHidlHostTest):
     """Host testcase class for the SENSORS HIDL HAL.
 
     This class set-up/tear-down the webDB host test framwork and contains host test cases for
     sensors HIDL HAL.
     """
 
+    TEST_HAL_SERVICES = {"android.hardware.sensors@1.0::ISensors"}
     def setUpClass(self):
         """Creates a mirror and turns on the framework-layer SENSORS service."""
-        self.dut = self.registerController(android_device)[0]
-
-        self.dut.shell.InvokeTerminal("one")
-        self.dut.shell.one.Execute("setenforce 0")  # SELinux permissive mode
-        if not precondition_utils.CanRunHidlHalTest(
-            self, self.dut, self.dut.shell.one):
-            self._skip_all_testcases = True
-            return
-
-        # Test using the binderized mode
-        self.dut.shell.one.Execute(
-            "setprop vts.hal.vts.hidl.get_stub true")
+        super(SensorsHidlTest, self).setUpClass()
 
         self.dut.hal.InitHidlHal(
             target_type="sensors",
@@ -55,22 +42,6 @@
             target_component_name="ISensors",
             bits=int(self.abi_bitness))
 
-    def tearDownClass(self):
-        """ If profiling is enabled for the test, collect the profiling data
-            and disable profiling after the test is done.
-        """
-        if not self._skip_all_testcases and self.profiling.enabled:
-            self.profiling.ProcessAndUploadTraceData()
-
-    def setUp(self):
-        if self.profiling.enabled:
-            self.profiling.EnableVTSProfiling(self.dut.shell.one)
-
-    def tearDown(self):
-        if self.profiling.enabled:
-            self.profiling.ProcessTraceDataForTestCase(self.dut)
-            self.profiling.DisableVTSProfiling(self.dut.shell.one)
-
     def testSensorsBasic(self):
         """Test the basic operation of test framework and sensor HIDL HAL
 
diff --git a/sensors/V1_0/host_profiling/AndroidTest.xml b/sensors/V1_0/host_profiling/AndroidTest.xml
index eec40c2..ada1a31 100644
--- a/sensors/V1_0/host_profiling/AndroidTest.xml
+++ b/sensors/V1_0/host_profiling/AndroidTest.xml
@@ -26,12 +26,10 @@
         <option name="push" value="DATA/lib/android.hardware.sensors@1.0-vts.profiler.so->/data/local/tmp/32/android.hardware.sensors@1.0-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.sensors@1.0-vts.profiler.so->/data/local/tmp/64/android.hardware.sensors@1.0-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalSensorsV1_0HostProfiling"/>
         <option name="test-case-path" value="vts/testcases/hal/sensors/V1_0/host/VtsHalSensorsV1_0HostTest"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.sensors@1.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/sensors/V1_0/target/AndroidTest.xml b/sensors/V1_0/target/AndroidTest.xml
index 25bdd99..4994b03 100644
--- a/sensors/V1_0/target/AndroidTest.xml
+++ b/sensors/V1_0/target/AndroidTest.xml
@@ -19,7 +19,6 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalSensorsV1_0Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalSensorsV1_0TargetTest/VtsHalSensorsV1_0TargetTest"/>
@@ -27,8 +26,8 @@
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.sensors@1.0"/>
         <option name="test-timeout" value="15m"/>
         <option name="runtime-hint" value="5m"/>
+        <option name="gtest-batch-mode" value="true"/>
     </test>
 </configuration>
diff --git a/sensors/V1_0/target_profiling/AndroidTest.xml b/sensors/V1_0/target_profiling/AndroidTest.xml
index 929bad4..77f4e09 100644
--- a/sensors/V1_0/target_profiling/AndroidTest.xml
+++ b/sensors/V1_0/target_profiling/AndroidTest.xml
@@ -22,7 +22,6 @@
         <option name="push" value="DATA/lib/android.hardware.sensors@1.0-vts.profiler.so->/data/local/tmp/32/android.hardware.sensors@1.0-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.sensors@1.0-vts.profiler.so->/data/local/tmp/64/android.hardware.sensors@1.0-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalSensorsV1_0TargetProfiling"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalSensorsV1_0TargetTest/VtsHalSensorsV1_0TargetTest"/>
@@ -31,7 +30,6 @@
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.sensors@1.0"/>
         <option name="test-timeout" value="15m"/>
     </test>
 </configuration>
diff --git a/soundtrigger/Android.bp b/soundtrigger/Android.bp
deleted file mode 100644
index fb60e6b..0000000
--- a/soundtrigger/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "V2_0",
-]
diff --git a/soundtrigger/V2_0/Android.bp b/soundtrigger/V2_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/soundtrigger/V2_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/soundtrigger/V2_0/OWNERS b/soundtrigger/V2_0/OWNERS
new file mode 100644
index 0000000..6fdc97c
--- /dev/null
+++ b/soundtrigger/V2_0/OWNERS
@@ -0,0 +1,3 @@
+elaurent@google.com
+krocard@google.com
+mnaganov@google.com
diff --git a/soundtrigger/V2_0/build/Android.bp b/soundtrigger/V2_0/build/Android.bp
index 3c9f435..797b63a 100644
--- a/soundtrigger/V2_0/build/Android.bp
+++ b/soundtrigger/V2_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.soundtrigger@2.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.soundtrigger@2.0_hal",
     ],
@@ -18,7 +19,7 @@
 genrule {
     name: "android.hardware.soundtrigger@2.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.soundtrigger@2.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/soundtrigger/2.0/ $(genDir)/android/hardware/soundtrigger/2.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.soundtrigger@2.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/soundtrigger/2.0/ $(genDir)/android/hardware/soundtrigger/2.0/",
     srcs: [
         ":android.hardware.soundtrigger@2.0_hal",
     ],
@@ -32,7 +33,7 @@
 genrule {
     name: "android.hardware.soundtrigger@2.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.soundtrigger@2.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/soundtrigger/2.0/ $(genDir)/android/hardware/soundtrigger/2.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.soundtrigger@2.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/soundtrigger/2.0/ $(genDir)/android/hardware/soundtrigger/2.0/",
     srcs: [
         ":android.hardware.soundtrigger@2.0_hal",
     ],
@@ -48,38 +49,13 @@
     generated_sources: ["android.hardware.soundtrigger@2.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.soundtrigger@2.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.soundtrigger@2.0-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
     shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+        "android.hardware.audio.common@2.0-vts.driver",
+    ],
+    static_libs: [
+        "android.hardware.audio.common@2.0",
         "android.hardware.soundtrigger@2.0",
-        "android.hardware.audio.common@2.0",
-        "android.hardware.audio.common@2.0-vts.driver",
-    ],
-    export_shared_lib_headers: [
-        "android.hardware.audio.common@2.0",
-        "android.hardware.audio.common@2.0-vts.driver",
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -87,7 +63,7 @@
 genrule {
     name: "android.hardware.soundtrigger@2.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.soundtrigger@2.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/soundtrigger/2.0/ $(genDir)/android/hardware/soundtrigger/2.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.soundtrigger@2.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/soundtrigger/2.0/ $(genDir)/android/hardware/soundtrigger/2.0/",
     srcs: [
         ":android.hardware.soundtrigger@2.0_hal",
     ],
@@ -101,7 +77,7 @@
 genrule {
     name: "android.hardware.soundtrigger@2.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.soundtrigger@2.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/soundtrigger/2.0/ $(genDir)/android/hardware/soundtrigger/2.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.soundtrigger@2.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/soundtrigger/2.0/ $(genDir)/android/hardware/soundtrigger/2.0/",
     srcs: [
         ":android.hardware.soundtrigger@2.0_hal",
     ],
@@ -117,28 +93,13 @@
     generated_sources: ["android.hardware.soundtrigger@2.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.soundtrigger@2.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.soundtrigger@2.0-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
     shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
-        "android.hardware.soundtrigger@2.0",
-        "android.hardware.audio.common@2.0",
         "android.hardware.audio.common@2.0-vts.profiler",
     ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
+    static_libs: [
+        "android.hardware.audio.common@2.0",
+        "android.hardware.soundtrigger@2.0",
     ],
 }
 
diff --git a/soundtrigger/V2_0/target/AndroidTest.xml b/soundtrigger/V2_0/target/AndroidTest.xml
index 2f833d0..bacc2b0 100644
--- a/soundtrigger/V2_0/target/AndroidTest.xml
+++ b/soundtrigger/V2_0/target/AndroidTest.xml
@@ -19,7 +19,6 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalSoundtriggerV2_0Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalSoundtriggerV2_0TargetTest/VtsHalSoundtriggerV2_0TargetTest"/>
@@ -27,8 +26,12 @@
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.soundtrigger@2.0"/>
-        <option name="precondition-file-path-prefix" value="/*/lib/hw/sound_trigger.primary." />
+        <option name="exclude-coverage-path" value="hardware/interfaces/audio/" />
+        <option name="exclude-coverage-path" value="hardware/libhardware/" />
+        <option name="exclude-coverage-path" value="hardware/qcom/audio/post_proc/" />
+        <option name="exclude-coverage-path" value="frameworks/av/media/libnbaio/" />
+        <option name="exclude-coverage-path" value="system/media/audio_utils/" />
+        <option name="precondition-file-path-prefix" value="/*/lib/hw/sound_trigger.primary.*" />
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/soundtrigger/V2_0/target/HalSoundTriggerHidlTargetBasicTest.config b/soundtrigger/V2_0/target/HalSoundTriggerHidlTargetBasicTest.config
deleted file mode 100644
index 5c12d13..0000000
--- a/soundtrigger/V2_0/target/HalSoundTriggerHidlTargetBasicTest.config
+++ /dev/null
@@ -1,41 +0,0 @@
-{
-    "use_gae_db": true,
-    "coverage": true,
-    "modules": [
-        {
-            "module_name": "system/lib/hw/sound_trigger.primary.bullhead",
-            "git_project": {
-                "name": "platform/vendor/lge/bullhead",
-                "path": "vendor/lge/bullhead"
-            }
-        },
-        {
-            "module_name": "system/lib/hw/sound_trigger.primary.angler",
-            "git_project": {
-                "name": "platform/vendor/huawei/angler",
-                "path": "vendor/huawei/angler"
-            }
-        },
-        {
-            "module_name": "system/lib/hw/sound_trigger.primary.marlin",
-            "git_project": {
-                "name": "platform/vendor/google_devices/marlin",
-                "path": "vendor/google_devices/marlin"
-            }
-        },
-        {
-            "module_name": "system/lib/hw/sound_trigger.primary.sailfish",
-            "git_project": {
-                "name": "platform/vendor/google_devices/marlin",
-                "path": "vendor/google_devices/marlin"
-            }
-        },
-        {
-            "module_name": "system/lib/hw/android.hardware.soundtrigger@2.0-impl",
-            "git_project": {
-                "name": "platform/hardware/interfaces",
-                "path": "hardware/interfaces"
-            }
-        }
-    ]
-}
diff --git a/soundtrigger/V2_0/target_profiling/AndroidTest.xml b/soundtrigger/V2_0/target_profiling/AndroidTest.xml
index 919678a..3c9dc2e 100644
--- a/soundtrigger/V2_0/target_profiling/AndroidTest.xml
+++ b/soundtrigger/V2_0/target_profiling/AndroidTest.xml
@@ -24,7 +24,6 @@
         <option name="push" value="DATA/lib/android.hardware.soundtrigger@2.0-vts.profiler.so->/data/local/tmp/32/android.hardware.soundtrigger@2.0-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.soundtrigger@2.0-vts.profiler.so->/data/local/tmp/64/android.hardware.soundtrigger@2.0-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalSoundtriggerV2_0TargetProfiling"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalSoundtriggerV2_0TargetTest/VtsHalSoundtriggerV2_0TargetTest"/>
@@ -33,8 +32,12 @@
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.soundtrigger@2.0"/>
-        <option name="precondition-file-path-prefix" value="/*/lib/hw/sound_trigger.primary." />
+        <option name="exclude-coverage-path" value="hardware/interfaces/audio/" />
+        <option name="exclude-coverage-path" value="hardware/libhardware/" />
+        <option name="exclude-coverage-path" value="hardware/qcom/audio/post_proc/" />
+        <option name="exclude-coverage-path" value="frameworks/av/media/libnbaio/" />
+        <option name="exclude-coverage-path" value="system/media/audio_utils/" />
+        <option name="precondition-file-path-prefix" value="/*/lib/hw/sound_trigger.primary.*" />
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/soundtrigger/V2_1/OWNERS b/soundtrigger/V2_1/OWNERS
new file mode 100644
index 0000000..6fdc97c
--- /dev/null
+++ b/soundtrigger/V2_1/OWNERS
@@ -0,0 +1,3 @@
+elaurent@google.com
+krocard@google.com
+mnaganov@google.com
diff --git a/radio/V1_1/target/Android.mk b/soundtrigger/V2_1/adapter/Android.mk
similarity index 80%
copy from radio/V1_1/target/Android.mk
copy to soundtrigger/V2_1/adapter/Android.mk
index bd1a0f1..cf1fbc7 100644
--- a/radio/V1_1/target/Android.mk
+++ b/soundtrigger/V2_1/adapter/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalSoundtriggerV2_1Adapter
+VTS_CONFIG_SRC_DIR := testcases/hal/soundtrigger/V2_1/adapter
 include test/vts/tools/build/Android.host_config.mk
diff --git a/soundtrigger/V2_1/adapter/AndroidTest.xml b/soundtrigger/V2_1/adapter/AndroidTest.xml
new file mode 100644
index 0000000..e292e96
--- /dev/null
+++ b/soundtrigger/V2_1/adapter/AndroidTest.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS VtsHalSoundtriggerV2_1Adapter test cases">
+    <option key="plan" name="config-descriptor:metadata" value="vts-hal-adapter"/>
+    <object class="com.android.tradefed.module.VtsHalAdapterModuleController" type="module_controller">
+        <option name="hal-package-name" value="android.hardware.soundtrigger@2.1"/>
+    </object>
+    <target_preparer class="com.android.tradefed.targetprep.VtsHalAdapterPreparer">
+        <option name="adapter-binary-name" value="android.hardware.soundtrigger@2.0-adapter"/>
+        <option name="hal-package-name" value="android.hardware.soundtrigger@2.1"/>
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest">
+        <option name="package" value="com.android.devicehealth.tests"/>
+        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner"/>
+    </test>
+    <include name="CtsStatsdHostTestCases.config"/>
+    <include name="CtsWidgetTestCases.config"/>
+</configuration>
diff --git a/soundtrigger/V2_1/build/Android.bp b/soundtrigger/V2_1/build/Android.bp
new file mode 100644
index 0000000..10cbca9
--- /dev/null
+++ b/soundtrigger/V2_1/build/Android.bp
@@ -0,0 +1,104 @@
+// This file was auto-generated. Do not edit manually.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
+
+// Generate .vts spec files.
+hal2vts {
+    name: "android.hardware.soundtrigger@2.1-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
+    srcs: [
+        ":android.hardware.soundtrigger@2.1_hal",
+    ],
+    out: [
+        "android/hardware/soundtrigger/2.1/SoundTriggerHw.vts",
+        "android/hardware/soundtrigger/2.1/SoundTriggerHwCallback.vts",
+    ],
+}
+
+// Build VTS driver.
+genrule {
+    name: "android.hardware.soundtrigger@2.1-vts.driver_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.soundtrigger@2.1 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/soundtrigger/2.1/ $(genDir)/android/hardware/soundtrigger/2.1/",
+    srcs: [
+        ":android.hardware.soundtrigger@2.1_hal",
+    ],
+    out: [
+        "android/hardware/soundtrigger/2.1/SoundTriggerHw.vts.cpp",
+        "android/hardware/soundtrigger/2.1/SoundTriggerHwCallback.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.soundtrigger@2.1-vts.driver_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.soundtrigger@2.1 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/soundtrigger/2.1/ $(genDir)/android/hardware/soundtrigger/2.1/",
+    srcs: [
+        ":android.hardware.soundtrigger@2.1_hal",
+    ],
+    out: [
+        "android/hardware/soundtrigger/2.1/SoundTriggerHw.vts.h",
+        "android/hardware/soundtrigger/2.1/SoundTriggerHwCallback.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.soundtrigger@2.1-vts.driver",
+    generated_sources: ["android.hardware.soundtrigger@2.1-vts.driver_genc++"],
+    generated_headers: ["android.hardware.soundtrigger@2.1-vts.driver_genc++_headers"],
+    export_generated_headers: ["android.hardware.soundtrigger@2.1-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [
+        "android.hardware.audio.common@2.0-vts.driver",
+        "android.hardware.soundtrigger@2.0-vts.driver",
+    ],
+    static_libs: [
+        "android.hardware.audio.common@2.0",
+        "android.hardware.soundtrigger@2.0",
+        "android.hardware.soundtrigger@2.1",
+    ],
+}
+
+// Build VTS profiler.
+genrule {
+    name: "android.hardware.soundtrigger@2.1-vts.profiler_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.soundtrigger@2.1 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/soundtrigger/2.1/ $(genDir)/android/hardware/soundtrigger/2.1/",
+    srcs: [
+        ":android.hardware.soundtrigger@2.1_hal",
+    ],
+    out: [
+        "android/hardware/soundtrigger/2.1/SoundTriggerHw.vts.cpp",
+        "android/hardware/soundtrigger/2.1/SoundTriggerHwCallback.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.soundtrigger@2.1-vts.profiler_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.soundtrigger@2.1 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/soundtrigger/2.1/ $(genDir)/android/hardware/soundtrigger/2.1/",
+    srcs: [
+        ":android.hardware.soundtrigger@2.1_hal",
+    ],
+    out: [
+        "android/hardware/soundtrigger/2.1/SoundTriggerHw.vts.h",
+        "android/hardware/soundtrigger/2.1/SoundTriggerHwCallback.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.soundtrigger@2.1-vts.profiler",
+    generated_sources: ["android.hardware.soundtrigger@2.1-vts.profiler_genc++"],
+    generated_headers: ["android.hardware.soundtrigger@2.1-vts.profiler_genc++_headers"],
+    export_generated_headers: ["android.hardware.soundtrigger@2.1-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [
+        "android.hardware.audio.common@2.0-vts.profiler",
+        "android.hardware.soundtrigger@2.0-vts.profiler",
+    ],
+    static_libs: [
+        "android.hardware.audio.common@2.0",
+        "android.hardware.soundtrigger@2.0",
+        "android.hardware.soundtrigger@2.1",
+    ],
+}
+
diff --git a/radio/V1_1/target/Android.mk b/soundtrigger/V2_1/target/Android.mk
similarity index 80%
copy from radio/V1_1/target/Android.mk
copy to soundtrigger/V2_1/target/Android.mk
index bd1a0f1..e567520 100644
--- a/radio/V1_1/target/Android.mk
+++ b/soundtrigger/V2_1/target/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalSoundtriggerV2_1Target
+VTS_CONFIG_SRC_DIR := testcases/hal/soundtrigger/V2_1/target
 include test/vts/tools/build/Android.host_config.mk
diff --git a/soundtrigger/V2_1/target/AndroidTest.xml b/soundtrigger/V2_1/target/AndroidTest.xml
new file mode 100644
index 0000000..80413a9
--- /dev/null
+++ b/soundtrigger/V2_1/target/AndroidTest.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS VtsHalSoundtriggerV2_1Target test cases">
+    <option name="config-descriptor:metadata" key="plan" value="vts-hal" />
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="abort-on-push-failure" value="false"/>
+        <option name="push-group" value="HalHidlTargetTest.push"/>
+    </target_preparer>
+    <multi_target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
+    <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+        <option name="test-module-name" value="VtsHalSoundtriggerV2_1Target"/>
+        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalSoundtriggerV2_1TargetTest/VtsHalSoundtriggerV2_1TargetTest"/>
+        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalSoundtriggerV2_1TargetTest/VtsHalSoundtriggerV2_1TargetTest"/>
+        <option name="binary-test-type" value="hal_hidl_gtest"/>
+        <option name="binary-test-disable-framework" value="true"/>
+        <option name="binary-test-stop-native-servers" value="true"/>
+        <option name="exclude-coverage-path" value="hardware/interfaces/audio/" />
+        <option name="exclude-coverage-path" value="hardware/libhardware/" />
+        <option name="exclude-coverage-path" value="hardware/qcom/audio/post_proc/" />
+        <option name="exclude-coverage-path" value="frameworks/av/media/libnbaio/" />
+        <option name="exclude-coverage-path" value="system/media/audio_utils/" />
+        <option name="precondition-file-path-prefix" value="/*/lib/hw/sound_trigger.primary.*" />
+        <option name="test-timeout" value="5m"/>
+    </test>
+</configuration>
diff --git a/radio/V1_1/target/Android.mk b/soundtrigger/V2_1/target_profiling/Android.mk
similarity index 78%
copy from radio/V1_1/target/Android.mk
copy to soundtrigger/V2_1/target_profiling/Android.mk
index bd1a0f1..13a95bf 100644
--- a/radio/V1_1/target/Android.mk
+++ b/soundtrigger/V2_1/target_profiling/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalSoundtriggerV2_1TargetProfiling
+VTS_CONFIG_SRC_DIR := testcases/hal/soundtrigger/V2_1/target_profiling
 include test/vts/tools/build/Android.host_config.mk
diff --git a/soundtrigger/V2_1/target_profiling/AndroidTest.xml b/soundtrigger/V2_1/target_profiling/AndroidTest.xml
new file mode 100644
index 0000000..7d1687f
--- /dev/null
+++ b/soundtrigger/V2_1/target_profiling/AndroidTest.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS VtsHalSoundtriggerV2_1TargetProfiling test cases">
+    <option name="config-descriptor:metadata" key="plan" value="vts-hal-profiling" />
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="abort-on-push-failure" value="false"/>
+        <option name="push-group" value="HalHidlTargetProfilingTest.push"/>
+        <option name="cleanup" value="true"/>
+        <option name="push" value="DATA/lib/android.hardware.audio.common@2.0-vts.profiler.so->/data/local/tmp/32/android.hardware.audio.common@2.0-vts.profiler.so"/>
+        <option name="push" value="DATA/lib64/android.hardware.audio.common@2.0-vts.profiler.so->/data/local/tmp/64/android.hardware.audio.common@2.0-vts.profiler.so"/>
+        <option name="push" value="DATA/lib/android.hardware.soundtrigger@2.0-vts.profiler.so->/data/local/tmp/32/android.hardware.soundtrigger@2.0-vts.profiler.so"/>
+        <option name="push" value="DATA/lib64/android.hardware.soundtrigger@2.0-vts.profiler.so->/data/local/tmp/64/android.hardware.soundtrigger@2.0-vts.profiler.so"/>
+        <option name="push" value="DATA/lib/android.hardware.soundtrigger@2.1-vts.profiler.so->/data/local/tmp/32/android.hardware.soundtrigger@2.1-vts.profiler.so"/>
+        <option name="push" value="DATA/lib64/android.hardware.soundtrigger@2.1-vts.profiler.so->/data/local/tmp/64/android.hardware.soundtrigger@2.1-vts.profiler.so"/>
+    </target_preparer>
+    <multi_target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
+    <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+        <option name="test-module-name" value="VtsHalSoundtriggerV2_1TargetProfiling"/>
+        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalSoundtriggerV2_1TargetTest/VtsHalSoundtriggerV2_1TargetTest"/>
+        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalSoundtriggerV2_1TargetTest/VtsHalSoundtriggerV2_1TargetTest"/>
+        <option name="binary-test-type" value="hal_hidl_gtest"/>
+        <option name="binary-test-disable-framework" value="true"/>
+        <option name="binary-test-stop-native-servers" value="true"/>
+        <option name="enable-profiling" value="true"/>
+        <option name="exclude-coverage-path" value="hardware/interfaces/audio/" />
+        <option name="exclude-coverage-path" value="hardware/libhardware/" />
+        <option name="exclude-coverage-path" value="hardware/qcom/audio/post_proc/" />
+        <option name="exclude-coverage-path" value="frameworks/av/media/libnbaio/" />
+        <option name="exclude-coverage-path" value="system/media/audio_utils/" />
+        <option name="precondition-file-path-prefix" value="/*/lib/hw/sound_trigger.primary.*" />
+        <option name="test-timeout" value="5m"/>
+    </test>
+</configuration>
diff --git a/system/hidl/memory/block/V1_0/build/Android.bp b/system/hidl/memory/block/V1_0/build/Android.bp
new file mode 100644
index 0000000..88a6bd3
--- /dev/null
+++ b/system/hidl/memory/block/V1_0/build/Android.bp
@@ -0,0 +1,77 @@
+// Build VTS driver.
+genrule {
+    name: "android.hidl.memory.block@1.0-vts.driver_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hidl:system/libhidl/transport android.hidl.memory.block@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hidl/memory/block/1.0/ $(genDir)/android/hidl/memory/block/1.0/",
+    srcs: [
+        ":android.hidl.memory.block@1.0_hal",
+    ],
+    out: [
+        "android/hidl/memory/block/1.0/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hidl.memory.block@1.0-vts.driver_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hidl:system/libhidl/transport android.hidl.memory.block@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hidl/memory/block/1.0/ $(genDir)/android/hidl/memory/block/1.0/",
+    srcs: [
+        ":android.hidl.memory.block@1.0_hal",
+    ],
+    out: [
+        "android/hidl/memory/block/1.0/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hidl.memory.block@1.0-vts.driver",
+    generated_sources: ["android.hidl.memory.block@1.0-vts.driver_genc++"],
+    generated_headers: ["android.hidl.memory.block@1.0-vts.driver_genc++_headers"],
+    export_generated_headers: ["android.hidl.memory.block@1.0-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [
+        "android.hidl.memory.token@1.0-vts.driver",
+    ],
+    static_libs: [
+        "android.hidl.memory.block@1.0",
+    ],
+}
+
+// Build VTS profiler.
+genrule {
+    name: "android.hidl.memory.block@1.0-vts.profiler_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hidl:system/libhidl/transport android.hidl.memory.block@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hidl/memory/block/1.0/ $(genDir)/android/hidl/memory/block/1.0/",
+    srcs: [
+        ":android.hidl.memory.block@1.0_hal",
+    ],
+    out: [
+        "android/hidl/memory/block/1.0/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hidl.memory.block@1.0-vts.profiler_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hidl:system/libhidl/transport android.hidl.memory.block@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hidl/memory/block/1.0/ $(genDir)/android/hidl/memory/block/1.0/",
+    srcs: [
+        ":android.hidl.memory.block@1.0_hal",
+    ],
+    out: [
+        "android/hidl/memory/block/1.0/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hidl.memory.block@1.0-vts.profiler",
+    generated_sources: ["android.hidl.memory.block@1.0-vts.profiler_genc++"],
+    generated_headers: ["android.hidl.memory.block@1.0-vts.profiler_genc++_headers"],
+    export_generated_headers: ["android.hidl.memory.block@1.0-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [
+        "android.hidl.memory.token@1.0-vts.profiler",
+    ],
+    static_libs: [
+        "android.hidl.memory.block@1.0",
+    ],
+}
diff --git a/system/hidl/memory/token/V1_0/build/Android.bp b/system/hidl/memory/token/V1_0/build/Android.bp
new file mode 100644
index 0000000..b53a199
--- /dev/null
+++ b/system/hidl/memory/token/V1_0/build/Android.bp
@@ -0,0 +1,73 @@
+// Build VTS driver.
+genrule {
+    name: "android.hidl.memory.token@1.0-vts.driver_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hidl:system/libhidl/transport android.hidl.memory.token@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hidl/memory/token/1.0/ $(genDir)/android/hidl/memory/token/1.0/",
+    srcs: [
+        ":android.hidl.memory.token@1.0_hal",
+    ],
+    out: [
+        "android/hidl/memory/token/1.0/MemoryToken.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hidl.memory.token@1.0-vts.driver_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hidl:system/libhidl/transport android.hidl.memory.token@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hidl/memory/token/1.0/ $(genDir)/android/hidl/memory/token/1.0/",
+    srcs: [
+        ":android.hidl.memory.token@1.0_hal",
+    ],
+    out: [
+        "android/hidl/memory/token/1.0/MemoryToken.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hidl.memory.token@1.0-vts.driver",
+    generated_sources: ["android.hidl.memory.token@1.0-vts.driver_genc++"],
+    generated_headers: ["android.hidl.memory.token@1.0-vts.driver_genc++_headers"],
+    export_generated_headers: ["android.hidl.memory.token@1.0-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
+        "android.hidl.memory.token@1.0",
+    ],
+}
+
+// Build VTS profiler.
+genrule {
+    name: "android.hidl.memory.token@1.0-vts.profiler_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hidl:system/libhidl/transport android.hidl.memory.token@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hidl/memory/token/1.0/ $(genDir)/android/hidl/memory/token/1.0/",
+    srcs: [
+        ":android.hidl.memory.token@1.0_hal",
+    ],
+    out: [
+        "android/hidl/memory/token/1.0/MemoryToken.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hidl.memory.token@1.0-vts.profiler_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hidl:system/libhidl/transport android.hidl.memory.token@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hidl/memory/token/1.0/ $(genDir)/android/hidl/memory/token/1.0/",
+    srcs: [
+        ":android.hidl.memory.token@1.0_hal",
+    ],
+    out: [
+        "android/hidl/memory/token/1.0/MemoryToken.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hidl.memory.token@1.0-vts.profiler",
+    generated_sources: ["android.hidl.memory.token@1.0-vts.profiler_genc++"],
+    generated_headers: ["android.hidl.memory.token@1.0-vts.profiler_genc++_headers"],
+    export_generated_headers: ["android.hidl.memory.token@1.0-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
+        "android.hidl.memory.token@1.0",
+    ],
+}
diff --git a/tests/Android.bp b/tests/Android.bp
deleted file mode 100644
index 8347b83..0000000
--- a/tests/Android.bp
+++ /dev/null
@@ -1,17 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "bar/V1_0",
-    "baz/V1_0",
-    "expression/V1_0",
-    "extension/light/V2_0",
-    "foo/V1_0",
-    "hash/V1_0",
-    "inheritance/V1_0",
-    "libhwbinder/V1_0",
-    "memory/V1_0",
-    "msgq/V1_0",
-    "multithread/V1_0",
-    "pointer/V1_0",
-]
diff --git a/tests/bar/V1_0/Android.bp b/tests/bar/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/tests/bar/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/tests/bar/V1_0/build/Android.bp b/tests/bar/V1_0/build/Android.bp
index dfc5408..f7cee53 100644
--- a/tests/bar/V1_0/build/Android.bp
+++ b/tests/bar/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.tests.bar@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.tests.bar@1.0_hal",
     ],
@@ -21,7 +22,7 @@
 genrule {
     name: "android.hardware.tests.bar@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.bar@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/tests/bar/1.0/ $(genDir)/android/hardware/tests/bar/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.bar@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/tests/bar/1.0/ $(genDir)/android/hardware/tests/bar/1.0/",
     srcs: [
         ":android.hardware.tests.bar@1.0_hal",
     ],
@@ -38,7 +39,7 @@
 genrule {
     name: "android.hardware.tests.bar@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.bar@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/tests/bar/1.0/ $(genDir)/android/hardware/tests/bar/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.bar@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/tests/bar/1.0/ $(genDir)/android/hardware/tests/bar/1.0/",
     srcs: [
         ":android.hardware.tests.bar@1.0_hal",
     ],
@@ -57,38 +58,13 @@
     generated_sources: ["android.hardware.tests.bar@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.tests.bar@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.tests.bar@1.0-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
     shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+        "android.hardware.tests.foo@1.0-vts.driver",
+    ],
+    static_libs: [
         "android.hardware.tests.bar@1.0",
         "android.hardware.tests.foo@1.0",
-        "android.hardware.tests.foo@1.0-vts.driver",
-    ],
-    export_shared_lib_headers: [
-        "android.hardware.tests.foo@1.0",
-        "android.hardware.tests.foo@1.0-vts.driver",
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -96,7 +72,7 @@
 genrule {
     name: "android.hardware.tests.bar@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.bar@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/tests/bar/1.0/ $(genDir)/android/hardware/tests/bar/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.bar@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/tests/bar/1.0/ $(genDir)/android/hardware/tests/bar/1.0/",
     srcs: [
         ":android.hardware.tests.bar@1.0_hal",
     ],
@@ -113,7 +89,7 @@
 genrule {
     name: "android.hardware.tests.bar@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.bar@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/tests/bar/1.0/ $(genDir)/android/hardware/tests/bar/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.bar@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/tests/bar/1.0/ $(genDir)/android/hardware/tests/bar/1.0/",
     srcs: [
         ":android.hardware.tests.bar@1.0_hal",
     ],
@@ -132,28 +108,13 @@
     generated_sources: ["android.hardware.tests.bar@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.tests.bar@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.tests.bar@1.0-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
     shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
-        "android.hardware.tests.bar@1.0",
-        "android.hardware.tests.foo@1.0",
         "android.hardware.tests.foo@1.0-vts.profiler",
     ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
+    static_libs: [
+        "android.hardware.tests.bar@1.0",
+        "android.hardware.tests.foo@1.0",
     ],
 }
 
diff --git a/tests/baz/V1_0/Android.bp b/tests/baz/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/tests/baz/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/tests/baz/V1_0/build/Android.bp b/tests/baz/V1_0/build/Android.bp
index db0a36e..5b9dbac 100644
--- a/tests/baz/V1_0/build/Android.bp
+++ b/tests/baz/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.tests.baz@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.tests.baz@1.0_hal",
     ],
@@ -20,7 +21,7 @@
 genrule {
     name: "android.hardware.tests.baz@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.baz@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/tests/baz/1.0/ $(genDir)/android/hardware/tests/baz/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.baz@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/tests/baz/1.0/ $(genDir)/android/hardware/tests/baz/1.0/",
     srcs: [
         ":android.hardware.tests.baz@1.0_hal",
     ],
@@ -36,7 +37,7 @@
 genrule {
     name: "android.hardware.tests.baz@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.baz@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/tests/baz/1.0/ $(genDir)/android/hardware/tests/baz/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.baz@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/tests/baz/1.0/ $(genDir)/android/hardware/tests/baz/1.0/",
     srcs: [
         ":android.hardware.tests.baz@1.0_hal",
     ],
@@ -54,36 +55,10 @@
     generated_sources: ["android.hardware.tests.baz@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.tests.baz@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.tests.baz@1.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.tests.baz@1.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -91,7 +66,7 @@
 genrule {
     name: "android.hardware.tests.baz@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.baz@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/tests/baz/1.0/ $(genDir)/android/hardware/tests/baz/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.baz@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/tests/baz/1.0/ $(genDir)/android/hardware/tests/baz/1.0/",
     srcs: [
         ":android.hardware.tests.baz@1.0_hal",
     ],
@@ -107,7 +82,7 @@
 genrule {
     name: "android.hardware.tests.baz@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.baz@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/tests/baz/1.0/ $(genDir)/android/hardware/tests/baz/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.baz@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/tests/baz/1.0/ $(genDir)/android/hardware/tests/baz/1.0/",
     srcs: [
         ":android.hardware.tests.baz@1.0_hal",
     ],
@@ -125,27 +100,10 @@
     generated_sources: ["android.hardware.tests.baz@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.tests.baz@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.tests.baz@1.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.tests.baz@1.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/tests/expression/V1_0/Android.bp b/tests/expression/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/tests/expression/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/tests/expression/V1_0/build/Android.bp b/tests/expression/V1_0/build/Android.bp
index 9e2de50..279884a 100644
--- a/tests/expression/V1_0/build/Android.bp
+++ b/tests/expression/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.tests.expression@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.tests.expression@1.0_hal",
     ],
@@ -17,7 +18,7 @@
 genrule {
     name: "android.hardware.tests.expression@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.expression@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/tests/expression/1.0/ $(genDir)/android/hardware/tests/expression/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.expression@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/tests/expression/1.0/ $(genDir)/android/hardware/tests/expression/1.0/",
     srcs: [
         ":android.hardware.tests.expression@1.0_hal",
     ],
@@ -30,7 +31,7 @@
 genrule {
     name: "android.hardware.tests.expression@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.expression@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/tests/expression/1.0/ $(genDir)/android/hardware/tests/expression/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.expression@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/tests/expression/1.0/ $(genDir)/android/hardware/tests/expression/1.0/",
     srcs: [
         ":android.hardware.tests.expression@1.0_hal",
     ],
@@ -45,36 +46,10 @@
     generated_sources: ["android.hardware.tests.expression@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.tests.expression@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.tests.expression@1.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.tests.expression@1.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -82,7 +57,7 @@
 genrule {
     name: "android.hardware.tests.expression@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.expression@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/tests/expression/1.0/ $(genDir)/android/hardware/tests/expression/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.expression@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/tests/expression/1.0/ $(genDir)/android/hardware/tests/expression/1.0/",
     srcs: [
         ":android.hardware.tests.expression@1.0_hal",
     ],
@@ -95,7 +70,7 @@
 genrule {
     name: "android.hardware.tests.expression@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.expression@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/tests/expression/1.0/ $(genDir)/android/hardware/tests/expression/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.expression@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/tests/expression/1.0/ $(genDir)/android/hardware/tests/expression/1.0/",
     srcs: [
         ":android.hardware.tests.expression@1.0_hal",
     ],
@@ -110,27 +85,10 @@
     generated_sources: ["android.hardware.tests.expression@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.tests.expression@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.tests.expression@1.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.tests.expression@1.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/tests/extension/light/V2_0/Android.bp b/tests/extension/light/V2_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/tests/extension/light/V2_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/tests/extension/light/V2_0/build/Android.bp b/tests/extension/light/V2_0/build/Android.bp
index 542a023..68b183e 100644
--- a/tests/extension/light/V2_0/build/Android.bp
+++ b/tests/extension/light/V2_0/build/Android.bp
@@ -1,14 +1,15 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.tests.extension.light@2.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.tests.extension.light@2.0_hal",
     ],
     out: [
-        "android/hardware/tests/extension/light/2.0/ExtLight.vts",
+        "android/hardware/tests/extension/light/2.0/Light.vts",
         "android/hardware/tests/extension/light/2.0/types.vts",
     ],
 }
@@ -17,12 +18,12 @@
 genrule {
     name: "android.hardware.tests.extension.light@2.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.extension.light@2.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/tests/extension/light/2.0/ $(genDir)/android/hardware/tests/extension/light/2.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.extension.light@2.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/tests/extension/light/2.0/ $(genDir)/android/hardware/tests/extension/light/2.0/",
     srcs: [
         ":android.hardware.tests.extension.light@2.0_hal",
     ],
     out: [
-        "android/hardware/tests/extension/light/2.0/ExtLight.vts.cpp",
+        "android/hardware/tests/extension/light/2.0/Light.vts.cpp",
         "android/hardware/tests/extension/light/2.0/types.vts.cpp",
     ],
 }
@@ -30,12 +31,12 @@
 genrule {
     name: "android.hardware.tests.extension.light@2.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.extension.light@2.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/tests/extension/light/2.0/ $(genDir)/android/hardware/tests/extension/light/2.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.extension.light@2.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/tests/extension/light/2.0/ $(genDir)/android/hardware/tests/extension/light/2.0/",
     srcs: [
         ":android.hardware.tests.extension.light@2.0_hal",
     ],
     out: [
-        "android/hardware/tests/extension/light/2.0/ExtLight.vts.h",
+        "android/hardware/tests/extension/light/2.0/Light.vts.h",
         "android/hardware/tests/extension/light/2.0/types.vts.h",
     ],
 }
@@ -45,38 +46,13 @@
     generated_sources: ["android.hardware.tests.extension.light@2.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.tests.extension.light@2.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.tests.extension.light@2.0-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
     shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+        "android.hardware.light@2.0-vts.driver",
+    ],
+    static_libs: [
+        "android.hardware.light@2.0",
         "android.hardware.tests.extension.light@2.0",
-        "android.hardware.light@2.0",
-        "android.hardware.light@2.0-vts.driver",
-    ],
-    export_shared_lib_headers: [
-        "android.hardware.light@2.0",
-        "android.hardware.light@2.0-vts.driver",
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -84,12 +60,12 @@
 genrule {
     name: "android.hardware.tests.extension.light@2.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.extension.light@2.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/tests/extension/light/2.0/ $(genDir)/android/hardware/tests/extension/light/2.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.extension.light@2.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/tests/extension/light/2.0/ $(genDir)/android/hardware/tests/extension/light/2.0/",
     srcs: [
         ":android.hardware.tests.extension.light@2.0_hal",
     ],
     out: [
-        "android/hardware/tests/extension/light/2.0/ExtLight.vts.cpp",
+        "android/hardware/tests/extension/light/2.0/Light.vts.cpp",
         "android/hardware/tests/extension/light/2.0/types.vts.cpp",
     ],
 }
@@ -97,12 +73,12 @@
 genrule {
     name: "android.hardware.tests.extension.light@2.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.extension.light@2.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/tests/extension/light/2.0/ $(genDir)/android/hardware/tests/extension/light/2.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.extension.light@2.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/tests/extension/light/2.0/ $(genDir)/android/hardware/tests/extension/light/2.0/",
     srcs: [
         ":android.hardware.tests.extension.light@2.0_hal",
     ],
     out: [
-        "android/hardware/tests/extension/light/2.0/ExtLight.vts.h",
+        "android/hardware/tests/extension/light/2.0/Light.vts.h",
         "android/hardware/tests/extension/light/2.0/types.vts.h",
     ],
 }
@@ -112,28 +88,13 @@
     generated_sources: ["android.hardware.tests.extension.light@2.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.tests.extension.light@2.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.tests.extension.light@2.0-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
     shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
-        "android.hardware.tests.extension.light@2.0",
-        "android.hardware.light@2.0",
         "android.hardware.light@2.0-vts.profiler",
     ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
+    static_libs: [
+        "android.hardware.light@2.0",
+        "android.hardware.tests.extension.light@2.0",
     ],
 }
 
diff --git a/tests/foo/V1_0/Android.bp b/tests/foo/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/tests/foo/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/tests/foo/V1_0/build/Android.bp b/tests/foo/V1_0/build/Android.bp
index 7cbdc9b..356eb7e 100644
--- a/tests/foo/V1_0/build/Android.bp
+++ b/tests/foo/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.tests.foo@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.tests.foo@1.0_hal",
     ],
@@ -21,7 +22,7 @@
 genrule {
     name: "android.hardware.tests.foo@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.foo@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/tests/foo/1.0/ $(genDir)/android/hardware/tests/foo/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.foo@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/tests/foo/1.0/ $(genDir)/android/hardware/tests/foo/1.0/",
     srcs: [
         ":android.hardware.tests.foo@1.0_hal",
     ],
@@ -38,7 +39,7 @@
 genrule {
     name: "android.hardware.tests.foo@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.foo@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/tests/foo/1.0/ $(genDir)/android/hardware/tests/foo/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.foo@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/tests/foo/1.0/ $(genDir)/android/hardware/tests/foo/1.0/",
     srcs: [
         ":android.hardware.tests.foo@1.0_hal",
     ],
@@ -57,36 +58,10 @@
     generated_sources: ["android.hardware.tests.foo@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.tests.foo@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.tests.foo@1.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.tests.foo@1.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -94,7 +69,7 @@
 genrule {
     name: "android.hardware.tests.foo@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.foo@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/tests/foo/1.0/ $(genDir)/android/hardware/tests/foo/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.foo@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/tests/foo/1.0/ $(genDir)/android/hardware/tests/foo/1.0/",
     srcs: [
         ":android.hardware.tests.foo@1.0_hal",
     ],
@@ -111,7 +86,7 @@
 genrule {
     name: "android.hardware.tests.foo@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.foo@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/tests/foo/1.0/ $(genDir)/android/hardware/tests/foo/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.foo@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/tests/foo/1.0/ $(genDir)/android/hardware/tests/foo/1.0/",
     srcs: [
         ":android.hardware.tests.foo@1.0_hal",
     ],
@@ -130,27 +105,10 @@
     generated_sources: ["android.hardware.tests.foo@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.tests.foo@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.tests.foo@1.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.tests.foo@1.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/tests/hash/V1_0/Android.bp b/tests/hash/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/tests/hash/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/tests/hash/V1_0/build/Android.bp b/tests/hash/V1_0/build/Android.bp
index dec5e2d..7c05925 100644
--- a/tests/hash/V1_0/build/Android.bp
+++ b/tests/hash/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.tests.hash@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.tests.hash@1.0_hal",
     ],
@@ -16,7 +17,7 @@
 genrule {
     name: "android.hardware.tests.hash@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.hash@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/tests/hash/1.0/ $(genDir)/android/hardware/tests/hash/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.hash@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/tests/hash/1.0/ $(genDir)/android/hardware/tests/hash/1.0/",
     srcs: [
         ":android.hardware.tests.hash@1.0_hal",
     ],
@@ -28,7 +29,7 @@
 genrule {
     name: "android.hardware.tests.hash@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.hash@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/tests/hash/1.0/ $(genDir)/android/hardware/tests/hash/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.hash@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/tests/hash/1.0/ $(genDir)/android/hardware/tests/hash/1.0/",
     srcs: [
         ":android.hardware.tests.hash@1.0_hal",
     ],
@@ -42,36 +43,10 @@
     generated_sources: ["android.hardware.tests.hash@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.tests.hash@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.tests.hash@1.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.tests.hash@1.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -79,7 +54,7 @@
 genrule {
     name: "android.hardware.tests.hash@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.hash@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/tests/hash/1.0/ $(genDir)/android/hardware/tests/hash/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.hash@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/tests/hash/1.0/ $(genDir)/android/hardware/tests/hash/1.0/",
     srcs: [
         ":android.hardware.tests.hash@1.0_hal",
     ],
@@ -91,7 +66,7 @@
 genrule {
     name: "android.hardware.tests.hash@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.hash@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/tests/hash/1.0/ $(genDir)/android/hardware/tests/hash/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.hash@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/tests/hash/1.0/ $(genDir)/android/hardware/tests/hash/1.0/",
     srcs: [
         ":android.hardware.tests.hash@1.0_hal",
     ],
@@ -105,27 +80,10 @@
     generated_sources: ["android.hardware.tests.hash@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.tests.hash@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.tests.hash@1.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.tests.hash@1.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/tests/inheritance/V1_0/Android.bp b/tests/inheritance/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/tests/inheritance/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/tests/inheritance/V1_0/build/Android.bp b/tests/inheritance/V1_0/build/Android.bp
index 771aa05..2307c90 100644
--- a/tests/inheritance/V1_0/build/Android.bp
+++ b/tests/inheritance/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.tests.inheritance@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.tests.inheritance@1.0_hal",
     ],
@@ -19,7 +20,7 @@
 genrule {
     name: "android.hardware.tests.inheritance@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.inheritance@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/tests/inheritance/1.0/ $(genDir)/android/hardware/tests/inheritance/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.inheritance@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/tests/inheritance/1.0/ $(genDir)/android/hardware/tests/inheritance/1.0/",
     srcs: [
         ":android.hardware.tests.inheritance@1.0_hal",
     ],
@@ -34,7 +35,7 @@
 genrule {
     name: "android.hardware.tests.inheritance@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.inheritance@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/tests/inheritance/1.0/ $(genDir)/android/hardware/tests/inheritance/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.inheritance@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/tests/inheritance/1.0/ $(genDir)/android/hardware/tests/inheritance/1.0/",
     srcs: [
         ":android.hardware.tests.inheritance@1.0_hal",
     ],
@@ -51,36 +52,10 @@
     generated_sources: ["android.hardware.tests.inheritance@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.tests.inheritance@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.tests.inheritance@1.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.tests.inheritance@1.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -88,7 +63,7 @@
 genrule {
     name: "android.hardware.tests.inheritance@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.inheritance@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/tests/inheritance/1.0/ $(genDir)/android/hardware/tests/inheritance/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.inheritance@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/tests/inheritance/1.0/ $(genDir)/android/hardware/tests/inheritance/1.0/",
     srcs: [
         ":android.hardware.tests.inheritance@1.0_hal",
     ],
@@ -103,7 +78,7 @@
 genrule {
     name: "android.hardware.tests.inheritance@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.inheritance@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/tests/inheritance/1.0/ $(genDir)/android/hardware/tests/inheritance/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.inheritance@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/tests/inheritance/1.0/ $(genDir)/android/hardware/tests/inheritance/1.0/",
     srcs: [
         ":android.hardware.tests.inheritance@1.0_hal",
     ],
@@ -120,27 +95,10 @@
     generated_sources: ["android.hardware.tests.inheritance@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.tests.inheritance@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.tests.inheritance@1.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.tests.inheritance@1.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/tests/libhwbinder/V1_0/Android.bp b/tests/libhwbinder/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/tests/libhwbinder/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/tests/libhwbinder/V1_0/build/Android.bp b/tests/libhwbinder/V1_0/build/Android.bp
index c627bca..13f29e9 100644
--- a/tests/libhwbinder/V1_0/build/Android.bp
+++ b/tests/libhwbinder/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.tests.libhwbinder@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.tests.libhwbinder@1.0_hal",
     ],
@@ -17,7 +18,7 @@
 genrule {
     name: "android.hardware.tests.libhwbinder@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.libhwbinder@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/tests/libhwbinder/1.0/ $(genDir)/android/hardware/tests/libhwbinder/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.libhwbinder@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/tests/libhwbinder/1.0/ $(genDir)/android/hardware/tests/libhwbinder/1.0/",
     srcs: [
         ":android.hardware.tests.libhwbinder@1.0_hal",
     ],
@@ -30,7 +31,7 @@
 genrule {
     name: "android.hardware.tests.libhwbinder@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.libhwbinder@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/tests/libhwbinder/1.0/ $(genDir)/android/hardware/tests/libhwbinder/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.libhwbinder@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/tests/libhwbinder/1.0/ $(genDir)/android/hardware/tests/libhwbinder/1.0/",
     srcs: [
         ":android.hardware.tests.libhwbinder@1.0_hal",
     ],
@@ -45,36 +46,10 @@
     generated_sources: ["android.hardware.tests.libhwbinder@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.tests.libhwbinder@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.tests.libhwbinder@1.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.tests.libhwbinder@1.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -82,7 +57,7 @@
 genrule {
     name: "android.hardware.tests.libhwbinder@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.libhwbinder@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/tests/libhwbinder/1.0/ $(genDir)/android/hardware/tests/libhwbinder/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.libhwbinder@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/tests/libhwbinder/1.0/ $(genDir)/android/hardware/tests/libhwbinder/1.0/",
     srcs: [
         ":android.hardware.tests.libhwbinder@1.0_hal",
     ],
@@ -95,7 +70,7 @@
 genrule {
     name: "android.hardware.tests.libhwbinder@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.libhwbinder@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/tests/libhwbinder/1.0/ $(genDir)/android/hardware/tests/libhwbinder/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.libhwbinder@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/tests/libhwbinder/1.0/ $(genDir)/android/hardware/tests/libhwbinder/1.0/",
     srcs: [
         ":android.hardware.tests.libhwbinder@1.0_hal",
     ],
@@ -110,27 +85,10 @@
     generated_sources: ["android.hardware.tests.libhwbinder@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.tests.libhwbinder@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.tests.libhwbinder@1.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.tests.libhwbinder@1.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/tests/memory/V1_0/Android.bp b/tests/memory/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/tests/memory/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/tests/memory/V1_0/build/Android.bp b/tests/memory/V1_0/build/Android.bp
index 73cea09..c47d5a1 100644
--- a/tests/memory/V1_0/build/Android.bp
+++ b/tests/memory/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.tests.memory@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.tests.memory@1.0_hal",
     ],
@@ -16,7 +17,7 @@
 genrule {
     name: "android.hardware.tests.memory@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.memory@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/tests/memory/1.0/ $(genDir)/android/hardware/tests/memory/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.memory@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/tests/memory/1.0/ $(genDir)/android/hardware/tests/memory/1.0/",
     srcs: [
         ":android.hardware.tests.memory@1.0_hal",
     ],
@@ -28,7 +29,7 @@
 genrule {
     name: "android.hardware.tests.memory@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.memory@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/tests/memory/1.0/ $(genDir)/android/hardware/tests/memory/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.memory@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/tests/memory/1.0/ $(genDir)/android/hardware/tests/memory/1.0/",
     srcs: [
         ":android.hardware.tests.memory@1.0_hal",
     ],
@@ -42,36 +43,15 @@
     generated_sources: ["android.hardware.tests.memory@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.tests.memory@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.tests.memory@1.0-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
     shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+        "android.hidl.memory.block@1.0-vts.driver",
+        "android.hidl.memory.token@1.0-vts.driver",
+    ],
+    static_libs: [
         "android.hardware.tests.memory@1.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
+        "android.hidl.memory.block@1.0",
+        "android.hidl.memory.token@1.0",
     ],
 }
 
@@ -79,7 +59,7 @@
 genrule {
     name: "android.hardware.tests.memory@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.memory@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/tests/memory/1.0/ $(genDir)/android/hardware/tests/memory/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.memory@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/tests/memory/1.0/ $(genDir)/android/hardware/tests/memory/1.0/",
     srcs: [
         ":android.hardware.tests.memory@1.0_hal",
     ],
@@ -91,7 +71,7 @@
 genrule {
     name: "android.hardware.tests.memory@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.memory@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/tests/memory/1.0/ $(genDir)/android/hardware/tests/memory/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.memory@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/tests/memory/1.0/ $(genDir)/android/hardware/tests/memory/1.0/",
     srcs: [
         ":android.hardware.tests.memory@1.0_hal",
     ],
@@ -105,27 +85,15 @@
     generated_sources: ["android.hardware.tests.memory@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.tests.memory@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.tests.memory@1.0-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
     shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
-        "android.hardware.tests.memory@1.0",
-        
+        "android.hidl.memory.block@1.0-vts.profiler",
+        "android.hidl.memory.token@1.0-vts.profiler",
     ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
+    static_libs: [
+        "android.hardware.tests.memory@1.0",
+        "android.hidl.memory.block@1.0",
+        "android.hidl.memory.token@1.0",
     ],
 }
 
diff --git a/tests/msgq/V1_0/Android.bp b/tests/msgq/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/tests/msgq/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/tests/msgq/V1_0/build/Android.bp b/tests/msgq/V1_0/build/Android.bp
index 5957117..100d4a4 100644
--- a/tests/msgq/V1_0/build/Android.bp
+++ b/tests/msgq/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.tests.msgq@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.tests.msgq@1.0_hal",
     ],
@@ -17,7 +18,7 @@
 genrule {
     name: "android.hardware.tests.msgq@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.msgq@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/tests/msgq/1.0/ $(genDir)/android/hardware/tests/msgq/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.msgq@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/tests/msgq/1.0/ $(genDir)/android/hardware/tests/msgq/1.0/",
     srcs: [
         ":android.hardware.tests.msgq@1.0_hal",
     ],
@@ -30,7 +31,7 @@
 genrule {
     name: "android.hardware.tests.msgq@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.msgq@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/tests/msgq/1.0/ $(genDir)/android/hardware/tests/msgq/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.msgq@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/tests/msgq/1.0/ $(genDir)/android/hardware/tests/msgq/1.0/",
     srcs: [
         ":android.hardware.tests.msgq@1.0_hal",
     ],
@@ -45,36 +46,10 @@
     generated_sources: ["android.hardware.tests.msgq@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.tests.msgq@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.tests.msgq@1.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.tests.msgq@1.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -82,7 +57,7 @@
 genrule {
     name: "android.hardware.tests.msgq@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.msgq@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/tests/msgq/1.0/ $(genDir)/android/hardware/tests/msgq/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.msgq@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/tests/msgq/1.0/ $(genDir)/android/hardware/tests/msgq/1.0/",
     srcs: [
         ":android.hardware.tests.msgq@1.0_hal",
     ],
@@ -95,7 +70,7 @@
 genrule {
     name: "android.hardware.tests.msgq@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.msgq@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/tests/msgq/1.0/ $(genDir)/android/hardware/tests/msgq/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.msgq@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/tests/msgq/1.0/ $(genDir)/android/hardware/tests/msgq/1.0/",
     srcs: [
         ":android.hardware.tests.msgq@1.0_hal",
     ],
@@ -110,27 +85,10 @@
     generated_sources: ["android.hardware.tests.msgq@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.tests.msgq@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.tests.msgq@1.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.tests.msgq@1.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/tests/multithread/V1_0/Android.bp b/tests/multithread/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/tests/multithread/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/tests/multithread/V1_0/build/Android.bp b/tests/multithread/V1_0/build/Android.bp
index 0b95f02..f526fe1 100644
--- a/tests/multithread/V1_0/build/Android.bp
+++ b/tests/multithread/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.tests.multithread@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.tests.multithread@1.0_hal",
     ],
@@ -16,7 +17,7 @@
 genrule {
     name: "android.hardware.tests.multithread@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.multithread@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/tests/multithread/1.0/ $(genDir)/android/hardware/tests/multithread/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.multithread@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/tests/multithread/1.0/ $(genDir)/android/hardware/tests/multithread/1.0/",
     srcs: [
         ":android.hardware.tests.multithread@1.0_hal",
     ],
@@ -28,7 +29,7 @@
 genrule {
     name: "android.hardware.tests.multithread@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.multithread@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/tests/multithread/1.0/ $(genDir)/android/hardware/tests/multithread/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.multithread@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/tests/multithread/1.0/ $(genDir)/android/hardware/tests/multithread/1.0/",
     srcs: [
         ":android.hardware.tests.multithread@1.0_hal",
     ],
@@ -42,36 +43,10 @@
     generated_sources: ["android.hardware.tests.multithread@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.tests.multithread@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.tests.multithread@1.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.tests.multithread@1.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -79,7 +54,7 @@
 genrule {
     name: "android.hardware.tests.multithread@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.multithread@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/tests/multithread/1.0/ $(genDir)/android/hardware/tests/multithread/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.multithread@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/tests/multithread/1.0/ $(genDir)/android/hardware/tests/multithread/1.0/",
     srcs: [
         ":android.hardware.tests.multithread@1.0_hal",
     ],
@@ -91,7 +66,7 @@
 genrule {
     name: "android.hardware.tests.multithread@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.multithread@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/tests/multithread/1.0/ $(genDir)/android/hardware/tests/multithread/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.multithread@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/tests/multithread/1.0/ $(genDir)/android/hardware/tests/multithread/1.0/",
     srcs: [
         ":android.hardware.tests.multithread@1.0_hal",
     ],
@@ -105,27 +80,10 @@
     generated_sources: ["android.hardware.tests.multithread@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.tests.multithread@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.tests.multithread@1.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.tests.multithread@1.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/tests/pointer/V1_0/Android.bp b/tests/pointer/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/tests/pointer/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/tests/pointer/V1_0/build/Android.bp b/tests/pointer/V1_0/build/Android.bp
index e9a4d86..7fce1dd 100644
--- a/tests/pointer/V1_0/build/Android.bp
+++ b/tests/pointer/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.tests.pointer@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.tests.pointer@1.0_hal",
     ],
@@ -17,7 +18,7 @@
 genrule {
     name: "android.hardware.tests.pointer@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.pointer@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/tests/pointer/1.0/ $(genDir)/android/hardware/tests/pointer/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.pointer@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/tests/pointer/1.0/ $(genDir)/android/hardware/tests/pointer/1.0/",
     srcs: [
         ":android.hardware.tests.pointer@1.0_hal",
     ],
@@ -30,7 +31,7 @@
 genrule {
     name: "android.hardware.tests.pointer@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.pointer@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/tests/pointer/1.0/ $(genDir)/android/hardware/tests/pointer/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.pointer@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/tests/pointer/1.0/ $(genDir)/android/hardware/tests/pointer/1.0/",
     srcs: [
         ":android.hardware.tests.pointer@1.0_hal",
     ],
@@ -45,36 +46,10 @@
     generated_sources: ["android.hardware.tests.pointer@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.tests.pointer@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.tests.pointer@1.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.tests.pointer@1.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -82,7 +57,7 @@
 genrule {
     name: "android.hardware.tests.pointer@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.pointer@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/tests/pointer/1.0/ $(genDir)/android/hardware/tests/pointer/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.pointer@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/tests/pointer/1.0/ $(genDir)/android/hardware/tests/pointer/1.0/",
     srcs: [
         ":android.hardware.tests.pointer@1.0_hal",
     ],
@@ -95,7 +70,7 @@
 genrule {
     name: "android.hardware.tests.pointer@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.pointer@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/tests/pointer/1.0/ $(genDir)/android/hardware/tests/pointer/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.pointer@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/tests/pointer/1.0/ $(genDir)/android/hardware/tests/pointer/1.0/",
     srcs: [
         ":android.hardware.tests.pointer@1.0_hal",
     ],
@@ -110,27 +85,10 @@
     generated_sources: ["android.hardware.tests.pointer@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.tests.pointer@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.tests.pointer@1.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.tests.pointer@1.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/tests/trie/V1_0/build/Android.bp b/tests/trie/V1_0/build/Android.bp
new file mode 100644
index 0000000..18c1b4a
--- /dev/null
+++ b/tests/trie/V1_0/build/Android.bp
@@ -0,0 +1,94 @@
+// This file was auto-generated. Do not edit manually.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
+
+// Generate .vts spec files.
+hal2vts {
+    name: "android.hardware.tests.trie@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
+    srcs: [
+        ":android.hardware.tests.trie@1.0_hal",
+    ],
+    out: [
+        "android/hardware/tests/trie/1.0/Trie.vts",
+        "android/hardware/tests/trie/1.0/types.vts",
+    ],
+}
+
+// Build VTS driver.
+genrule {
+    name: "android.hardware.tests.trie@1.0-vts.driver_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.trie@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/tests/trie/1.0/ $(genDir)/android/hardware/tests/trie/1.0/",
+    srcs: [
+        ":android.hardware.tests.trie@1.0_hal",
+    ],
+    out: [
+        "android/hardware/tests/trie/1.0/Trie.vts.cpp",
+        "android/hardware/tests/trie/1.0/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.tests.trie@1.0-vts.driver_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.trie@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/tests/trie/1.0/ $(genDir)/android/hardware/tests/trie/1.0/",
+    srcs: [
+        ":android.hardware.tests.trie@1.0_hal",
+    ],
+    out: [
+        "android/hardware/tests/trie/1.0/Trie.vts.h",
+        "android/hardware/tests/trie/1.0/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.tests.trie@1.0-vts.driver",
+    generated_sources: ["android.hardware.tests.trie@1.0-vts.driver_genc++"],
+    generated_headers: ["android.hardware.tests.trie@1.0-vts.driver_genc++_headers"],
+    export_generated_headers: ["android.hardware.tests.trie@1.0-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
+        "android.hardware.tests.trie@1.0",
+    ],
+}
+
+// Build VTS profiler.
+genrule {
+    name: "android.hardware.tests.trie@1.0-vts.profiler_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.trie@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/tests/trie/1.0/ $(genDir)/android/hardware/tests/trie/1.0/",
+    srcs: [
+        ":android.hardware.tests.trie@1.0_hal",
+    ],
+    out: [
+        "android/hardware/tests/trie/1.0/Trie.vts.cpp",
+        "android/hardware/tests/trie/1.0/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.tests.trie@1.0-vts.profiler_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tests.trie@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/tests/trie/1.0/ $(genDir)/android/hardware/tests/trie/1.0/",
+    srcs: [
+        ":android.hardware.tests.trie@1.0_hal",
+    ],
+    out: [
+        "android/hardware/tests/trie/1.0/Trie.vts.h",
+        "android/hardware/tests/trie/1.0/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.tests.trie@1.0-vts.profiler",
+    generated_sources: ["android.hardware.tests.trie@1.0-vts.profiler_genc++"],
+    generated_headers: ["android.hardware.tests.trie@1.0-vts.profiler_genc++_headers"],
+    export_generated_headers: ["android.hardware.tests.trie@1.0-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
+        "android.hardware.tests.trie@1.0",
+    ],
+}
+
diff --git a/tetheroffload/Android.bp b/tetheroffload/Android.bp
deleted file mode 100644
index 3d48b18..0000000
--- a/tetheroffload/Android.bp
+++ /dev/null
@@ -1,7 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "config/V1_0",
-    "control/V1_0",
-]
diff --git a/tetheroffload/config/V1_0/Android.bp b/tetheroffload/config/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/tetheroffload/config/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/tetheroffload/config/V1_0/build/Android.bp b/tetheroffload/config/V1_0/build/Android.bp
index ac1d51c..8be1fe3 100644
--- a/tetheroffload/config/V1_0/build/Android.bp
+++ b/tetheroffload/config/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.tetheroffload.config@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.tetheroffload.config@1.0_hal",
     ],
@@ -16,7 +17,7 @@
 genrule {
     name: "android.hardware.tetheroffload.config@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tetheroffload.config@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/tetheroffload/config/1.0/ $(genDir)/android/hardware/tetheroffload/config/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tetheroffload.config@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/tetheroffload/config/1.0/ $(genDir)/android/hardware/tetheroffload/config/1.0/",
     srcs: [
         ":android.hardware.tetheroffload.config@1.0_hal",
     ],
@@ -28,7 +29,7 @@
 genrule {
     name: "android.hardware.tetheroffload.config@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tetheroffload.config@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/tetheroffload/config/1.0/ $(genDir)/android/hardware/tetheroffload/config/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tetheroffload.config@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/tetheroffload/config/1.0/ $(genDir)/android/hardware/tetheroffload/config/1.0/",
     srcs: [
         ":android.hardware.tetheroffload.config@1.0_hal",
     ],
@@ -42,36 +43,10 @@
     generated_sources: ["android.hardware.tetheroffload.config@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.tetheroffload.config@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.tetheroffload.config@1.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.tetheroffload.config@1.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -79,7 +54,7 @@
 genrule {
     name: "android.hardware.tetheroffload.config@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tetheroffload.config@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/tetheroffload/config/1.0/ $(genDir)/android/hardware/tetheroffload/config/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tetheroffload.config@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/tetheroffload/config/1.0/ $(genDir)/android/hardware/tetheroffload/config/1.0/",
     srcs: [
         ":android.hardware.tetheroffload.config@1.0_hal",
     ],
@@ -91,7 +66,7 @@
 genrule {
     name: "android.hardware.tetheroffload.config@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tetheroffload.config@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/tetheroffload/config/1.0/ $(genDir)/android/hardware/tetheroffload/config/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tetheroffload.config@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/tetheroffload/config/1.0/ $(genDir)/android/hardware/tetheroffload/config/1.0/",
     srcs: [
         ":android.hardware.tetheroffload.config@1.0_hal",
     ],
@@ -105,27 +80,10 @@
     generated_sources: ["android.hardware.tetheroffload.config@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.tetheroffload.config@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.tetheroffload.config@1.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.tetheroffload.config@1.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/tetheroffload/config/V1_0/target/AndroidTest.xml b/tetheroffload/config/V1_0/target/AndroidTest.xml
index 6cb15b9..dbd9457 100644
--- a/tetheroffload/config/V1_0/target/AndroidTest.xml
+++ b/tetheroffload/config/V1_0/target/AndroidTest.xml
@@ -19,14 +19,12 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalTetherOffloadConfigV1_0Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalTetheroffloadConfigV1_0TargetTest/VtsHalTetheroffloadConfigV1_0TargetTest"/>
         <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalTetheroffloadConfigV1_0TargetTest/VtsHalTetheroffloadConfigV1_0TargetTest"/>
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.tetheroffload.config@1.0"/>
         <option name="test-timeout" value="5m"/>
         <option name="runtime-hint" value="2m"/>
     </test>
diff --git a/tetheroffload/config/V1_0/target_profiling/AndroidTest.xml b/tetheroffload/config/V1_0/target_profiling/AndroidTest.xml
index a5d1057..dccb00e 100644
--- a/tetheroffload/config/V1_0/target_profiling/AndroidTest.xml
+++ b/tetheroffload/config/V1_0/target_profiling/AndroidTest.xml
@@ -22,7 +22,6 @@
         <option name="push" value="DATA/lib/android.hardware.tetheroffload.config@1.0-vts.profiler.so->/data/local/tmp/32/android.hardware.tetheroffload.config@1.0-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.tetheroffload.config@1.0-vts.profiler.so->/data/local/tmp/64/android.hardware.tetheroffload.config@1.0-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalTetherOffloadConfigV1_0TargetProfiling"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalTetheroffloadConfigV1_0TargetTest/VtsHalTetheroffloadConfigV1_0TargetTest"/>
@@ -30,7 +29,6 @@
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.tetheroffload.config@1.0"/>
         <option name="test-timeout" value="15m"/>
     </test>
 </configuration>
diff --git a/tetheroffload/control/V1_0/Android.bp b/tetheroffload/control/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/tetheroffload/control/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/tetheroffload/control/V1_0/build/Android.bp b/tetheroffload/control/V1_0/build/Android.bp
index d2d55b3..8d51a63 100644
--- a/tetheroffload/control/V1_0/build/Android.bp
+++ b/tetheroffload/control/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.tetheroffload.control@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.tetheroffload.control@1.0_hal",
     ],
@@ -18,7 +19,7 @@
 genrule {
     name: "android.hardware.tetheroffload.control@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tetheroffload.control@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/tetheroffload/control/1.0/ $(genDir)/android/hardware/tetheroffload/control/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tetheroffload.control@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/tetheroffload/control/1.0/ $(genDir)/android/hardware/tetheroffload/control/1.0/",
     srcs: [
         ":android.hardware.tetheroffload.control@1.0_hal",
     ],
@@ -32,7 +33,7 @@
 genrule {
     name: "android.hardware.tetheroffload.control@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tetheroffload.control@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/tetheroffload/control/1.0/ $(genDir)/android/hardware/tetheroffload/control/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tetheroffload.control@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/tetheroffload/control/1.0/ $(genDir)/android/hardware/tetheroffload/control/1.0/",
     srcs: [
         ":android.hardware.tetheroffload.control@1.0_hal",
     ],
@@ -48,36 +49,10 @@
     generated_sources: ["android.hardware.tetheroffload.control@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.tetheroffload.control@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.tetheroffload.control@1.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.tetheroffload.control@1.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -85,7 +60,7 @@
 genrule {
     name: "android.hardware.tetheroffload.control@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tetheroffload.control@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/tetheroffload/control/1.0/ $(genDir)/android/hardware/tetheroffload/control/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tetheroffload.control@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/tetheroffload/control/1.0/ $(genDir)/android/hardware/tetheroffload/control/1.0/",
     srcs: [
         ":android.hardware.tetheroffload.control@1.0_hal",
     ],
@@ -99,7 +74,7 @@
 genrule {
     name: "android.hardware.tetheroffload.control@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tetheroffload.control@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/tetheroffload/control/1.0/ $(genDir)/android/hardware/tetheroffload/control/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tetheroffload.control@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/tetheroffload/control/1.0/ $(genDir)/android/hardware/tetheroffload/control/1.0/",
     srcs: [
         ":android.hardware.tetheroffload.control@1.0_hal",
     ],
@@ -115,27 +90,10 @@
     generated_sources: ["android.hardware.tetheroffload.control@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.tetheroffload.control@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.tetheroffload.control@1.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.tetheroffload.control@1.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/tetheroffload/control/V1_0/target/AndroidTest.xml b/tetheroffload/control/V1_0/target/AndroidTest.xml
index 6d9bec6..9e59e28 100644
--- a/tetheroffload/control/V1_0/target/AndroidTest.xml
+++ b/tetheroffload/control/V1_0/target/AndroidTest.xml
@@ -19,14 +19,12 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalTetherOffloadControlV1_0Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalTetheroffloadControlV1_0TargetTest/VtsHalTetheroffloadControlV1_0TargetTest"/>
         <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalTetheroffloadControlV1_0TargetTest/VtsHalTetheroffloadControlV1_0TargetTest"/>
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.tetheroffload.control@1.0"/>
         <option name="test-timeout" value="15m"/>
         <option name="runtime-hint" value="6m"/>
         <option name="exclude-filter" value="OffloadControlHidlTest.SetDataLimitNonZeroOk"/>
diff --git a/tetheroffload/control/V1_0/target_profiling/AndroidTest.xml b/tetheroffload/control/V1_0/target_profiling/AndroidTest.xml
index 11a63c0..5931064 100644
--- a/tetheroffload/control/V1_0/target_profiling/AndroidTest.xml
+++ b/tetheroffload/control/V1_0/target_profiling/AndroidTest.xml
@@ -22,7 +22,6 @@
         <option name="push" value="DATA/lib/android.hardware.tetheroffload.control@1.0-vts.profiler.so->/data/local/tmp/32/android.hardware.tetheroffload.control@1.0-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.tetheroffload.control@1.0-vts.profiler.so->/data/local/tmp/64/android.hardware.tetheroffload.control@1.0-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalTetherOffloadControlV1_0TargetProfiling"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalTetheroffloadControlV1_0TargetTest/VtsHalTetheroffloadControlV1_0TargetTest"/>
@@ -30,7 +29,6 @@
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.tetheroffload.control@1.0"/>
         <option name="test-timeout" value="30m"/>
         <option name="exclude-filter" value="OffloadControlHidlTest.SetDataLimitNonZeroOk"/>
         <option name="exclude-filter" value="OffloadControlHidlTest.SetDataLimitZeroOk"/>
diff --git a/thermal/Android.bp b/thermal/Android.bp
deleted file mode 100644
index 2e98897..0000000
--- a/thermal/Android.bp
+++ /dev/null
@@ -1,7 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "V1_0",
-    "V1_1",
-]
diff --git a/thermal/V1_0/Android.bp b/thermal/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/thermal/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/thermal/V1_0/build/Android.bp b/thermal/V1_0/build/Android.bp
index aee3411..2858248 100644
--- a/thermal/V1_0/build/Android.bp
+++ b/thermal/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.thermal@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.thermal@1.0_hal",
     ],
@@ -17,7 +18,7 @@
 genrule {
     name: "android.hardware.thermal@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.thermal@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/thermal/1.0/ $(genDir)/android/hardware/thermal/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.thermal@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/thermal/1.0/ $(genDir)/android/hardware/thermal/1.0/",
     srcs: [
         ":android.hardware.thermal@1.0_hal",
     ],
@@ -30,7 +31,7 @@
 genrule {
     name: "android.hardware.thermal@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.thermal@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/thermal/1.0/ $(genDir)/android/hardware/thermal/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.thermal@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/thermal/1.0/ $(genDir)/android/hardware/thermal/1.0/",
     srcs: [
         ":android.hardware.thermal@1.0_hal",
     ],
@@ -45,36 +46,10 @@
     generated_sources: ["android.hardware.thermal@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.thermal@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.thermal@1.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.thermal@1.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -82,7 +57,7 @@
 genrule {
     name: "android.hardware.thermal@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.thermal@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/thermal/1.0/ $(genDir)/android/hardware/thermal/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.thermal@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/thermal/1.0/ $(genDir)/android/hardware/thermal/1.0/",
     srcs: [
         ":android.hardware.thermal@1.0_hal",
     ],
@@ -95,7 +70,7 @@
 genrule {
     name: "android.hardware.thermal@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.thermal@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/thermal/1.0/ $(genDir)/android/hardware/thermal/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.thermal@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/thermal/1.0/ $(genDir)/android/hardware/thermal/1.0/",
     srcs: [
         ":android.hardware.thermal@1.0_hal",
     ],
@@ -110,27 +85,10 @@
     generated_sources: ["android.hardware.thermal@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.thermal@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.thermal@1.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.thermal@1.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/thermal/V1_0/target/AndroidTest.xml b/thermal/V1_0/target/AndroidTest.xml
index 2efa16c..6ff8659 100644
--- a/thermal/V1_0/target/AndroidTest.xml
+++ b/thermal/V1_0/target/AndroidTest.xml
@@ -19,7 +19,6 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalThermalV1_0Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalThermalV1_0TargetTest/VtsHalThermalV1_0TargetTest"/>
@@ -27,7 +26,6 @@
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.thermal@1.0"/>
         <option name="test-timeout" value="15m"/>
     </test>
 </configuration>
diff --git a/thermal/V1_0/target_profiling/AndroidTest.xml b/thermal/V1_0/target_profiling/AndroidTest.xml
index d222f4a..cc8cb70 100644
--- a/thermal/V1_0/target_profiling/AndroidTest.xml
+++ b/thermal/V1_0/target_profiling/AndroidTest.xml
@@ -22,7 +22,6 @@
         <option name="push" value="DATA/lib/android.hardware.thermal@1.0-vts.profiler.so->/data/local/tmp/32/android.hardware.thermal@1.0-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.thermal@1.0-vts.profiler.so->/data/local/tmp/64/android.hardware.thermal@1.0-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalThermalV1_0TargetProfiling"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalThermalV1_0TargetTest/VtsHalThermalV1_0TargetTest"/>
@@ -31,7 +30,6 @@
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.thermal@1.0"/>
         <option name="test-timeout" value="15m"/>
     </test>
 </configuration>
diff --git a/thermal/V1_0/target_replay/AndroidTest.xml b/thermal/V1_0/target_replay/AndroidTest.xml
index ca1b0f0..e30d598 100644
--- a/thermal/V1_0/target_replay/AndroidTest.xml
+++ b/thermal/V1_0/target_replay/AndroidTest.xml
@@ -24,13 +24,12 @@
         <option name="push" value="DATA/lib/android.hardware.thermal@1.0-vts.driver.so->/data/local/tmp/32/android.hardware.thermal@1.0-vts.driver.so"/>
         <option name="push" value="DATA/lib64/android.hardware.thermal@1.0-vts.driver.so->/data/local/tmp/64/android.hardware.thermal@1.0-vts.driver.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalThermalV1_0TargetReplay"/>
         <option name="binary-test-type" value="hal_hidl_replay_test"/>
         <option name="hal-hidl-replay-test-trace-path" value="test/vts-testcase/hal-trace/thermal/V1_0/android.hardware.thermal_1.0_414823138144.vts.trace"/>
-        <option name="hal-hidl-package-name" value="android.hardware.thermal@1.0"/>
-        <option name="precondition-lshal" value="android.hardware.thermal@1.0"/>
+        <option name="hal-hidl-replay-test-trace-path" value="test/vts-testcase/hal-trace/thermal/V1_0/android.hardware.thermal_1.0_42653587163.vts.trace"/>
+        <option name="binary-test-disable-framework" value="true"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/thermal/V1_0/target_stress/Android.bp b/thermal/V1_0/target_stress/Android.bp
index 5e33c2e..b6a4302 100644
--- a/thermal/V1_0/target_stress/Android.bp
+++ b/thermal/V1_0/target_stress/Android.bp
@@ -33,5 +33,7 @@
     cflags: [
         "-O0",
         "-g",
+        "-Wall",
+        "-Werror",
     ],
 }
diff --git a/thermal/V1_0/target_stress/AndroidTest.xml b/thermal/V1_0/target_stress/AndroidTest.xml
index 80b9601..7fe51fd 100644
--- a/thermal/V1_0/target_stress/AndroidTest.xml
+++ b/thermal/V1_0/target_stress/AndroidTest.xml
@@ -19,7 +19,6 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push" />
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="ThermalHidlTargetStressTest" />
         <option name="binary-test-source" value="_32bit::DATA/nativetest/thermal_hidl_stress_test/thermal_hidl_stress_test" />
diff --git a/thermal/V1_1/Android.bp b/thermal/V1_1/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/thermal/V1_1/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/radio/V1_1/target/Android.mk b/thermal/V1_1/adapter/Android.mk
similarity index 81%
copy from radio/V1_1/target/Android.mk
copy to thermal/V1_1/adapter/Android.mk
index bd1a0f1..b75eddc 100644
--- a/radio/V1_1/target/Android.mk
+++ b/thermal/V1_1/adapter/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalThermalV1_1Adapter
+VTS_CONFIG_SRC_DIR := testcases/hal/thermal/V1_1/adapter
 include test/vts/tools/build/Android.host_config.mk
diff --git a/thermal/V1_1/adapter/AndroidTest.xml b/thermal/V1_1/adapter/AndroidTest.xml
new file mode 100644
index 0000000..b9e1679
--- /dev/null
+++ b/thermal/V1_1/adapter/AndroidTest.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS VtsHalThermalV1_1Adapter test cases">
+    <option key="plan" name="config-descriptor:metadata" value="vts-hal-adapter"/>
+    <object class="com.android.tradefed.module.VtsHalAdapterModuleController" type="module_controller">
+        <option name="hal-package-name" value="android.hardware.thermal@1.1"/>
+    </object>
+    <target_preparer class="com.android.tradefed.targetprep.VtsHalAdapterPreparer">
+        <option name="adapter-binary-name" value="android.hardware.thermal@1.0-adapter"/>
+        <option name="hal-package-name" value="android.hardware.thermal@1.1"/>
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest">
+        <option name="package" value="com.android.devicehealth.tests"/>
+        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner"/>
+    </test>
+    <include name="CtsJniTestCases.config"/>
+</configuration>
diff --git a/thermal/V1_1/build/Android.bp b/thermal/V1_1/build/Android.bp
index ecd29b4..4e778b7 100644
--- a/thermal/V1_1/build/Android.bp
+++ b/thermal/V1_1/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.thermal@1.1-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.thermal@1.1_hal",
     ],
@@ -17,7 +18,7 @@
 genrule {
     name: "android.hardware.thermal@1.1-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.thermal@1.1 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/thermal/1.1/ $(genDir)/android/hardware/thermal/1.1/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.thermal@1.1 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/thermal/1.1/ $(genDir)/android/hardware/thermal/1.1/",
     srcs: [
         ":android.hardware.thermal@1.1_hal",
     ],
@@ -30,7 +31,7 @@
 genrule {
     name: "android.hardware.thermal@1.1-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.thermal@1.1 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/thermal/1.1/ $(genDir)/android/hardware/thermal/1.1/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.thermal@1.1 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/thermal/1.1/ $(genDir)/android/hardware/thermal/1.1/",
     srcs: [
         ":android.hardware.thermal@1.1_hal",
     ],
@@ -45,38 +46,13 @@
     generated_sources: ["android.hardware.thermal@1.1-vts.driver_genc++"],
     generated_headers: ["android.hardware.thermal@1.1-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.thermal@1.1-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
     shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+        "android.hardware.thermal@1.0-vts.driver",
+    ],
+    static_libs: [
+        "android.hardware.thermal@1.0",
         "android.hardware.thermal@1.1",
-        "android.hardware.thermal@1.0",
-        "android.hardware.thermal@1.0-vts.driver",
-    ],
-    export_shared_lib_headers: [
-        "android.hardware.thermal@1.0",
-        "android.hardware.thermal@1.0-vts.driver",
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -84,7 +60,7 @@
 genrule {
     name: "android.hardware.thermal@1.1-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.thermal@1.1 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/thermal/1.1/ $(genDir)/android/hardware/thermal/1.1/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.thermal@1.1 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/thermal/1.1/ $(genDir)/android/hardware/thermal/1.1/",
     srcs: [
         ":android.hardware.thermal@1.1_hal",
     ],
@@ -97,7 +73,7 @@
 genrule {
     name: "android.hardware.thermal@1.1-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.thermal@1.1 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/thermal/1.1/ $(genDir)/android/hardware/thermal/1.1/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.thermal@1.1 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/thermal/1.1/ $(genDir)/android/hardware/thermal/1.1/",
     srcs: [
         ":android.hardware.thermal@1.1_hal",
     ],
@@ -112,28 +88,13 @@
     generated_sources: ["android.hardware.thermal@1.1-vts.profiler_genc++"],
     generated_headers: ["android.hardware.thermal@1.1-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.thermal@1.1-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
     shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
-        "android.hardware.thermal@1.1",
-        "android.hardware.thermal@1.0",
         "android.hardware.thermal@1.0-vts.profiler",
     ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
+    static_libs: [
+        "android.hardware.thermal@1.0",
+        "android.hardware.thermal@1.1",
     ],
 }
 
diff --git a/thermal/V1_1/target/AndroidTest.xml b/thermal/V1_1/target/AndroidTest.xml
index 16d55dd..13aacf2 100644
--- a/thermal/V1_1/target/AndroidTest.xml
+++ b/thermal/V1_1/target/AndroidTest.xml
@@ -19,7 +19,6 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalThermalV1_1Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalThermalV1_1TargetTest/VtsHalThermalV1_1TargetTest"/>
@@ -27,7 +26,6 @@
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.thermal@1.1"/>
         <option name="test-timeout" value="15m"/>
     </test>
 </configuration>
diff --git a/thermal/V1_1/target_profiling/AndroidTest.xml b/thermal/V1_1/target_profiling/AndroidTest.xml
index 17a5abd..ec2b69b 100644
--- a/thermal/V1_1/target_profiling/AndroidTest.xml
+++ b/thermal/V1_1/target_profiling/AndroidTest.xml
@@ -22,7 +22,6 @@
         <option name="push" value="DATA/lib/android.hardware.thermal@1.1-vts.profiler.so->/data/local/tmp/32/android.hardware.thermal@1.1-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.thermal@1.1-vts.profiler.so->/data/local/tmp/64/android.hardware.thermal@1.1-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalThermalV1_1TargetProfiling"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalThermalV1_1TargetTest/VtsHalThermalV1_1TargetTest"/>
@@ -31,7 +30,6 @@
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.thermal@1.1"/>
         <option name="test-timeout" value="15m"/>
     </test>
 </configuration>
diff --git a/treble/hidl_shim/Android.mk b/treble/framework_vintf/Android.mk
similarity index 86%
copy from treble/hidl_shim/Android.mk
copy to treble/framework_vintf/Android.mk
index 01bacd7..4f41033 100644
--- a/treble/hidl_shim/Android.mk
+++ b/treble/framework_vintf/Android.mk
@@ -1,5 +1,4 @@
-#
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -12,11 +11,10 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
 
 LOCAL_PATH := $(call my-dir)
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsTrebleHidlShim
-include test/vts/tools/build/Android.host_config.mk
\ No newline at end of file
+LOCAL_MODULE := CtsOnGsiTrebleFrameworkVintfTest
+include test/vts/tools/build/Android.host_config.mk
diff --git a/treble/framework_vintf/AndroidTest.xml b/treble/framework_vintf/AndroidTest.xml
new file mode 100644
index 0000000..3824e65
--- /dev/null
+++ b/treble/framework_vintf/AndroidTest.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for CtsOnGsiTrebleFrameworkVintfTest">
+    <option name="test-suite-tag" value="cts" />
+    <option name="config-descriptor:metadata" key="component" value="vintf" />
+    <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer" />
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="push" value="hal-hidl-hash/frameworks/hardware/interfaces/current.txt->/data/local/tmp/frameworks/hardware/interfaces/current.txt"/>
+        <option name="push" value="hal-hidl-hash/hardware/interfaces/current.txt->/data/local/tmp/hardware/interfaces/current.txt"/>
+        <option name="push" value="hal-hidl-hash/system/hardware/interfaces/current.txt->/data/local/tmp/system/hardware/interfaces/current.txt"/>
+        <option name="push" value="hal-hidl-hash/system/libhidl/transport/current.txt->/data/local/tmp/system/libhidl/transport/current.txt"/>
+    </target_preparer>
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="abort-on-push-failure" value="false"/>
+        <option name="push" value="DATA/nativetest/vts_treble_vintf_framework_test/vts_treble_vintf_framework_test->/data/nativetest/vts_treble_vintf_framework_test"/>
+        <option name="push" value="DATA/nativetest64/vts_treble_vintf_framework_test/vts_treble_vintf_framework_test->/data/nativetest/vts_treble_vintf_framework_test"/>
+        <option name="append-bitness" value="true" />
+        <option name="post-push" value="chmod a+x /data/nativetest/vts_treble_vintf_framework_test" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.GTest" >
+        <option name="module-name" value="vts_treble_vintf_framework_test" />
+        <option name="runtime-hint" value="1m" />
+    </test>
+</configuration>
diff --git a/treble/hidl_shim/AndroidTest.xml b/treble/hidl_shim/AndroidTest.xml
deleted file mode 100644
index dd4d385..0000000
--- a/treble/hidl_shim/AndroidTest.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2017 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-<configuration description="Config for VtsTrebleHidlShim">
-    <option name="config-descriptor:metadata" key="plan" value="vts-misc" />
-    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
-        <option name="push-group" value="HostDrivenTest.push" />
-    </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer">
-    </target_preparer>
-    <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
-        <option name="test-module-name" value="VtsTrebleHidlShim" />
-        <option name="test-case-path" value="vts/testcases/hal/treble/hidl_shim/VtsTrebleHidlShimTest" />
-    </test>
-</configuration>
diff --git a/treble/hidl_shim/VtsTrebleHidlShimTest.py b/treble/hidl_shim/VtsTrebleHidlShimTest.py
deleted file mode 100644
index f05a44e..0000000
--- a/treble/hidl_shim/VtsTrebleHidlShimTest.py
+++ /dev/null
@@ -1,89 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright (C) 2017 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-import logging
-
-from vts.runners.host import asserts
-from vts.runners.host import base_test
-from vts.runners.host import test_runner
-from vts.utils.python.common import vintf_utils
-from vts.utils.python.controllers import android_device
-from vts.utils.python.file import target_file_utils
-from vts.utils.python.os import path_utils
-
-
-class VtsTrebleHidlShimTest(base_test.BaseTestClass):
-    """Ensures existence of at least one HIDL shim library (32 or 64-bit)."""
-
-    VENDOR_MANIFEST_FILE_PATH = '/vendor/manifest.xml'
-    SHIM_DIRS = [
-        '/system/lib/', '/system/lib64/', '/vendor/lib/', '/vendor/lib64/'
-    ]
-
-    def setUpClass(self):
-        self.dut = self.registerController(android_device)[0]
-        self.dut.shell.InvokeTerminal(
-            'VtsTrebleHidlShim')  # creates a remote shell instance.
-        self.shell = self.dut.shell.VtsTrebleHidlShim
-
-    def missingHidlShims(self, hal_dictionary):
-        """Finds HALs listed in hal_dictionary that are missing shims on device.
-
-        Args:
-            hal_dictionary:
-                {key: hal_name@version, value: vintf_utils.HalDescription object}
-        Returns:
-            a list of the hal_keys (hal_name@version) for which no HIDL shim was
-            found on device
-        """
-        missing_hidl_shims = []
-        for hal_key, hal_info in hal_dictionary.iteritems():
-            for shim_dir in self.SHIM_DIRS:
-                hidl_shim_path = path_utils.JoinTargetPath(
-                    shim_dir, hal_key + '.so')
-                found = target_file_utils.Exists(hidl_shim_path, self.shell)
-                if found:
-                    break
-            if not found:
-                missing_hidl_shims.append(hal_key)
-        return missing_hidl_shims
-
-    def testHidlShimExists(self):
-        """Checks that at least one HIDL shim (32 or 64-bit) exists on device.
-
-        For all HALs registered in /vendor/manifest.xml, at least one HIDL shim
-        must exist on device under one of the dirs listed in self.SHIM_DIRS.
-        """
-        vendor_manifest_xml = target_file_utils.ReadFileContent(
-            self.VENDOR_MANIFEST_FILE_PATH, self.shell)
-        manifest_hwbinder_hals, manifest_passthrough_hals = vintf_utils.GetHalDescriptions(
-            vendor_manifest_xml)
-
-        missing_hidl_shims_hwbinder = self.missingHidlShims(
-            manifest_hwbinder_hals)
-        missing_hidl_shims_passthrough = self.missingHidlShims(
-            manifest_passthrough_hals)
-
-        asserts.assertTrue(
-            len(missing_hidl_shims_hwbinder) == 0 and
-            len(missing_hidl_shims_passthrough) == 0,
-            ('No HIDL shim library (neither 32 or 64-bit) was found on device for the following HALs: %s, %s'
-             ) % (missing_hidl_shims_hwbinder, missing_hidl_shims_passthrough))
-
-
-if __name__ == "__main__":
-    test_runner.main()
diff --git a/treble/platform_version/AndroidTest.xml b/treble/platform_version/AndroidTest.xml
index d7b21ac..cbf76a4 100644
--- a/treble/platform_version/AndroidTest.xml
+++ b/treble/platform_version/AndroidTest.xml
@@ -18,8 +18,6 @@
     <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
         <option name="push-group" value="HostDrivenTest.push" />
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer">
-    </target_preparer>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsTreblePlatformVersionTest" />
         <option name="test-case-path" value="vts/testcases/hal/treble/platform_version/VtsTreblePlatformVersionTest" />
diff --git a/treble/platform_version/VtsTreblePlatformVersionTest.py b/treble/platform_version/VtsTreblePlatformVersionTest.py
index 53130d9..76d8ba7 100644
--- a/treble/platform_version/VtsTreblePlatformVersionTest.py
+++ b/treble/platform_version/VtsTreblePlatformVersionTest.py
@@ -21,22 +21,20 @@
 from vts.runners.host import base_test
 from vts.runners.host import const
 from vts.runners.host import test_runner
-from vts.utils.python.controllers import android_device
+from vts.utils.python.android import api
 
-ANDROID_O_API_VERSION = 26
 
 class VtsTreblePlatformVersionTest(base_test.BaseTestClass):
     """VTS should run on devices launched with O or later."""
 
     def setUpClass(self):
-        self.dut = self.registerController(android_device)[0]
+        self.dut = self.android_devices[0]
         self.dut.shell.InvokeTerminal("VtsTreblePlatformVersionTest")
 
     def getProp(self, prop, required=True):
         """Helper to retrieve a property from device."""
 
-        results = self.dut.shell.VtsTreblePlatformVersionTest.Execute(
-            "getprop " + prop)
+        results = self.dut.shell.Execute("getprop " + prop)
         if required:
             asserts.assertEqual(results[const.EXIT_CODE][0], 0,
                 "getprop must succeed")
@@ -54,18 +52,26 @@
 
         return result
 
+    def getEnv(self, env):
+        """Helper to retrieve an environment varable from device."""
+
+        results = self.dut.shell.Execute("printenv " + env)
+        if (results[const.EXIT_CODE][0] != 0 or
+            len(results[const.STDOUT][0].strip()) == 0):
+            logging.info("environment variable %s undefined", env)
+            return None
+
+        result = results[const.STDOUT][0].strip()
+
+        logging.info("printenv {}:{}".format(env, result))
+
+        return result
+
     def testFirstApiLevel(self):
         """Test that device launched with O or later."""
-        try:
-            firstApiLevel = self.getProp("ro.product.first_api_level",
-                                         required=False)
-            if firstApiLevel is None:
-                asserts.skip("ro.product.first_api_level undefined")
-            firstApiLevel = int(firstApiLevel)
-            asserts.assertTrue(firstApiLevel >= ANDROID_O_API_VERSION,
-                "VTS can only be run for new launches in O or above")
-        except ValueError as e:
-            asserts.fail("Unexpected value returned from getprop: %s" % e)
+        firstApiLevel = self.dut.getLaunchApiLevel()
+        asserts.assertTrue(firstApiLevel >= api.PLATFORM_API_LEVEL_O,
+            "VTS can only be run for new launches in O or above")
 
     def testTrebleEnabled(self):
         """Test that device has Treble enabled."""
@@ -77,10 +83,30 @@
         """Test that SDK version >= O (26)."""
         try:
             sdkVersion = int(self.getProp("ro.build.version.sdk"))
-            asserts.assertTrue(sdkVersion >= ANDROID_O_API_VERSION,
+            asserts.assertTrue(sdkVersion >= api.PLATFORM_API_LEVEL_O,
                 "VTS is for devices launching in O or above")
         except ValueError as e:
             asserts.fail("Unexpected value returned from getprop: %s" % e)
 
+    def testVndkVersion(self):
+        """Test that VNDK version is specified.
+
+        If ro.vndk.version is not defined on boot, GSI sets LD_CONFIG_FILE to
+        temporary configuration file and ro.vndk.version to default value.
+        """
+
+        vndkVersion = self.getProp("ro.vndk.version")
+        if vndkVersion is None:
+            asserts.fail("VNDK version is not defined")
+
+        firstApiLevel = self.dut.getLaunchApiLevel()
+        if firstApiLevel > api.PLATFORM_API_LEVEL_O_MR1:
+            vndkLite = self.getProp("ro.vndk.lite", False)
+            if vndkLite is not None:
+                asserts.fail("ro.vndk.lite is defined as %s" % vndkLite)
+            envLdConfigFile = self.getEnv("LD_CONFIG_FILE")
+            if envLdConfigFile is not None:
+                asserts.fail("LD_CONFIG_FILE is defined as %s" % envLdConfigFile)
+
 if __name__ == "__main__":
     test_runner.main()
diff --git a/treble/hidl_shim/Android.mk b/treble/vendor_vintf/Android.mk
similarity index 87%
copy from treble/hidl_shim/Android.mk
copy to treble/vendor_vintf/Android.mk
index 01bacd7..9b6f0ff 100644
--- a/treble/hidl_shim/Android.mk
+++ b/treble/vendor_vintf/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,5 +18,5 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsTrebleHidlShim
-include test/vts/tools/build/Android.host_config.mk
\ No newline at end of file
+LOCAL_MODULE := VtsTrebleVendorVintfTest
+include test/vts/tools/build/Android.host_config.mk
diff --git a/treble/vendor_vintf/AndroidTest.xml b/treble/vendor_vintf/AndroidTest.xml
new file mode 100644
index 0000000..cbdf212
--- /dev/null
+++ b/treble/vendor_vintf/AndroidTest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS VtsTrebleVendorVintfTest test cases">
+    <option name="config-descriptor:metadata" key="plan" value="vts-treble" />
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="abort-on-push-failure" value="false"/>
+        <option name="push-group" value="HalHidlTargetTest.push"/>
+        <option name="push" value="hal-hidl-hash/frameworks/hardware/interfaces/current.txt->/data/local/tmp/frameworks/hardware/interfaces/current.txt"/>
+        <option name="push" value="hal-hidl-hash/hardware/interfaces/current.txt->/data/local/tmp/hardware/interfaces/current.txt"/>
+        <option name="push" value="hal-hidl-hash/system/hardware/interfaces/current.txt->/data/local/tmp/system/hardware/interfaces/current.txt"/>
+        <option name="push" value="hal-hidl-hash/system/libhidl/transport/current.txt->/data/local/tmp/system/libhidl/transport/current.txt"/>
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+        <option name="test-module-name" value="VtsTrebleVendorVintfTest"/>
+        <option name="binary-test-working-directory" value="_32bit::/data/nativetest/" />
+        <option name="binary-test-working-directory" value="_64bit::/data/nativetest64/" />
+        <option name="binary-test-source" value="_32bit::DATA/nativetest/vts_treble_vintf_vendor_test/vts_treble_vintf_vendor_test" />
+        <option name="binary-test-source" value="_64bit::DATA/nativetest64/vts_treble_vintf_vendor_test/vts_treble_vintf_vendor_test" />
+        <option name="binary-test-type" value="gtest"/>
+        <option name="test-timeout" value="5m"/>
+    </test>
+</configuration>
diff --git a/treble/vintf/Android.bp b/treble/vintf/Android.bp
index 173ad43..1357047 100644
--- a/treble/vintf/Android.bp
+++ b/treble/vintf/Android.bp
@@ -12,16 +12,12 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+cc_defaults {
+    name: "vts_treble_vintf_test_defaults",
 
-cc_test {
-    name: "vts_treble_vintf_test",
-    srcs: [
-        "vts_treble_vintf_test.cpp",
-
-        // b/77293161
-        // Moving internal implementation details of libvintf into this test.
-        // This is so that the test can know about the ODM manifest.
-        "VintfObjectWithOdm.cpp",
+    cflags: [
+        "-Wall",
+        "-Werror",
     ],
     shared_libs: [
         "libbase",
@@ -35,10 +31,69 @@
     static_libs: [
         "libhidl-gen-hash",
         "libhidl-gen-utils",
+        "libprocpartition",
         "libselinux",
         "libtinyxml2",
         "libvintf",
     ],
     group_static_libs: true,
+    srcs: [
+        "VtsTrebleVintfTestBase.cpp",
+        "utils.cpp",
+        "main.cpp",
+    ]
 }
 
+// Do similar tests as vts_treble_vintf_test from O-MR1 vendor image branch. The
+// test is modified to compile against latest libvintf.
+// VendorFrameworkCompatibility is removed because it has framework dependency.
+cc_test {
+    name: "vts_treble_vintf_test_o_mr1",
+    defaults: ["vts_treble_vintf_test_defaults"],
+    srcs: [
+        "vts_treble_vintf_test_o_mr1.cpp",
+    ],
+}
+
+// Test vendor image that has the highest target FCM version. This test binary
+// has no system XML dependencies.
+cc_test {
+    name: "vts_treble_vintf_vendor_test",
+    defaults: ["vts_treble_vintf_test_defaults"],
+    srcs: [
+        "DeviceManifestTest.cpp",
+        "SingleManifestTest.cpp",
+    ],
+}
+
+// Test a (potentially) compatible vendor image with framework dependency;
+// test the current framework.
+cc_test {
+    name: "vts_treble_vintf_framework_test",
+    defaults: ["vts_treble_vintf_test_defaults"],
+    srcs: [
+        "SingleManifestTest.cpp",
+        "SystemVendorTest.cpp",
+    ],
+    multilib: {
+        lib32: {
+            suffix: "32",
+        },
+        lib64: {
+            suffix: "64",
+        },
+    },
+}
+
+// Tests everything.
+// Should not be used by VTS framework, but could be used for test development.
+// VTS framework should choose among the other test binaries defined above.
+cc_test {
+    name: "vts_treble_vintf_test_all",
+    defaults: ["vts_treble_vintf_test_defaults"],
+    srcs: [
+        "DeviceManifestTest.cpp",
+        "SingleManifestTest.cpp",
+        "SystemVendorTest.cpp",
+    ],
+}
diff --git a/treble/vintf/Android.mk b/treble/vintf/Android.mk
index a8daa2a..b7a4e94 100644
--- a/treble/vintf/Android.mk
+++ b/treble/vintf/Android.mk
@@ -18,5 +18,5 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsTrebleVintfTest
+LOCAL_MODULE := VtsTrebleVintfTestOMr1
 include test/vts/tools/build/Android.host_config.mk
diff --git a/treble/vintf/AndroidTest.xml b/treble/vintf/AndroidTest.xml
index 8b0604f..2fe48b7 100644
--- a/treble/vintf/AndroidTest.xml
+++ b/treble/vintf/AndroidTest.xml
@@ -13,7 +13,7 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Config for VTS VtsTrebleVintfTest test cases">
+<configuration description="Config for VTS VtsTrebleVintfTestOMr1 test cases">
     <option name="config-descriptor:metadata" key="plan" value="vts-treble" />
     <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
         <option name="abort-on-push-failure" value="false"/>
@@ -25,13 +25,12 @@
         <option name="push" value="hal-hidl-hash/system/hardware/interfaces/current.txt->/data/local/tmp/system/hardware/interfaces/current.txt"/>
         <option name="push" value="hal-hidl-hash/system/libhidl/transport/current.txt->/data/local/tmp/system/libhidl/transport/current.txt"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
-        <option name="test-module-name" value="VtsTrebleVintfTest"/>
+        <option name="test-module-name" value="VtsTrebleVintfTestOMr1"/>
         <option name="binary-test-working-directory" value="_32bit::/data/nativetest/" />
         <option name="binary-test-working-directory" value="_64bit::/data/nativetest64/" />
-        <option name="binary-test-source" value="_32bit::DATA/nativetest/vts_treble_vintf_test/vts_treble_vintf_test" />
-        <option name="binary-test-source" value="_64bit::DATA/nativetest64/vts_treble_vintf_test/vts_treble_vintf_test" />
+        <option name="binary-test-source" value="_32bit::DATA/nativetest/vts_treble_vintf_test_o_mr1/vts_treble_vintf_test_o_mr1" />
+        <option name="binary-test-source" value="_64bit::DATA/nativetest64/vts_treble_vintf_test_o_mr1/vts_treble_vintf_test_o_mr1" />
         <option name="binary-test-type" value="gtest"/>
         <option name="test-timeout" value="5m"/>
     </test>
diff --git a/treble/vintf/DeviceManifestTest.cpp b/treble/vintf/DeviceManifestTest.cpp
new file mode 100644
index 0000000..1240c6b
--- /dev/null
+++ b/treble/vintf/DeviceManifestTest.cpp
@@ -0,0 +1,85 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "DeviceManifestTest.h"
+
+#include <vintf/VintfObject.h>
+#include "SingleManifestTest.h"
+
+namespace android {
+namespace vintf {
+namespace testing {
+
+void DeviceManifestTest::SetUp() {
+  VtsTrebleVintfTestBase::SetUp();
+
+  vendor_manifest_ = VintfObject::GetDeviceHalManifest();
+  ASSERT_NE(vendor_manifest_, nullptr)
+      << "Failed to get vendor HAL manifest." << endl;
+}
+
+// Tests that Shipping FCM Version in the device manifest is at least the
+// minimum Shipping FCM Version as required by Shipping API level.
+TEST_F(DeviceManifestTest, ShippingFcmVersion) {
+  uint64_t shipping_api_level = GetShippingApiLevel();
+  ASSERT_NE(shipping_api_level, 0u)
+      << "Device's shipping API level cannot be determined.";
+
+  Level shipping_fcm_version = VintfObject::GetDeviceHalManifest()->level();
+  if (shipping_fcm_version == Level::UNSPECIFIED) {
+    // O / O-MR1 vendor image doesn't have shipping FCM version declared and
+    // shipping FCM version is inferred from Shipping API level, hence it always
+    // meets the requirement.
+    return;
+  }
+
+  ASSERT_GE(shipping_api_level, kFcm2ApiLevelMap.begin()->first /* 25 */)
+      << "Pre-N devices should not run this test.";
+
+  auto it = kFcm2ApiLevelMap.find(shipping_api_level);
+  ASSERT_TRUE(it != kFcm2ApiLevelMap.end())
+      << "No launch requirement is set yet for Shipping API level "
+      << shipping_api_level << ". Please update the test.";
+
+  Level required_fcm_version = it->second;
+
+  ASSERT_GE(shipping_fcm_version, required_fcm_version)
+      << "Shipping API level == " << shipping_api_level
+      << " requires Shipping FCM Version >= " << required_fcm_version
+      << " (but is " << shipping_fcm_version << ")";
+}
+
+// Tests that deprecated HALs are not in the manifest, unless a higher,
+// non-deprecated minor version is in the manifest.
+TEST_F(DeviceManifestTest, NoDeprecatedHalsOnManifest) {
+  string error;
+  EXPECT_EQ(android::vintf::NO_DEPRECATED_HALS,
+            VintfObject::CheckDeprecation(&error))
+      << error;
+}
+
+static std::vector<HalManifestPtr> GetTestManifests() {
+  return {
+      VintfObject::GetDeviceHalManifest(),
+  };
+}
+
+INSTANTIATE_TEST_CASE_P(DeviceManifest, SingleManifestTest,
+                        ::testing::ValuesIn(GetTestManifests()));
+
+}  // namespace testing
+}  // namespace vintf
+}  // namespace android
diff --git a/treble/vintf/DeviceManifestTest.h b/treble/vintf/DeviceManifestTest.h
new file mode 100644
index 0000000..fd680c1
--- /dev/null
+++ b/treble/vintf/DeviceManifestTest.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef VTS_TREBLE_VINTF_TEST_DEVICE_MANIFEST_TEST_H_
+#define VTS_TREBLE_VINTF_TEST_DEVICE_MANIFEST_TEST_H_
+
+#include "VtsTrebleVintfTestBase.h"
+
+#include <gtest/gtest.h>
+
+namespace android {
+namespace vintf {
+namespace testing {
+
+// Test for device manifest only.
+// These tests shouldn't be run on framework manifest, hence they are not
+// included in SingleManifestTest.
+
+class DeviceManifestTest : public VtsTrebleVintfTestBase {
+ public:
+  virtual ~DeviceManifestTest() {}
+  virtual void SetUp() override;
+
+  HalManifestPtr vendor_manifest_;
+};
+
+}  // namespace testing
+}  // namespace vintf
+}  // namespace android
+
+#endif  // VTS_TREBLE_VINTF_TEST_DEVICE_MANIFEST_TEST_H_
diff --git a/treble/vintf/README.md b/treble/vintf/README.md
new file mode 100644
index 0000000..edd16ea
--- /dev/null
+++ b/treble/vintf/README.md
@@ -0,0 +1,48 @@
+# VTS Treble VINTF test
+
+## Targets?
+
+```
+branch      | tests
+------------+---------------------------------------------
+O-MR1, 8.1  | (legacy binary)
+------------+---------------------------------------------
+P    , 9.0  | vts_treble_vintf_test
+            | vts_treble_vintf_vendor_test
+            | vts_treble_vintf_framework_test
+------------+---------------------------------------------
+Q    , 10.0 | vts_treble_vintf_test             (P binary)
+            | vts_treble_vintf_vendor_test      (P binary)
+            | vts_treble_vintf_vendor_test
+            | vts_treble_vintf_framework_test
+```
+
+## What to run?
+
+```
+Vendor image | System image  |
+VTS Tests    | VTS framework | VTS Treble VINTF test
+-------------+---------------+---------------------------
+O-MR1, 8.1   | O-MR1, 8.1    | (legacy binary)
+-------------+---------------+---------------------------
+O-MR1, 8.1   | P    , 9.0    | _test             (P)
+             |               | _framework_test   (P)
+-------------+---------------+---------------------------
+P    , 9.0   | P    , 9.0    | _vendor_test      (P)
+             |               | _framework_test   (P)
+-------------+---------------+---------------------------
+O-MR1, 8.1   | Q    , 10.0   | _test (P)
+             |               | _framework_test   (Q)
+-------------+---------------+---------------------------
+P    , 9.0   | Q    , 10.0   | _vendor_test      (P)
+             |               | _framework_test   (Q)
+-------------+---------------+---------------------------
+Q    , 10.0  | Q    , 10.0   | _vendor_test      (Q)
+             |               | _framework_test   (Q)
+```
+
+## Summary
+
+* O-MR1 is a special case; always run `vts_treble_vintf_test` binary.
+* From P onwards, always run `_vendor_test` from VTS tests at VTS tests ${VENDOR}
+  snapshot, and latest `_framework_test`.
diff --git a/treble/vintf/SingleManifestTest.cpp b/treble/vintf/SingleManifestTest.cpp
new file mode 100644
index 0000000..4662d48
--- /dev/null
+++ b/treble/vintf/SingleManifestTest.cpp
@@ -0,0 +1,304 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "SingleManifestTest.h"
+
+#include <hidl-util/FqInstance.h>
+#include <hidl/HidlTransportUtils.h>
+#include <vintf/parse_string.h>
+
+#include "utils.h"
+
+namespace android {
+namespace vintf {
+namespace testing {
+
+using android::FqInstance;
+using android::vintf::toFQNameString;
+
+// For devices that launched <= Android O-MR1, systems/hals/implementations
+// were delivered to companies which either don't start up on device boot.
+bool LegacyAndExempt(const FQName &fq_name) {
+  return GetShippingApiLevel() <= 27 && !IsGoogleDefinedIface(fq_name);
+}
+
+void FailureHalMissing(const FQName &fq_name) {
+  if (LegacyAndExempt(fq_name)) {
+    cout << "[  WARNING ] " << fq_name.string()
+         << " not available but is exempted because it is legacy. It is still "
+            "recommended to fix this."
+         << endl;
+  } else {
+    ADD_FAILURE() << fq_name.string() << " not available.";
+  }
+}
+
+void FailureHashMissing(const FQName &fq_name) {
+  if (LegacyAndExempt(fq_name)) {
+    cout << "[  WARNING ] " << fq_name.string()
+         << " has an empty hash but is exempted because it is legacy. It is "
+            "still recommended to fix this. This is because it was compiled "
+            "without being frozen in a corresponding current.txt file."
+         << endl;
+  } else {
+    ADD_FAILURE()
+        << fq_name.string()
+        << " has an empty hash. This is because it was compiled "
+           "without being frozen in a corresponding current.txt file.";
+  }
+}
+
+// Tests that no HAL outside of the allowed set is specified as passthrough in
+// VINTF.
+TEST_P(SingleManifestTest, HalsAreBinderized) {
+  // Verifies that HAL is binderized unless it's allowed to be passthrough.
+  HalVerifyFn is_binderized = [](const FQName &fq_name,
+                                 const string & /* instance_name */,
+                                 Transport transport) {
+    cout << "Verifying transport method of: " << fq_name.string() << endl;
+    string hal_name = fq_name.package();
+    Version version{fq_name.getPackageMajorVersion(),
+                    fq_name.getPackageMinorVersion()};
+    string iface_name = fq_name.name();
+
+    EXPECT_NE(transport, Transport::EMPTY)
+        << hal_name << " has no transport specified in VINTF.";
+
+    if (transport == Transport::PASSTHROUGH) {
+      EXPECT_NE(kPassthroughHals.find(hal_name), kPassthroughHals.end())
+          << hal_name << " can't be passthrough under Treble rules.";
+    }
+  };
+
+  ForEachHalInstance(GetParam(), is_binderized);
+}
+
+// Tests that all HALs specified in the VINTF are available through service
+// manager.
+// This tests (HAL in manifest) => (HAL is served)
+TEST_P(SingleManifestTest, HalsAreServed) {
+  // Returns a function that verifies that HAL is available through service
+  // manager and is served from a specific set of partitions.
+  auto is_available_from = [this](Partition expected_partition) -> HalVerifyFn {
+    return [this, expected_partition](const FQName &fq_name,
+                                      const string &instance_name,
+                                      Transport transport) {
+      sp<IBase> hal_service;
+
+      if (transport == Transport::PASSTHROUGH) {
+        using android::hardware::details::canCastInterface;
+
+        // Passthrough services all start with minor version 0.
+        // there are only three of them listed above. They are looked
+        // up based on their binary location. For instance,
+        // V1_0::IFoo::getService() might correspond to looking up
+        // android.hardware.foo@1.0-impl for the symbol
+        // HIDL_FETCH_IFoo. For @1.1::IFoo to continue to work with
+        // 1.0 clients, it must also be present in a library that is
+        // called the 1.0 name. Clients can say:
+        //     mFoo1_0 = V1_0::IFoo::getService();
+        //     mFoo1_1 = V1_1::IFoo::castFrom(mFoo1_0);
+        // This is the standard pattern for making a service work
+        // for both versions (mFoo1_1 != nullptr => you have 1.1)
+        // and a 1.0 client still works with the 1.1 interface.
+
+        if (!IsGoogleDefinedIface(fq_name)) {
+          // This isn't the case for extensions of core Google interfaces.
+          return;
+        }
+
+        const FQName lowest_name =
+            fq_name.withVersion(fq_name.getPackageMajorVersion(), 0);
+        hal_service = GetHalService(lowest_name, instance_name, transport);
+        EXPECT_TRUE(
+            canCastInterface(hal_service.get(), fq_name.string().c_str()))
+            << fq_name.string() << " is not on the device.";
+      } else {
+        hal_service = GetHalService(fq_name, instance_name, transport);
+      }
+
+      if (hal_service == nullptr) {
+        FailureHalMissing(fq_name);
+        return;
+      }
+
+      EXPECT_EQ(transport == Transport::HWBINDER, hal_service->isRemote())
+          << "transport is " << transport << "but HAL service is "
+          << (hal_service->isRemote() ? "" : "not") << " remote.";
+      EXPECT_EQ(transport == Transport::PASSTHROUGH, !hal_service->isRemote())
+          << "transport is " << transport << "but HAL service is "
+          << (hal_service->isRemote() ? "" : "not") << " remote.";
+
+      if (!hal_service->isRemote()) return;
+
+      Partition partition = GetPartition(hal_service);
+      if (partition == Partition::UNKNOWN) return;
+      EXPECT_EQ(expected_partition, partition)
+          << fq_name.string() << " is in partition " << partition
+          << " but is expected to be in " << expected_partition;
+    };
+  };
+
+  auto manifest = GetParam();
+  ForEachHalInstance(manifest,
+                     is_available_from(PartitionOfType(manifest->type())));
+}
+
+// Tests that all HALs which are served are specified in the VINTF
+// This tests (HAL is served) => (HAL in manifest)
+TEST_P(SingleManifestTest, ServedHwbinderHalsAreInManifest) {
+  auto manifest = GetParam();
+  auto expected_partition = PartitionOfType(manifest->type());
+  std::set<std::string> manifest_hwbinder_hals_ = GetHwbinderHals(manifest);
+
+  Return<void> ret = default_manager_->list([&](const auto &list) {
+    for (const auto &name : list) {
+      if (std::string(name).find(IBase::descriptor) == 0) continue;
+
+      FqInstance fqInstanceName;
+      EXPECT_TRUE(fqInstanceName.setTo(name));
+
+      auto service =
+          GetHalService(toFQNameString(fqInstanceName.getPackage(),
+                                       fqInstanceName.getVersion(),
+                                       fqInstanceName.getInterface()),
+                        fqInstanceName.getInstance(), Transport::HWBINDER);
+      ASSERT_NE(service, nullptr);
+
+      Partition partition = GetPartition(service);
+      if (partition == Partition::UNKNOWN) {
+        // Caught by SystemVendorTest.ServedHwbinderHalsAreInManifest
+        // if that test is run.
+        return;
+      }
+      if (partition == expected_partition) {
+        EXPECT_NE(manifest_hwbinder_hals_.find(name),
+                  manifest_hwbinder_hals_.end())
+            << name << " is being served, but it is not in a manifest.";
+      }
+    }
+  });
+  EXPECT_TRUE(ret.isOk());
+}
+
+TEST_P(SingleManifestTest, ServedPassthroughHalsAreInManifest) {
+  auto manifest = GetParam();
+  std::set<std::string> manifest_passthrough_hals_ =
+      GetPassthroughHals(manifest);
+
+  auto passthrough_interfaces_declared = [&manifest_passthrough_hals_](
+                                             const FQName &fq_name,
+                                             const string &instance_name,
+                                             Transport transport) {
+    if (transport != Transport::PASSTHROUGH) return;
+
+    // See HalsAreServed. These are always retrieved through the base interface
+    // and if it is not a google defined interface, it must be an extension of
+    // one.
+    if (!IsGoogleDefinedIface(fq_name)) return;
+
+    const FQName lowest_name =
+        fq_name.withVersion(fq_name.getPackageMajorVersion(), 0);
+    sp<IBase> hal_service =
+        GetHalService(lowest_name, instance_name, transport);
+    if (hal_service == nullptr) {
+      ADD_FAILURE() << "Could not get service " << fq_name.string() << "/"
+                    << instance_name;
+      return;
+    }
+
+    Return<void> ret = hal_service->interfaceChain(
+        [&manifest_passthrough_hals_, &instance_name](const auto &interfaces) {
+          for (const auto &interface : interfaces) {
+            if (std::string(interface) == IBase::descriptor) continue;
+
+            const std::string instance =
+                std::string(interface) + "/" + instance_name;
+            EXPECT_NE(manifest_passthrough_hals_.find(instance),
+                      manifest_passthrough_hals_.end())
+                << "Instance missing from manifest: " << instance;
+          }
+        });
+    EXPECT_TRUE(ret.isOk());
+  };
+  ForEachHalInstance(manifest, passthrough_interfaces_declared);
+}
+
+// Tests that HAL interfaces are officially released.
+TEST_P(SingleManifestTest, InterfacesAreReleased) {
+  // Verifies that HAL are released by fetching the hash of the interface and
+  // comparing it to the set of known hashes of released interfaces.
+  HalVerifyFn is_released = [](const FQName &fq_name,
+                               const string &instance_name,
+                               Transport transport) {
+    // See HalsAreServed. These are always retrieved through the base interface
+    // and if it is not a google defined interface, it must be an extension of
+    // one.
+    if (transport == Transport::PASSTHROUGH &&
+        (!IsGoogleDefinedIface(fq_name) ||
+         fq_name.getPackageMinorVersion() != 0)) {
+      return;
+    }
+
+    sp<IBase> hal_service = GetHalService(fq_name, instance_name, transport);
+
+    if (hal_service == nullptr) {
+      FailureHalMissing(fq_name);
+      return;
+    }
+
+    vector<string> iface_chain = GetInterfaceChain(hal_service);
+
+    vector<string> hash_chain{};
+    hal_service->getHashChain(
+        [&hash_chain](const hidl_vec<HashCharArray> &chain) {
+          for (const HashCharArray &hash_array : chain) {
+            vector<uint8_t> hash{hash_array.data(),
+                                 hash_array.data() + hash_array.size()};
+            hash_chain.push_back(Hash::hexString(hash));
+          }
+        });
+
+    ASSERT_EQ(iface_chain.size(), hash_chain.size());
+    for (size_t i = 0; i < iface_chain.size(); ++i) {
+      FQName fq_iface_name;
+      if (!FQName::parse(iface_chain[i], &fq_iface_name)) {
+        ADD_FAILURE() << "Could not parse iface name " << iface_chain[i]
+                      << " from interface chain of " << fq_name.string();
+        return;
+      }
+      string hash = hash_chain[i];
+
+      if (hash == Hash::hexString(Hash::kEmptyHash)) {
+        FailureHashMissing(fq_iface_name);
+      }
+
+      if (IsGoogleDefinedIface(fq_iface_name)) {
+        set<string> released_hashes = ReleasedHashes(fq_iface_name);
+        EXPECT_NE(released_hashes.find(hash), released_hashes.end())
+            << "Hash not found. This interface was not released." << endl
+            << "Interface name: " << fq_iface_name.string() << endl
+            << "Hash: " << hash << endl;
+      }
+    }
+  };
+
+  ForEachHalInstance(GetParam(), is_released);
+}
+
+}  // namespace testing
+}  // namespace vintf
+}  // namespace android
diff --git a/treble/vintf/SingleManifestTest.h b/treble/vintf/SingleManifestTest.h
new file mode 100644
index 0000000..f196d43
--- /dev/null
+++ b/treble/vintf/SingleManifestTest.h
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef VTS_TREBLE_VINTF_TEST_SINGLE_MANIFEST_TEST_H_
+#define VTS_TREBLE_VINTF_TEST_SINGLE_MANIFEST_TEST_H_
+#include <gtest/gtest.h>
+#include "VtsTrebleVintfTestBase.h"
+
+namespace android {
+namespace vintf {
+namespace testing {
+
+// A parameterized test for common tests on device and framework manifest.
+class SingleManifestTest
+    : public VtsTrebleVintfTestBase,
+      public ::testing::WithParamInterface<HalManifestPtr> {
+ public:
+  virtual ~SingleManifestTest() {}
+};
+
+}  // namespace testing
+}  // namespace vintf
+}  // namespace android
+
+#endif  // VTS_TREBLE_VINTF_TEST_SINGLE_MANIFEST_TEST_H_
diff --git a/treble/vintf/SystemVendorTest.cpp b/treble/vintf/SystemVendorTest.cpp
new file mode 100644
index 0000000..26e3eed
--- /dev/null
+++ b/treble/vintf/SystemVendorTest.cpp
@@ -0,0 +1,183 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// SystemVendorTest test cases that runs on P+ vendor.
+
+#include "SystemVendorTest.h"
+
+#include <android-base/logging.h>
+#include <android-base/strings.h>
+#include <vintf/VintfObject.h>
+#include <iostream>
+
+#include "SingleManifestTest.h"
+
+namespace android {
+namespace vintf {
+namespace testing {
+
+using std::endl;
+
+// Tests that vendor and framework are compatible.
+TEST_F(SystemVendorTest, VendorFrameworkCompatibility) {
+  string error;
+
+  EXPECT_TRUE(vendor_manifest_->checkCompatibility(
+      *VintfObject::GetFrameworkCompatibilityMatrix(), &error))
+      << error;
+
+  EXPECT_TRUE(fwk_manifest_->checkCompatibility(
+      *VintfObject::GetDeviceCompatibilityMatrix(), &error))
+      << error;
+
+  // AVB version is not a compliance requirement.
+  EXPECT_TRUE(VintfObject::GetRuntimeInfo()->checkCompatibility(
+      *VintfObject::GetFrameworkCompatibilityMatrix(), &error,
+      ::android::vintf::DISABLE_AVB_CHECK))
+      << error;
+
+  EXPECT_EQ(android::vintf::COMPATIBLE,
+            VintfObject::CheckCompatibility(
+                {}, &error, ::android::vintf::DISABLE_AVB_CHECK))
+      << error;
+}
+
+template <typename D, typename S>
+static void insert(D *d, const S &s) {
+  d->insert(s.begin(), s.end());
+}
+
+// This needs to be tested besides
+// SingleManifestTest.ServedHwbinderHalsAreInManifest because some HALs may
+// refuse to provide its PID, and the partition cannot be inferred.
+TEST_F(SystemVendorTest, ServedHwbinderHalsAreInManifest) {
+  std::set<std::string> manifest_hwbinder_hals_;
+
+  insert(&manifest_hwbinder_hals_, GetHwbinderHals(fwk_manifest_));
+  insert(&manifest_hwbinder_hals_, GetHwbinderHals(vendor_manifest_));
+
+  Return<void> ret = default_manager_->list([&](const auto &list) {
+    for (const auto &name : list) {
+      // TODO(b/73774955): use standardized parsing code for fqinstancename
+      if (std::string(name).find(IBase::descriptor) == 0) continue;
+
+      EXPECT_NE(manifest_hwbinder_hals_.find(name),
+                manifest_hwbinder_hals_.end())
+          << name << " is being served, but it is not in a manifest.";
+    }
+  });
+  EXPECT_TRUE(ret.isOk());
+}
+
+// Tests that deprecated HALs are not served, unless a higher, non-deprecated
+// minor version is served.
+TEST_F(SystemVendorTest, NoDeprecatedHalsOnManager) {
+  if (vendor_manifest_->level() == Level::UNSPECIFIED) {
+    // On a legacy device, no HALs are deprecated.
+    return;
+  }
+
+  // Predicate for whether an instance is served through service manager.
+  // Return {instance name, highest minor version}
+  // where "highest minor version" is the first element in getInterfaceChain()
+  // that has the same "package", major version as "version" and "interface"
+  // but a higher minor version than "version".
+  VintfObject::ListInstances list_instances = [this](const string &package,
+                                                     Version version,
+                                                     const string &interface,
+                                                     const vector<string>
+                                                         &instance_hints) {
+    vector<std::pair<string, Version>> ret;
+
+    FQName fq_name(package, to_string(version), interface);
+    for (auto transport : {Transport::HWBINDER, Transport::PASSTHROUGH}) {
+      const vector<string> &instance_names =
+          transport == Transport::HWBINDER
+              ? GetInstanceNames(default_manager_, fq_name)
+              : instance_hints;
+
+      for (auto instance : instance_names) {
+        auto service =
+            GetHalService(fq_name, instance, transport, false /* log */);
+        if (service == nullptr) {
+          if (transport == Transport::PASSTHROUGH) {
+            CHECK(std::find(instance_hints.begin(), instance_hints.end(),
+                            instance) != instance_hints.end())
+                << "existing <instance>'s: ["
+                << android::base::Join(instance_hints, ",")
+                << "] but instance=" << instance;
+            continue;  // name is from instance_hints, so ignore
+          }
+          ADD_FAILURE()
+              << fq_name.string() << "/" << instance
+              << " is registered to hwservicemanager but cannot be retrieved.";
+          continue;
+        }
+
+        vector<string> iface_chain = GetInterfaceChain(service);
+        bool done = false;
+        for (const auto &fq_interface_str : iface_chain) {
+          FQName fq_interface;
+          if (!FQName::parse(fq_interface_str, &fq_interface)) {
+            // Allow CheckDeprecation to proceed with some sensible default
+            ADD_FAILURE() << "'" << fq_interface_str
+                          << "' (returned by getInterfaceChain())"
+                          << "is not a valid fully-qualified name.";
+            ret.push_back(std::make_pair(instance, version));
+            done = true;
+            continue;
+          }
+          if (fq_interface.package() == package) {
+            Version fq_version{fq_interface.getPackageMajorVersion(),
+                               fq_interface.getPackageMinorVersion()};
+            if (fq_version.minorAtLeast(version)) {
+              ret.push_back(std::make_pair(instance, fq_version));
+              done = true;
+              break;
+            }
+          }
+        }
+        if (!done) {
+          // Allow CheckDeprecation to proceed with some sensible default
+          ADD_FAILURE() << "getInterfaceChain() does not return interface name "
+                        << "with at least minor version'" << package << "@"
+                        << version << "'; returned values are ["
+                        << android::base::Join(iface_chain, ", ") << "]";
+          ret.push_back(std::make_pair(instance, version));
+        }
+      }
+    }
+
+    return ret;
+  };
+  string error;
+  EXPECT_EQ(android::vintf::NO_DEPRECATED_HALS,
+            VintfObject::CheckDeprecation(list_instances, &error))
+      << error;
+}
+
+static std::vector<HalManifestPtr> GetTestManifests() {
+  return {
+      VintfObject::GetFrameworkHalManifest(),
+  };
+}
+
+INSTANTIATE_TEST_CASE_P(FrameworkManifest, SingleManifestTest,
+                        ::testing::ValuesIn(GetTestManifests()));
+
+}  // namespace testing
+}  // namespace vintf
+}  // namespace android
diff --git a/treble/vintf/SystemVendorTest.h b/treble/vintf/SystemVendorTest.h
new file mode 100644
index 0000000..847acd8
--- /dev/null
+++ b/treble/vintf/SystemVendorTest.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef VTS_TREBLE_VINTF_TEST_SYSTEM_VENDOR_TEST_H_
+#define VTS_TREBLE_VINTF_TEST_SYSTEM_VENDOR_TEST_H_
+#include "VtsTrebleVintfTestBase.h"
+
+#include <gtest/gtest.h>
+
+namespace android {
+namespace vintf {
+namespace testing {
+
+// Tests the compatibility / deprecation / etc. between framework and
+// device manifest.
+class SystemVendorTest : public VtsTrebleVintfTestBase {
+ public:
+  virtual ~SystemVendorTest() {}
+  virtual void SetUp() override {
+    VtsTrebleVintfTestBase::SetUp();
+
+    vendor_manifest_ = VintfObject::GetDeviceHalManifest();
+    ASSERT_NE(vendor_manifest_, nullptr)
+        << "Failed to get vendor HAL manifest." << endl;
+
+    fwk_manifest_ = VintfObject::GetFrameworkHalManifest();
+    ASSERT_NE(fwk_manifest_, nullptr)
+        << "Failed to get framework HAL manifest." << endl;
+  }
+
+  HalManifestPtr vendor_manifest_;
+  HalManifestPtr fwk_manifest_;
+};
+
+}  // namespace testing
+}  // namespace vintf
+}  // namespace android
+
+#endif  // VTS_TREBLE_VINTF_TEST_SYSTEM_VENDOR_TEST_H_
diff --git a/treble/vintf/VintfObjectWithOdm.cpp b/treble/vintf/VintfObjectWithOdm.cpp
deleted file mode 100644
index 282e84c..0000000
--- a/treble/vintf/VintfObjectWithOdm.cpp
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "VintfObjectWithOdm.h"
-
-#include <vintf/CompatibilityMatrix.h>
-#include <vintf/parse_xml.h>
-#include <vintf/VintfObject.h>
-#include "utils.h"
-
-#include <android-base/properties.h>
-
-#include <functional>
-#include <memory>
-#include <mutex>
-
-namespace android {
-namespace vintf_with_odm {
-using namespace vintf;
-
-template <typename T>
-struct LockedUniquePtr {
-    std::unique_ptr<T> object;
-    std::mutex mutex;
-};
-
-static LockedUniquePtr<HalManifest> gProductManifest;
-static LockedUniquePtr<HalManifest> gOdmManifest;
-static LockedUniquePtr<HalManifest> gVendorManifest;
-static std::mutex gDeviceManifestMutex;
-
-static LockedUniquePtr<CompatibilityMatrix> gDeviceMatrix;
-static LockedUniquePtr<CompatibilityMatrix> gFrameworkMatrix;
-static LockedUniquePtr<RuntimeInfo> gDeviceRuntimeInfo;
-
-template <typename T, typename F>
-static const T *Get(
-        LockedUniquePtr<T> *ptr,
-        bool skipCache,
-        const F &fetchAllInformation) {
-    std::unique_lock<std::mutex> _lock(ptr->mutex);
-    if (skipCache || ptr->object == nullptr) {
-        ptr->object = std::make_unique<T>();
-        if (fetchAllInformation(ptr->object.get()) != OK) {
-            ptr->object = nullptr; // frees the old object
-        }
-    }
-    return ptr->object.get();
-}
-
-status_t fetchAllInformation(HalManifest* manifest, const std::string &path) {
-    return vintf::details::fetchAllInformation(path, gHalManifestConverter, manifest);
-}
-
-// static
-const HalManifest *VintfObject::GetDeviceHalManifest(bool skipCache) {
-    std::unique_lock<std::mutex> _lock(gDeviceManifestMutex);
-
-    std::string productModel = android::base::GetProperty("ro.boot.product.hardware.sku", "");
-    if (!productModel.empty()) {
-        auto product = Get(&gProductManifest, skipCache,
-                           std::bind(&fetchAllInformation, std::placeholders::_1,
-                                     "/odm/etc/manifest_" + productModel + ".xml"));
-        if (product != nullptr) {
-            return product;
-        }
-    }
-
-    auto odm = Get(
-        &gOdmManifest, skipCache,
-        std::bind(&fetchAllInformation, std::placeholders::_1, "/odm/etc/manifest.xml"));
-    if (odm != nullptr) {
-        return odm;
-    }
-
-    return Get(&gVendorManifest, skipCache,
-               std::bind(&fetchAllInformation, std::placeholders::_1,
-                         "/vendor/manifest.xml"));
-}
-
-// static
-const HalManifest *VintfObject::GetFrameworkHalManifest(bool skipCache) {
-    return vintf::VintfObject::GetFrameworkHalManifest(skipCache);
-}
-
-
-// static
-const CompatibilityMatrix *VintfObject::GetDeviceCompatibilityMatrix(bool skipCache) {
-    return vintf::VintfObject::GetDeviceCompatibilityMatrix(skipCache);
-}
-
-// static
-const CompatibilityMatrix *VintfObject::GetFrameworkCompatibilityMatrix(bool skipCache) {
-    return vintf::VintfObject::GetFrameworkCompatibilityMatrix(skipCache);
-}
-
-// static
-const RuntimeInfo *VintfObject::GetRuntimeInfo(bool skipCache) {
-    return vintf::VintfObject::GetRuntimeInfo(skipCache);
-}
-
-// static
-int32_t VintfObject::CheckCompatibility(const std::vector<std::string>& xmls, std::string* error,
-                                        DisabledChecks disabledChecks) {
-    return vintf::VintfObject::CheckCompatibility(xmls, error, disabledChecks);
-}
-
-
-} // namespace vintf
-} // namespace android
diff --git a/treble/vintf/VintfObjectWithOdm.h b/treble/vintf/VintfObjectWithOdm.h
deleted file mode 100644
index 336f178..0000000
--- a/treble/vintf/VintfObjectWithOdm.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ANDROID_VINTF_VINTF_OBJECT_WITH_ODM_H_
-#define ANDROID_VINTF_VINTF_OBJECT_WITH_ODM_H_
-
-#include <vintf/CompatibilityMatrix.h>
-#include <vintf/HalManifest.h>
-#include <vintf/RuntimeInfo.h>
-#include <vintf/DisabledChecks.h>
-
-namespace android {
-namespace vintf_with_odm {
-using namespace vintf;
-
-/*
- * The top level class for libvintf.
- * An overall diagram of the public API:
- * VintfObject
- *   + GetDeviceHalManfiest
- *   |   + getTransport
- *   |   + getSupportedVersions
- *   |   + checkIncompatibility
- *   + GetFrameworkHalManifest
- *   |   + getTransport
- *   |   + getSupportedVersions
- *   |   + checkIncompatibility
- *   + GetRuntimeInfo
- *       + checkCompatibility
- *
- * Each of the function gathers all information and encapsulate it into the object.
- * If no error, it return the same singleton object in the future, and the HAL manifest
- * file won't be touched again.
- * If any error, nullptr is returned, and Get will try to parse the HAL manifest
- * again when it is called again.
- * All these operations are thread-safe.
- * If skipCache, always skip the cache in memory and read the files / get runtime information
- * again from the device.
- */
-class VintfObject {
-public:
-    /*
-     * Return the API that access the device-side HAL manifest stored
-     * in /vendor/manifest.xml.
-     */
-    static const HalManifest *GetDeviceHalManifest(bool skipCache = false);
-
-    /*
-     * Return the API that access the framework-side HAL manifest stored
-     * in /system/manfiest.xml.
-     */
-    static const HalManifest *GetFrameworkHalManifest(bool skipCache = false);
-
-    /*
-     * Return the API that access the device-side compatibility matrix stored
-     * in /vendor/compatibility_matrix.xml.
-     */
-    static const CompatibilityMatrix *GetDeviceCompatibilityMatrix(bool skipCache = false);
-
-    /*
-     * Return the API that access the device-side compatibility matrix stored
-     * in /system/compatibility_matrix.xml.
-     */
-    static const CompatibilityMatrix *GetFrameworkCompatibilityMatrix(bool skipCache = false);
-
-    /*
-     * Return the API that access device runtime info.
-     */
-    static const RuntimeInfo *GetRuntimeInfo(bool skipCache = false);
-
-    /**
-     * Check compatibility, given a set of manifests / matrices in packageInfo.
-     * They will be checked against the manifests / matrices on the device.
-     *
-     * @param packageInfo a list of XMLs of HalManifest /
-     * CompatibilityMatrix objects.
-     * @param error error message
-     * @param disabledChecks flags to disable certain checks. See DisabledChecks.
-     *
-     * @return = 0 if success (compatible)
-     *         > 0 if incompatible
-     *         < 0 if any error (mount partition fails, illformed XML, etc.)
-     */
-    static int32_t CheckCompatibility(const std::vector<std::string>& packageInfo,
-                                      std::string* error = nullptr,
-                                      DisabledChecks disabledChecks = ENABLE_ALL_CHECKS);
-};
-
-} // namespace vintf
-} // namespace android
-
-#endif // ANDROID_VINTF_VINTF_OBJECT_WITH_ODM_H_
diff --git a/treble/vintf/VtsTrebleVintfTestBase.cpp b/treble/vintf/VtsTrebleVintfTestBase.cpp
new file mode 100644
index 0000000..d7a2897
--- /dev/null
+++ b/treble/vintf/VtsTrebleVintfTestBase.cpp
@@ -0,0 +1,239 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "VtsTrebleVintfTestBase.h"
+
+#include <chrono>
+#include <condition_variable>
+#include <functional>
+#include <future>
+#include <iostream>
+#include <map>
+#include <mutex>
+#include <set>
+#include <sstream>
+#include <string>
+#include <thread>
+#include <vector>
+
+#include <android-base/logging.h>
+#include <android-base/strings.h>
+#include <android/hidl/manager/1.0/IServiceManager.h>
+#include <gtest/gtest.h>
+#include <hidl-hash/Hash.h>
+#include <hidl-util/FQName.h>
+#include <hidl-util/FqInstance.h>
+#include <hidl/HidlTransportUtils.h>
+#include <hidl/ServiceManagement.h>
+#include <procpartition/procpartition.h>
+#include <vintf/HalManifest.h>
+#include <vintf/VintfObject.h>
+#include <vintf/parse_string.h>
+
+#include "SingleManifestTest.h"
+#include "utils.h"
+
+namespace android {
+namespace vintf {
+namespace testing {
+
+using android::FqInstance;
+using android::FQName;
+using android::Hash;
+using android::sp;
+using android::hardware::hidl_array;
+using android::hardware::hidl_string;
+using android::hardware::hidl_vec;
+using android::hardware::Return;
+using android::hidl::base::V1_0::IBase;
+using android::hidl::manager::V1_0::IServiceManager;
+using android::procpartition::Partition;
+using android::vintf::HalManifest;
+using android::vintf::Level;
+using android::vintf::ManifestHal;
+using android::vintf::Transport;
+using android::vintf::Version;
+using android::vintf::VintfObject;
+using android::vintf::operator<<;
+using android::vintf::to_string;
+using android::vintf::toFQNameString;
+
+using std::cout;
+using std::endl;
+using std::map;
+using std::set;
+using std::string;
+using std::vector;
+
+void VtsTrebleVintfTestBase::SetUp() {
+  default_manager_ = ::android::hardware::defaultServiceManager();
+  ASSERT_NE(default_manager_, nullptr)
+      << "Failed to get default service manager." << endl;
+}
+
+void VtsTrebleVintfTestBase::ForEachHalInstance(const HalManifestPtr &manifest,
+                                                HalVerifyFn fn) {
+  manifest->forEachInstance([manifest, fn](const auto &manifest_instance) {
+    const FQName fq_name{manifest_instance.package(),
+                         to_string(manifest_instance.version()),
+                         manifest_instance.interface()};
+    const Transport transport = manifest_instance.transport();
+    const std::string instance_name = manifest_instance.instance();
+
+    auto future_result =
+        std::async([&]() { fn(fq_name, instance_name, transport); });
+    auto timeout = std::chrono::seconds(1);
+    std::future_status status = future_result.wait_for(timeout);
+    if (status != std::future_status::ready) {
+      cout << "Timed out on: " << fq_name.string() << " " << instance_name
+           << endl;
+    }
+    return true;  // continue to next instance
+  });
+}
+
+sp<IBase> VtsTrebleVintfTestBase::GetHalService(const FQName &fq_name,
+                                                const string &instance_name,
+                                                Transport transport, bool log) {
+  return GetHalService(fq_name.string(), instance_name, transport, log);
+}
+
+sp<IBase> VtsTrebleVintfTestBase::GetHalService(const string &fq_name,
+                                                const string &instance_name,
+                                                Transport transport, bool log) {
+  using android::hardware::details::getRawServiceInternal;
+
+  if (log) {
+    cout << "Getting: " << fq_name << "/" << instance_name << endl;
+  }
+
+  // getService blocks until a service is available. In 100% of other cases
+  // where getService is used, it should be called directly. However, this test
+  // enforces that various services are actually available when they are
+  // declared, it must make a couple of precautions in case the service isn't
+  // actually available so that the proper failure can be reported.
+
+  auto task = std::packaged_task<sp<IBase>()>([fq_name, instance_name]() {
+    return getRawServiceInternal(fq_name, instance_name, true /* retry */,
+                                 false /* getStub */);
+  });
+  auto max_time = std::chrono::milliseconds(500);
+
+  // TODO(b/114157425): remove once android.hardware.renderscript@1.0-impl.so
+  // dlopen time reduced to normal level
+  if (fq_name == "android.hardware.renderscript@1.0::IDevice") {
+    max_time = std::chrono::seconds(1);
+  }
+
+  std::future<sp<IBase>> future = task.get_future();
+  std::thread(std::move(task)).detach();
+  auto status = future.wait_for(max_time);
+
+  if (status != std::future_status::ready) return nullptr;
+
+  sp<IBase> base = future.get();
+  if (base == nullptr) return nullptr;
+
+  bool wantRemote = transport == Transport::HWBINDER;
+  if (base->isRemote() != wantRemote) return nullptr;
+
+  return base;
+}
+
+vector<string> VtsTrebleVintfTestBase::GetInstanceNames(
+    const sp<IServiceManager> &manager, const FQName &fq_name) {
+  vector<string> ret;
+  auto status =
+      manager->listByInterface(fq_name.string(), [&](const auto &out) {
+        for (const auto &e : out) ret.push_back(e);
+      });
+  EXPECT_TRUE(status.isOk()) << status.description();
+  return ret;
+}
+
+vector<string> VtsTrebleVintfTestBase::GetInterfaceChain(
+    const sp<IBase> &service) {
+  vector<string> iface_chain{};
+  service->interfaceChain([&iface_chain](const hidl_vec<hidl_string> &chain) {
+    for (const auto &iface_name : chain) {
+      iface_chain.push_back(iface_name);
+    }
+  });
+  return iface_chain;
+}
+
+Partition VtsTrebleVintfTestBase::GetPartition(sp<IBase> hal_service) {
+  Partition partition = Partition::UNKNOWN;
+  auto ret = hal_service->getDebugInfo(
+      [&](const auto &info) { partition = PartitionOfProcess(info.pid); });
+  EXPECT_TRUE(ret.isOk());
+  return partition;
+}
+
+set<string> VtsTrebleVintfTestBase::GetPassthroughHals(
+    HalManifestPtr manifest) {
+  std::set<std::string> manifest_passthrough_hals_;
+
+  auto add_manifest_hals = [&manifest_passthrough_hals_](
+                               const FQName &fq_name,
+                               const string &instance_name,
+                               Transport transport) {
+    if (transport == Transport::HWBINDER) {
+      // ignore
+    } else if (transport == Transport::PASSTHROUGH) {
+      // 1.n in manifest => 1.0, 1.1, ... 1.n are all served (if they exist)
+      FQName fq = fq_name;
+      while (true) {
+        manifest_passthrough_hals_.insert(fq.string() + "/" + instance_name);
+        if (fq.getPackageMinorVersion() <= 0) break;
+        fq = fq.downRev();
+      }
+    } else {
+      ADD_FAILURE() << "Unrecognized transport: " << transport;
+    }
+  };
+  ForEachHalInstance(manifest, add_manifest_hals);
+  return manifest_passthrough_hals_;
+}
+
+set<string> VtsTrebleVintfTestBase::GetHwbinderHals(HalManifestPtr manifest) {
+  std::set<std::string> manifest_hwbinder_hals_;
+
+  auto add_manifest_hals = [&manifest_hwbinder_hals_](
+                               const FQName &fq_name,
+                               const string &instance_name,
+                               Transport transport) {
+    if (transport == Transport::HWBINDER) {
+      // 1.n in manifest => 1.0, 1.1, ... 1.n are all served (if they exist)
+      FQName fq = fq_name;
+      while (true) {
+        manifest_hwbinder_hals_.insert(fq.string() + "/" + instance_name);
+        if (fq.getPackageMinorVersion() <= 0) break;
+        fq = fq.downRev();
+      }
+    } else if (transport == Transport::PASSTHROUGH) {
+      // ignore
+    } else {
+      ADD_FAILURE() << "Unrecognized transport: " << transport;
+    }
+  };
+  ForEachHalInstance(manifest, add_manifest_hals);
+  return manifest_hwbinder_hals_;
+}
+
+}  // namespace testing
+}  // namespace vintf
+}  // namespace android
diff --git a/treble/vintf/VtsTrebleVintfTestBase.h b/treble/vintf/VtsTrebleVintfTestBase.h
new file mode 100644
index 0000000..824bdc7
--- /dev/null
+++ b/treble/vintf/VtsTrebleVintfTestBase.h
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef VTS_TREBLE_VINTF_TEST_BASE_H_
+#define VTS_TREBLE_VINTF_TEST_BASE_H_
+
+#include <string>
+#include <vector>
+
+#include <android/hidl/manager/1.0/IServiceManager.h>
+#include <gtest/gtest.h>
+#include <vintf/VintfObject.h>
+
+#include "utils.h"
+
+namespace android {
+namespace vintf {
+namespace testing {
+
+using android::sp;
+using android::hidl::base::V1_0::IBase;
+using android::hidl::manager::V1_0::IServiceManager;
+
+// Base class for many test suites. Provides some utility functions.
+class VtsTrebleVintfTestBase : public ::testing::Test {
+ public:
+  virtual ~VtsTrebleVintfTestBase() {}
+  virtual void SetUp() override;
+
+  // Applies given function to each HAL instance in VINTF.
+  static void ForEachHalInstance(const HalManifestPtr &, HalVerifyFn);
+  // Retrieves an existing HAL service.
+  static sp<IBase> GetHalService(const string &fq_name,
+                                 const string &instance_name, Transport,
+                                 bool log = true);
+  static sp<IBase> GetHalService(const FQName &fq_name,
+                                 const string &instance_name, Transport,
+                                 bool log = true);
+
+  static vector<string> GetInstanceNames(const sp<IServiceManager> &manager,
+                                         const FQName &fq_name);
+
+  static vector<string> GetInterfaceChain(const sp<IBase> &service);
+
+  static set<string> GetPassthroughHals(HalManifestPtr manifest);
+  static set<string> GetHwbinderHals(HalManifestPtr manifest);
+  Partition GetPartition(sp<IBase> hal_service);
+
+  // Default service manager.
+  sp<IServiceManager> default_manager_;
+};
+
+}  // namespace testing
+}  // namespace vintf
+}  // namespace android
+
+#endif  // VTS_TREBLE_VINTF_TEST_BASE_H_
diff --git a/treble/vintf/main.cpp b/treble/vintf/main.cpp
new file mode 100644
index 0000000..8e5a88e
--- /dev/null
+++ b/treble/vintf/main.cpp
@@ -0,0 +1,22 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <gtest/gtest.h>
+
+int main(int argc, char **argv) {
+  ::testing::InitGoogleTest(&argc, argv);
+  return RUN_ALL_TESTS();
+}
diff --git a/treble/vintf/utils.cpp b/treble/vintf/utils.cpp
new file mode 100644
index 0000000..59b3e5f
--- /dev/null
+++ b/treble/vintf/utils.cpp
@@ -0,0 +1,152 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "utils.h"
+
+#include <map>
+#include <set>
+#include <string>
+#include <vector>
+
+#include <android-base/properties.h>
+
+using android::base::GetUintProperty;
+
+namespace android {
+namespace vintf {
+namespace testing {
+
+// Path to directory on target containing test data.
+const string kDataDir = "/data/local/tmp/";
+
+// Name of file containing HAL hashes.
+const string kHashFileName = "current.txt";
+
+// Map from package name to package root.
+const map<string, string> kPackageRoot = {
+    {"android.frameworks", "frameworks/hardware/interfaces/"},
+    {"android.hardware", "hardware/interfaces/"},
+    {"android.hidl", "system/libhidl/transport/"},
+    {"android.system", "system/hardware/interfaces/"},
+};
+
+// HALs that are allowed to be passthrough under Treble rules.
+const set<string> kPassthroughHals = {
+    "android.hardware.graphics.mapper", "android.hardware.renderscript",
+    "android.hidl.memory",
+};
+
+// kFcm2ApiLevelMap is associated with API level. There can be multiple
+// Framework Compatibility Matrix Version (FCM Version) per API level, or
+// multiple API levels per FCM version.
+// kFcm2ApiLevelMap is defined apart from android::vintf::Level. Level is an
+// integer designed to be irrelevant with API level; the O / O_MR1 values are
+// historic values for convenience, and should be removed (b/70628538). Hence
+// these values are not used here.
+// For example:
+//    ...
+//    // Assume devices launch with Android X must implement FCM version >= 9
+//    X = 9,
+//    // Assume devices launch with Android Y and Android Z must implement
+//    // FCM version >= 11
+//    Y = 11,
+//    Z = 11
+const map<size_t /* Shipping API Level */, Level /* FCM Version */>
+    kFcm2ApiLevelMap{{// N. The test runs on devices that launch with N and
+                      // become a Treble device when upgrading to O.
+                      {25, static_cast<Level>(1)},
+                      // O
+                      {26, static_cast<Level>(1)},
+                      // O MR-1
+                      {27, static_cast<Level>(2)},
+                      // P
+                      {28, static_cast<Level>(3)}}};
+
+// Returns ro.product.first_api_level if it is defined and not 0. Returns
+// ro.build.version.sdk otherwise.
+uint64_t GetShippingApiLevel() {
+  uint64_t api_level =
+      GetUintProperty<uint64_t>("ro.product.first_api_level", 0);
+  if (api_level != 0) {
+    return api_level;
+  }
+  return GetUintProperty<uint64_t>("ro.build.version.sdk", 0);
+}
+
+// For a given interface returns package root if known. Returns empty string
+// otherwise.
+const string PackageRoot(const FQName &fq_iface_name) {
+  for (const auto &package_root : kPackageRoot) {
+    if (fq_iface_name.inPackage(package_root.first)) {
+      return package_root.second;
+    }
+  }
+  return "";
+}
+
+// Returns true iff HAL interface is Google-defined.
+bool IsGoogleDefinedIface(const FQName &fq_iface_name) {
+  // Package roots are only known for Google-defined packages.
+  return !PackageRoot(fq_iface_name).empty();
+}
+
+// Returns the set of released hashes for a given HAL interface.
+set<string> ReleasedHashes(const FQName &fq_iface_name) {
+  set<string> released_hashes{};
+  string err = "";
+
+  string file_path = kDataDir + PackageRoot(fq_iface_name) + kHashFileName;
+  auto hashes = Hash::lookupHash(file_path, fq_iface_name.string(), &err);
+  released_hashes.insert(hashes.begin(), hashes.end());
+  return released_hashes;
+}
+
+// Returns the partition that a HAL is associated with.
+Partition PartitionOfProcess(int32_t pid) {
+  auto partition = android::procpartition::getPartition(pid);
+
+  // TODO(b/70033981): remove once ODM and Vendor manifests are distinguished
+  if (partition == Partition::ODM) {
+    partition = Partition::VENDOR;
+  }
+
+  return partition;
+}
+
+Partition PartitionOfType(SchemaType type) {
+  switch (type) {
+    case SchemaType::DEVICE:
+      return Partition::VENDOR;
+    case SchemaType::FRAMEWORK:
+      return Partition::SYSTEM;
+  }
+  return Partition::UNKNOWN;
+}
+
+}  // namespace testing
+}  // namespace vintf
+}  // namespace android
+
+namespace std {
+void PrintTo(const android::vintf::testing::HalManifestPtr &v, ostream *os) {
+  if (v == nullptr) {
+    *os << "nullptr";
+    return;
+  }
+  *os << to_string(v->type()) << " manifest";
+}
+void PrintTo(nullptr_t, ostream *os) { *os << "nullptr"; }
+}  // namespace std
diff --git a/treble/vintf/utils.h b/treble/vintf/utils.h
index 8a5ca57..8c9c0db 100644
--- a/treble/vintf/utils.h
+++ b/treble/vintf/utils.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2017 The Android Open Source Project
+ * Copyright (C) 2018 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -14,87 +14,115 @@
  * limitations under the License.
  */
 
-#ifndef ANDROID_VINTF_UTILS_H
-#define ANDROID_VINTF_UTILS_H
+#ifndef VTS_TREBLE_VINTF_TEST_UTILS_H_
+#define VTS_TREBLE_VINTF_TEST_UTILS_H_
+#include <map>
+#include <set>
+#include <string>
+#include <vector>
 
-#include <fstream>
-#include <iostream>
-#include <sstream>
-
-#include <android-base/logging.h>
-#include <utils/Errors.h>
-
-#include <vintf/parse_xml.h>
+#include <android/hidl/manager/1.0/IServiceManager.h>
+#include <hidl-hash/Hash.h>
+#include <hidl-util/FQName.h>
+#include <hidl/HidlSupport.h>
+#include <procpartition/procpartition.h>
+#include <vintf/VintfObject.h>
+#include <vintf/parse_string.h>
 
 namespace android {
 namespace vintf {
-namespace details {
+namespace testing {
 
-// Return the file from the given location as a string.
-//
-// This class can be used to create a mock for overriding.
-class FileFetcher {
-   public:
-    virtual ~FileFetcher() {}
-    virtual status_t fetch(const std::string& path, std::string& fetched) {
-        std::ifstream in;
+using android::FQName;
+using android::Hash;
+using android::sp;
+using android::hardware::hidl_array;
+using android::hardware::hidl_string;
+using android::hardware::hidl_vec;
+using android::hardware::Return;
+using android::hidl::base::V1_0::IBase;
+using android::hidl::manager::V1_0::IServiceManager;
+using android::procpartition::Partition;
+using android::vintf::HalManifest;
+using android::vintf::Level;
+using android::vintf::ManifestHal;
+using android::vintf::SchemaType;
+using android::vintf::to_string;
+using android::vintf::Transport;
+using android::vintf::Version;
+using android::vintf::VintfObject;
 
-        in.open(path);
-        if (!in.is_open()) {
-            LOG(WARNING) << "Cannot open " << path;
-            return INVALID_OPERATION;
-        }
+using std::cout;
+using std::endl;
+using std::map;
+using std::set;
+using std::string;
 
-        std::stringstream ss;
-        ss << in.rdbuf();
-        fetched = ss.str();
+using std::vector;
 
-        return OK;
-    }
-};
+using HalVerifyFn = std::function<void(const FQName& fq_name,
+                                       const string& instance_name, Transport)>;
+using HashCharArray = hidl_array<unsigned char, 32>;
+using HalManifestPtr = std::shared_ptr<const HalManifest>;
 
-extern FileFetcher* gFetcher;
+// Path to directory on target containing test data.
+extern const string kDataDir;
+// Name of file containing HAL hashes.
+extern const string kHashFileName;
+// Map from package name to package root.
+extern const map<string, string> kPackageRoot;
+// HALs that are allowed to be passthrough under Treble rules.
+extern const set<string> kPassthroughHals;
 
-class PartitionMounter {
-   public:
-    virtual ~PartitionMounter() {}
-    virtual status_t mountSystem() const { return OK; }
-    virtual status_t mountVendor() const { return OK; }
-    virtual status_t umountSystem() const { return OK; }
-    virtual status_t umountVendor() const { return OK; }
-};
+extern const map<size_t /* Shipping API Level */, Level /* FCM Version */>
+    kFcm2ApiLevelMap;
 
-extern PartitionMounter* gPartitionMounter;
+// Returns ro.product.first_api_level if it is defined and not 0. Returns
+// ro.build.version.sdk otherwise.
+uint64_t GetShippingApiLevel();
 
+// For a given interface returns package root if known. Returns empty string
+// otherwise.
+const string PackageRoot(const FQName& fq_iface_name);
+
+// Returns true iff HAL interface is Google-defined.
+bool IsGoogleDefinedIface(const FQName& fq_iface_name);
+
+// Returns the set of released hashes for a given HAL interface.
+set<string> ReleasedHashes(const FQName& fq_iface_name);
+
+// Returns the partition that a HAL is associated with.
+Partition PartitionOfProcess(int32_t pid);
+
+// Returns SYSTEM for FRAMEWORK, VENDOR for DEVICE.
+Partition PartitionOfType(SchemaType type);
+
+}  // namespace testing
+}  // namespace vintf
+
+// Allows GTest to print pointers with a human readable string.
 template <typename T>
-status_t fetchAllInformation(const std::string& path, const XmlConverter<T>& converter,
-                             T* outObject) {
-    std::string info;
-
-    if (gFetcher == nullptr) {
-        // Should never happen.
-        return NO_INIT;
-    }
-
-    status_t result = gFetcher->fetch(path, info);
-
-    if (result != OK) {
-        return result;
-    }
-
-    bool success = converter(outObject, info);
-    if (!success) {
-        LOG(ERROR) << "Illformed file: " << path << ": "
-                   << converter.lastError();
-        return BAD_VALUE;
-    }
-    return OK;
+void PrintTo(const sp<T>& v, std::ostream* os) {
+  *os << android::hardware::details::toHexString<uintptr_t>(
+      reinterpret_cast<uintptr_t>(&*v), true /* prefix */);
+}
+template <typename T>
+void PrintTo(const T* v, std::ostream* os) {
+  *os << android::hardware::details::toHexString<uintptr_t>(
+      reinterpret_cast<uintptr_t>(v), true /* prefix */);
 }
 
-}  // namespace details
-}  // namespace vintf
 }  // namespace android
 
+// Allows GTest to print pointers with a human readable string.
+namespace std {
+void PrintTo(const android::vintf::testing::HalManifestPtr& v, ostream* os);
+void PrintTo(nullptr_t, ostream* os);
+template <typename T>
+void PrintTo(const T* v, ostream* os) {
+  *os << android::hardware::details::toHexString<uintptr_t>(
+      reinterpret_cast<uintptr_t>(v), true /* prefix */);
+}
+}  // namespace std
 
-
-#endif
+#endif  // VTS_TREBLE_VINTF_TEST_UTILS_H_
diff --git a/treble/vintf/vts_treble_vintf_test.cpp b/treble/vintf/vts_treble_vintf_test_o_mr1.cpp
similarity index 61%
rename from treble/vintf/vts_treble_vintf_test.cpp
rename to treble/vintf/vts_treble_vintf_test_o_mr1.cpp
index 15b63d1..4ee7dd6 100644
--- a/treble/vintf/vts_treble_vintf_test.cpp
+++ b/treble/vintf/vts_treble_vintf_test_o_mr1.cpp
@@ -31,20 +31,28 @@
 #include <hidl-util/FQName.h>
 #include <hidl/ServiceManagement.h>
 #include <vintf/HalManifest.h>
-#include <vintf/parse_xml.h>    // b/77293161
-#include "VintfObjectWithOdm.h" // b/77293161
+#include <vintf/VintfObject.h>
+#include <vintf/parse_string.h>
+
+#include "VtsTrebleVintfTestBase.h"
+
+namespace android {
+namespace vintf {
+namespace testing {
+namespace legacy {
 
 using android::FQName;
 using android::Hash;
+using android::sp;
 using android::hardware::hidl_array;
 using android::hardware::hidl_string;
 using android::hardware::hidl_vec;
 using android::hidl::manager::V1_0::IServiceManager;
-using android::sp;
 using android::vintf::HalManifest;
+using android::vintf::to_string;
 using android::vintf::Transport;
 using android::vintf::Version;
-using android::vintf_with_odm::VintfObject;
+using android::vintf::VintfObject;
 
 using std::cout;
 using std::endl;
@@ -54,43 +62,6 @@
 using std::vector;
 using HalVerifyFn =
     std::function<void(const FQName &fq_name, const string &instance_name)>;
-using HashCharArray = hidl_array<unsigned char, 32>;
-
-// Path to directory on target containing test data.
-static const string kDataDir = "/data/local/tmp/";
-
-// Name of file containing HAL hashes.
-static const string kHashFileName = "current.txt";
-
-// Map from package name to package root.
-static const map<string, string> kPackageRoot = {
-    {"android.frameworks", "frameworks/hardware/interfaces/"},
-    {"android.hardware", "hardware/interfaces/"},
-    {"android.hidl", "system/libhidl/transport/"},
-    {"android.system", "system/hardware/interfaces/"},
-};
-
-// HALs that are allowed to be passthrough under Treble rules.
-static const set<string> kPassthroughHals = {
-    "android.hardware.graphics.mapper", "android.hardware.renderscript",
-};
-
-// For a given interface returns package root if known. Returns empty string
-// otherwise.
-static const string PackageRoot(const FQName &fq_iface_name) {
-  for (const auto &package_root : kPackageRoot) {
-    if (fq_iface_name.inPackage(package_root.first)) {
-      return package_root.second;
-    }
-  }
-  return "";
-}
-
-// Returns true iff HAL interface is Google-defined.
-static bool IsGoogleDefinedIface(const FQName &fq_iface_name) {
-  // Package roots are only known for Google-defined packages.
-  return !PackageRoot(fq_iface_name).empty();
-}
 
 // Returns true iff HAL interface is exempt from following rules:
 // 1. If an interface is declared in VINTF, it has to be served on the device.
@@ -102,17 +73,6 @@
          !IsGoogleDefinedIface(fq_iface_name);
 }
 
-// Returns the set of released hashes for a given HAL interface.
-static set<string> ReleasedHashes(const FQName &fq_iface_name) {
-  set<string> released_hashes{};
-  string err = "";
-
-  string file_path = kDataDir + PackageRoot(fq_iface_name) + kHashFileName;
-  auto hashes = Hash::lookupHash(file_path, fq_iface_name.string(), &err);
-  released_hashes.insert(hashes.begin(), hashes.end());
-  return released_hashes;
-}
-
 class VtsTrebleVintfTest : public ::testing::Test {
  public:
   virtual void SetUp() override {
@@ -140,36 +100,25 @@
   // Passthrough service manager.
   sp<IServiceManager> passthrough_manager_;
   // Vendor hal manifest.
-  const HalManifest *vendor_manifest_;
+  std::shared_ptr<const HalManifest> vendor_manifest_;
 };
 
 void VtsTrebleVintfTest::ForEachHalInstance(HalVerifyFn fn) {
-  auto hal_names = vendor_manifest_->getHalNames();
-  for (const auto &hal_name : hal_names) {
-    auto versions = vendor_manifest_->getSupportedVersions(hal_name);
-    auto iface_names = vendor_manifest_->getInterfaceNames(hal_name);
-    for (const auto &iface_name : iface_names) {
-      auto instance_names =
-          vendor_manifest_->getInstances(hal_name, iface_name);
-      for (const auto &version : versions) {
-        for (const auto &instance_name : instance_names) {
-          string major_ver = std::to_string(version.majorVer);
-          string minor_ver = std::to_string(version.minorVer);
-          string full_ver = major_ver + "." + minor_ver;
-          FQName fq_name{hal_name, full_ver, iface_name};
+  vendor_manifest_->forEachInstance([fn](const auto &manifest_instance) {
+    const FQName fq_name{manifest_instance.package(),
+                         to_string(manifest_instance.version()),
+                         manifest_instance.interface()};
+    const std::string instance_name = manifest_instance.instance();
 
-          auto future_result =
-              std::async([&]() { fn(fq_name, instance_name); });
-          auto timeout = std::chrono::milliseconds(500);
-          std::future_status status = future_result.wait_for(timeout);
-          if (status != std::future_status::ready) {
-            cout << "Timed out on: " << fq_name.string() << " " << instance_name
-                 << endl;
-          }
-        }
-      }
+    auto future_result = std::async([&]() { fn(fq_name, instance_name); });
+    auto timeout = std::chrono::milliseconds(500);
+    std::future_status status = future_result.wait_for(timeout);
+    if (status != std::future_status::ready) {
+      cout << "Timed out on: " << fq_name.string() << " " << instance_name
+           << endl;
     }
-  }
+    return true;  // continue to next instance
+  });
 }
 
 sp<android::hidl::base::V1_0::IBase> VtsTrebleVintfTest::GetHalService(
@@ -184,13 +133,8 @@
   Transport transport = vendor_manifest_->getTransport(
       hal_name, version, iface_name, instance_name);
 
-  android::sp<android::hidl::base::V1_0::IBase> hal_service = nullptr;
-  if (transport == Transport::HWBINDER) {
-    hal_service = default_manager_->get(fq_iface_name, instance_name);
-  } else if (transport == Transport::PASSTHROUGH) {
-    hal_service = passthrough_manager_->get(fq_iface_name, instance_name);
-  }
-  return hal_service;
+  return VtsTrebleVintfTestBase::GetHalService(fq_name, instance_name,
+                                               transport);
 }
 
 // Tests that no HAL outside of the allowed set is specified as passthrough in
@@ -227,7 +171,7 @@
   HalVerifyFn is_available = [this](const FQName &fq_name,
                                     const string &instance_name) {
     if (IsExempt(fq_name)) {
-      cout << fq_name.string() << " is exempt." << endl;
+      cout << fq_name.string() << " is exempt for O-MR1 vendor." << endl;
       return;
     }
 
@@ -251,7 +195,7 @@
 
     if (hal_service == nullptr) {
       if (IsExempt(fq_name)) {
-        cout << fq_name.string() << " is exempt." << endl;
+        cout << fq_name.string() << " is exempt for O-MR1 vendor." << endl;
       } else {
         ADD_FAILURE() << fq_name.package() << " not available." << endl;
       }
@@ -278,7 +222,12 @@
 
     ASSERT_EQ(iface_chain.size(), hash_chain.size());
     for (size_t i = 0; i < iface_chain.size(); ++i) {
-      FQName fq_iface_name{iface_chain[i]};
+      FQName fq_iface_name;
+      if (!FQName::parse(iface_chain[i], &fq_iface_name)) {
+        ADD_FAILURE() << "Could not parse iface name " << iface_chain[i]
+                      << " from interface chain of " << fq_name.string();
+        return;
+      }
       string hash = hash_chain[i];
 
       if (IsGoogleDefinedIface(fq_iface_name)) {
@@ -294,33 +243,7 @@
   ForEachHalInstance(is_released);
 }
 
-// Tests that vendor and framework are compatible.
-TEST(CompatiblityTest, VendorFrameworkCompatibility) {
-  string error;
-
-  EXPECT_TRUE(VintfObject::GetDeviceHalManifest()->checkCompatibility(
-      *VintfObject::GetFrameworkCompatibilityMatrix(), &error))
-      << error;
-
-  EXPECT_TRUE(VintfObject::GetFrameworkHalManifest()->checkCompatibility(
-      *VintfObject::GetDeviceCompatibilityMatrix(), &error))
-      << error;
-
-  // AVB version is not a compliance requirement.
-  EXPECT_TRUE(VintfObject::GetRuntimeInfo()->checkCompatibility(
-      *VintfObject::GetFrameworkCompatibilityMatrix(), &error,
-      ::android::vintf::DISABLE_AVB_CHECK))
-      << error;
-
-  const std::string &deviceManifest = ::android::vintf::gHalManifestConverter(
-      *VintfObject::GetDeviceHalManifest());
-  EXPECT_EQ(
-      0, VintfObject::CheckCompatibility({deviceManifest}, &error,
-                                         ::android::vintf::DISABLE_AVB_CHECK))
-      << error;
-}
-
-int main(int argc, char **argv) {
-  ::testing::InitGoogleTest(&argc, argv);
-  return RUN_ALL_TESTS();
-}
+}  // namespace legacy
+}  // namespace testing
+}  // namespace vintf
+}  // namespace android
diff --git a/tv/Android.bp b/tv/Android.bp
deleted file mode 100644
index 4cb3cb0..0000000
--- a/tv/Android.bp
+++ /dev/null
@@ -1,7 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "cec/V1_0",
-    "input/V1_0",
-]
diff --git a/tv/cec/V1_0/Android.bp b/tv/cec/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/tv/cec/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/tv/cec/V1_0/build/Android.bp b/tv/cec/V1_0/build/Android.bp
index 8c4cd99..cb51251 100644
--- a/tv/cec/V1_0/build/Android.bp
+++ b/tv/cec/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.tv.cec@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.tv.cec@1.0_hal",
     ],
@@ -18,7 +19,7 @@
 genrule {
     name: "android.hardware.tv.cec@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tv.cec@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/tv/cec/1.0/ $(genDir)/android/hardware/tv/cec/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tv.cec@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/tv/cec/1.0/ $(genDir)/android/hardware/tv/cec/1.0/",
     srcs: [
         ":android.hardware.tv.cec@1.0_hal",
     ],
@@ -32,7 +33,7 @@
 genrule {
     name: "android.hardware.tv.cec@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tv.cec@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/tv/cec/1.0/ $(genDir)/android/hardware/tv/cec/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tv.cec@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/tv/cec/1.0/ $(genDir)/android/hardware/tv/cec/1.0/",
     srcs: [
         ":android.hardware.tv.cec@1.0_hal",
     ],
@@ -48,36 +49,10 @@
     generated_sources: ["android.hardware.tv.cec@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.tv.cec@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.tv.cec@1.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.tv.cec@1.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -85,7 +60,7 @@
 genrule {
     name: "android.hardware.tv.cec@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tv.cec@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/tv/cec/1.0/ $(genDir)/android/hardware/tv/cec/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tv.cec@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/tv/cec/1.0/ $(genDir)/android/hardware/tv/cec/1.0/",
     srcs: [
         ":android.hardware.tv.cec@1.0_hal",
     ],
@@ -99,7 +74,7 @@
 genrule {
     name: "android.hardware.tv.cec@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tv.cec@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/tv/cec/1.0/ $(genDir)/android/hardware/tv/cec/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tv.cec@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/tv/cec/1.0/ $(genDir)/android/hardware/tv/cec/1.0/",
     srcs: [
         ":android.hardware.tv.cec@1.0_hal",
     ],
@@ -115,27 +90,10 @@
     generated_sources: ["android.hardware.tv.cec@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.tv.cec@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.tv.cec@1.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.tv.cec@1.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/tv/cec/V1_0/host/AndroidTest.xml b/tv/cec/V1_0/host/AndroidTest.xml
index 9133b03..a569bc2 100644
--- a/tv/cec/V1_0/host/AndroidTest.xml
+++ b/tv/cec/V1_0/host/AndroidTest.xml
@@ -24,11 +24,9 @@
         <option name="push" value="spec/hardware/interfaces/tv/cec/1.0/vts/types.vts->/data/local/tmp/spec/android/hardware/tv/cec/1.0/types.vts"/>
         <option name="push" value="DATA/lib/android.hardware.tv.cec@1.0-vts.driver.so->/data/local/tmp/32/android.hardware.tv.cec@1.0-vts.driver.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalTvCecV1_0Host"/>
         <option name="test-case-path" value="vts/testcases/hal/tv/cec/V1_0/host/VtsHalTvCecV1_0HostTest"/>
-        <option name="precondition-lshal" value="android.hardware.tv.cec@1.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/tv/cec/V1_0/host/VtsHalTvCecV1_0HostTest.py b/tv/cec/V1_0/host/VtsHalTvCecV1_0HostTest.py
index 779870f..456cb53 100644
--- a/tv/cec/V1_0/host/VtsHalTvCecV1_0HostTest.py
+++ b/tv/cec/V1_0/host/VtsHalTvCecV1_0HostTest.py
@@ -18,39 +18,19 @@
 import logging
 import time
 
-from vts.proto import ComponentSpecificationMessage_pb2 as CompSpecMsg
 from vts.runners.host import asserts
-from vts.runners.host import base_test
-from vts.runners.host import const
-from vts.runners.host import keys
 from vts.runners.host import test_runner
-from vts.utils.python.controllers import android_device
-from vts.utils.python.precondition import precondition_utils
+from vts.testcases.template.hal_hidl_host_test import hal_hidl_host_test
 
+TVCEC_V1_0_HAL = "android.hardware.tv.cec@1.0::IHdmiCec"
 
-class TvCecHidlTest(base_test.BaseTestClass):
+class TvCecHidlTest(hal_hidl_host_test.HalHidlHostTest):
     """Host testcase class for the TV HDMI_CEC HIDL HAL."""
 
+    TEST_HAL_SERVICES = {TVCEC_V1_0_HAL}
     def setUpClass(self):
         """Creates a mirror and init tv hdmi cec hal service."""
-        self.dut = self.registerController(android_device)[0]
-
-        self.dut.shell.InvokeTerminal("one")
-        self.dut.shell.one.Execute("setenforce 0")  # SELinux permissive mode
-        if not precondition_utils.CanRunHidlHalTest(
-            self, self.dut, self.dut.shell.one):
-            self._skip_all_testcases = True
-            return
-
-        self.dut.shell.one.Execute(
-            "setprop vts.hal.vts.hidl.get_stub true")
-
-        if self.coverage.enabled:
-            self.coverage.LoadArtifacts()
-            self.coverage.InitializeDeviceCoverage(self.dut)
-
-        if self.profiling.enabled:
-            self.profiling.EnableVTSProfiling(self.dut.shell.one)
+        super(TvCecHidlTest, self).setUpClass()
 
         self.dut.hal.InitHidlHal(
             target_type="tv_cec",
@@ -58,6 +38,7 @@
             target_version=1.0,
             target_package="android.hardware.tv.cec",
             target_component_name="IHdmiCec",
+            hw_binder_service_name=self.getHalServiceName(TVCEC_V1_0_HAL),
             bits=int(self.abi_bitness))
 
         time.sleep(1) # Wait for hal to be ready
@@ -65,30 +46,6 @@
         self.vtypes = self.dut.hal.tv_cec.GetHidlTypeInterface("types")
         logging.info("tv_cec types: %s", self.vtypes)
 
-    def setUp(self):
-        """Setup function that will be called every time before executing each
-        test case in the test class."""
-        if self.profiling.enabled:
-            self.profiling.EnableVTSProfiling(self.dut.shell.one)
-
-    def tearDown(self):
-        """TearDown function that will be called every time after executing each
-        test case in the test class."""
-        if self.profiling.enabled:
-            self.profiling.ProcessTraceDataForTestCase(self.dut)
-            self.profiling.DisableVTSProfiling(self.dut.shell.one)
-
-    def tearDownClass(self):
-        """To be executed when all test cases are finished."""
-        if self._skip_all_testcases:
-            return
-
-        if self.coverage.enabled:
-            self.coverage.SetCoverageData(dut=self.dut, isGlobal=True)
-
-        if self.profiling.enabled:
-            self.profiling.ProcessAndUploadTraceData()
-
     def testClearAndAddLogicalAddress(self):
         """A simple test case which sets logical address and clears it."""
         self.dut.hal.tv_cec.clearLogicalAddress()
diff --git a/tv/cec/V1_0/host_profiling/AndroidTest.xml b/tv/cec/V1_0/host_profiling/AndroidTest.xml
index a8be952..b488801 100644
--- a/tv/cec/V1_0/host_profiling/AndroidTest.xml
+++ b/tv/cec/V1_0/host_profiling/AndroidTest.xml
@@ -25,12 +25,10 @@
         <option name="push" value="DATA/lib/android.hardware.tv.cec@1.0-vts.driver.so->/data/local/tmp/32/android.hardware.tv.cec@1.0-vts.driver.so"/>
         <option name="push" value="DATA/lib/android.hardware.tv.cec@1.0-vts.profiler.so->/data/local/tmp/32/android.hardware.tv.cec@1.0-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalTvCecV1_0HostProfiling"/>
         <option name="test-case-path" value="vts/testcases/hal/tv/cec/V1_0/host/VtsHalTvCecV1_0HostTest"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.tv.cec@1.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/tv/input/V1_0/Android.bp b/tv/input/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/tv/input/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/tv/input/V1_0/build/Android.bp b/tv/input/V1_0/build/Android.bp
index 99edc91..ad4b529 100644
--- a/tv/input/V1_0/build/Android.bp
+++ b/tv/input/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.tv.input@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.tv.input@1.0_hal",
     ],
@@ -18,7 +19,7 @@
 genrule {
     name: "android.hardware.tv.input@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tv.input@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/tv/input/1.0/ $(genDir)/android/hardware/tv/input/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tv.input@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/tv/input/1.0/ $(genDir)/android/hardware/tv/input/1.0/",
     srcs: [
         ":android.hardware.tv.input@1.0_hal",
     ],
@@ -32,7 +33,7 @@
 genrule {
     name: "android.hardware.tv.input@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tv.input@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/tv/input/1.0/ $(genDir)/android/hardware/tv/input/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tv.input@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/tv/input/1.0/ $(genDir)/android/hardware/tv/input/1.0/",
     srcs: [
         ":android.hardware.tv.input@1.0_hal",
     ],
@@ -48,38 +49,13 @@
     generated_sources: ["android.hardware.tv.input@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.tv.input@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.tv.input@1.0-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
     shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+        "android.hardware.audio.common@2.0-vts.driver",
+    ],
+    static_libs: [
+        "android.hardware.audio.common@2.0",
         "android.hardware.tv.input@1.0",
-        "android.hardware.audio.common@2.0",
-        "android.hardware.audio.common@2.0-vts.driver",
-    ],
-    export_shared_lib_headers: [
-        "android.hardware.audio.common@2.0",
-        "android.hardware.audio.common@2.0-vts.driver",
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -87,7 +63,7 @@
 genrule {
     name: "android.hardware.tv.input@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tv.input@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/tv/input/1.0/ $(genDir)/android/hardware/tv/input/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tv.input@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/tv/input/1.0/ $(genDir)/android/hardware/tv/input/1.0/",
     srcs: [
         ":android.hardware.tv.input@1.0_hal",
     ],
@@ -101,7 +77,7 @@
 genrule {
     name: "android.hardware.tv.input@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tv.input@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/tv/input/1.0/ $(genDir)/android/hardware/tv/input/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.tv.input@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/tv/input/1.0/ $(genDir)/android/hardware/tv/input/1.0/",
     srcs: [
         ":android.hardware.tv.input@1.0_hal",
     ],
@@ -117,28 +93,13 @@
     generated_sources: ["android.hardware.tv.input@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.tv.input@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.tv.input@1.0-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
     shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
-        "android.hardware.tv.input@1.0",
-        "android.hardware.audio.common@2.0",
         "android.hardware.audio.common@2.0-vts.profiler",
     ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
+    static_libs: [
+        "android.hardware.audio.common@2.0",
+        "android.hardware.tv.input@1.0",
     ],
 }
 
diff --git a/tv/input/V1_0/host/AndroidTest.xml b/tv/input/V1_0/host/AndroidTest.xml
index 0f7a01c..7bc8930 100644
--- a/tv/input/V1_0/host/AndroidTest.xml
+++ b/tv/input/V1_0/host/AndroidTest.xml
@@ -27,11 +27,9 @@
         <option name="push" value="spec/hardware/interfaces/tv/input/1.0/vts/types.vts->/data/local/tmp/spec/android/hardware/tv/input/1.0/types.vts"/>
         <option name="push" value="DATA/lib/android.hardware.tv.input@1.0-vts.driver.so->/data/local/tmp/32/android.hardware.tv.input@1.0-vts.driver.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalTvInputV1_0Host"/>
         <option name="test-case-path" value="vts/testcases/hal/tv/input/V1_0/host/VtsHalTvInputV1_0HostTest"/>
-        <option name="precondition-lshal" value="android.hardware.tv.input@1.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/tv/input/V1_0/host/VtsHalTvInputV1_0HostTest.py b/tv/input/V1_0/host/VtsHalTvInputV1_0HostTest.py
index 305c4f5..147bdcd 100644
--- a/tv/input/V1_0/host/VtsHalTvInputV1_0HostTest.py
+++ b/tv/input/V1_0/host/VtsHalTvInputV1_0HostTest.py
@@ -18,64 +18,29 @@
 import logging
 
 from vts.runners.host import asserts
-from vts.runners.host import base_test
-from vts.runners.host import const
-from vts.runners.host import keys
 from vts.runners.host import test_runner
-from vts.utils.python.controllers import android_device
-from vts.utils.python.precondition import precondition_utils
+from vts.testcases.template.hal_hidl_host_test import hal_hidl_host_test
+
+TVINPUT_V1_0_HAL = "android.hardware.tv.input@1.0::ITvInput"
 
 
-class TvInputHidlTest(base_test.BaseTestClass):
+class TvInputHidlTest(hal_hidl_host_test.HalHidlHostTest):
     """Two hello world test cases which use the shell driver."""
 
+    TEST_HAL_SERVICES = {TVINPUT_V1_0_HAL}
+
     def setUpClass(self):
         """Creates a mirror and init tv input hal."""
-        self.dut = self.registerController(android_device)[0]
+        super(TvInputHidlTest, self).setUpClass()
 
-        self.dut.shell.InvokeTerminal("one")
-        self.dut.shell.one.Execute("setenforce 0")  # SELinux permissive mode
-        if not precondition_utils.CanRunHidlHalTest(
-            self, self.dut, self.dut.shell.one):
-            self._skip_all_testcases = True
-            return
-
-        if self.coverage.enabled:
-            self.coverage.LoadArtifacts()
-            self.coverage.InitializeDeviceCoverage(self.dut)
-
-        self.dut.hal.InitHidlHal(target_type="tv_input",
-                                 target_basepaths=self.dut.libPaths,
-                                 target_version=1.0,
-                                 target_package="android.hardware.tv.input",
-                                 target_component_name="ITvInput",
-                                 bits=int(self.abi_bitness))
-
-        self.dut.shell.InvokeTerminal("one")
-
-    def setUp(self):
-        """Setup function that will be called every time before executing each
-        test case in the test class."""
-        if self.profiling.enabled:
-            self.profiling.EnableVTSProfiling(self.dut.shell.one)
-
-    def tearDown(self):
-        """TearDown function that will be called every time after executing each
-        test case in the test class."""
-        if self.profiling.enabled:
-            self.profiling.ProcessTraceDataForTestCase(self.dut)
-            self.profiling.DisableVTSProfiling(self.dut.shell.one)
-
-    def tearDownClass(self):
-        """To be executed when all test cases are finished."""
-        if self._skip_all_testcases:
-            return
-
-        if self.coverage.enabled:
-            self.coverage.SetCoverageData(dut=self.dut, isGlobal=True)
-
-        if self.profiling.enabled:
-            self.profiling.ProcessAndUploadTraceData()
+        self.dut.hal.InitHidlHal(
+            target_type="tv_input",
+            target_basepaths=self.dut.libPaths,
+            target_version=1.0,
+            target_package="android.hardware.tv.input",
+            target_component_name="ITvInput",
+            hw_binder_service_name=self.getHalServiceName(TVINPUT_V1_0_HAL),
+            bits=int(self.abi_bitness))
 
     def testGetStreamConfigurations(self):
         configs = self.dut.hal.tv_input.getStreamConfigurations(0)
diff --git a/tv/input/V1_0/host_profiling/AndroidTest.xml b/tv/input/V1_0/host_profiling/AndroidTest.xml
index eee43e5..e6c3baf 100644
--- a/tv/input/V1_0/host_profiling/AndroidTest.xml
+++ b/tv/input/V1_0/host_profiling/AndroidTest.xml
@@ -29,12 +29,10 @@
         <option name="push" value="DATA/lib/android.hardware.audio.common@2.0-vts.profiler.so->/data/local/tmp/32/android.hardware.audio.common@2.0-vts.profiler.so"/>
         <option name="push" value="DATA/lib/android.hardware.tv.input@1.0-vts.profiler.so->/data/local/tmp/32/android.hardware.tv.input@1.0-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalTvInputV1_0HostProfiling"/>
         <option name="test-case-path" value="vts/testcases/hal/tv/input/V1_0/host/VtsHalTvInputV1_0HostTest"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.tv.input@1.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/tv/input/V1_0/target/AndroidTest.xml b/tv/input/V1_0/target/AndroidTest.xml
index 4eedb2a..75a847a 100644
--- a/tv/input/V1_0/target/AndroidTest.xml
+++ b/tv/input/V1_0/target/AndroidTest.xml
@@ -19,14 +19,12 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalTvInputV1_0Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalTvInputV1_0TargetTest/VtsHalTvInputV1_0TargetTest"/>
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.tv.input@1.0"/>
         <!-- Needs about 50 seconds if no device. Needs about 15 seconds for every additional device -->
         <option name="test-timeout" value="15m"/>
     </test>
diff --git a/tv/input/V1_0/target_profiling/AndroidTest.xml b/tv/input/V1_0/target_profiling/AndroidTest.xml
index 43304c4..0576c96 100644
--- a/tv/input/V1_0/target_profiling/AndroidTest.xml
+++ b/tv/input/V1_0/target_profiling/AndroidTest.xml
@@ -22,7 +22,6 @@
         <option name="push" value="DATA/lib/android.hardware.audio.common@2.0-vts.profiler.so->/data/local/tmp/32/android.hardware.audio.common@2.0-vts.profiler.so"/>
         <option name="push" value="DATA/lib/android.hardware.tv.input@1.0-vts.profiler.so->/data/local/tmp/32/android.hardware.tv.input@1.0-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalTvInputV1_0TargetProfiling"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalTvInputV1_0TargetTest/VtsHalTvInputV1_0TargetTest"/>
@@ -30,7 +29,6 @@
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.tv.input@1.0"/>
         <!-- Needs about 50 seconds if no device. Needs about 15 seconds for every additional device -->
         <option name="test-timeout" value="15m"/>
     </test>
diff --git a/usb/Android.bp b/usb/Android.bp
deleted file mode 100644
index 2e98897..0000000
--- a/usb/Android.bp
+++ /dev/null
@@ -1,7 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "V1_0",
-    "V1_1",
-]
diff --git a/usb/V1_0/Android.bp b/usb/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/usb/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/usb/V1_0/build/Android.bp b/usb/V1_0/build/Android.bp
index 9f7ce78..a049b24 100644
--- a/usb/V1_0/build/Android.bp
+++ b/usb/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.usb@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.usb@1.0_hal",
     ],
@@ -18,7 +19,7 @@
 genrule {
     name: "android.hardware.usb@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.usb@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/usb/1.0/ $(genDir)/android/hardware/usb/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.usb@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/usb/1.0/ $(genDir)/android/hardware/usb/1.0/",
     srcs: [
         ":android.hardware.usb@1.0_hal",
     ],
@@ -32,7 +33,7 @@
 genrule {
     name: "android.hardware.usb@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.usb@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/usb/1.0/ $(genDir)/android/hardware/usb/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.usb@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/usb/1.0/ $(genDir)/android/hardware/usb/1.0/",
     srcs: [
         ":android.hardware.usb@1.0_hal",
     ],
@@ -48,36 +49,10 @@
     generated_sources: ["android.hardware.usb@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.usb@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.usb@1.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.usb@1.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -85,7 +60,7 @@
 genrule {
     name: "android.hardware.usb@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.usb@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/usb/1.0/ $(genDir)/android/hardware/usb/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.usb@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/usb/1.0/ $(genDir)/android/hardware/usb/1.0/",
     srcs: [
         ":android.hardware.usb@1.0_hal",
     ],
@@ -99,7 +74,7 @@
 genrule {
     name: "android.hardware.usb@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.usb@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/usb/1.0/ $(genDir)/android/hardware/usb/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.usb@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/usb/1.0/ $(genDir)/android/hardware/usb/1.0/",
     srcs: [
         ":android.hardware.usb@1.0_hal",
     ],
@@ -115,27 +90,10 @@
     generated_sources: ["android.hardware.usb@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.usb@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.usb@1.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.usb@1.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/usb/V1_0/target/AndroidTest.xml b/usb/V1_0/target/AndroidTest.xml
index af0c241..d8fd1a7 100644
--- a/usb/V1_0/target/AndroidTest.xml
+++ b/usb/V1_0/target/AndroidTest.xml
@@ -19,7 +19,6 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalUsbV1_0Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalUsbV1_0TargetTest/VtsHalUsbV1_0TargetTest"/>
@@ -27,7 +26,6 @@
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.usb@1.0"/>
         <option name="exclude-filter" value="UsbHidlTest.switchModetoDFP" />
         <option name="test-timeout" value="15m"/>
     </test>
diff --git a/usb/V1_0/target_profiling/AndroidTest.xml b/usb/V1_0/target_profiling/AndroidTest.xml
index 1aa31f0..aecb7db 100644
--- a/usb/V1_0/target_profiling/AndroidTest.xml
+++ b/usb/V1_0/target_profiling/AndroidTest.xml
@@ -22,7 +22,6 @@
         <option name="push" value="DATA/lib/android.hardware.usb@1.0-vts.profiler.so->/data/local/tmp/32/android.hardware.usb@1.0-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.usb@1.0-vts.profiler.so->/data/local/tmp/64/android.hardware.usb@1.0-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalUsbV1_0TargetProfiling"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalUsbV1_0TargetTest/VtsHalUsbV1_0TargetTest"/>
@@ -31,7 +30,6 @@
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.usb@1.0"/>
         <option name="exclude-filter" value="UsbHidlTest.switchModetoDFP" />
         <option name="test-timeout" value="15m"/>
     </test>
diff --git a/usb/V1_0/target_replay/AndroidTest.xml b/usb/V1_0/target_replay/AndroidTest.xml
index 8f166e4..0a157b4 100644
--- a/usb/V1_0/target_replay/AndroidTest.xml
+++ b/usb/V1_0/target_replay/AndroidTest.xml
@@ -25,14 +25,10 @@
         <option name="push" value="DATA/lib/android.hardware.usb@1.0-vts.driver.so->/data/local/tmp/32/android.hardware.usb@1.0-vts.driver.so"/>
         <option name="push" value="DATA/lib64/android.hardware.usb@1.0-vts.driver.so->/data/local/tmp/64/android.hardware.usb@1.0-vts.driver.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalUsbV1_0TargetReplay"/>
         <option name="binary-test-type" value="hal_hidl_replay_test"/>
         <option name="hal-hidl-replay-test-trace-path" value="test/vts-testcase/hal-trace/usb/V1_0/android.hardware.usb_1.0_704343228913.vts.trace"/>
-        <option name="hal-hidl-package-name" value="android.hardware.usb@1.0"/>
-        <option name="precondition-lshal" value="android.hardware.usb@1.0"/>
-        <option name="exclude-filter" value="UsbHidlTest.switchModetoDFP" />
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/usb/V1_1/Android.bp b/usb/V1_1/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/usb/V1_1/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/radio/V1_1/target/Android.mk b/usb/V1_1/adapter/Android.mk
similarity index 81%
copy from radio/V1_1/target/Android.mk
copy to usb/V1_1/adapter/Android.mk
index bd1a0f1..d869f34 100644
--- a/radio/V1_1/target/Android.mk
+++ b/usb/V1_1/adapter/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalUsbV1_1Adapter
+VTS_CONFIG_SRC_DIR := testcases/hal/usb/V1_1/adapter
 include test/vts/tools/build/Android.host_config.mk
diff --git a/usb/V1_1/adapter/AndroidTest.xml b/usb/V1_1/adapter/AndroidTest.xml
new file mode 100644
index 0000000..4029f2a
--- /dev/null
+++ b/usb/V1_1/adapter/AndroidTest.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS VtsHalUsbV1_1Adapter test cases">
+    <option key="plan" name="config-descriptor:metadata" value="vts-hal-adapter"/>
+    <object class="com.android.tradefed.module.VtsHalAdapterModuleController" type="module_controller">
+        <option name="hal-package-name" value="android.hardware.usb@1.1"/>
+    </object>
+    <target_preparer class="com.android.tradefed.targetprep.VtsHalAdapterPreparer">
+        <option name="adapter-binary-name" value="android.hardware.usb@1.0-adapter"/>
+        <option name="hal-package-name" value="android.hardware.usb@1.1"/>
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest">
+        <option name="package" value="com.android.devicehealth.tests"/>
+        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner"/>
+    </test>
+    <include name="CtsStatsdHostTestCases.config"/>
+</configuration>
diff --git a/usb/V1_1/build/Android.bp b/usb/V1_1/build/Android.bp
index 8288d41..2ea7311 100644
--- a/usb/V1_1/build/Android.bp
+++ b/usb/V1_1/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.usb@1.1-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.usb@1.1_hal",
     ],
@@ -18,7 +19,7 @@
 genrule {
     name: "android.hardware.usb@1.1-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.usb@1.1 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/usb/1.1/ $(genDir)/android/hardware/usb/1.1/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.usb@1.1 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/usb/1.1/ $(genDir)/android/hardware/usb/1.1/",
     srcs: [
         ":android.hardware.usb@1.1_hal",
     ],
@@ -32,7 +33,7 @@
 genrule {
     name: "android.hardware.usb@1.1-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.usb@1.1 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/usb/1.1/ $(genDir)/android/hardware/usb/1.1/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.usb@1.1 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/usb/1.1/ $(genDir)/android/hardware/usb/1.1/",
     srcs: [
         ":android.hardware.usb@1.1_hal",
     ],
@@ -48,38 +49,13 @@
     generated_sources: ["android.hardware.usb@1.1-vts.driver_genc++"],
     generated_headers: ["android.hardware.usb@1.1-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.usb@1.1-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
     shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+        "android.hardware.usb@1.0-vts.driver",
+    ],
+    static_libs: [
+        "android.hardware.usb@1.0",
         "android.hardware.usb@1.1",
-        "android.hardware.usb@1.0",
-        "android.hardware.usb@1.0-vts.driver",
-    ],
-    export_shared_lib_headers: [
-        "android.hardware.usb@1.0",
-        "android.hardware.usb@1.0-vts.driver",
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -87,7 +63,7 @@
 genrule {
     name: "android.hardware.usb@1.1-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.usb@1.1 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/usb/1.1/ $(genDir)/android/hardware/usb/1.1/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.usb@1.1 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/usb/1.1/ $(genDir)/android/hardware/usb/1.1/",
     srcs: [
         ":android.hardware.usb@1.1_hal",
     ],
@@ -101,7 +77,7 @@
 genrule {
     name: "android.hardware.usb@1.1-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.usb@1.1 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/usb/1.1/ $(genDir)/android/hardware/usb/1.1/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.usb@1.1 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/usb/1.1/ $(genDir)/android/hardware/usb/1.1/",
     srcs: [
         ":android.hardware.usb@1.1_hal",
     ],
@@ -117,28 +93,13 @@
     generated_sources: ["android.hardware.usb@1.1-vts.profiler_genc++"],
     generated_headers: ["android.hardware.usb@1.1-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.usb@1.1-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
     shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
-        "android.hardware.usb@1.1",
-        "android.hardware.usb@1.0",
         "android.hardware.usb@1.0-vts.profiler",
     ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
+    static_libs: [
+        "android.hardware.usb@1.0",
+        "android.hardware.usb@1.1",
     ],
 }
 
diff --git a/usb/V1_1/target/AndroidTest.xml b/usb/V1_1/target/AndroidTest.xml
index 4d2dc2f..c97c315 100644
--- a/usb/V1_1/target/AndroidTest.xml
+++ b/usb/V1_1/target/AndroidTest.xml
@@ -19,7 +19,6 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalUsbV1_1Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalUsbV1_1TargetTest/VtsHalUsbV1_1TargetTest"/>
@@ -27,7 +26,6 @@
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.usb@1.1"/>
         <option name="test-timeout" value="15m"/>
     </test>
 </configuration>
diff --git a/treble/hidl_shim/__init__.py b/usb/__init__.py
similarity index 100%
copy from treble/hidl_shim/__init__.py
copy to usb/__init__.py
diff --git a/treble/hidl_shim/__init__.py b/usb/gadget/V1_0/__init__.py
similarity index 100%
copy from treble/hidl_shim/__init__.py
copy to usb/gadget/V1_0/__init__.py
diff --git a/usb/gadget/V1_0/build/Android.bp b/usb/gadget/V1_0/build/Android.bp
new file mode 100644
index 0000000..5098a3c
--- /dev/null
+++ b/usb/gadget/V1_0/build/Android.bp
@@ -0,0 +1,99 @@
+// This file was auto-generated. Do not edit manually.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
+
+// Generate .vts spec files.
+hal2vts {
+    name: "android.hardware.usb.gadget@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
+    srcs: [
+        ":android.hardware.usb.gadget@1.0_hal",
+    ],
+    out: [
+        "android/hardware/usb/gadget/1.0/UsbGadget.vts",
+        "android/hardware/usb/gadget/1.0/UsbGadgetCallback.vts",
+        "android/hardware/usb/gadget/1.0/types.vts",
+    ],
+}
+
+// Build VTS driver.
+genrule {
+    name: "android.hardware.usb.gadget@1.0-vts.driver_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.usb.gadget@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/usb/gadget/1.0/ $(genDir)/android/hardware/usb/gadget/1.0/",
+    srcs: [
+        ":android.hardware.usb.gadget@1.0_hal",
+    ],
+    out: [
+        "android/hardware/usb/gadget/1.0/UsbGadget.vts.cpp",
+        "android/hardware/usb/gadget/1.0/UsbGadgetCallback.vts.cpp",
+        "android/hardware/usb/gadget/1.0/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.usb.gadget@1.0-vts.driver_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.usb.gadget@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/usb/gadget/1.0/ $(genDir)/android/hardware/usb/gadget/1.0/",
+    srcs: [
+        ":android.hardware.usb.gadget@1.0_hal",
+    ],
+    out: [
+        "android/hardware/usb/gadget/1.0/UsbGadget.vts.h",
+        "android/hardware/usb/gadget/1.0/UsbGadgetCallback.vts.h",
+        "android/hardware/usb/gadget/1.0/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.usb.gadget@1.0-vts.driver",
+    generated_sources: ["android.hardware.usb.gadget@1.0-vts.driver_genc++"],
+    generated_headers: ["android.hardware.usb.gadget@1.0-vts.driver_genc++_headers"],
+    export_generated_headers: ["android.hardware.usb.gadget@1.0-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
+        "android.hardware.usb.gadget@1.0",
+    ],
+}
+
+// Build VTS profiler.
+genrule {
+    name: "android.hardware.usb.gadget@1.0-vts.profiler_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.usb.gadget@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/usb/gadget/1.0/ $(genDir)/android/hardware/usb/gadget/1.0/",
+    srcs: [
+        ":android.hardware.usb.gadget@1.0_hal",
+    ],
+    out: [
+        "android/hardware/usb/gadget/1.0/UsbGadget.vts.cpp",
+        "android/hardware/usb/gadget/1.0/UsbGadgetCallback.vts.cpp",
+        "android/hardware/usb/gadget/1.0/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.usb.gadget@1.0-vts.profiler_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.usb.gadget@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/usb/gadget/1.0/ $(genDir)/android/hardware/usb/gadget/1.0/",
+    srcs: [
+        ":android.hardware.usb.gadget@1.0_hal",
+    ],
+    out: [
+        "android/hardware/usb/gadget/1.0/UsbGadget.vts.h",
+        "android/hardware/usb/gadget/1.0/UsbGadgetCallback.vts.h",
+        "android/hardware/usb/gadget/1.0/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.usb.gadget@1.0-vts.profiler",
+    generated_sources: ["android.hardware.usb.gadget@1.0-vts.profiler_genc++"],
+    generated_headers: ["android.hardware.usb.gadget@1.0-vts.profiler_genc++_headers"],
+    export_generated_headers: ["android.hardware.usb.gadget@1.0-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
+        "android.hardware.usb.gadget@1.0",
+    ],
+}
+
diff --git a/radio/V1_1/target/Android.mk b/usb/gadget/V1_0/host/Android.mk
similarity index 81%
copy from radio/V1_1/target/Android.mk
copy to usb/gadget/V1_0/host/Android.mk
index bd1a0f1..669276d 100644
--- a/radio/V1_1/target/Android.mk
+++ b/usb/gadget/V1_0/host/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,7 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalUsbGadgetV1_0Host
+VTS_CONFIG_SRC_DIR := testcases/hal/usb/gadget/V1_0/host
 include test/vts/tools/build/Android.host_config.mk
+
diff --git a/usb/gadget/V1_0/host/AndroidTest.xml b/usb/gadget/V1_0/host/AndroidTest.xml
new file mode 100644
index 0000000..9a9e3c4
--- /dev/null
+++ b/usb/gadget/V1_0/host/AndroidTest.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VtsHalUsbGadgetV1_0Host test cases">
+    <option name="config-descriptor:metadata" key="plan" value="vts-staging-default" />
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="push-group" value="HostDrivenTest.push" />
+    </target_preparer>
+    <multi_target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer">
+        <option name="dep-module" value="libusb1" />
+    </multi_target_preparer>
+    <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+        <option name="test-module-name" value="VtsHalUsbGadgetV1_0Host"/>
+        <option name="test-case-path" value="vts/testcases/hal/usb/gadget/V1_0/host/VtsHalUsbGadgetV1_0HostTest" />
+        <option name="test-config-path" value="vts/testcases/hal/usb/gadget/V1_0/host/VtsHalUsbGadgetV1_0HostTest.runner_conf" />
+        <option name="binary-test-disable-framework" value="false"/>
+    </test>
+</configuration>
diff --git a/usb/gadget/V1_0/host/VtsHalUsbGadgetV1_0HostTest.py b/usb/gadget/V1_0/host/VtsHalUsbGadgetV1_0HostTest.py
new file mode 100644
index 0000000..da9abb6
--- /dev/null
+++ b/usb/gadget/V1_0/host/VtsHalUsbGadgetV1_0HostTest.py
@@ -0,0 +1,130 @@
+#!/usr/bin/env python
+#
+# Copyright (C) 2018 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+import logging
+import time
+import usb1
+
+from vts.runners.host import asserts
+from vts.runners.host import base_test
+from vts.runners.host import const
+from vts.runners.host import test_runner
+from vts.testcases.template.hal_hidl_host_test import hal_hidl_host_test
+from vts.utils.python.controllers import adb
+
+
+class UsbGadgetHidlTest(hal_hidl_host_test.HalHidlHostTest):
+    """A host-side test for USB Gadget HAL.
+
+    This test requires Android framework to run.
+    """
+
+    TEST_HAL_SERVICES = {"android.hardware.usb.gadget@1.0::IUsbGadget"}
+
+    def setUpClass(self):
+        """Creates an adb session and reads sysprop values."""
+        super(UsbGadgetHidlTest, self).setUpClass()
+
+        self.adb = self.dut.adb
+        try:
+            self.adb.root()
+            self.adb.wait_for_device()
+        except adb.AdbError as e:
+            logging.exception(e)
+        self.serialno = self.adb.shell("\"getprop ro.serialno\"")
+
+    def checkProtocol(self, usb_class, usb_sub_class, usb_protocol):
+        """Queries the host USB bus to see if the interface is present.
+
+        Args:
+            usb_class: usbClass id of the interface.
+            usb_sub_class: usbSubClass id of the interface.
+            usb_protocol: usbProtocol id of the interface.
+
+        Returns:
+            True if the usb interface was present. False otherwise.
+        """
+        with usb1.USBContext() as context:
+            for device in context.getDeviceIterator(skip_on_error=True):
+                logging.info("ID %04x:%04x ", device.getVendorID(),
+                             device.getProductID())
+                for config in device.iterConfigurations():
+                    logging.info("config: %d", config.getConfigurationValue())
+                    interfaces_list = iter(config)
+                    for interface in interfaces_list:
+                        altsettings_list = iter(interface)
+                        for altsetting in altsettings_list:
+                            logging.info("interfaceNum:%d altSetting:%d "
+                                         "class:%d subclass:%d protocol:%d",
+                                         altsetting.getNumber(),
+                                         altsetting.getAlternateSetting(),
+                                         altsetting.getClass(),
+                                         altsetting.getSubClass(),
+                                         altsetting.getProtocol())
+                            if altsetting.getClass() == usb_class and \
+                                altsetting.getSubClass() == usb_sub_class and \
+                                altsetting.getProtocol() == usb_protocol:
+                                return True
+        return False
+
+    def testAdb(self):
+        """Check for ADB"""
+        asserts.assertTrue(self.checkProtocol(255, 66, 1), "ADB not present")
+
+    def testMtp(self):
+        """Check for MTP.
+
+        Enables mtp and checks the host to see if mtp interface is present.
+        MTP: https://en.wikipedia.org/wiki/Media_Transfer_Protocol.
+        """
+        self.adb.shell("svc usb setFunctions mtp true")
+        time.sleep(3)
+        asserts.assertTrue(self.checkProtocol(6, 1, 1), "MTP not present")
+
+    def testPtp(self):
+        """Check for PTP.
+
+        Enables ptp and checks the host to see if ptp interface is present.
+        PTP: https://en.wikipedia.org/wiki/Picture_Transfer_Protocol.
+        """
+        self.adb.shell("svc usb setFunctions ptp true")
+        time.sleep(3)
+        asserts.assertTrue(self.checkProtocol(6, 1, 1), "PTP not present")
+
+    def testMIDI(self):
+        """Check for MIDI.
+
+        Enables midi and checks the host to see if midi interface is present.
+        MIDI: https://en.wikipedia.org/wiki/MIDI.
+        """
+        self.adb.shell("svc usb setFunctions midi true")
+        time.sleep(3)
+        asserts.assertTrue(self.checkProtocol(1, 3, 0), "MIDI not present")
+
+    def testRndis(self):
+        """Check for RNDIS.
+
+        Enables rndis and checks the host to see if rndis interface is present.
+        RNDIS: https://en.wikipedia.org/wiki/RNDIS.
+        """
+        self.adb.shell("svc usb setFunctions rndis true")
+        time.sleep(3)
+        asserts.assertTrue(self.checkProtocol(10, 0, 0), "RNDIS not present")
+
+
+if __name__ == "__main__":
+    test_runner.main()
diff --git a/usb/gadget/V1_0/host/VtsHalUsbGadgetV1_0HostTest.runner_conf b/usb/gadget/V1_0/host/VtsHalUsbGadgetV1_0HostTest.runner_conf
new file mode 100644
index 0000000..f943fc2
--- /dev/null
+++ b/usb/gadget/V1_0/host/VtsHalUsbGadgetV1_0HostTest.runner_conf
@@ -0,0 +1,16 @@
+{
+    "test_bed":
+    [
+        {
+            "name": "VtsHalUsbGadgetV1_0HostTest",
+            "AndroidDevice":
+            [
+                {
+                    "enable_sl4a": false,
+                    "enable_sl4a_ed": false,
+                    "enable_vts_agent": true
+                }
+            ]
+        }
+    ]
+}
diff --git a/treble/hidl_shim/__init__.py b/usb/gadget/V1_0/host/__init__.py
similarity index 100%
copy from treble/hidl_shim/__init__.py
copy to usb/gadget/V1_0/host/__init__.py
diff --git a/treble/hidl_shim/__init__.py b/usb/gadget/__init__.py
similarity index 100%
copy from treble/hidl_shim/__init__.py
copy to usb/gadget/__init__.py
diff --git a/vibrator/Android.bp b/vibrator/Android.bp
deleted file mode 100644
index 2e98897..0000000
--- a/vibrator/Android.bp
+++ /dev/null
@@ -1,7 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "V1_0",
-    "V1_1",
-]
diff --git a/vibrator/V1_0/Android.bp b/vibrator/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/vibrator/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/vibrator/V1_0/build/Android.bp b/vibrator/V1_0/build/Android.bp
index 0ee0a8c..0be3e68 100644
--- a/vibrator/V1_0/build/Android.bp
+++ b/vibrator/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.vibrator@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.vibrator@1.0_hal",
     ],
@@ -17,7 +18,7 @@
 genrule {
     name: "android.hardware.vibrator@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.vibrator@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/vibrator/1.0/ $(genDir)/android/hardware/vibrator/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.vibrator@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/vibrator/1.0/ $(genDir)/android/hardware/vibrator/1.0/",
     srcs: [
         ":android.hardware.vibrator@1.0_hal",
     ],
@@ -30,7 +31,7 @@
 genrule {
     name: "android.hardware.vibrator@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.vibrator@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/vibrator/1.0/ $(genDir)/android/hardware/vibrator/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.vibrator@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/vibrator/1.0/ $(genDir)/android/hardware/vibrator/1.0/",
     srcs: [
         ":android.hardware.vibrator@1.0_hal",
     ],
@@ -45,36 +46,10 @@
     generated_sources: ["android.hardware.vibrator@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.vibrator@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.vibrator@1.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.vibrator@1.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -82,7 +57,7 @@
 genrule {
     name: "android.hardware.vibrator@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.vibrator@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/vibrator/1.0/ $(genDir)/android/hardware/vibrator/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.vibrator@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/vibrator/1.0/ $(genDir)/android/hardware/vibrator/1.0/",
     srcs: [
         ":android.hardware.vibrator@1.0_hal",
     ],
@@ -95,7 +70,7 @@
 genrule {
     name: "android.hardware.vibrator@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.vibrator@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/vibrator/1.0/ $(genDir)/android/hardware/vibrator/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.vibrator@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/vibrator/1.0/ $(genDir)/android/hardware/vibrator/1.0/",
     srcs: [
         ":android.hardware.vibrator@1.0_hal",
     ],
@@ -110,27 +85,10 @@
     generated_sources: ["android.hardware.vibrator@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.vibrator@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.vibrator@1.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.vibrator@1.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/vibrator/V1_0/host/AndroidTest.xml b/vibrator/V1_0/host/AndroidTest.xml
index d30e986..758a8ea 100644
--- a/vibrator/V1_0/host/AndroidTest.xml
+++ b/vibrator/V1_0/host/AndroidTest.xml
@@ -24,11 +24,9 @@
         <option name="push" value="DATA/lib/android.hardware.vibrator@1.0-vts.driver.so->/data/local/tmp/32/android.hardware.vibrator@1.0-vts.driver.so"/>
         <option name="push" value="DATA/lib64/android.hardware.vibrator@1.0-vts.driver.so->/data/local/tmp/64/android.hardware.vibrator@1.0-vts.driver.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalVibratorV1_0Host"/>
         <option name="test-case-path" value="vts/testcases/hal/vibrator/V1_0/host/VtsHalVibratorV1_0HostTest"/>
-        <option name="precondition-lshal" value="android.hardware.vibrator@1.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/vibrator/V1_0/host/VtsHalVibratorV1_0HostTest.py b/vibrator/V1_0/host/VtsHalVibratorV1_0HostTest.py
index 8b66418..74b52e0 100644
--- a/vibrator/V1_0/host/VtsHalVibratorV1_0HostTest.py
+++ b/vibrator/V1_0/host/VtsHalVibratorV1_0HostTest.py
@@ -19,29 +19,17 @@
 import time
 
 from vts.runners.host import asserts
-from vts.runners.host import base_test
 from vts.runners.host import test_runner
-from vts.utils.python.controllers import android_device
-from vts.utils.python.precondition import precondition_utils
+from vts.testcases.template.hal_hidl_host_test import hal_hidl_host_test
 
 
-class VibratorHidlTest(base_test.BaseTestClass):
+class VibratorHidlTest(hal_hidl_host_test.HalHidlHostTest):
     """A simple testcase for the VIBRATOR HIDL HAL."""
 
+    TEST_HAL_SERVICES = {"android.hardware.vibrator@1.0::IVibrator"}
     def setUpClass(self):
         """Creates a mirror and turns on the framework-layer VIBRATOR service."""
-        self.dut = self.registerController(android_device)[0]
-
-        self.dut.shell.InvokeTerminal("one")
-        self.dut.shell.one.Execute("setenforce 0")  # SELinux permissive mode
-        if not precondition_utils.CanRunHidlHalTest(
-            self, self.dut, self.dut.shell.one):
-            self._skip_all_testcases = True
-            return
-
-        # Test using the binderized mode
-        self.dut.shell.one.Execute(
-            "setprop vts.hal.vts.hidl.get_stub true")
+        super(VibratorHidlTest, self).setUpClass()
 
         self.dut.hal.InitHidlHal(
             target_type="vibrator",
@@ -51,22 +39,6 @@
             target_component_name="IVibrator",
             bits=int(self.abi_bitness))
 
-    def tearDownClass(self):
-        """ If profiling is enabled for the test, collect the profiling data
-            and disable profiling after the test is done.
-        """
-        if not self._skip_all_testcases and self.profiling.enabled:
-            self.profiling.ProcessAndUploadTraceData()
-
-    def setUp(self):
-        if self.profiling.enabled:
-            self.profiling.EnableVTSProfiling(self.dut.shell.one)
-
-    def tearDown(self):
-        if self.profiling.enabled:
-            self.profiling.ProcessTraceDataForTestCase(self.dut)
-            self.profiling.DisableVTSProfiling(self.dut.shell.one)
-
     def testVibratorBasic(self):
         """A simple test case which just calls each registered function."""
         vibrator_types = self.dut.hal.vibrator.GetHidlTypeInterface("types")
diff --git a/vibrator/V1_0/host_profiling/AndroidTest.xml b/vibrator/V1_0/host_profiling/AndroidTest.xml
index e9ca4ab..95ee2c0 100644
--- a/vibrator/V1_0/host_profiling/AndroidTest.xml
+++ b/vibrator/V1_0/host_profiling/AndroidTest.xml
@@ -26,12 +26,10 @@
         <option name="push" value="DATA/lib/android.hardware.vibrator@1.0-vts.profiler.so->/data/local/tmp/32/android.hardware.vibrator@1.0-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.vibrator@1.0-vts.profiler.so->/data/local/tmp/64/android.hardware.vibrator@1.0-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalVibratorV1_0HostProfiling"/>
         <option name="test-case-path" value="vts/testcases/hal/vibrator/V1_0/host/VtsHalVibratorV1_0HostTest"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.vibrator@1.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/vibrator/V1_0/target/AndroidTest.xml b/vibrator/V1_0/target/AndroidTest.xml
index 9e3128c..3e82cf3 100644
--- a/vibrator/V1_0/target/AndroidTest.xml
+++ b/vibrator/V1_0/target/AndroidTest.xml
@@ -19,7 +19,6 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalVibratorV1_0Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalVibratorV1_0TargetTest/VtsHalVibratorV1_0TargetTest"/>
@@ -27,7 +26,6 @@
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.vibrator@1.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/vibrator/V1_0/target_profiling/AndroidTest.xml b/vibrator/V1_0/target_profiling/AndroidTest.xml
index aeda36d..a668331 100644
--- a/vibrator/V1_0/target_profiling/AndroidTest.xml
+++ b/vibrator/V1_0/target_profiling/AndroidTest.xml
@@ -22,7 +22,6 @@
         <option name="push" value="DATA/lib/android.hardware.vibrator@1.0-vts.profiler.so->/data/local/tmp/32/android.hardware.vibrator@1.0-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.vibrator@1.0-vts.profiler.so->/data/local/tmp/64/android.hardware.vibrator@1.0-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalVibratorV1_0TargetProfiling"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalVibratorV1_0TargetTest/VtsHalVibratorV1_0TargetTest"/>
@@ -31,7 +30,6 @@
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.vibrator@1.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/vibrator/V1_0/target_replay/AndroidTest.xml b/vibrator/V1_0/target_replay/AndroidTest.xml
index fbaa4f6..952aae1 100644
--- a/vibrator/V1_0/target_replay/AndroidTest.xml
+++ b/vibrator/V1_0/target_replay/AndroidTest.xml
@@ -24,7 +24,6 @@
         <option name="push" value="DATA/lib/android.hardware.vibrator@1.0-vts.driver.so->/data/local/tmp/32/android.hardware.vibrator@1.0-vts.driver.so"/>
         <option name="push" value="DATA/lib64/android.hardware.vibrator@1.0-vts.driver.so->/data/local/tmp/64/android.hardware.vibrator@1.0-vts.driver.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalVibratorV1_0TargetReplay"/>
         <option name="binary-test-type" value="hal_hidl_replay_test"/>
@@ -39,8 +38,6 @@
         <option name="hal-hidl-replay-test-trace-path" value="test/vts-testcase/hal-trace/vibrator/V1_0/android.hardware.vibrator_1.0_106577312906.vts.trace"/>
         <option name="hal-hidl-replay-test-trace-path" value="test/vts-testcase/hal-trace/vibrator/V1_0/android.hardware.vibrator_1.0_23569480470.vts.trace"/>
         <option name="hal-hidl-replay-test-trace-path" value="test/vts-testcase/hal-trace/vibrator/V1_0/android.hardware.vibrator_1.0_3442286814892.vts.trace"/>
-        <option name="hal-hidl-package-name" value="android.hardware.vibrator@1.0"/>
-        <option name="precondition-lshal" value="android.hardware.vibrator@1.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/vibrator/V1_1/Android.bp b/vibrator/V1_1/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/vibrator/V1_1/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/radio/V1_1/target/Android.mk b/vibrator/V1_1/adapter/Android.mk
similarity index 80%
copy from radio/V1_1/target/Android.mk
copy to vibrator/V1_1/adapter/Android.mk
index bd1a0f1..8e1e2b3 100644
--- a/radio/V1_1/target/Android.mk
+++ b/vibrator/V1_1/adapter/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalVibratorV1_1Adapter
+VTS_CONFIG_SRC_DIR := testcases/hal/vibrator/V1_1/adapter
 include test/vts/tools/build/Android.host_config.mk
diff --git a/vibrator/V1_1/adapter/AndroidTest.xml b/vibrator/V1_1/adapter/AndroidTest.xml
new file mode 100644
index 0000000..d8f497c
--- /dev/null
+++ b/vibrator/V1_1/adapter/AndroidTest.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS VtsHalVibratorV1_1Adapter test cases">
+    <option key="plan" name="config-descriptor:metadata" value="vts-hal-adapter"/>
+    <object class="com.android.tradefed.module.VtsHalAdapterModuleController" type="module_controller">
+        <option name="hal-package-name" value="android.hardware.vibrator@1.1"/>
+    </object>
+    <target_preparer class="com.android.tradefed.targetprep.VtsHalAdapterPreparer">
+        <option name="adapter-binary-name" value="android.hardware.vibrator@1.0-adapter"/>
+        <option name="hal-package-name" value="android.hardware.vibrator@1.1"/>
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest">
+        <option name="package" value="com.android.devicehealth.tests"/>
+        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner"/>
+    </test>
+    <include name="CtsDevicePolicyManagerTestCases.config"/>
+    <include name="CtsMonkeyTestCases.config"/>
+</configuration>
diff --git a/vibrator/V1_1/build/Android.bp b/vibrator/V1_1/build/Android.bp
index 2c8e8d6..bd7a297 100644
--- a/vibrator/V1_1/build/Android.bp
+++ b/vibrator/V1_1/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.vibrator@1.1-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.vibrator@1.1_hal",
     ],
@@ -17,7 +18,7 @@
 genrule {
     name: "android.hardware.vibrator@1.1-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.vibrator@1.1 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/vibrator/1.1/ $(genDir)/android/hardware/vibrator/1.1/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.vibrator@1.1 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/vibrator/1.1/ $(genDir)/android/hardware/vibrator/1.1/",
     srcs: [
         ":android.hardware.vibrator@1.1_hal",
     ],
@@ -30,7 +31,7 @@
 genrule {
     name: "android.hardware.vibrator@1.1-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.vibrator@1.1 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/vibrator/1.1/ $(genDir)/android/hardware/vibrator/1.1/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.vibrator@1.1 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/vibrator/1.1/ $(genDir)/android/hardware/vibrator/1.1/",
     srcs: [
         ":android.hardware.vibrator@1.1_hal",
     ],
@@ -45,38 +46,13 @@
     generated_sources: ["android.hardware.vibrator@1.1-vts.driver_genc++"],
     generated_headers: ["android.hardware.vibrator@1.1-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.vibrator@1.1-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
     shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+        "android.hardware.vibrator@1.0-vts.driver",
+    ],
+    static_libs: [
+        "android.hardware.vibrator@1.0",
         "android.hardware.vibrator@1.1",
-        "android.hardware.vibrator@1.0",
-        "android.hardware.vibrator@1.0-vts.driver",
-    ],
-    export_shared_lib_headers: [
-        "android.hardware.vibrator@1.0",
-        "android.hardware.vibrator@1.0-vts.driver",
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -84,7 +60,7 @@
 genrule {
     name: "android.hardware.vibrator@1.1-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.vibrator@1.1 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/vibrator/1.1/ $(genDir)/android/hardware/vibrator/1.1/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.vibrator@1.1 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/vibrator/1.1/ $(genDir)/android/hardware/vibrator/1.1/",
     srcs: [
         ":android.hardware.vibrator@1.1_hal",
     ],
@@ -97,7 +73,7 @@
 genrule {
     name: "android.hardware.vibrator@1.1-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.vibrator@1.1 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/vibrator/1.1/ $(genDir)/android/hardware/vibrator/1.1/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.vibrator@1.1 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/vibrator/1.1/ $(genDir)/android/hardware/vibrator/1.1/",
     srcs: [
         ":android.hardware.vibrator@1.1_hal",
     ],
@@ -112,28 +88,13 @@
     generated_sources: ["android.hardware.vibrator@1.1-vts.profiler_genc++"],
     generated_headers: ["android.hardware.vibrator@1.1-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.vibrator@1.1-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
     shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
-        "android.hardware.vibrator@1.1",
-        "android.hardware.vibrator@1.0",
         "android.hardware.vibrator@1.0-vts.profiler",
     ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
+    static_libs: [
+        "android.hardware.vibrator@1.0",
+        "android.hardware.vibrator@1.1",
     ],
 }
 
diff --git a/vibrator/V1_1/target/AndroidTest.xml b/vibrator/V1_1/target/AndroidTest.xml
index bf93f3c..efc3cc1 100644
--- a/vibrator/V1_1/target/AndroidTest.xml
+++ b/vibrator/V1_1/target/AndroidTest.xml
@@ -19,7 +19,6 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalVibratorV1_1Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalVibratorV1_1TargetTest/VtsHalVibratorV1_1TargetTest"/>
@@ -27,7 +26,6 @@
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.vibrator@1.1"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/radio/V1_1/target/Android.mk b/vibrator/V1_2/adapter/Android.mk
similarity index 80%
copy from radio/V1_1/target/Android.mk
copy to vibrator/V1_2/adapter/Android.mk
index bd1a0f1..07d55ca 100644
--- a/radio/V1_1/target/Android.mk
+++ b/vibrator/V1_2/adapter/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalVibratorV1_2Adapter
+VTS_CONFIG_SRC_DIR := testcases/hal/vibrator/V1_2/adapter
 include test/vts/tools/build/Android.host_config.mk
diff --git a/vibrator/V1_2/adapter/AndroidTest.xml b/vibrator/V1_2/adapter/AndroidTest.xml
new file mode 100644
index 0000000..674f5bf
--- /dev/null
+++ b/vibrator/V1_2/adapter/AndroidTest.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS VtsHalVibratorV1_2Adapter test cases">
+    <option key="plan" name="config-descriptor:metadata" value="vts-hal-adapter"/>
+    <object class="com.android.tradefed.module.VtsHalAdapterModuleController" type="module_controller">
+        <option name="hal-package-name" value="android.hardware.vibrator@1.2"/>
+    </object>
+    <target_preparer class="com.android.tradefed.targetprep.VtsHalAdapterPreparer">
+        <option name="adapter-binary-name" value="android.hardware.vibrator@1.1-adapter"/>
+        <option name="hal-package-name" value="android.hardware.vibrator@1.2"/>
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest">
+        <option name="package" value="com.android.devicehealth.tests"/>
+        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner"/>
+    </test>
+    <include name="CtsWidgetTestCases.config"/>
+</configuration>
diff --git a/vibrator/V1_2/build/Android.bp b/vibrator/V1_2/build/Android.bp
new file mode 100644
index 0000000..8bc7f0b
--- /dev/null
+++ b/vibrator/V1_2/build/Android.bp
@@ -0,0 +1,104 @@
+// This file was auto-generated. Do not edit manually.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
+
+// Generate .vts spec files.
+hal2vts {
+    name: "android.hardware.vibrator@1.2-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
+    srcs: [
+        ":android.hardware.vibrator@1.2_hal",
+    ],
+    out: [
+        "android/hardware/vibrator/1.2/Vibrator.vts",
+        "android/hardware/vibrator/1.2/types.vts",
+    ],
+}
+
+// Build VTS driver.
+genrule {
+    name: "android.hardware.vibrator@1.2-vts.driver_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.vibrator@1.2 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/vibrator/1.2/ $(genDir)/android/hardware/vibrator/1.2/",
+    srcs: [
+        ":android.hardware.vibrator@1.2_hal",
+    ],
+    out: [
+        "android/hardware/vibrator/1.2/Vibrator.vts.cpp",
+        "android/hardware/vibrator/1.2/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.vibrator@1.2-vts.driver_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.vibrator@1.2 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/vibrator/1.2/ $(genDir)/android/hardware/vibrator/1.2/",
+    srcs: [
+        ":android.hardware.vibrator@1.2_hal",
+    ],
+    out: [
+        "android/hardware/vibrator/1.2/Vibrator.vts.h",
+        "android/hardware/vibrator/1.2/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.vibrator@1.2-vts.driver",
+    generated_sources: ["android.hardware.vibrator@1.2-vts.driver_genc++"],
+    generated_headers: ["android.hardware.vibrator@1.2-vts.driver_genc++_headers"],
+    export_generated_headers: ["android.hardware.vibrator@1.2-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [
+        "android.hardware.vibrator@1.0-vts.driver",
+        "android.hardware.vibrator@1.1-vts.driver",
+    ],
+    static_libs: [
+        "android.hardware.vibrator@1.0",
+        "android.hardware.vibrator@1.1",
+        "android.hardware.vibrator@1.2",
+    ],
+}
+
+// Build VTS profiler.
+genrule {
+    name: "android.hardware.vibrator@1.2-vts.profiler_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.vibrator@1.2 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/vibrator/1.2/ $(genDir)/android/hardware/vibrator/1.2/",
+    srcs: [
+        ":android.hardware.vibrator@1.2_hal",
+    ],
+    out: [
+        "android/hardware/vibrator/1.2/Vibrator.vts.cpp",
+        "android/hardware/vibrator/1.2/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.vibrator@1.2-vts.profiler_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.vibrator@1.2 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/vibrator/1.2/ $(genDir)/android/hardware/vibrator/1.2/",
+    srcs: [
+        ":android.hardware.vibrator@1.2_hal",
+    ],
+    out: [
+        "android/hardware/vibrator/1.2/Vibrator.vts.h",
+        "android/hardware/vibrator/1.2/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.vibrator@1.2-vts.profiler",
+    generated_sources: ["android.hardware.vibrator@1.2-vts.profiler_genc++"],
+    generated_headers: ["android.hardware.vibrator@1.2-vts.profiler_genc++_headers"],
+    export_generated_headers: ["android.hardware.vibrator@1.2-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [
+        "android.hardware.vibrator@1.0-vts.profiler",
+        "android.hardware.vibrator@1.1-vts.profiler",
+    ],
+    static_libs: [
+        "android.hardware.vibrator@1.0",
+        "android.hardware.vibrator@1.1",
+        "android.hardware.vibrator@1.2",
+    ],
+}
+
diff --git a/radio/V1_1/target/Android.mk b/vibrator/V1_2/target/Android.mk
similarity index 81%
copy from radio/V1_1/target/Android.mk
copy to vibrator/V1_2/target/Android.mk
index bd1a0f1..e9ed8f4 100644
--- a/radio/V1_1/target/Android.mk
+++ b/vibrator/V1_2/target/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalVibratorV1_2Target
+VTS_CONFIG_SRC_DIR := testcases/hal/vibrator/V1_2/target
 include test/vts/tools/build/Android.host_config.mk
diff --git a/radio/V1_1/target/AndroidTest.xml b/vibrator/V1_2/target/AndroidTest.xml
similarity index 70%
copy from radio/V1_1/target/AndroidTest.xml
copy to vibrator/V1_2/target/AndroidTest.xml
index 76b339d..2fdd759 100644
--- a/radio/V1_1/target/AndroidTest.xml
+++ b/vibrator/V1_2/target/AndroidTest.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2017 The Android Open Source Project
+<!-- Copyright (C) 2018 The Android Open Source Project
 
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
@@ -13,21 +13,20 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Config for VTS VtsHalRadioV1_1Target test cases">
+<configuration description="Config for VTS VtsHalVibratorV1_2Target test cases">
     <option name="config-descriptor:metadata" key="plan" value="vts-hal" />
     <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
+    <multi_target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
-        <option name="test-module-name" value="VtsHalRadioV1_1Target"/>
-        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalRadioV1_1TargetTest/VtsHalRadioV1_1TargetTest"/>
-        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalRadioV1_1TargetTest/VtsHalRadioV1_1TargetTest"/>
+        <option name="test-module-name" value="VtsHalVibratorV1_2Target"/>
+        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalVibratorV1_2TargetTest/VtsHalVibratorV1_2TargetTest"/>
+        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalVibratorV1_2TargetTest/VtsHalVibratorV1_2TargetTest"/>
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.radio@1.1"/>
-        <option name="test-timeout" value="15m"/>
+        <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/vr/Android.bp b/vr/Android.bp
deleted file mode 100644
index cdc8905..0000000
--- a/vr/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "V1_0",
-]
diff --git a/vr/V1_0/Android.bp b/vr/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/vr/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/vr/V1_0/build/Android.bp b/vr/V1_0/build/Android.bp
index 1497c9c..1f6cd08 100644
--- a/vr/V1_0/build/Android.bp
+++ b/vr/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.vr@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.vr@1.0_hal",
     ],
@@ -16,7 +17,7 @@
 genrule {
     name: "android.hardware.vr@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.vr@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/vr/1.0/ $(genDir)/android/hardware/vr/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.vr@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/vr/1.0/ $(genDir)/android/hardware/vr/1.0/",
     srcs: [
         ":android.hardware.vr@1.0_hal",
     ],
@@ -28,7 +29,7 @@
 genrule {
     name: "android.hardware.vr@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.vr@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/vr/1.0/ $(genDir)/android/hardware/vr/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.vr@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/vr/1.0/ $(genDir)/android/hardware/vr/1.0/",
     srcs: [
         ":android.hardware.vr@1.0_hal",
     ],
@@ -42,36 +43,10 @@
     generated_sources: ["android.hardware.vr@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.vr@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.vr@1.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.vr@1.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -79,7 +54,7 @@
 genrule {
     name: "android.hardware.vr@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.vr@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/vr/1.0/ $(genDir)/android/hardware/vr/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.vr@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/vr/1.0/ $(genDir)/android/hardware/vr/1.0/",
     srcs: [
         ":android.hardware.vr@1.0_hal",
     ],
@@ -91,7 +66,7 @@
 genrule {
     name: "android.hardware.vr@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.vr@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/vr/1.0/ $(genDir)/android/hardware/vr/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.vr@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/vr/1.0/ $(genDir)/android/hardware/vr/1.0/",
     srcs: [
         ":android.hardware.vr@1.0_hal",
     ],
@@ -105,27 +80,10 @@
     generated_sources: ["android.hardware.vr@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.vr@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.vr@1.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.vr@1.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/vr/V1_0/host/AndroidTest.xml b/vr/V1_0/host/AndroidTest.xml
index 49455b4..1525614 100644
--- a/vr/V1_0/host/AndroidTest.xml
+++ b/vr/V1_0/host/AndroidTest.xml
@@ -23,11 +23,9 @@
         <option name="push" value="DATA/lib/android.hardware.vr@1.0-vts.driver.so->/data/local/tmp/32/android.hardware.vr@1.0-vts.driver.so"/>
         <option name="push" value="DATA/lib64/android.hardware.vr@1.0-vts.driver.so->/data/local/tmp/64/android.hardware.vr@1.0-vts.driver.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalVrV1_0Host"/>
         <option name="test-case-path" value="vts/testcases/hal/vr/V1_0/host/VtsHalVrV1_0HostTest"/>
-        <option name="precondition-lshal" value="android.hardware.vr@1.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/vr/V1_0/host/VtsHalVrV1_0HostTest.py b/vr/V1_0/host/VtsHalVrV1_0HostTest.py
index 747f84f..d2ebb62 100644
--- a/vr/V1_0/host/VtsHalVrV1_0HostTest.py
+++ b/vr/V1_0/host/VtsHalVrV1_0HostTest.py
@@ -19,30 +19,18 @@
 import time
 
 from vts.runners.host import asserts
-from vts.runners.host import base_test
 from vts.runners.host import test_runner
-from vts.utils.python.controllers import android_device
-from vts.utils.python.precondition import precondition_utils
+from vts.testcases.template.hal_hidl_host_test import hal_hidl_host_test
 
 
-class VrHidlTest(base_test.BaseTestClass):
+class VrHidlTest(hal_hidl_host_test.HalHidlHostTest):
     """A simple testcase for the VR HIDL HAL."""
 
+    TEST_HAL_SERVICES = {"android.hardware.vr@1.0::IVr"}
+
     def setUpClass(self):
         """Creates a mirror and turns on the framework-layer VR service."""
-        self.dut = self.registerController(android_device)[0]
-
-        self.dut.shell.InvokeTerminal("one")
-        self.dut.shell.one.Execute("setenforce 0")  # SELinux permissive mode
-        if not precondition_utils.CanRunHidlHalTest(
-            self, self.dut, self.dut.shell.one):
-            self._skip_all_testcases = True
-            return
-
-        # Test using the binderized mode
-        self.dut.shell.one.Execute(
-            "setprop vts.hal.vts.hidl.get_stub true")
-
+        super(VrHidlTest, self).setUpClass()
         self.dut.hal.InitHidlHal(
             target_type="vr",
             target_basepaths=self.dut.libPaths,
@@ -51,22 +39,6 @@
             target_component_name="IVr",
             bits=int(self.abi_bitness))
 
-    def tearDownClass(self):
-        """ If profiling is enabled for the test, collect the profiling data
-            and disable profiling after the test is done.
-        """
-        if not self._skip_all_testcases and self.profiling.enabled:
-            self.profiling.ProcessAndUploadTraceData()
-
-    def setUp(self):
-        if self.profiling.enabled:
-            self.profiling.EnableVTSProfiling(self.dut.shell.one)
-
-    def tearDown(self):
-        if self.profiling.enabled:
-            self.profiling.ProcessTraceDataForTestCase(self.dut)
-            self.profiling.DisableVTSProfiling(self.dut.shell.one)
-
     def testVrBasic(self):
         """A simple test case which just calls each registered function."""
         result = self.dut.hal.vr.init()
diff --git a/vr/V1_0/target/AndroidTest.xml b/vr/V1_0/target/AndroidTest.xml
index ffa3ad7..a5c26b4 100644
--- a/vr/V1_0/target/AndroidTest.xml
+++ b/vr/V1_0/target/AndroidTest.xml
@@ -19,7 +19,6 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalVrV1_0Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalVrV1_0TargetTest/VtsHalVrV1_0TargetTest"/>
@@ -27,8 +26,6 @@
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.vr@1.0"/>
-        <option name="test-config-path" value="vts/testcases/hal/vr/V1_0/target/VrHidlTargetTest.config" />
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/vr/V1_0/target/VrHidlTargetTest.config b/vr/V1_0/target/VrHidlTargetTest.config
deleted file mode 100644
index ec01b5f..0000000
--- a/vr/V1_0/target/VrHidlTargetTest.config
+++ /dev/null
@@ -1,25 +0,0 @@
-{
-    "use_gae_db": true,
-    "coverage": true,
-    "modules": [{
-                    "module_name": "system/lib64/hw/vr.marlin",
-                    "git_project": {
-                        "name": "device/google/marlin",
-                        "path": "device/google/marlin"
-                    }
-                },
-                {
-                    "module_name": "system/lib64/hw/vr.sailfish",
-                    "git_project": {
-                        "name": "device/google/marlin",
-                        "path": "device/google/marlin"
-                    }
-                },
-                {
-                    "module_name": "system/lib64/hw/android.hardware.vr@1.0-impl",
-                    "git_project": {
-                        "name": "platform/hardware/interfaces",
-                        "path": "hardware/interfaces"
-                    }
-                }]
-}
diff --git a/vr/V1_0/target_profiling/AndroidTest.xml b/vr/V1_0/target_profiling/AndroidTest.xml
index 3d05869..9061b21 100644
--- a/vr/V1_0/target_profiling/AndroidTest.xml
+++ b/vr/V1_0/target_profiling/AndroidTest.xml
@@ -22,7 +22,6 @@
         <option name="push" value="DATA/lib/android.hardware.vr@1.0-vts.profiler.so->/data/local/tmp/32/android.hardware.vr@1.0-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.vr@1.0-vts.profiler.so->/data/local/tmp/64/android.hardware.vr@1.0-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalVrV1_0TargetProfiling"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalVrV1_0TargetTest/VtsHalVrV1_0TargetTest"/>
@@ -31,7 +30,6 @@
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.vr@1.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/vr/V1_0/target_replay/AndroidTest.xml b/vr/V1_0/target_replay/AndroidTest.xml
index ede2267..f4881f5 100644
--- a/vr/V1_0/target_replay/AndroidTest.xml
+++ b/vr/V1_0/target_replay/AndroidTest.xml
@@ -23,15 +23,12 @@
         <option name="push" value="DATA/lib/android.hardware.vr@1.0-vts.driver.so->/data/local/tmp/32/android.hardware.vr@1.0-vts.driver.so"/>
         <option name="push" value="DATA/lib64/android.hardware.vr@1.0-vts.driver.so->/data/local/tmp/64/android.hardware.vr@1.0-vts.driver.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalVrV1_0TargetReplay"/>
         <option name="binary-test-type" value="hal_hidl_replay_test"/>
         <option name="hal-hidl-replay-test-trace-path" value="test/vts-testcase/hal-trace/vr/V1_0/android.hardware.vr_1.0_414639701250.vts.trace"/>
         <option name="hal-hidl-replay-test-trace-path" value="test/vts-testcase/hal-trace/vr/V1_0/android.hardware.vr_1.0_703509813153.vts.trace"/>
         <option name="hal-hidl-replay-test-trace-path" value="test/vts-testcase/hal-trace/vr/V1_0/android.hardware.vr_1.0_45605331051.vts.trace"/>
-        <option name="hal-hidl-package-name" value="android.hardware.vr@1.0"/>
-        <option name="precondition-lshal" value="android.hardware.vr@1.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/vts_specs/Android.mk b/vts_specs/Android.mk
new file mode 100644
index 0000000..465edb7
--- /dev/null
+++ b/vts_specs/Android.mk
@@ -0,0 +1,30 @@
+#
+# Copyright (C) 2017 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+spec_copy_pairs :=
+$(foreach m,$(VTS_SPEC_FILE_LIST),\
+  $(eval spec_copy_dir :=\
+    spec/$(word 2,$(subst android/frameworks/, ,\
+                    $(subst android/hardware/, ,\
+                      $(subst android/hidl/, ,\
+                        $(subst android/system/, ,$(dir $(m))))))))\
+  $(eval spec_copy_file := $(notdir $(m)))\
+  $(eval spec_copy_dest := $(spec_copy_dir)/$(spec_copy_file))\
+  $(eval spec_copy_pairs += $(m):$(TARGET_OUT_DATA)/vts_specs/$(spec_copy_dest)))
+
+.PHONY: vts_specs
+vts_specs: \
+  $(call copy-many-files,$(spec_copy_pairs)) \
diff --git a/weaver/Android.bp b/weaver/Android.bp
deleted file mode 100644
index cdc8905..0000000
--- a/weaver/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "V1_0",
-]
diff --git a/weaver/V1_0/Android.bp b/weaver/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/weaver/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/weaver/V1_0/build/Android.bp b/weaver/V1_0/build/Android.bp
index dd9da7d..31a3721 100644
--- a/weaver/V1_0/build/Android.bp
+++ b/weaver/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.weaver@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.weaver@1.0_hal",
     ],
@@ -17,7 +18,7 @@
 genrule {
     name: "android.hardware.weaver@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.weaver@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/weaver/1.0/ $(genDir)/android/hardware/weaver/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.weaver@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/weaver/1.0/ $(genDir)/android/hardware/weaver/1.0/",
     srcs: [
         ":android.hardware.weaver@1.0_hal",
     ],
@@ -30,7 +31,7 @@
 genrule {
     name: "android.hardware.weaver@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.weaver@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/weaver/1.0/ $(genDir)/android/hardware/weaver/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.weaver@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/weaver/1.0/ $(genDir)/android/hardware/weaver/1.0/",
     srcs: [
         ":android.hardware.weaver@1.0_hal",
     ],
@@ -45,36 +46,10 @@
     generated_sources: ["android.hardware.weaver@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.weaver@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.weaver@1.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.weaver@1.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -82,7 +57,7 @@
 genrule {
     name: "android.hardware.weaver@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.weaver@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/weaver/1.0/ $(genDir)/android/hardware/weaver/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.weaver@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/weaver/1.0/ $(genDir)/android/hardware/weaver/1.0/",
     srcs: [
         ":android.hardware.weaver@1.0_hal",
     ],
@@ -95,7 +70,7 @@
 genrule {
     name: "android.hardware.weaver@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.weaver@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/weaver/1.0/ $(genDir)/android/hardware/weaver/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.weaver@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/weaver/1.0/ $(genDir)/android/hardware/weaver/1.0/",
     srcs: [
         ":android.hardware.weaver@1.0_hal",
     ],
@@ -110,27 +85,10 @@
     generated_sources: ["android.hardware.weaver@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.weaver@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.weaver@1.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.weaver@1.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/weaver/V1_0/target/AndroidTest.xml b/weaver/V1_0/target/AndroidTest.xml
index ddca9a0..1f387aa 100644
--- a/weaver/V1_0/target/AndroidTest.xml
+++ b/weaver/V1_0/target/AndroidTest.xml
@@ -19,14 +19,12 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalWeaverV1_0Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalWeaverV1_0TargetTest/VtsHalWeaverV1_0TargetTest"/>
         <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalWeaverV1_0TargetTest/VtsHalWeaverV1_0TargetTest"/>
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.weaver@1.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/weaver/V1_0/target_profiling/AndroidTest.xml b/weaver/V1_0/target_profiling/AndroidTest.xml
index 0cd55fb..a1d017b 100644
--- a/weaver/V1_0/target_profiling/AndroidTest.xml
+++ b/weaver/V1_0/target_profiling/AndroidTest.xml
@@ -22,7 +22,6 @@
         <option name="push" value="DATA/lib/android.hardware.weaver@1.0-vts.profiler.so->/data/local/tmp/32/android.hardware.weaver@1.0-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.weaver@1.0-vts.profiler.so->/data/local/tmp/64/android.hardware.weaver@1.0-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalWeaverV1_0TargetProfiling"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalWeaverV1_0TargetTest/VtsHalWeaverV1_0TargetTest"/>
@@ -31,7 +30,6 @@
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.weaver@1.0"/>
         <option name="test-timeout" value="5m"/>
     </test>
 </configuration>
diff --git a/wifi/Android.bp b/wifi/Android.bp
deleted file mode 100644
index 9a6ba16..0000000
--- a/wifi/Android.bp
+++ /dev/null
@@ -1,9 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "V1_0",
-    "V1_1",
-    "offload/V1_0",
-    "supplicant/V1_0",
-]
diff --git a/wifi/V1_0/Android.bp b/wifi/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/wifi/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/radio/V1_1/target/Android.mk b/wifi/V1_0/app/wifi_native_test/Android.mk
similarity index 86%
copy from radio/V1_1/target/Android.mk
copy to wifi/V1_0/app/wifi_native_test/Android.mk
index bd1a0f1..5ee16cb 100644
--- a/radio/V1_1/target/Android.mk
+++ b/wifi/V1_0/app/wifi_native_test/Android.mk
@@ -18,6 +18,7 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsAppWifiNativeTest
+VTS_CONFIG_SRC_DIR := testcases/hal/wifi/V1_0/app/wifi_native_test
 include test/vts/tools/build/Android.host_config.mk
+
diff --git a/wifi/V1_0/app/wifi_native_test/AndroidTest.xml b/wifi/V1_0/app/wifi_native_test/AndroidTest.xml
new file mode 100644
index 0000000..8156b23
--- /dev/null
+++ b/wifi/V1_0/app/wifi_native_test/AndroidTest.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2017 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS VtsAppWifiAwarePerformanceThroughput test cases">
+    <option name="config-descriptor:metadata" key="plan" value="vts-misc" />
+    <multi_target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer">
+        <option name="no-dep-module" value="enum" />
+        <option name="dep-module" value="enum34" />
+        <option name="dep-module" value="pyserial" />
+        <option name="dep-module" value="shellescape" />
+        <option name="dep-module" value="statistics" />
+        <option name="dep-module" value="subprocess32" />
+    </multi_target_preparer>
+
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="abort-on-push-failure" value="true"/>
+        <option name="push-group" value="HalHidlHostTest.push"/>
+        <option name="cleanup" value="true"/>
+    </target_preparer>
+
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+        <option name="test-file-name" value="DATA/app/sl4a/sl4a.apk" />
+        <option name="cleanup-apks" value="true" />
+        <option name="install-arg" value="-r" />
+      </target_preparer>
+
+    <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+        <option name="test-module-name" value="VtsAppWifiNativeTest"/>
+        <option name="test-case-path" value="vts/testcases/acts/wifi/WifiNativeTest"/>
+        <option name="test-case-path-type" value="file"/>
+        <option name="test-timeout" value="10m"/>
+        <option name="test-config-path" value="vts/testcases/hal/wifi/V1_0/app/wifi_native_test/VtsAppWifiNativeTest.runner_conf" />
+    </test>
+</configuration>
diff --git a/wifi/V1_0/app/wifi_native_test/VtsAppWifiNativeTest.runner_conf b/wifi/V1_0/app/wifi_native_test/VtsAppWifiNativeTest.runner_conf
new file mode 100644
index 0000000..bb9c041
--- /dev/null
+++ b/wifi/V1_0/app/wifi_native_test/VtsAppWifiNativeTest.runner_conf
@@ -0,0 +1,16 @@
+{
+    "test_bed":
+    [
+        {
+            "name": "VtsAppWifiNativeTest",
+            "AndroidDevice":
+            [
+                {
+                    "enable_sl4a": true,
+                    "enable_vts_agent": false
+                }
+            ]
+        }
+    ],
+    "aware_default_power_mode": "INTERACTIVE"
+}
diff --git a/wifi/V1_0/build/Android.bp b/wifi/V1_0/build/Android.bp
index 1951f58..60e7ba4 100644
--- a/wifi/V1_0/build/Android.bp
+++ b/wifi/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.wifi@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.wifi@1.0_hal",
     ],
@@ -29,7 +30,7 @@
 genrule {
     name: "android.hardware.wifi@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/wifi/1.0/ $(genDir)/android/hardware/wifi/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.wifi@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/wifi/1.0/ $(genDir)/android/hardware/wifi/1.0/",
     srcs: [
         ":android.hardware.wifi@1.0_hal",
     ],
@@ -54,7 +55,7 @@
 genrule {
     name: "android.hardware.wifi@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/wifi/1.0/ $(genDir)/android/hardware/wifi/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.wifi@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/wifi/1.0/ $(genDir)/android/hardware/wifi/1.0/",
     srcs: [
         ":android.hardware.wifi@1.0_hal",
     ],
@@ -81,36 +82,10 @@
     generated_sources: ["android.hardware.wifi@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.wifi@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.wifi@1.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.wifi@1.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -118,7 +93,7 @@
 genrule {
     name: "android.hardware.wifi@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/wifi/1.0/ $(genDir)/android/hardware/wifi/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.wifi@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/wifi/1.0/ $(genDir)/android/hardware/wifi/1.0/",
     srcs: [
         ":android.hardware.wifi@1.0_hal",
     ],
@@ -143,7 +118,7 @@
 genrule {
     name: "android.hardware.wifi@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/wifi/1.0/ $(genDir)/android/hardware/wifi/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.wifi@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/wifi/1.0/ $(genDir)/android/hardware/wifi/1.0/",
     srcs: [
         ":android.hardware.wifi@1.0_hal",
     ],
@@ -170,27 +145,10 @@
     generated_sources: ["android.hardware.wifi@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.wifi@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.wifi@1.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.wifi@1.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/wifi/V1_0/host/AndroidTest.xml b/wifi/V1_0/host/AndroidTest.xml
index 08a3de9..3047266 100644
--- a/wifi/V1_0/host/AndroidTest.xml
+++ b/wifi/V1_0/host/AndroidTest.xml
@@ -19,8 +19,23 @@
         <option name="abort-on-push-failure" value="true"/>
         <option name="push-group" value="HalHidlHostTest.push"/>
         <option name="cleanup" value="true"/>
+        <option name="push" value="spec/hardware/interfaces/wifi/1.0/vts/Wifi.vts->/data/local/tmp/spec/android/hardware/wifi/1.0/Wifi.vts"/>
+        <option name="push" value="spec/hardware/interfaces/wifi/1.0/vts/WifiApIface.vts->/data/local/tmp/spec/android/hardware/wifi/1.0/WifiApIface.vts"/>
+        <option name="push" value="spec/hardware/interfaces/wifi/1.0/vts/WifiChip.vts->/data/local/tmp/spec/android/hardware/wifi/1.0/WifiChip.vts"/>
+        <option name="push" value="spec/hardware/interfaces/wifi/1.0/vts/WifiChipEventCallback.vts->/data/local/tmp/spec/android/hardware/wifi/1.0/WifiChipEventCallback.vts"/>
+        <option name="push" value="spec/hardware/interfaces/wifi/1.0/vts/WifiEventCallback.vts->/data/local/tmp/spec/android/hardware/wifi/1.0/WifiEventCallback.vts"/>
+        <option name="push" value="spec/hardware/interfaces/wifi/1.0/vts/WifiIface.vts->/data/local/tmp/spec/android/hardware/wifi/1.0/WifiIface.vts"/>
+        <option name="push" value="spec/hardware/interfaces/wifi/1.0/vts/WifiNanIface.vts->/data/local/tmp/spec/android/hardware/wifi/1.0/WifiNanIface.vts"/>
+        <option name="push" value="spec/hardware/interfaces/wifi/1.0/vts/WifiNanIfaceEventCallback.vts->/data/local/tmp/spec/android/hardware/wifi/1.0/WifiNanIfaceEventCallback.vts"/>
+        <option name="push" value="spec/hardware/interfaces/wifi/1.0/vts/WifiP2pIface.vts->/data/local/tmp/spec/android/hardware/wifi/1.0/WifiP2pIface.vts"/>
+        <option name="push" value="spec/hardware/interfaces/wifi/1.0/vts/WifiRttController.vts->/data/local/tmp/spec/android/hardware/wifi/1.0/WifiRttController.vts"/>
+        <option name="push" value="spec/hardware/interfaces/wifi/1.0/vts/WifiRttControllerEventCallback.vts->/data/local/tmp/spec/android/hardware/wifi/1.0/WifiRttControllerEventCallback.vts"/>
+        <option name="push" value="spec/hardware/interfaces/wifi/1.0/vts/WifiStaIface.vts->/data/local/tmp/spec/android/hardware/wifi/1.0/WifiStaIface.vts"/>
+        <option name="push" value="spec/hardware/interfaces/wifi/1.0/vts/WifiStaIfaceEventCallback.vts->/data/local/tmp/spec/android/hardware/wifi/1.0/WifiStaIfaceEventCallback.vts"/>
+        <option name="push" value="spec/hardware/interfaces/wifi/1.0/vts/types.vts->/data/local/tmp/spec/android/hardware/wifi/1.0/types.vts"/>
+        <option name="push" value="DATA/lib/android.hardware.wifi@1.0-vts.driver.so->/data/local/tmp/32/android.hardware.wifi@1.0-vts.driver.so"/>
+        <option name="push" value="DATA/lib64/android.hardware.wifi@1.0-vts.driver.so->/data/local/tmp/64/android.hardware.wifi@1.0-vts.driver.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalWifiV1_0Host"/>
         <option name="test-case-path" value="vts/testcases/hal/wifi/V1_0/host/VtsHalWifiV1_0HostTest"/>
@@ -28,7 +43,6 @@
         <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalWifiV1_0TargetTest/VtsHalWifiV1_0TargetTest" />
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.wifi@1.0"/>
         <option name="test-timeout" value="10m"/>
     </test>
 </configuration>
diff --git a/wifi/V1_0/host/VtsHalWifiV1_0HostTest.py b/wifi/V1_0/host/VtsHalWifiV1_0HostTest.py
index c2c313d..199b454 100644
--- a/wifi/V1_0/host/VtsHalWifiV1_0HostTest.py
+++ b/wifi/V1_0/host/VtsHalWifiV1_0HostTest.py
@@ -20,7 +20,6 @@
 from vts.runners.host import const
 from vts.runners.host import test_runner
 from vts.testcases.template.hal_hidl_gtest import hal_hidl_gtest
-from vts.testcases.hal.wifi.V1_0.host import VtsHalWifiV1_0TestCase as wifi_test_case
 
 
 class VtsHalWifiV1_0Host(hal_hidl_gtest.HidlHalGTest):
@@ -47,13 +46,10 @@
             A list of VtsHalWifiV1_0TestCase objects
         """
         gtest_cases = super(VtsHalWifiV1_0Host, self).CreateTestCase(path, tag)
-        test_cases = []
         for gtest_case in gtest_cases:
-            test_case = wifi_test_case.VtsHalWifiV1_0TestCase(
-                self._nan_on, gtest_case.full_name, gtest_case.test_name, path)
-            test_cases.append(test_case)
-        logging.info("num of test_testcases: %s", len(test_cases))
-        return test_cases
+            if self._nan_on:
+                gtest_case.args += " --nan_on"
+        return gtest_cases
 
 
 if __name__ == "__main__":
diff --git a/wifi/V1_0/host/VtsHalWifiV1_0TestCase.py b/wifi/V1_0/host/VtsHalWifiV1_0TestCase.py
deleted file mode 100644
index bc8af65..0000000
--- a/wifi/V1_0/host/VtsHalWifiV1_0TestCase.py
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-# Copyright (C) 2017 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-from vts.testcases.template.gtest_binary_test import gtest_test_case
-
-class VtsHalWifiV1_0TestCase(gtest_test_case.GtestTestCase):
-    """A class to represent a WiFi HAL VTS test case.
-
-    Attributes:
-        _nan: boolean, whether WiFi NAN feature is supported on the device.
-    """
-
-    def __init__(self, nan, *args, **kwargs):
-        super(VtsHalWifiV1_0TestCase, self).__init__(*args, **kwargs)
-        self._nan = nan
-
-    # @Override
-    def GetRunCommand(self):
-        """Get the command to run the test. """
-        orig_cmds = super(VtsHalWifiV1_0TestCase,
-                          self).GetRunCommand(test_name=self.test_suite),
-        new_cmd = [('{cmd}{nan_on}').format(
-            cmd=orig_cmds[0][0], nan_on=" --nan_on" if self._nan else ""),
-            orig_cmds[0][1]]
-        return new_cmd
diff --git a/wifi/V1_0/target/nan/AndroidTest.xml b/wifi/V1_0/target/nan/AndroidTest.xml
index f251669..7c0290b 100644
--- a/wifi/V1_0/target/nan/AndroidTest.xml
+++ b/wifi/V1_0/target/nan/AndroidTest.xml
@@ -19,7 +19,6 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalWifiNanV1_0Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalWifiNanV1_0TargetTest/VtsHalWifiNanV1_0TargetTest" />
diff --git a/wifi/V1_0/target_profiling/base/AndroidTest.xml b/wifi/V1_0/target_profiling/base/AndroidTest.xml
index e4d74f1..2819eeb 100644
--- a/wifi/V1_0/target_profiling/base/AndroidTest.xml
+++ b/wifi/V1_0/target_profiling/base/AndroidTest.xml
@@ -22,7 +22,6 @@
         <option name="push" value="DATA/lib/android.hardware.wifi@1.0-vts.profiler.so->/data/local/tmp/32/android.hardware.wifi@1.0-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.wifi@1.0-vts.profiler.so->/data/local/tmp/64/android.hardware.wifi@1.0-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalWifiV1_0TargetProfiling"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalWifiV1_0TargetTest/VtsHalWifiV1_0TargetTest" />
@@ -31,7 +30,6 @@
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.wifi@1.0"/>
         <option name="test-timeout" value="15m"/>
     </test>
 </configuration>
diff --git a/wifi/V1_0/target_profiling/nan/AndroidTest.xml b/wifi/V1_0/target_profiling/nan/AndroidTest.xml
index fcffe19..d031820 100644
--- a/wifi/V1_0/target_profiling/nan/AndroidTest.xml
+++ b/wifi/V1_0/target_profiling/nan/AndroidTest.xml
@@ -22,7 +22,6 @@
         <option name="push" value="DATA/lib/android.hardware.wifi@1.0-vts.profiler.so->/data/local/tmp/32/android.hardware.wifi@1.0-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.wifi@1.0-vts.profiler.so->/data/local/tmp/64/android.hardware.wifi@1.0-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalWifiNanV1_0TargetProfiling"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalWifiNanV1_0TargetTest/VtsHalWifiNanV1_0TargetTest" />
diff --git a/wifi/V1_1/Android.bp b/wifi/V1_1/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/wifi/V1_1/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/radio/V1_1/target/Android.mk b/wifi/V1_1/adapter/Android.mk
similarity index 81%
copy from radio/V1_1/target/Android.mk
copy to wifi/V1_1/adapter/Android.mk
index bd1a0f1..6491572 100644
--- a/radio/V1_1/target/Android.mk
+++ b/wifi/V1_1/adapter/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalWifiV1_1Adapter
+VTS_CONFIG_SRC_DIR := testcases/hal/wifi/V1_1/adapter
 include test/vts/tools/build/Android.host_config.mk
diff --git a/wifi/V1_1/adapter/AndroidTest.xml b/wifi/V1_1/adapter/AndroidTest.xml
new file mode 100644
index 0000000..0352352
--- /dev/null
+++ b/wifi/V1_1/adapter/AndroidTest.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS VtsHalWifiV1_1Adapter test cases">
+    <option key="plan" name="config-descriptor:metadata" value="vts-hal-adapter"/>
+    <object class="com.android.tradefed.module.VtsHalAdapterModuleController" type="module_controller">
+        <option name="hal-package-name" value="android.hardware.wifi@1.1"/>
+    </object>
+    <target_preparer class="com.android.tradefed.targetprep.VtsHalAdapterPreparer">
+        <option name="adapter-binary-name" value="android.hardware.wifi@1.0-adapter"/>
+        <option name="hal-package-name" value="android.hardware.wifi@1.1"/>
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest">
+        <option name="package" value="com.android.devicehealth.tests"/>
+        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner"/>
+    </test>
+    <include name="CtsDevicePolicyManagerTestCases.config"/>
+    <include name="CtsNetTestCases.config"/>
+</configuration>
diff --git a/wifi/V1_1/build/Android.bp b/wifi/V1_1/build/Android.bp
index 5d30b7a..be1d9eb 100644
--- a/wifi/V1_1/build/Android.bp
+++ b/wifi/V1_1/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.wifi@1.1-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.wifi@1.1_hal",
     ],
@@ -17,7 +18,7 @@
 genrule {
     name: "android.hardware.wifi@1.1-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi@1.1 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/wifi/1.1/ $(genDir)/android/hardware/wifi/1.1/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.wifi@1.1 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/wifi/1.1/ $(genDir)/android/hardware/wifi/1.1/",
     srcs: [
         ":android.hardware.wifi@1.1_hal",
     ],
@@ -30,7 +31,7 @@
 genrule {
     name: "android.hardware.wifi@1.1-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi@1.1 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/wifi/1.1/ $(genDir)/android/hardware/wifi/1.1/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.wifi@1.1 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/wifi/1.1/ $(genDir)/android/hardware/wifi/1.1/",
     srcs: [
         ":android.hardware.wifi@1.1_hal",
     ],
@@ -45,38 +46,13 @@
     generated_sources: ["android.hardware.wifi@1.1-vts.driver_genc++"],
     generated_headers: ["android.hardware.wifi@1.1-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.wifi@1.1-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
     shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+        "android.hardware.wifi@1.0-vts.driver",
+    ],
+    static_libs: [
+        "android.hardware.wifi@1.0",
         "android.hardware.wifi@1.1",
-        "android.hardware.wifi@1.0",
-        "android.hardware.wifi@1.0-vts.driver",
-    ],
-    export_shared_lib_headers: [
-        "android.hardware.wifi@1.0",
-        "android.hardware.wifi@1.0-vts.driver",
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -84,7 +60,7 @@
 genrule {
     name: "android.hardware.wifi@1.1-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi@1.1 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/wifi/1.1/ $(genDir)/android/hardware/wifi/1.1/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.wifi@1.1 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/wifi/1.1/ $(genDir)/android/hardware/wifi/1.1/",
     srcs: [
         ":android.hardware.wifi@1.1_hal",
     ],
@@ -97,7 +73,7 @@
 genrule {
     name: "android.hardware.wifi@1.1-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi@1.1 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/wifi/1.1/ $(genDir)/android/hardware/wifi/1.1/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.wifi@1.1 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/wifi/1.1/ $(genDir)/android/hardware/wifi/1.1/",
     srcs: [
         ":android.hardware.wifi@1.1_hal",
     ],
@@ -112,28 +88,13 @@
     generated_sources: ["android.hardware.wifi@1.1-vts.profiler_genc++"],
     generated_headers: ["android.hardware.wifi@1.1-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.wifi@1.1-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
     shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
-        "android.hardware.wifi@1.1",
-        "android.hardware.wifi@1.0",
         "android.hardware.wifi@1.0-vts.profiler",
     ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
+    static_libs: [
+        "android.hardware.wifi@1.0",
+        "android.hardware.wifi@1.1",
     ],
 }
 
diff --git a/wifi/V1_1/target/base/AndroidTest.xml b/wifi/V1_1/target/base/AndroidTest.xml
index f871102..c05b7dc 100644
--- a/wifi/V1_1/target/base/AndroidTest.xml
+++ b/wifi/V1_1/target/base/AndroidTest.xml
@@ -19,7 +19,6 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalWifiV1_1Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalWifiV1_1TargetTest/VtsHalWifiV1_1TargetTest" />
@@ -27,7 +26,6 @@
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.wifi@1.1"/>
         <option name="test-timeout" value="15m"/>
         <option name="runtime-hint" value="5m"/>
         <!-- b/114117679: VtsHalWifiV1_0Target 2 failed test cases (waiver) -->
diff --git a/wifi/V1_1/target_profiling/base/AndroidTest.xml b/wifi/V1_1/target_profiling/base/AndroidTest.xml
index c934478..b176dd2 100644
--- a/wifi/V1_1/target_profiling/base/AndroidTest.xml
+++ b/wifi/V1_1/target_profiling/base/AndroidTest.xml
@@ -22,7 +22,6 @@
         <option name="push" value="DATA/lib/android.hardware.wifi@1.1-vts.profiler.so->/data/local/tmp/32/android.hardware.wifi@1.1-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.wifi@1.1-vts.profiler.so->/data/local/tmp/64/android.hardware.wifi@1.1-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalWifiV1_1TargetProfiling"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalWifiV1_1TargetTest/VtsHalWifiV1_1TargetTest" />
@@ -31,7 +30,6 @@
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.wifi@1.1"/>
         <option name="test-timeout" value="15m"/>
     </test>
 </configuration>
diff --git a/radio/V1_1/target/Android.mk b/wifi/V1_2/adapter/Android.mk
similarity index 81%
copy from radio/V1_1/target/Android.mk
copy to wifi/V1_2/adapter/Android.mk
index bd1a0f1..6fa6798 100644
--- a/radio/V1_1/target/Android.mk
+++ b/wifi/V1_2/adapter/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalWifiV1_2Adapter
+VTS_CONFIG_SRC_DIR := testcases/hal/wifi/V1_2/adapter
 include test/vts/tools/build/Android.host_config.mk
diff --git a/wifi/V1_2/adapter/AndroidTest.xml b/wifi/V1_2/adapter/AndroidTest.xml
new file mode 100644
index 0000000..2b4f411
--- /dev/null
+++ b/wifi/V1_2/adapter/AndroidTest.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS VtsHalWifiV1_2Adapter test cases">
+    <option key="plan" name="config-descriptor:metadata" value="vts-hal-adapter"/>
+    <object class="com.android.tradefed.module.VtsHalAdapterModuleController" type="module_controller">
+        <option name="hal-package-name" value="android.hardware.wifi@1.2"/>
+    </object>
+    <target_preparer class="com.android.tradefed.targetprep.VtsHalAdapterPreparer">
+        <option name="adapter-binary-name" value="android.hardware.wifi@1.1-adapter"/>
+        <option name="hal-package-name" value="android.hardware.wifi@1.2"/>
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest">
+        <option name="package" value="com.android.devicehealth.tests"/>
+        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner"/>
+    </test>
+    <include name="CtsNetTestCases.config"/>
+</configuration>
diff --git a/wifi/V1_2/build/Android.bp b/wifi/V1_2/build/Android.bp
new file mode 100644
index 0000000..ca1b596
--- /dev/null
+++ b/wifi/V1_2/build/Android.bp
@@ -0,0 +1,129 @@
+// This file was auto-generated. Do not edit manually.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
+
+// Generate .vts spec files.
+hal2vts {
+    name: "android.hardware.wifi@1.2-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
+    srcs: [
+        ":android.hardware.wifi@1.2_hal",
+    ],
+    out: [
+        "android/hardware/wifi/1.2/Wifi.vts",
+        "android/hardware/wifi/1.2/WifiChip.vts",
+        "android/hardware/wifi/1.2/WifiChipEventCallback.vts",
+        "android/hardware/wifi/1.2/WifiNanIface.vts",
+        "android/hardware/wifi/1.2/WifiNanIfaceEventCallback.vts",
+        "android/hardware/wifi/1.2/WifiStaIface.vts",
+        "android/hardware/wifi/1.2/types.vts",
+    ],
+}
+
+// Build VTS driver.
+genrule {
+    name: "android.hardware.wifi@1.2-vts.driver_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.wifi@1.2 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/wifi/1.2/ $(genDir)/android/hardware/wifi/1.2/",
+    srcs: [
+        ":android.hardware.wifi@1.2_hal",
+    ],
+    out: [
+        "android/hardware/wifi/1.2/Wifi.vts.cpp",
+        "android/hardware/wifi/1.2/WifiChip.vts.cpp",
+        "android/hardware/wifi/1.2/WifiChipEventCallback.vts.cpp",
+        "android/hardware/wifi/1.2/WifiNanIface.vts.cpp",
+        "android/hardware/wifi/1.2/WifiNanIfaceEventCallback.vts.cpp",
+        "android/hardware/wifi/1.2/WifiStaIface.vts.cpp",
+        "android/hardware/wifi/1.2/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.wifi@1.2-vts.driver_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.wifi@1.2 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/wifi/1.2/ $(genDir)/android/hardware/wifi/1.2/",
+    srcs: [
+        ":android.hardware.wifi@1.2_hal",
+    ],
+    out: [
+        "android/hardware/wifi/1.2/Wifi.vts.h",
+        "android/hardware/wifi/1.2/WifiChip.vts.h",
+        "android/hardware/wifi/1.2/WifiChipEventCallback.vts.h",
+        "android/hardware/wifi/1.2/WifiNanIface.vts.h",
+        "android/hardware/wifi/1.2/WifiNanIfaceEventCallback.vts.h",
+        "android/hardware/wifi/1.2/WifiStaIface.vts.h",
+        "android/hardware/wifi/1.2/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.wifi@1.2-vts.driver",
+    generated_sources: ["android.hardware.wifi@1.2-vts.driver_genc++"],
+    generated_headers: ["android.hardware.wifi@1.2-vts.driver_genc++_headers"],
+    export_generated_headers: ["android.hardware.wifi@1.2-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [
+        "android.hardware.wifi@1.0-vts.driver",
+        "android.hardware.wifi@1.1-vts.driver",
+    ],
+    static_libs: [
+        "android.hardware.wifi@1.0",
+        "android.hardware.wifi@1.1",
+        "android.hardware.wifi@1.2",
+    ],
+}
+
+// Build VTS profiler.
+genrule {
+    name: "android.hardware.wifi@1.2-vts.profiler_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.wifi@1.2 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/wifi/1.2/ $(genDir)/android/hardware/wifi/1.2/",
+    srcs: [
+        ":android.hardware.wifi@1.2_hal",
+    ],
+    out: [
+        "android/hardware/wifi/1.2/Wifi.vts.cpp",
+        "android/hardware/wifi/1.2/WifiChip.vts.cpp",
+        "android/hardware/wifi/1.2/WifiChipEventCallback.vts.cpp",
+        "android/hardware/wifi/1.2/WifiNanIface.vts.cpp",
+        "android/hardware/wifi/1.2/WifiNanIfaceEventCallback.vts.cpp",
+        "android/hardware/wifi/1.2/WifiStaIface.vts.cpp",
+        "android/hardware/wifi/1.2/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.wifi@1.2-vts.profiler_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.wifi@1.2 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/wifi/1.2/ $(genDir)/android/hardware/wifi/1.2/",
+    srcs: [
+        ":android.hardware.wifi@1.2_hal",
+    ],
+    out: [
+        "android/hardware/wifi/1.2/Wifi.vts.h",
+        "android/hardware/wifi/1.2/WifiChip.vts.h",
+        "android/hardware/wifi/1.2/WifiChipEventCallback.vts.h",
+        "android/hardware/wifi/1.2/WifiNanIface.vts.h",
+        "android/hardware/wifi/1.2/WifiNanIfaceEventCallback.vts.h",
+        "android/hardware/wifi/1.2/WifiStaIface.vts.h",
+        "android/hardware/wifi/1.2/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.wifi@1.2-vts.profiler",
+    generated_sources: ["android.hardware.wifi@1.2-vts.profiler_genc++"],
+    generated_headers: ["android.hardware.wifi@1.2-vts.profiler_genc++_headers"],
+    export_generated_headers: ["android.hardware.wifi@1.2-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [
+        "android.hardware.wifi@1.0-vts.profiler",
+        "android.hardware.wifi@1.1-vts.profiler",
+    ],
+    static_libs: [
+        "android.hardware.wifi@1.0",
+        "android.hardware.wifi@1.1",
+        "android.hardware.wifi@1.2",
+    ],
+}
+
diff --git a/radio/V1_1/target/Android.mk b/wifi/V1_2/target/Android.mk
similarity index 81%
copy from radio/V1_1/target/Android.mk
copy to wifi/V1_2/target/Android.mk
index bd1a0f1..0b86e01 100644
--- a/radio/V1_1/target/Android.mk
+++ b/wifi/V1_2/target/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalWifiV1_2Target
+VTS_CONFIG_SRC_DIR := testcases/hal/wifi/V1_2/target
 include test/vts/tools/build/Android.host_config.mk
diff --git a/radio/V1_1/target/AndroidTest.xml b/wifi/V1_2/target/AndroidTest.xml
similarity index 70%
copy from radio/V1_1/target/AndroidTest.xml
copy to wifi/V1_2/target/AndroidTest.xml
index 76b339d..07330b5 100644
--- a/radio/V1_1/target/AndroidTest.xml
+++ b/wifi/V1_2/target/AndroidTest.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2017 The Android Open Source Project
+<!-- Copyright (C) 2018 The Android Open Source Project
 
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
@@ -13,21 +13,20 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Config for VTS VtsHalRadioV1_1Target test cases">
-    <option name="config-descriptor:metadata" key="plan" value="vts-hal" />
+<configuration description="Config for VTS VtsHalWifiV1_2Target test cases">
+    <option name="config-descriptor:metadata" key="plan" value="vts-hal"/>
     <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
+    <multi_target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
-        <option name="test-module-name" value="VtsHalRadioV1_1Target"/>
-        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalRadioV1_1TargetTest/VtsHalRadioV1_1TargetTest"/>
-        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalRadioV1_1TargetTest/VtsHalRadioV1_1TargetTest"/>
+        <option name="test-module-name" value="VtsHalWifiV1_2Target"/>
+        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalWifiV1_2TargetTest/VtsHalWifiV1_2TargetTest"/>
+        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalWifiV1_2TargetTest/VtsHalWifiV1_2TargetTest"/>
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.radio@1.1"/>
-        <option name="test-timeout" value="15m"/>
+        <option name="test-timeout" value="1m"/>
     </test>
 </configuration>
diff --git a/radio/V1_1/target/Android.mk b/wifi/V1_2/target/nan/Android.mk
similarity index 81%
copy from radio/V1_1/target/Android.mk
copy to wifi/V1_2/target/nan/Android.mk
index bd1a0f1..6306aa8 100644
--- a/radio/V1_1/target/Android.mk
+++ b/wifi/V1_2/target/nan/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalWifiNanV1_2Target
+VTS_CONFIG_SRC_DIR := testcases/hal/wifi/V1_2/target/nan
 include test/vts/tools/build/Android.host_config.mk
diff --git a/radio/V1_1/target/AndroidTest.xml b/wifi/V1_2/target/nan/AndroidTest.xml
similarity index 73%
copy from radio/V1_1/target/AndroidTest.xml
copy to wifi/V1_2/target/nan/AndroidTest.xml
index 76b339d..0d4b7fb 100644
--- a/radio/V1_1/target/AndroidTest.xml
+++ b/wifi/V1_2/target/nan/AndroidTest.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2017 The Android Open Source Project
+<!-- Copyright (C) 2018 The Android Open Source Project
 
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
@@ -13,21 +13,20 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Config for VTS VtsHalRadioV1_1Target test cases">
+<configuration description="Config for VTS VtsHalWifiNanV1_2Target test cases">
     <option name="config-descriptor:metadata" key="plan" value="vts-hal" />
     <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
-        <option name="test-module-name" value="VtsHalRadioV1_1Target"/>
-        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalRadioV1_1TargetTest/VtsHalRadioV1_1TargetTest"/>
-        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalRadioV1_1TargetTest/VtsHalRadioV1_1TargetTest"/>
+        <option name="test-module-name" value="VtsHalWifiNanV1_2Target"/>
+        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalWifiNanV1_2TargetTest/VtsHalWifiNanV1_2TargetTest" />
+        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalWifiNanV1_2TargetTest/VtsHalWifiNanV1_2TargetTest" />
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.radio@1.1"/>
+        <option name="precondition-feature" value="android.hardware.wifi.aware" />
         <option name="test-timeout" value="15m"/>
     </test>
 </configuration>
diff --git a/radio/V1_1/target/Android.mk b/wifi/V1_2/target_profiling/Android.mk
similarity index 79%
copy from radio/V1_1/target/Android.mk
copy to wifi/V1_2/target_profiling/Android.mk
index bd1a0f1..2f938bb 100644
--- a/radio/V1_1/target/Android.mk
+++ b/wifi/V1_2/target_profiling/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalWifiV1_2TargetProfiling
+VTS_CONFIG_SRC_DIR := testcases/hal/wifi/V1_2/target_profiling
 include test/vts/tools/build/Android.host_config.mk
diff --git a/wifi/V1_2/target_profiling/AndroidTest.xml b/wifi/V1_2/target_profiling/AndroidTest.xml
new file mode 100644
index 0000000..e96429b
--- /dev/null
+++ b/wifi/V1_2/target_profiling/AndroidTest.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS VtsHalWifiV1_2TargetProfiling test cases">
+    <option name="config-descriptor:metadata" key="plan" value="vts-hal-profiling"/>
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="abort-on-push-failure" value="false"/>
+        <option name="push-group" value="HalHidlTargetProfilingTest.push"/>
+        <option name="cleanup" value="true"/>
+        <option name="push" value="DATA/lib/android.hardware.wifi@1.0-vts.profiler.so->/data/local/tmp/32/android.hardware.wifi@1.0-vts.profiler.so"/>
+        <option name="push" value="DATA/lib64/android.hardware.wifi@1.0-vts.profiler.so->/data/local/tmp/64/android.hardware.wifi@1.0-vts.profiler.so"/>
+        <option name="push" value="DATA/lib/android.hardware.wifi@1.1-vts.profiler.so->/data/local/tmp/32/android.hardware.wifi@1.1-vts.profiler.so"/>
+        <option name="push" value="DATA/lib64/android.hardware.wifi@1.1-vts.profiler.so->/data/local/tmp/64/android.hardware.wifi@1.1-vts.profiler.so"/>
+        <option name="push" value="DATA/lib/android.hardware.wifi@1.2-vts.profiler.so->/data/local/tmp/32/android.hardware.wifi@1.2-vts.profiler.so"/>
+        <option name="push" value="DATA/lib64/android.hardware.wifi@1.2-vts.profiler.so->/data/local/tmp/64/android.hardware.wifi@1.2-vts.profiler.so"/>
+    </target_preparer>
+    <multi_target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
+    <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+        <option name="test-module-name" value="VtsHalWifiV1_2TargetProfiling"/>
+        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalWifiV1_2TargetTest/VtsHalWifiV1_2TargetTest"/>
+        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalWifiV1_2TargetTest/VtsHalWifiV1_2TargetTest"/>
+        <option name="binary-test-type" value="hal_hidl_gtest"/>
+        <option name="binary-test-disable-framework" value="true"/>
+        <option name="binary-test-stop-native-servers" value="true"/>
+        <option name="enable-profiling" value="true"/>
+        <option name="test-timeout" value="1m"/>
+    </test>
+</configuration>
diff --git a/radio/V1_1/target/Android.mk b/wifi/V1_2/target_profiling/nan/Android.mk
similarity index 79%
copy from radio/V1_1/target/Android.mk
copy to wifi/V1_2/target_profiling/nan/Android.mk
index bd1a0f1..ef85f77 100644
--- a/radio/V1_1/target/Android.mk
+++ b/wifi/V1_2/target_profiling/nan/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalWifiNanV1_2TargetProfiling
+VTS_CONFIG_SRC_DIR := testcases/hal/wifi/V1_2/target_profiling/nan
 include test/vts/tools/build/Android.host_config.mk
diff --git a/wifi/V1_2/target_profiling/nan/AndroidTest.xml b/wifi/V1_2/target_profiling/nan/AndroidTest.xml
new file mode 100644
index 0000000..4598f8c
--- /dev/null
+++ b/wifi/V1_2/target_profiling/nan/AndroidTest.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS VtsHalWifiNanV1_2TargetProfiling test cases">
+    <option name="config-descriptor:metadata" key="plan" value="vts-hal-profiling" />
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="abort-on-push-failure" value="false"/>
+        <option name="push-group" value="HalHidlTargetProfilingTest.push"/>
+        <option name="cleanup" value="true"/>
+        <option name="push" value="DATA/lib/android.hardware.wifi@1.0-vts.profiler.so->/data/local/tmp/32/android.hardware.wifi@1.0-vts.profiler.so"/>
+        <option name="push" value="DATA/lib64/android.hardware.wifi@1.0-vts.profiler.so->/data/local/tmp/64/android.hardware.wifi@1.0-vts.profiler.so"/>
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+        <option name="test-module-name" value="VtsHalWifiNanV1_2TargetProfiling"/>
+        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalWifiNanV1_2TargetTest/VtsHalWifiNanV1_2TargetTest" />
+        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalWifiNanV1_2TargetTest/VtsHalWifiNanV1_2TargetTest" />
+        <option name="binary-test-type" value="hal_hidl_gtest"/>
+        <option name="enable-profiling" value="true"/>
+        <option name="precondition-feature" value="android.hardware.wifi.aware" />
+        <option name="test-timeout" value="15m"/>
+    </test>
+</configuration>
diff --git a/wifi/hostapd/V1_0/build/Android.bp b/wifi/hostapd/V1_0/build/Android.bp
new file mode 100644
index 0000000..5ca6a42
--- /dev/null
+++ b/wifi/hostapd/V1_0/build/Android.bp
@@ -0,0 +1,100 @@
+// This file was auto-generated. Do not edit manually.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
+
+// Generate .vts spec files.
+hal2vts {
+    name: "android.hardware.wifi.hostapd@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
+    srcs: [
+        ":android.hardware.wifi.hostapd@1.0_hal",
+    ],
+    out: [
+        "android/hardware/wifi/hostapd/1.0/Hostapd.vts",
+        "android/hardware/wifi/hostapd/1.0/types.vts",
+    ],
+}
+
+// Build VTS driver.
+genrule {
+    name: "android.hardware.wifi.hostapd@1.0-vts.driver_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.wifi.hostapd@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/wifi/hostapd/1.0/ $(genDir)/android/hardware/wifi/hostapd/1.0/",
+    srcs: [
+        ":android.hardware.wifi.hostapd@1.0_hal",
+    ],
+    out: [
+        "android/hardware/wifi/hostapd/1.0/Hostapd.vts.cpp",
+        "android/hardware/wifi/hostapd/1.0/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.wifi.hostapd@1.0-vts.driver_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.wifi.hostapd@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/wifi/hostapd/1.0/ $(genDir)/android/hardware/wifi/hostapd/1.0/",
+    srcs: [
+        ":android.hardware.wifi.hostapd@1.0_hal",
+    ],
+    out: [
+        "android/hardware/wifi/hostapd/1.0/Hostapd.vts.h",
+        "android/hardware/wifi/hostapd/1.0/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.wifi.hostapd@1.0-vts.driver",
+    generated_sources: ["android.hardware.wifi.hostapd@1.0-vts.driver_genc++"],
+    generated_headers: ["android.hardware.wifi.hostapd@1.0-vts.driver_genc++_headers"],
+    export_generated_headers: ["android.hardware.wifi.hostapd@1.0-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [
+        "android.hardware.wifi.supplicant@1.0-vts.driver",
+    ],
+    static_libs: [
+        "android.hardware.wifi.hostapd@1.0",
+        "android.hardware.wifi.supplicant@1.0",
+    ],
+}
+
+// Build VTS profiler.
+genrule {
+    name: "android.hardware.wifi.hostapd@1.0-vts.profiler_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.wifi.hostapd@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/wifi/hostapd/1.0/ $(genDir)/android/hardware/wifi/hostapd/1.0/",
+    srcs: [
+        ":android.hardware.wifi.hostapd@1.0_hal",
+    ],
+    out: [
+        "android/hardware/wifi/hostapd/1.0/Hostapd.vts.cpp",
+        "android/hardware/wifi/hostapd/1.0/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.wifi.hostapd@1.0-vts.profiler_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.wifi.hostapd@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/wifi/hostapd/1.0/ $(genDir)/android/hardware/wifi/hostapd/1.0/",
+    srcs: [
+        ":android.hardware.wifi.hostapd@1.0_hal",
+    ],
+    out: [
+        "android/hardware/wifi/hostapd/1.0/Hostapd.vts.h",
+        "android/hardware/wifi/hostapd/1.0/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.wifi.hostapd@1.0-vts.profiler",
+    generated_sources: ["android.hardware.wifi.hostapd@1.0-vts.profiler_genc++"],
+    generated_headers: ["android.hardware.wifi.hostapd@1.0-vts.profiler_genc++_headers"],
+    export_generated_headers: ["android.hardware.wifi.hostapd@1.0-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [
+        "android.hardware.wifi.supplicant@1.0-vts.profiler",
+    ],
+    static_libs: [
+        "android.hardware.wifi.hostapd@1.0",
+        "android.hardware.wifi.supplicant@1.0",
+    ],
+}
+
diff --git a/wifi/offload/V1_0/Android.bp b/wifi/offload/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/wifi/offload/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/wifi/offload/V1_0/build/Android.bp b/wifi/offload/V1_0/build/Android.bp
index d64f0b4..4484eaf 100644
--- a/wifi/offload/V1_0/build/Android.bp
+++ b/wifi/offload/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.wifi.offload@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.wifi.offload@1.0_hal",
     ],
@@ -18,7 +19,7 @@
 genrule {
     name: "android.hardware.wifi.offload@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi.offload@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/wifi/offload/1.0/ $(genDir)/android/hardware/wifi/offload/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.wifi.offload@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/wifi/offload/1.0/ $(genDir)/android/hardware/wifi/offload/1.0/",
     srcs: [
         ":android.hardware.wifi.offload@1.0_hal",
     ],
@@ -32,7 +33,7 @@
 genrule {
     name: "android.hardware.wifi.offload@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi.offload@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/wifi/offload/1.0/ $(genDir)/android/hardware/wifi/offload/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.wifi.offload@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/wifi/offload/1.0/ $(genDir)/android/hardware/wifi/offload/1.0/",
     srcs: [
         ":android.hardware.wifi.offload@1.0_hal",
     ],
@@ -48,36 +49,10 @@
     generated_sources: ["android.hardware.wifi.offload@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.wifi.offload@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.wifi.offload@1.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.wifi.offload@1.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -85,7 +60,7 @@
 genrule {
     name: "android.hardware.wifi.offload@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi.offload@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/wifi/offload/1.0/ $(genDir)/android/hardware/wifi/offload/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.wifi.offload@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/wifi/offload/1.0/ $(genDir)/android/hardware/wifi/offload/1.0/",
     srcs: [
         ":android.hardware.wifi.offload@1.0_hal",
     ],
@@ -99,7 +74,7 @@
 genrule {
     name: "android.hardware.wifi.offload@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi.offload@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/wifi/offload/1.0/ $(genDir)/android/hardware/wifi/offload/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.wifi.offload@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/wifi/offload/1.0/ $(genDir)/android/hardware/wifi/offload/1.0/",
     srcs: [
         ":android.hardware.wifi.offload@1.0_hal",
     ],
@@ -115,27 +90,10 @@
     generated_sources: ["android.hardware.wifi.offload@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.wifi.offload@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.wifi.offload@1.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.wifi.offload@1.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/wifi/offload/V1_0/target/AndroidTest.xml b/wifi/offload/V1_0/target/AndroidTest.xml
index aff2581..7a959ac 100644
--- a/wifi/offload/V1_0/target/AndroidTest.xml
+++ b/wifi/offload/V1_0/target/AndroidTest.xml
@@ -19,7 +19,6 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalWifiOffloadV1_0Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalWifiOffloadV1_0TargetTest/VtsHalWifiOffloadV1_0TargetTest"/>
@@ -27,7 +26,6 @@
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.wifi.offload@1.0"/>
         <option name="test-timeout" value="1m"/>
     </test>
 </configuration>
diff --git a/wifi/supplicant/V1_0/Android.bp b/wifi/supplicant/V1_0/Android.bp
deleted file mode 100644
index 995dd5b..0000000
--- a/wifi/supplicant/V1_0/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
-
-subdirs = [
-    "*",
-]
diff --git a/wifi/supplicant/V1_0/build/Android.bp b/wifi/supplicant/V1_0/build/Android.bp
index ef5841c..d28c94d 100644
--- a/wifi/supplicant/V1_0/build/Android.bp
+++ b/wifi/supplicant/V1_0/build/Android.bp
@@ -1,9 +1,10 @@
 // This file was auto-generated. Do not edit manually.
-// Use test/vts-testcase/hal/update_makefiles.py to generate this file.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
 
 // Generate .vts spec files.
 hal2vts {
     name: "android.hardware.wifi.supplicant@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
     srcs: [
         ":android.hardware.wifi.supplicant@1.0_hal",
     ],
@@ -28,7 +29,7 @@
 genrule {
     name: "android.hardware.wifi.supplicant@1.0-vts.driver_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi.supplicant@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/wifi/supplicant/1.0/ $(genDir)/android/hardware/wifi/supplicant/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.wifi.supplicant@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/wifi/supplicant/1.0/ $(genDir)/android/hardware/wifi/supplicant/1.0/",
     srcs: [
         ":android.hardware.wifi.supplicant@1.0_hal",
     ],
@@ -52,7 +53,7 @@
 genrule {
     name: "android.hardware.wifi.supplicant@1.0-vts.driver_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi.supplicant@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/wifi/supplicant/1.0/ $(genDir)/android/hardware/wifi/supplicant/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.wifi.supplicant@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/wifi/supplicant/1.0/ $(genDir)/android/hardware/wifi/supplicant/1.0/",
     srcs: [
         ":android.hardware.wifi.supplicant@1.0_hal",
     ],
@@ -78,36 +79,10 @@
     generated_sources: ["android.hardware.wifi.supplicant@1.0-vts.driver_genc++"],
     generated_headers: ["android.hardware.wifi.supplicant@1.0-vts.driver_genc++_headers"],
     export_generated_headers: ["android.hardware.wifi.supplicant@1.0-vts.driver_genc++_headers"],
-    shared_libs: [
-        "libcamera_metadata",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libprotobuf-cpp-full",
-        "libutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_drivercomm",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "android.hidl.allocator@1.0",
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.wifi.supplicant@1.0",
-        
-    ],
-    export_shared_lib_headers: [
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
@@ -115,7 +90,7 @@
 genrule {
     name: "android.hardware.wifi.supplicant@1.0-vts.profiler_genc++",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi.supplicant@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/wifi/supplicant/1.0/ $(genDir)/android/hardware/wifi/supplicant/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.wifi.supplicant@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/wifi/supplicant/1.0/ $(genDir)/android/hardware/wifi/supplicant/1.0/",
     srcs: [
         ":android.hardware.wifi.supplicant@1.0_hal",
     ],
@@ -139,7 +114,7 @@
 genrule {
     name: "android.hardware.wifi.supplicant@1.0-vts.profiler_genc++_headers",
     tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi.supplicant@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/wifi/supplicant/1.0/ $(genDir)/android/hardware/wifi/supplicant/1.0/",
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.wifi.supplicant@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/wifi/supplicant/1.0/ $(genDir)/android/hardware/wifi/supplicant/1.0/",
     srcs: [
         ":android.hardware.wifi.supplicant@1.0_hal",
     ],
@@ -165,27 +140,10 @@
     generated_sources: ["android.hardware.wifi.supplicant@1.0-vts.profiler_genc++"],
     generated_headers: ["android.hardware.wifi.supplicant@1.0-vts.profiler_genc++_headers"],
     export_generated_headers: ["android.hardware.wifi.supplicant@1.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libcutils",
-        "libfmq",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_common",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
         "android.hardware.wifi.supplicant@1.0",
-        
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-
-        // These warnings are in code generated with vtsc
-        // b/31362043
-        "-Wno-duplicate-decl-specifier",
-        "-Wno-implicitly-unsigned-literal",
     ],
 }
 
diff --git a/wifi/supplicant/V1_0/target/AndroidTest.xml b/wifi/supplicant/V1_0/target/AndroidTest.xml
index 863604f..ac198d0 100644
--- a/wifi/supplicant/V1_0/target/AndroidTest.xml
+++ b/wifi/supplicant/V1_0/target/AndroidTest.xml
@@ -19,7 +19,6 @@
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalWifiSupplicantV1_0Target"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalWifiSupplicantV1_0TargetTest/VtsHalWifiSupplicantV1_0TargetTest"/>
@@ -27,7 +26,6 @@
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.wifi.supplicant@1.0"/>
         <option name="test-timeout" value="30m"/>
     </test>
 </configuration>
diff --git a/wifi/supplicant/V1_0/target_profiling/AndroidTest.xml b/wifi/supplicant/V1_0/target_profiling/AndroidTest.xml
index 32db215..dbdbe55 100644
--- a/wifi/supplicant/V1_0/target_profiling/AndroidTest.xml
+++ b/wifi/supplicant/V1_0/target_profiling/AndroidTest.xml
@@ -22,7 +22,6 @@
         <option name="push" value="DATA/lib/android.hardware.wifi.supplicant@1.0-vts.profiler.so->/data/local/tmp/32/android.hardware.wifi.supplicant@1.0-vts.profiler.so"/>
         <option name="push" value="DATA/lib64/android.hardware.wifi.supplicant@1.0-vts.profiler.so->/data/local/tmp/64/android.hardware.wifi.supplicant@1.0-vts.profiler.so"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsHalWifiSupplicantV1_0TargetProfiling"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalWifiSupplicantV1_0TargetTest/VtsHalWifiSupplicantV1_0TargetTest"/>
@@ -31,7 +30,6 @@
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
         <option name="enable-profiling" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.wifi.supplicant@1.0"/>
         <option name="test-timeout" value="30m"/>
     </test>
 </configuration>
diff --git a/radio/V1_1/target/Android.mk b/wifi/supplicant/V1_1/adapter/Android.mk
similarity index 79%
copy from radio/V1_1/target/Android.mk
copy to wifi/supplicant/V1_1/adapter/Android.mk
index bd1a0f1..49709a0 100644
--- a/radio/V1_1/target/Android.mk
+++ b/wifi/supplicant/V1_1/adapter/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017 The Android Open Source Project
+# Copyright (C) 2018 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalWifiSupplicantV1_1Adapter
+VTS_CONFIG_SRC_DIR := testcases/hal/wifi/supplicant/V1_1/adapter
 include test/vts/tools/build/Android.host_config.mk
diff --git a/wifi/supplicant/V1_1/adapter/AndroidTest.xml b/wifi/supplicant/V1_1/adapter/AndroidTest.xml
new file mode 100644
index 0000000..83e661e
--- /dev/null
+++ b/wifi/supplicant/V1_1/adapter/AndroidTest.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS VtsHalWifiSupplicantV1_1Adapter test cases">
+    <option key="plan" name="config-descriptor:metadata" value="vts-hal-adapter"/>
+    <object class="com.android.tradefed.module.VtsHalAdapterModuleController" type="module_controller">
+        <option name="hal-package-name" value="android.hardware.wifi.supplicant@1.1"/>
+    </object>
+    <target_preparer class="com.android.tradefed.targetprep.VtsHalAdapterPreparer">
+        <option name="adapter-binary-name" value="android.hardware.wifi.supplicant@1.0-adapter"/>
+        <option name="hal-package-name" value="android.hardware.wifi.supplicant@1.1"/>
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest">
+        <option name="package" value="com.android.devicehealth.tests"/>
+        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner"/>
+    </test>
+    <include name="CtsDevicePolicyManagerTestCases.config"/>
+    <include name="CtsNetTestCases.config"/>
+</configuration>
diff --git a/wifi/supplicant/V1_1/build/Android.bp b/wifi/supplicant/V1_1/build/Android.bp
new file mode 100644
index 0000000..1729f79
--- /dev/null
+++ b/wifi/supplicant/V1_1/build/Android.bp
@@ -0,0 +1,110 @@
+// This file was auto-generated. Do not edit manually.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
+
+// Generate .vts spec files.
+hal2vts {
+    name: "android.hardware.wifi.supplicant@1.1-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
+    srcs: [
+        ":android.hardware.wifi.supplicant@1.1_hal",
+    ],
+    out: [
+        "android/hardware/wifi/supplicant/1.1/Supplicant.vts",
+        "android/hardware/wifi/supplicant/1.1/SupplicantStaIface.vts",
+        "android/hardware/wifi/supplicant/1.1/SupplicantStaIfaceCallback.vts",
+        "android/hardware/wifi/supplicant/1.1/SupplicantStaNetwork.vts",
+    ],
+}
+
+// Build VTS driver.
+genrule {
+    name: "android.hardware.wifi.supplicant@1.1-vts.driver_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.wifi.supplicant@1.1 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/wifi/supplicant/1.1/ $(genDir)/android/hardware/wifi/supplicant/1.1/",
+    srcs: [
+        ":android.hardware.wifi.supplicant@1.1_hal",
+    ],
+    out: [
+        "android/hardware/wifi/supplicant/1.1/Supplicant.vts.cpp",
+        "android/hardware/wifi/supplicant/1.1/SupplicantStaIface.vts.cpp",
+        "android/hardware/wifi/supplicant/1.1/SupplicantStaIfaceCallback.vts.cpp",
+        "android/hardware/wifi/supplicant/1.1/SupplicantStaNetwork.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.wifi.supplicant@1.1-vts.driver_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.wifi.supplicant@1.1 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/wifi/supplicant/1.1/ $(genDir)/android/hardware/wifi/supplicant/1.1/",
+    srcs: [
+        ":android.hardware.wifi.supplicant@1.1_hal",
+    ],
+    out: [
+        "android/hardware/wifi/supplicant/1.1/Supplicant.vts.h",
+        "android/hardware/wifi/supplicant/1.1/SupplicantStaIface.vts.h",
+        "android/hardware/wifi/supplicant/1.1/SupplicantStaIfaceCallback.vts.h",
+        "android/hardware/wifi/supplicant/1.1/SupplicantStaNetwork.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.wifi.supplicant@1.1-vts.driver",
+    generated_sources: ["android.hardware.wifi.supplicant@1.1-vts.driver_genc++"],
+    generated_headers: ["android.hardware.wifi.supplicant@1.1-vts.driver_genc++_headers"],
+    export_generated_headers: ["android.hardware.wifi.supplicant@1.1-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [
+        "android.hardware.wifi.supplicant@1.0-vts.driver",
+    ],
+    static_libs: [
+        "android.hardware.wifi.supplicant@1.0",
+        "android.hardware.wifi.supplicant@1.1",
+    ],
+}
+
+// Build VTS profiler.
+genrule {
+    name: "android.hardware.wifi.supplicant@1.1-vts.profiler_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.wifi.supplicant@1.1 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/wifi/supplicant/1.1/ $(genDir)/android/hardware/wifi/supplicant/1.1/",
+    srcs: [
+        ":android.hardware.wifi.supplicant@1.1_hal",
+    ],
+    out: [
+        "android/hardware/wifi/supplicant/1.1/Supplicant.vts.cpp",
+        "android/hardware/wifi/supplicant/1.1/SupplicantStaIface.vts.cpp",
+        "android/hardware/wifi/supplicant/1.1/SupplicantStaIfaceCallback.vts.cpp",
+        "android/hardware/wifi/supplicant/1.1/SupplicantStaNetwork.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.wifi.supplicant@1.1-vts.profiler_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.wifi.supplicant@1.1 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/wifi/supplicant/1.1/ $(genDir)/android/hardware/wifi/supplicant/1.1/",
+    srcs: [
+        ":android.hardware.wifi.supplicant@1.1_hal",
+    ],
+    out: [
+        "android/hardware/wifi/supplicant/1.1/Supplicant.vts.h",
+        "android/hardware/wifi/supplicant/1.1/SupplicantStaIface.vts.h",
+        "android/hardware/wifi/supplicant/1.1/SupplicantStaIfaceCallback.vts.h",
+        "android/hardware/wifi/supplicant/1.1/SupplicantStaNetwork.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.wifi.supplicant@1.1-vts.profiler",
+    generated_sources: ["android.hardware.wifi.supplicant@1.1-vts.profiler_genc++"],
+    generated_headers: ["android.hardware.wifi.supplicant@1.1-vts.profiler_genc++_headers"],
+    export_generated_headers: ["android.hardware.wifi.supplicant@1.1-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [
+        "android.hardware.wifi.supplicant@1.0-vts.profiler",
+    ],
+    static_libs: [
+        "android.hardware.wifi.supplicant@1.0",
+        "android.hardware.wifi.supplicant@1.1",
+    ],
+}
+
diff --git a/radio/V1_1/target/Android.mk b/wifi/supplicant/V1_1/target/Android.mk
similarity index 86%
copy from radio/V1_1/target/Android.mk
copy to wifi/supplicant/V1_1/target/Android.mk
index bd1a0f1..812b23b 100644
--- a/radio/V1_1/target/Android.mk
+++ b/wifi/supplicant/V1_1/target/Android.mk
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalWifiSupplicantV1_1Target
+VTS_CONFIG_SRC_DIR := testcases/hal/wifi/supplicant/V1_1/target
 include test/vts/tools/build/Android.host_config.mk
diff --git a/radio/V1_1/target/AndroidTest.xml b/wifi/supplicant/V1_1/target/AndroidTest.xml
similarity index 73%
copy from radio/V1_1/target/AndroidTest.xml
copy to wifi/supplicant/V1_1/target/AndroidTest.xml
index 76b339d..a3be44d 100644
--- a/radio/V1_1/target/AndroidTest.xml
+++ b/wifi/supplicant/V1_1/target/AndroidTest.xml
@@ -13,21 +13,20 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Config for VTS VtsHalRadioV1_1Target test cases">
+<configuration description="Config for VTS VtsHalWifiSupplicantV1_1Target test cases">
     <option name="config-descriptor:metadata" key="plan" value="vts-hal" />
     <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
         <option name="abort-on-push-failure" value="false"/>
         <option name="push-group" value="HalHidlTargetTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
+    <multi_target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
-        <option name="test-module-name" value="VtsHalRadioV1_1Target"/>
-        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalRadioV1_1TargetTest/VtsHalRadioV1_1TargetTest"/>
-        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalRadioV1_1TargetTest/VtsHalRadioV1_1TargetTest"/>
+        <option name="test-module-name" value="VtsHalWifiSupplicantV1_1Target"/>
+        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalWifiSupplicantV1_1TargetTest/VtsHalWifiSupplicantV1_1TargetTest"/>
+        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalWifiSupplicantV1_1TargetTest/VtsHalWifiSupplicantV1_1TargetTest"/>
         <option name="binary-test-type" value="hal_hidl_gtest"/>
         <option name="binary-test-disable-framework" value="true"/>
         <option name="binary-test-stop-native-servers" value="true"/>
-        <option name="precondition-lshal" value="android.hardware.radio@1.1"/>
-        <option name="test-timeout" value="15m"/>
+        <option name="test-timeout" value="30m"/>
     </test>
 </configuration>
diff --git a/radio/V1_1/target/Android.mk b/wifi/supplicant/V1_1/target_profiling/Android.mk
similarity index 84%
copy from radio/V1_1/target/Android.mk
copy to wifi/supplicant/V1_1/target_profiling/Android.mk
index bd1a0f1..751bf92 100644
--- a/radio/V1_1/target/Android.mk
+++ b/wifi/supplicant/V1_1/target_profiling/Android.mk
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := VtsHalRadioV1_1Target
-VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_1/target
+LOCAL_MODULE := VtsHalWifiSupplicantV1_1TargetProfiling
+VTS_CONFIG_SRC_DIR := testcases/hal/wifi/supplicant/V1_1/target_profiling
 include test/vts/tools/build/Android.host_config.mk
diff --git a/wifi/supplicant/V1_1/target_profiling/AndroidTest.xml b/wifi/supplicant/V1_1/target_profiling/AndroidTest.xml
new file mode 100644
index 0000000..110d46c
--- /dev/null
+++ b/wifi/supplicant/V1_1/target_profiling/AndroidTest.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2017 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Config for VTS VtsHalWifiSupplicantV1_1TargetProfiling test cases">
+    <option name="config-descriptor:metadata" key="plan" value="vts-hal-profiling" />
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="abort-on-push-failure" value="false"/>
+        <option name="push-group" value="HalHidlTargetProfilingTest.push"/>
+        <option name="cleanup" value="true"/>
+        <option name="push" value="DATA/lib/android.hardware.wifi.supplicant@1.0-vts.profiler.so->/data/local/tmp/32/android.hardware.wifi.supplicant@1.0-vts.profiler.so"/>
+        <option name="push" value="DATA/lib64/android.hardware.wifi.supplicant@1.0-vts.profiler.so->/data/local/tmp/64/android.hardware.wifi.supplicant@1.0-vts.profiler.so"/>
+        <option name="push" value="DATA/lib/android.hardware.wifi.supplicant@1.1-vts.profiler.so->/data/local/tmp/32/android.hardware.wifi.supplicant@1.1-vts.profiler.so"/>
+        <option name="push" value="DATA/lib64/android.hardware.wifi.supplicant@1.1-vts.profiler.so->/data/local/tmp/64/android.hardware.wifi.supplicant@1.1-vts.profiler.so"/>
+    </target_preparer>
+    <multi_target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
+    <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+        <option name="test-module-name" value="VtsHalWifiSupplicantV1_1TargetProfiling"/>
+        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalWifiSupplicantV1_1TargetTest/VtsHalWifiSupplicantV1_1TargetTest"/>
+        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalWifiSupplicantV1_1TargetTest/VtsHalWifiSupplicantV1_1TargetTest"/>
+        <option name="binary-test-type" value="hal_hidl_gtest"/>
+        <option name="binary-test-disable-framework" value="true"/>
+        <option name="binary-test-stop-native-servers" value="true"/>
+        <option name="enable-profiling" value="true"/>
+        <option name="test-timeout" value="30m"/>
+    </test>
+</configuration>