Merge "Add vehicle profiling test"
diff --git a/Android.bp b/Android.bp
index 03c2f66..b32af97 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,59 +1,4 @@
+// This file was auto-generated. Do not edit manually.
 subdirs = [
-    "configstore/V1_0/",
-    "ir/V1_0/",
-    "camera/common/V1_0/",
-    "camera/device/V3_2/",
-    "camera/device/V1_0/",
-    "camera/metadata/V3_2/",
-    "camera/provider/V2_4/",
-    "sensors/V1_0/",
-    "soundtrigger/V2_0/",
-    "dumpstate/V1_0/",
-    "benchmarks/msgq/V1_0/",
-    "biometrics/fingerprint/V2_1/",
-    "thermal/V1_0/",
-    "memtrack/V1_0/",
-    "automotive/vehicle/V2_0/",
-    "wifi/supplicant/V1_0/",
-    "wifi/V1_0/",
-    "broadcastradio/V1_0/",
-    "vr/V1_0/",
-    "evs/V1_0/",
-    "drm/V1_0/",
-    "nfc/V1_0/",
-    "audio/common/V2_0/",
-    "audio/V2_0/",
-    "audio/effect/V2_0/",
-    "usb/V1_0/",
-    "bluetooth/V1_0/",
-    "media/V1_0/",
-    "media/omx/V1_0/",
-    "contexthub/V1_0/",
-    "health/V1_0/",
-    "graphics/common/V1_0/",
-    "graphics/mapper/V2_0/",
-    "graphics/composer/V2_1/",
-    "graphics/allocator/V2_0/",
-    "vibrator/V1_0/",
-    "boot/V1_0/",
-    "gnss/V1_0/",
-    "tv/input/V1_0/",
-    "tv/cec/V1_0/",
-    "radio/V1_0/",
-    "light/V2_0/",
-    "keymaster/V3_0/",
-    "gatekeeper/V1_0/",
-    "power/V1_0/",
-    "tests/expression/V1_0/",
-    "tests/baz/V1_0/",
-    "tests/msgq/V1_0/",
-    "tests/pointer/V1_0/",
-    "tests/libhwbinder/V1_0/",
-    "tests/foo/V1_0/",
-    "tests/memory/V1_0/",
-    "tests/inheritance/V1_0/",
-    "tests/bar/V1_0/",
-    "tests/versioning/V1_0/",
-    "tests/versioning/V2_3/",
-    "tests/versioning/V2_2/",
+    "*",
 ]
diff --git a/audio/Android.bp b/audio/Android.bp
new file mode 100644
index 0000000..adeee4c
--- /dev/null
+++ b/audio/Android.bp
@@ -0,0 +1,5 @@
+subdirs = [
+    "V2_0",
+    "common/V2_0",
+    "effect/V2_0",
+]
diff --git a/audio/V2_0/Android.bp b/audio/V2_0/Android.bp
index 3fd7742..7cb1900 100644
--- a/audio/V2_0/Android.bp
+++ b/audio/V2_0/Android.bp
@@ -12,12 +12,12 @@
     out: [
         "android/hardware/audio/2.0/Device.vts.cpp",
         "android/hardware/audio/2.0/DevicesFactory.vts.cpp",
+        "android/hardware/audio/2.0/PrimaryDevice.vts.cpp",
         "android/hardware/audio/2.0/Stream.vts.cpp",
         "android/hardware/audio/2.0/StreamIn.vts.cpp",
-        "android/hardware/audio/2.0/StreamOutCallback.vts.cpp",
         "android/hardware/audio/2.0/StreamOut.vts.cpp",
+        "android/hardware/audio/2.0/StreamOutCallback.vts.cpp",
         "android/hardware/audio/2.0/types.vts.cpp",
-        "android/hardware/audio/2.0/PrimaryDevice.vts.cpp",
     ],
 }
 
@@ -31,12 +31,12 @@
     out: [
         "android/hardware/audio/2.0/Device.vts.h",
         "android/hardware/audio/2.0/DevicesFactory.vts.h",
+        "android/hardware/audio/2.0/PrimaryDevice.vts.h",
         "android/hardware/audio/2.0/Stream.vts.h",
         "android/hardware/audio/2.0/StreamIn.vts.h",
-        "android/hardware/audio/2.0/StreamOutCallback.vts.h",
         "android/hardware/audio/2.0/StreamOut.vts.h",
+        "android/hardware/audio/2.0/StreamOutCallback.vts.h",
         "android/hardware/audio/2.0/types.vts.h",
-        "android/hardware/audio/2.0/PrimaryDevice.vts.h",
     ],
 }
 
@@ -79,12 +79,12 @@
     out: [
         "android/hardware/audio/2.0/Device.vts.cpp",
         "android/hardware/audio/2.0/DevicesFactory.vts.cpp",
+        "android/hardware/audio/2.0/PrimaryDevice.vts.cpp",
         "android/hardware/audio/2.0/Stream.vts.cpp",
         "android/hardware/audio/2.0/StreamIn.vts.cpp",
-        "android/hardware/audio/2.0/StreamOutCallback.vts.cpp",
         "android/hardware/audio/2.0/StreamOut.vts.cpp",
+        "android/hardware/audio/2.0/StreamOutCallback.vts.cpp",
         "android/hardware/audio/2.0/types.vts.cpp",
-        "android/hardware/audio/2.0/PrimaryDevice.vts.cpp",
     ],
 }
 
@@ -98,12 +98,12 @@
     out: [
         "android/hardware/audio/2.0/Device.vts.h",
         "android/hardware/audio/2.0/DevicesFactory.vts.h",
+        "android/hardware/audio/2.0/PrimaryDevice.vts.h",
         "android/hardware/audio/2.0/Stream.vts.h",
         "android/hardware/audio/2.0/StreamIn.vts.h",
-        "android/hardware/audio/2.0/StreamOutCallback.vts.h",
         "android/hardware/audio/2.0/StreamOut.vts.h",
+        "android/hardware/audio/2.0/StreamOutCallback.vts.h",
         "android/hardware/audio/2.0/types.vts.h",
-        "android/hardware/audio/2.0/PrimaryDevice.vts.h",
     ],
 }
 
diff --git a/audio/effect/V2_0/Android.bp b/audio/effect/V2_0/Android.bp
index 41c0368..c0753af 100644
--- a/audio/effect/V2_0/Android.bp
+++ b/audio/effect/V2_0/Android.bp
@@ -10,21 +10,21 @@
         ":android.hardware.audio.effect@2.0_hal",
     ],
     out: [
-        "android/hardware/audio/effect/2.0/EffectsFactory.vts.cpp",
-        "android/hardware/audio/effect/2.0/BassBoostEffect.vts.cpp",
-        "android/hardware/audio/effect/2.0/VisualizerEffect.vts.cpp",
         "android/hardware/audio/effect/2.0/AcousticEchoCancelerEffect.vts.cpp",
-        "android/hardware/audio/effect/2.0/VirtualizerEffect.vts.cpp",
-        "android/hardware/audio/effect/2.0/EnvironmentalReverbEffect.vts.cpp",
-        "android/hardware/audio/effect/2.0/DownmixEffect.vts.cpp",
         "android/hardware/audio/effect/2.0/AutomaticGainControlEffect.vts.cpp",
-        "android/hardware/audio/effect/2.0/PresetReverbEffect.vts.cpp",
+        "android/hardware/audio/effect/2.0/BassBoostEffect.vts.cpp",
+        "android/hardware/audio/effect/2.0/DownmixEffect.vts.cpp",
         "android/hardware/audio/effect/2.0/Effect.vts.cpp",
+        "android/hardware/audio/effect/2.0/EffectBufferProviderCallback.vts.cpp",
+        "android/hardware/audio/effect/2.0/EffectsFactory.vts.cpp",
+        "android/hardware/audio/effect/2.0/EnvironmentalReverbEffect.vts.cpp",
+        "android/hardware/audio/effect/2.0/EqualizerEffect.vts.cpp",
         "android/hardware/audio/effect/2.0/LoudnessEnhancerEffect.vts.cpp",
         "android/hardware/audio/effect/2.0/NoiseSuppressionEffect.vts.cpp",
+        "android/hardware/audio/effect/2.0/PresetReverbEffect.vts.cpp",
+        "android/hardware/audio/effect/2.0/VirtualizerEffect.vts.cpp",
+        "android/hardware/audio/effect/2.0/VisualizerEffect.vts.cpp",
         "android/hardware/audio/effect/2.0/types.vts.cpp",
-        "android/hardware/audio/effect/2.0/EffectBufferProviderCallback.vts.cpp",
-        "android/hardware/audio/effect/2.0/EqualizerEffect.vts.cpp",
     ],
 }
 
@@ -36,21 +36,21 @@
         ":android.hardware.audio.effect@2.0_hal",
     ],
     out: [
-        "android/hardware/audio/effect/2.0/EffectsFactory.vts.h",
-        "android/hardware/audio/effect/2.0/BassBoostEffect.vts.h",
-        "android/hardware/audio/effect/2.0/VisualizerEffect.vts.h",
         "android/hardware/audio/effect/2.0/AcousticEchoCancelerEffect.vts.h",
-        "android/hardware/audio/effect/2.0/VirtualizerEffect.vts.h",
-        "android/hardware/audio/effect/2.0/EnvironmentalReverbEffect.vts.h",
-        "android/hardware/audio/effect/2.0/DownmixEffect.vts.h",
         "android/hardware/audio/effect/2.0/AutomaticGainControlEffect.vts.h",
-        "android/hardware/audio/effect/2.0/PresetReverbEffect.vts.h",
+        "android/hardware/audio/effect/2.0/BassBoostEffect.vts.h",
+        "android/hardware/audio/effect/2.0/DownmixEffect.vts.h",
         "android/hardware/audio/effect/2.0/Effect.vts.h",
+        "android/hardware/audio/effect/2.0/EffectBufferProviderCallback.vts.h",
+        "android/hardware/audio/effect/2.0/EffectsFactory.vts.h",
+        "android/hardware/audio/effect/2.0/EnvironmentalReverbEffect.vts.h",
+        "android/hardware/audio/effect/2.0/EqualizerEffect.vts.h",
         "android/hardware/audio/effect/2.0/LoudnessEnhancerEffect.vts.h",
         "android/hardware/audio/effect/2.0/NoiseSuppressionEffect.vts.h",
+        "android/hardware/audio/effect/2.0/PresetReverbEffect.vts.h",
+        "android/hardware/audio/effect/2.0/VirtualizerEffect.vts.h",
+        "android/hardware/audio/effect/2.0/VisualizerEffect.vts.h",
         "android/hardware/audio/effect/2.0/types.vts.h",
-        "android/hardware/audio/effect/2.0/EffectBufferProviderCallback.vts.h",
-        "android/hardware/audio/effect/2.0/EqualizerEffect.vts.h",
     ],
 }
 
@@ -91,21 +91,21 @@
         ":android.hardware.audio.effect@2.0_hal",
     ],
     out: [
-        "android/hardware/audio/effect/2.0/EffectsFactory.vts.cpp",
-        "android/hardware/audio/effect/2.0/BassBoostEffect.vts.cpp",
-        "android/hardware/audio/effect/2.0/VisualizerEffect.vts.cpp",
         "android/hardware/audio/effect/2.0/AcousticEchoCancelerEffect.vts.cpp",
-        "android/hardware/audio/effect/2.0/VirtualizerEffect.vts.cpp",
-        "android/hardware/audio/effect/2.0/EnvironmentalReverbEffect.vts.cpp",
-        "android/hardware/audio/effect/2.0/DownmixEffect.vts.cpp",
         "android/hardware/audio/effect/2.0/AutomaticGainControlEffect.vts.cpp",
-        "android/hardware/audio/effect/2.0/PresetReverbEffect.vts.cpp",
+        "android/hardware/audio/effect/2.0/BassBoostEffect.vts.cpp",
+        "android/hardware/audio/effect/2.0/DownmixEffect.vts.cpp",
         "android/hardware/audio/effect/2.0/Effect.vts.cpp",
+        "android/hardware/audio/effect/2.0/EffectBufferProviderCallback.vts.cpp",
+        "android/hardware/audio/effect/2.0/EffectsFactory.vts.cpp",
+        "android/hardware/audio/effect/2.0/EnvironmentalReverbEffect.vts.cpp",
+        "android/hardware/audio/effect/2.0/EqualizerEffect.vts.cpp",
         "android/hardware/audio/effect/2.0/LoudnessEnhancerEffect.vts.cpp",
         "android/hardware/audio/effect/2.0/NoiseSuppressionEffect.vts.cpp",
+        "android/hardware/audio/effect/2.0/PresetReverbEffect.vts.cpp",
+        "android/hardware/audio/effect/2.0/VirtualizerEffect.vts.cpp",
+        "android/hardware/audio/effect/2.0/VisualizerEffect.vts.cpp",
         "android/hardware/audio/effect/2.0/types.vts.cpp",
-        "android/hardware/audio/effect/2.0/EffectBufferProviderCallback.vts.cpp",
-        "android/hardware/audio/effect/2.0/EqualizerEffect.vts.cpp",
     ],
 }
 
@@ -117,21 +117,21 @@
         ":android.hardware.audio.effect@2.0_hal",
     ],
     out: [
-        "android/hardware/audio/effect/2.0/EffectsFactory.vts.h",
-        "android/hardware/audio/effect/2.0/BassBoostEffect.vts.h",
-        "android/hardware/audio/effect/2.0/VisualizerEffect.vts.h",
         "android/hardware/audio/effect/2.0/AcousticEchoCancelerEffect.vts.h",
-        "android/hardware/audio/effect/2.0/VirtualizerEffect.vts.h",
-        "android/hardware/audio/effect/2.0/EnvironmentalReverbEffect.vts.h",
-        "android/hardware/audio/effect/2.0/DownmixEffect.vts.h",
         "android/hardware/audio/effect/2.0/AutomaticGainControlEffect.vts.h",
-        "android/hardware/audio/effect/2.0/PresetReverbEffect.vts.h",
+        "android/hardware/audio/effect/2.0/BassBoostEffect.vts.h",
+        "android/hardware/audio/effect/2.0/DownmixEffect.vts.h",
         "android/hardware/audio/effect/2.0/Effect.vts.h",
+        "android/hardware/audio/effect/2.0/EffectBufferProviderCallback.vts.h",
+        "android/hardware/audio/effect/2.0/EffectsFactory.vts.h",
+        "android/hardware/audio/effect/2.0/EnvironmentalReverbEffect.vts.h",
+        "android/hardware/audio/effect/2.0/EqualizerEffect.vts.h",
         "android/hardware/audio/effect/2.0/LoudnessEnhancerEffect.vts.h",
         "android/hardware/audio/effect/2.0/NoiseSuppressionEffect.vts.h",
+        "android/hardware/audio/effect/2.0/PresetReverbEffect.vts.h",
+        "android/hardware/audio/effect/2.0/VirtualizerEffect.vts.h",
+        "android/hardware/audio/effect/2.0/VisualizerEffect.vts.h",
         "android/hardware/audio/effect/2.0/types.vts.h",
-        "android/hardware/audio/effect/2.0/EffectBufferProviderCallback.vts.h",
-        "android/hardware/audio/effect/2.0/EqualizerEffect.vts.h",
     ],
 }
 
diff --git a/automotive/Android.bp b/automotive/Android.bp
new file mode 100644
index 0000000..eac76b9
--- /dev/null
+++ b/automotive/Android.bp
@@ -0,0 +1,3 @@
+subdirs = [
+    "vehicle/V2_0",
+]
diff --git a/benchmarks/Android.bp b/benchmarks/Android.bp
new file mode 100644
index 0000000..028c36b
--- /dev/null
+++ b/benchmarks/Android.bp
@@ -0,0 +1,3 @@
+subdirs = [
+    "msgq/V1_0",
+]
diff --git a/biometrics/Android.bp b/biometrics/Android.bp
new file mode 100644
index 0000000..eec225f
--- /dev/null
+++ b/biometrics/Android.bp
@@ -0,0 +1,3 @@
+subdirs = [
+    "fingerprint/V2_1",
+]
diff --git a/bluetooth/Android.bp b/bluetooth/Android.bp
new file mode 100644
index 0000000..ffa62cd
--- /dev/null
+++ b/bluetooth/Android.bp
@@ -0,0 +1,3 @@
+subdirs = [
+    "V1_0",
+]
diff --git a/bluetooth/V1_0/target/Android.mk b/bluetooth/V1_0/target/Android.mk
index 3c84677..1bd05ba 100644
--- a/bluetooth/V1_0/target/Android.mk
+++ b/bluetooth/V1_0/target/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2016 The Android Open Source Project
+# 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.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := HalBluetoothHidlTargetBasicTest
+LOCAL_MODULE := VtsHalBluetoothV1_0Target
 VTS_CONFIG_SRC_DIR := testcases/hal/bluetooth/V1_0/target
 include test/vts/tools/build/Android.host_config.mk
diff --git a/bluetooth/V1_0/target/AndroidTest.xml b/bluetooth/V1_0/target/AndroidTest.xml
index 54fb89b..d459755 100644
--- a/bluetooth/V1_0/target/AndroidTest.xml
+++ b/bluetooth/V1_0/target/AndroidTest.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2016 The Android Open Source Project
+<!-- 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.
@@ -13,17 +13,19 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Config for VTS Bluetooth HIDL HAL's basic target-side test cases">
+<configuration description="Config for VTS VtsHalBluetoothV1_0Target test cases">
     <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
-        <option name="push-group" value="HidlHalTest.push" />
+        <option name="push-group" value="HidlHalTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
+    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
-        <option name="test-module-name" value="HalBluetoothHidlTargetBasicTest" />
+        <option name="test-module-name" value="VtsHalBluetoothV1_0Target"/>
         <option name="binary-test-sources" value="
-            _64bit::DATA/nativetest64/bluetooth_hidl_hal_test/bluetooth_hidl_hal_test,
-            "/>
-        <option name="binary-test-type" value="gtest" />
-        <option name="test-timeout" value="1m" />
+          _32bit::DATA/nativetest/VtsHalBluetoothV1_0TargetTest/VtsHalBluetoothV1_0TargetTest,
+          _64bit::DATA/nativetest64/VtsHalBluetoothV1_0TargetTest/VtsHalBluetoothV1_0TargetTest,
+          "/>
+        <option name="binary-test-type" value="hal_hidl_gtest"/>
+        <option name="precondition-lshal" value="android.hardware.bluetooth@1.0"/>
+        <option name="test-timeout" value="1m"/>
     </test>
 </configuration>
diff --git a/bluetooth/V1_0/target_profiling/Android.mk b/bluetooth/V1_0/target_profiling/Android.mk
index d0d850b..e4c4c9c 100644
--- a/bluetooth/V1_0/target_profiling/Android.mk
+++ b/bluetooth/V1_0/target_profiling/Android.mk
@@ -1,23 +1,23 @@
 #
-## Copyright (C) 2016 The Android Open Source Project
+# Copyright (C) 2017 The Android Open Source Project
 #
-## Licensed under the Apache License, Version 2.0 (the "License");
+# 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.
-# #
+# 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 := BluetoothHidlTargetProfilingTest
+LOCAL_MODULE := VtsHalBluetoothV1_0TargetProfiling
 VTS_CONFIG_SRC_DIR := testcases/hal/bluetooth/V1_0/target_profiling
 include test/vts/tools/build/Android.host_config.mk
diff --git a/bluetooth/V1_0/target_profiling/AndroidTest.xml b/bluetooth/V1_0/target_profiling/AndroidTest.xml
index 8052b3c..4880cf4 100644
--- a/bluetooth/V1_0/target_profiling/AndroidTest.xml
+++ b/bluetooth/V1_0/target_profiling/AndroidTest.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2016 The Android Open Source Project
+<!-- 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.
@@ -13,18 +13,23 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Config for VTS Bluetooth HIDL HAL's target-side profiling test cases">
+<configuration description="Config for VTS VtsHalBluetoothV1_0TargetProfiling test cases">
     <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
-        <option name="push-group" value="HidlHalTest.push" />
+        <option name="push-group" value="HidlHalTest.push"/>
+        <option name="cleanup" value="true"/>
+        <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" />
+    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
-        <option name="test-module-name" value="BluetoothHidlTargetProfilingTest" />
+        <option name="test-module-name" value="VtsHalBluetoothV1_0TargetProfiling"/>
         <option name="binary-test-sources" value="
-            _64bit::DATA/nativetest64/bluetooth_hidl_hal_test/bluetooth_hidl_hal_test,
-            "/>
-        <option name="binary-test-type" value="gtest" />
-        <option name="test-timeout" value="1m" />
-    <option name="enable-profiling" value="true" />
+          _32bit::DATA/nativetest/VtsHalBluetoothV1_0TargetTest/VtsHalBluetoothV1_0TargetTest,
+          _64bit::DATA/nativetest64/VtsHalBluetoothV1_0TargetTest/VtsHalBluetoothV1_0TargetTest,
+          "/>
+        <option name="binary-test-type" value="hal_hidl_gtest"/>
+        <option name="enable-profiling" value="true"/>
+        <option name="precondition-lshal" value="android.hardware.bluetooth@1.0"/>
+        <option name="test-timeout" value="1m"/>
     </test>
 </configuration>
diff --git a/boot/Android.bp b/boot/Android.bp
new file mode 100644
index 0000000..ffa62cd
--- /dev/null
+++ b/boot/Android.bp
@@ -0,0 +1,3 @@
+subdirs = [
+    "V1_0",
+]
diff --git a/boot/V1_0/target_profiling/AndroidTest.xml b/boot/V1_0/target_profiling/AndroidTest.xml
index 22d6ecc..780ceda 100644
--- a/boot/V1_0/target_profiling/AndroidTest.xml
+++ b/boot/V1_0/target_profiling/AndroidTest.xml
@@ -25,7 +25,7 @@
             _64bit::DATA/nativetest64/boot_hidl_hal_test/boot_hidl_hal_test,
             "/>
         <option name="binary-test-type" value="hal_hidl_gtest" />
-        <option name="precondition-lshal" value="android.hardware.boot@1.0::I*" />
+        <option name="precondition-lshal" value="android.hardware.boot@1.0" />
         <option name="test-timeout" value="5m" />
         <option name="enable-profiling" value="true" />
     </test>
diff --git a/broadcastradio/Android.bp b/broadcastradio/Android.bp
new file mode 100644
index 0000000..ffa62cd
--- /dev/null
+++ b/broadcastradio/Android.bp
@@ -0,0 +1,3 @@
+subdirs = [
+    "V1_0",
+]
diff --git a/broadcastradio/V1_0/Android.bp b/broadcastradio/V1_0/Android.bp
index d07bed5..0582251 100644
--- a/broadcastradio/V1_0/Android.bp
+++ b/broadcastradio/V1_0/Android.bp
@@ -10,11 +10,11 @@
         ":android.hardware.broadcastradio@1.0_hal",
     ],
     out: [
-        "android/hardware/broadcastradio/1.0/BroadcastRadioFactory.vts.cpp",
-        "android/hardware/broadcastradio/1.0/TunerCallback.vts.cpp",
-        "android/hardware/broadcastradio/1.0/Tuner.vts.cpp",
-        "android/hardware/broadcastradio/1.0/types.vts.cpp",
         "android/hardware/broadcastradio/1.0/BroadcastRadio.vts.cpp",
+        "android/hardware/broadcastradio/1.0/BroadcastRadioFactory.vts.cpp",
+        "android/hardware/broadcastradio/1.0/Tuner.vts.cpp",
+        "android/hardware/broadcastradio/1.0/TunerCallback.vts.cpp",
+        "android/hardware/broadcastradio/1.0/types.vts.cpp",
     ],
 }
 
@@ -26,11 +26,11 @@
         ":android.hardware.broadcastradio@1.0_hal",
     ],
     out: [
-        "android/hardware/broadcastradio/1.0/BroadcastRadioFactory.vts.h",
-        "android/hardware/broadcastradio/1.0/TunerCallback.vts.h",
-        "android/hardware/broadcastradio/1.0/Tuner.vts.h",
-        "android/hardware/broadcastradio/1.0/types.vts.h",
         "android/hardware/broadcastradio/1.0/BroadcastRadio.vts.h",
+        "android/hardware/broadcastradio/1.0/BroadcastRadioFactory.vts.h",
+        "android/hardware/broadcastradio/1.0/Tuner.vts.h",
+        "android/hardware/broadcastradio/1.0/TunerCallback.vts.h",
+        "android/hardware/broadcastradio/1.0/types.vts.h",
     ],
 }
 
@@ -69,11 +69,11 @@
         ":android.hardware.broadcastradio@1.0_hal",
     ],
     out: [
-        "android/hardware/broadcastradio/1.0/BroadcastRadioFactory.vts.cpp",
-        "android/hardware/broadcastradio/1.0/TunerCallback.vts.cpp",
-        "android/hardware/broadcastradio/1.0/Tuner.vts.cpp",
-        "android/hardware/broadcastradio/1.0/types.vts.cpp",
         "android/hardware/broadcastradio/1.0/BroadcastRadio.vts.cpp",
+        "android/hardware/broadcastradio/1.0/BroadcastRadioFactory.vts.cpp",
+        "android/hardware/broadcastradio/1.0/Tuner.vts.cpp",
+        "android/hardware/broadcastradio/1.0/TunerCallback.vts.cpp",
+        "android/hardware/broadcastradio/1.0/types.vts.cpp",
     ],
 }
 
@@ -85,11 +85,11 @@
         ":android.hardware.broadcastradio@1.0_hal",
     ],
     out: [
-        "android/hardware/broadcastradio/1.0/BroadcastRadioFactory.vts.h",
-        "android/hardware/broadcastradio/1.0/TunerCallback.vts.h",
-        "android/hardware/broadcastradio/1.0/Tuner.vts.h",
-        "android/hardware/broadcastradio/1.0/types.vts.h",
         "android/hardware/broadcastradio/1.0/BroadcastRadio.vts.h",
+        "android/hardware/broadcastradio/1.0/BroadcastRadioFactory.vts.h",
+        "android/hardware/broadcastradio/1.0/Tuner.vts.h",
+        "android/hardware/broadcastradio/1.0/TunerCallback.vts.h",
+        "android/hardware/broadcastradio/1.0/types.vts.h",
     ],
 }
 
diff --git a/build/build_rule_gen.py b/build/build_rule_gen.py
deleted file mode 100644
index 5f721dd..0000000
--- a/build/build_rule_gen.py
+++ /dev/null
@@ -1,328 +0,0 @@
-#!/usr/bin/env python3.4
-#
-# 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 fnmatch
-import os
-import shutil
-import subprocess
-import sys
-
-# TODO(trong): use proper packaging without referencing modules from source.
-TEST_VTS_DIR = '%s/../../../vts' % os.path.dirname(__file__)
-sys.path.append(TEST_VTS_DIR)
-from proto import ComponentSpecificationMessage_pb2 as CompSpecMsg
-from google.protobuf import text_format
-HW_IFACE_DIR = '../../../hardware/interfaces/'
-VTS_BUILD_TEMPLATE = 'build/template/vts_build_template.bp'
-
-
-def UpdateBuildRule():
-    """Updates build rules under test/vts-testcase/hal."""
-
-    def HalList():
-        """Returns a list of hals and version present under hardware/interfaces.
-
-        Returns:
-          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(HW_IFACE_DIR):
-            pattern = HW_IFACE_DIR + '*/[0-9].[0-9]'
-            if fnmatch.fnmatch(base, pattern):
-                hal_dir = base[len(HW_IFACE_DIR):]
-                hal_dir = hal_dir.rsplit('/', 1)
-                hal_name = hal_dir[0].replace('/', '.')
-                hal_version = hal_dir[1]
-                result.append((hal_name, hal_version))
-        return result
-
-    hal_list = HalList()
-    UpdateTopLevelBuildRule(hal_list)
-    UpdateHalDirBuildRule(hal_list)
-
-
-def UpdateTopLevelBuildRule(hal_list):
-    """Updates test/vts-testcase/hal/Android.bp"""
-    WriteBuildRule('./Android.bp', TopLevelBuildRule(hal_list))
-
-
-def UpdateHalDirBuildRule(hal_list):
-    """Updates build rules for vts drivers/profilers.
-
-    Updates vts drivers/profilers for each pair of (hal_name, hal_version)
-    in hal_list.
-
-    Args:
-        hal_list: list of tuple of strings. For example,
-            [('vibrator', '1.3'), ('sensors', '1.7')]
-    """
-    for target in hal_list:
-        hal_name = target[0]
-        hal_version = target[1]
-        hal_name_dir = hal_name.replace('.', '/')
-        hal_version_dir = 'V' + hal_version.replace('.', '_')
-
-        file_path = './%s/%s/Android.bp' % (hal_name_dir, hal_version_dir)
-        WriteBuildRule(file_path, VtsBuildRuleFromTemplate(
-            VTS_BUILD_TEMPLATE, hal_name, hal_version))
-
-
-def WriteBuildRule(file_path, build_rule):
-    """Writes the build rule into specified file.
-
-    Opens file_path and writes build_rule into it. Creates intermediate
-    directories if necessary.
-
-    Args:
-      file_path: string, path to file to which to write.
-      build_rule: string, build rule to be written into file.
-    """
-    print 'Updating %s' % file_path
-    dir_path = os.path.dirname(file_path)
-
-    if not os.path.exists(dir_path):
-        os.makedirs(dir_path)
-
-    with open(file_path, 'w') as bp_file:
-        bp_file.write(build_rule)
-
-
-def TopLevelBuildRule(hal_list):
-    """Returns build rules for test/vts-testcase/hal/Android.bp.
-
-    Args:
-      hal_list: list of tuple of strings. For example,
-          [('vibrator', '1.3'), ('sensors', '1.7')]
-    """
-    result = 'subdirs = [\n'
-    for target in hal_list:
-        hal_name = target[0]
-        hal_version = target[1]
-        hal_name_dir = hal_name.replace('.', '/')
-        hal_version_dir = 'V' + hal_version.replace('.', '_')
-        hal_dir = '%s/%s/' % (hal_name_dir, hal_version_dir)
-        result += '    "%s",\n' % hal_dir
-    result += ']\n'
-    return result
-
-
-def VtsBuildRuleFromTemplate(template_path, hal_name, hal_version):
-    """Returns build rules in string form by filling out a template.
-
-    Reads template from given path and fills it out.
-
-    Args:
-      template_path: string, path to build rule template file.
-      hal_name: string, name of the hal, e.g. 'vibrator'.
-      hal_version: string, version of the hal, e.g '7.4'
-
-    Returns:
-      string, complete build rules in string form
-    """
-    with open(template_path) as template_file:
-        build_template = str(template_file.read())
-    return FillOutBuildRuleTemplate(hal_name, hal_version, build_template)
-
-
-def ImportedPackagesList(hal_name, hal_version):
-    """Returns a list of imported packages.
-
-    Args:
-      hal_name: string, name of the hal, e.g. 'vibrator'.
-      hal_version: string, version of the hal, e.g '7.4'
-
-    Returns:
-      list of strings. For example,
-          ['android.hardware.vibrator@1.3', 'android.hidl.base@1.7']
-    """
-    temp_dir = './temp/'
-
-    def GenerateVtsSpecs(hal_name, hal_version, temp_dir):
-        """Generates VTS specs.
-
-        Uses hidl-gen to generate .vts files under a temp directory.
-
-        Args:
-          hal_name: string, name of the hal, e.g. 'vibrator'.
-          hal_version: string, version of the hal, e.g '7.4'
-          temp_dir: string, location to which to write temp files.
-        """
-        hidl_gen_cmd = ('hidl-gen -o {TEMP_DIR} -L vts '
-                        '-r android.hardware:../../../hardware/interfaces '
-                        '-r android.hidl:../../../system/libhidl/transport '
-                        'android.hardware.{HAL_NAME}@{HAL_VERSION}').format(
-                            TEMP_DIR=temp_dir,
-                            HAL_NAME=hal_name,
-                            HAL_VERSION=hal_version)
-        subprocess.call(hidl_gen_cmd, shell=True)
-
-    GenerateVtsSpecs(hal_name, hal_version, temp_dir)
-    vts_spec_list = VtsSpecList(hal_name, hal_version)
-
-    hal_name_dir = hal_name.replace('.', '/')
-    vts_spec_dir = '%s/android/hardware/%s/%s/' % (temp_dir, hal_name_dir,
-                                                   hal_version)
-    imported_packages = set()
-    for vts_spec in vts_spec_list:
-        spec_proto = CompSpecMsg.ComponentSpecificationMessage()
-        vts_spec_path = '%s/%s' % (vts_spec_dir, vts_spec)
-        with open(vts_spec_path, 'r') as spec_file:
-            spec_string = spec_file.read()
-            text_format.Merge(spec_string, spec_proto)
-
-        for package in getattr(spec_proto, 'import', []):
-            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)
-
-    shutil.rmtree(temp_dir)
-    return imported_packages
-
-
-def VtsSpecList(hal_name, hal_version):
-    """Returns list of .vts files for given hal name and version.
-
-    hal_name: string, name of the hal, e.g. 'vibrator'.
-    hal_version: string, version of the hal, e.g '7.4'
-
-    Returns:
-      list of string, .vts files for given hal name and version,
-          e.g. ['Vibrator.vts', 'types.vts']
-    """
-
-    def HalSpecToVtsSpecName(hal_spec_name):
-        """Transforms hal spec name to its corresponding vts spec name.
-
-        Args:
-          hal_spec_name: string, name of hal file, e.g. 'IVibrator.hal'.
-
-        Returns:
-          string, name of hal file, e.g. 'Vibrator.vts'.
-        """
-        vts_spec_name = hal_spec_name.replace('.hal', '.vts')
-        if vts_spec_name != 'types.vts':
-            vts_spec_name = vts_spec_name[1:]
-        return vts_spec_name
-
-    hal_files_dir = '%s/%s/%s/' % (HW_IFACE_DIR, hal_name.replace('.', '/'),
-                                   hal_version)
-    hal_spec_list = filter(lambda x: x.endswith('.hal'),
-                           os.listdir(hal_files_dir))
-    vts_spec_list = map(HalSpecToVtsSpecName, hal_spec_list)
-    return vts_spec_list
-
-
-def FillOutBuildRuleTemplate(hal_name, hal_version, template):
-    """Returns build rules in string form by filling out given template.
-
-    Args:
-      hal_name: string, name of the hal, e.g. 'vibrator'.
-      hal_version: string, version of the hal, e.g '7.4'
-      template: string, build rule template to fill out.
-
-    Returns:
-      string, complete build rule in string form.
-    """
-
-    def GeneratedOutput(hal_name, hal_version, extension):
-        """Formats list of vts spec names into a string.
-
-        Formats list of vts spec name for given hal_name, hal_version
-        into a string that can be inserted into build template.
-
-        Args:
-          hal_name: string, name of the hal, e.g. 'vibrator'.
-          hal_version: string, version of the hal, e.g '7.4'
-          extension: string, extension of files e.g. '.cpp'.
-
-        Returns:
-          string, to be inserted into build template.
-        """
-        result = []
-        vts_spec_list = VtsSpecList(hal_name, hal_version)
-        for vts_spec in vts_spec_list:
-            result.append('"android/hardware/%s/%s/%s%s",' % (
-                hal_name.replace('.', '/'), hal_version, vts_spec, extension))
-        return '\n        '.join(result)
-
-    def ImportedDriverPackages(imported_packages):
-        """Formats list of imported packages into a string.
-
-        Formats list of imported packages for given hal_name, hal_version
-        into a string that can be inserted into build template.
-
-        Args:
-          imported_packages: list of imported packages
-
-        Returns:
-          string, to be inserted into build template.
-        """
-        result = []
-        for package in imported_packages:
-            prefix = 'android.hardware.'
-            if package.startswith(prefix):
-                vts_driver_name = package.replace('@', '.vts.driver@')
-                result.append('"%s",' % vts_driver_name)
-            else:
-                result.append('"%s",' % package)
-        return '\n        '.join(result)
-
-    def ImportedProfilerPackages(imported_packages):
-        """Formats list of imported packages into a string.
-
-        Formats list of imported packages for given hal_name, hal_version
-        into a string that can be inserted into build template.
-
-        Args:
-          imported_packages: list of imported packages
-
-        Returns:
-          string, to be inserted into build template.
-        """
-        result = []
-        for package in imported_packages:
-            prefix = 'android.hardware.'
-            if package.startswith(prefix):
-                vts_driver_name = package + "-vts.profiler"
-                result.append('"%s",' % vts_driver_name)
-            else:
-                result.append('"%s",' % package)
-        return '\n        '.join(result)
-
-    build_rule = template
-    build_rule = build_rule.replace('{HAL_NAME}', hal_name)
-    build_rule = build_rule.replace('{HAL_NAME_DIR}', hal_name.replace('.',
-                                                                       '/'))
-    build_rule = build_rule.replace('{HAL_VERSION}', hal_version)
-    build_rule = build_rule.replace(
-        '{GENERATED_SOURCES}', GeneratedOutput(hal_name, hal_version, '.cpp'))
-    build_rule = build_rule.replace(
-        '{GENERATED_HEADERS}', GeneratedOutput(hal_name, hal_version, '.h'))
-
-    imported_packages = ImportedPackagesList(hal_name, hal_version)
-    build_rule = build_rule.replace(
-        '{IMPORTED_DRIVER_PACKAGES}',
-        ImportedDriverPackages(imported_packages))
-    build_rule = build_rule.replace(
-        '{IMPORTED_PROFILER_PACKAGES}',
-        ImportedProfilerPackages(imported_packages))
-
-    return build_rule
diff --git a/build/soong/Android.bp b/build/soong/Android.bp
new file mode 100644
index 0000000..7a1cd42
--- /dev/null
+++ b/build/soong/Android.bp
@@ -0,0 +1,28 @@
+// 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.
+
+bootstrap_go_package {
+    name: "soong-vts-spec",
+    pkgPath: "android/soong/vts/hal2vts",
+    deps: [
+        "blueprint",
+        "soong",
+        "soong-android",
+        "soong-genrule",
+    ],
+    srcs: [
+        "hal2vts.go",
+    ],
+    pluginFor: ["soong_build"],
+}
diff --git a/build/soong/hal2vts.go b/build/soong/hal2vts.go
new file mode 100644
index 0000000..92251fd
--- /dev/null
+++ b/build/soong/hal2vts.go
@@ -0,0 +1,149 @@
+// 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.
+
+package hal2vts
+
+import (
+	"path/filepath"
+	"sort"
+	"strings"
+	"sync"
+
+	"android/soong/android"
+	"android/soong/genrule"
+
+	"github.com/google/blueprint"
+)
+
+func init() {
+	android.RegisterModuleType("hal2vts", hal2vtsFactory)
+}
+
+var (
+	pctx = android.NewPackageContext("android/soong/hal2vts")
+
+	hidlGen = pctx.HostBinToolVariable("hidlGen", "hidl-gen")
+
+	hidlGenCmd = "${hidlGen}  -o ${genDir} -L vts " +
+		"-r android.hardware:hardware/interfaces " +
+		"-r android.hidl:system/libhidl/transport " +
+		"${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")
+)
+
+type hal2vtsProperties struct {
+	Srcs []string
+	Out  []string
+}
+
+type hal2vts struct {
+	android.ModuleBase
+
+	properties hal2vtsProperties
+
+	exportedHeaderDirs android.Paths
+	generatedHeaders   android.Paths
+}
+
+var _ genrule.SourceFileGenerator = (*hal2vts)(nil)
+
+func (h *hal2vts) GenerateAndroidBuildActions(ctx android.ModuleContext) {
+	srcFiles := ctx.ExpandSources(h.properties.Srcs, nil)
+	if len(srcFiles) != len(h.properties.Out) {
+		ctx.ModuleErrorf("Number of inputs must be equal to number of outputs.")
+	}
+
+	genDir := android.PathForModuleGen(ctx, "").String()
+
+	vtsList := vtsList(ctx.AConfig())
+
+	vtsListMutex.Lock()
+	defer vtsListMutex.Unlock()
+
+	for i, src := range srcFiles {
+		out := android.PathForModuleGen(ctx, h.properties.Out[i])
+		if src.Ext() != ".hal" {
+			ctx.ModuleErrorf("Source file has to be a .hal file.")
+		}
+
+		relSrc, err := filepath.Rel("hardware/interfaces/", src.String())
+		if err != nil {
+			ctx.ModuleErrorf("Source file has to be from hardware/interfaces")
+		}
+		halDir := filepath.Dir(relSrc)
+		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,
+			Input:  src,
+			Output: out,
+			Args: map[string]string{
+				"genDir":  genDir,
+				"pckg":    pckg,
+				"ver":     ver,
+				"halFile": halFile,
+			},
+		})
+		h.generatedHeaders = append(h.generatedHeaders, out)
+		*vtsList = append(*vtsList, out)
+	}
+	h.exportedHeaderDirs = append(h.exportedHeaderDirs, android.PathForModuleGen(ctx, ""))
+}
+
+func (h *hal2vts) DepsMutator(ctx android.BottomUpMutatorContext) {
+	android.ExtractSourcesDeps(ctx, h.properties.Srcs)
+}
+
+func (h *hal2vts) GeneratedHeaderDirs() android.Paths {
+	return h.exportedHeaderDirs
+}
+
+func (h *hal2vts) GeneratedSourceFiles() android.Paths {
+	return h.generatedHeaders
+}
+
+func hal2vtsFactory() (blueprint.Module, []interface{}) {
+	h := &hal2vts{}
+	return android.InitAndroidModule(h, &h.properties)
+}
+
+func vtsList(config android.Config) *android.Paths {
+	return config.Once("vtsList", func() interface{} {
+		return &android.Paths{}
+	}).(*android.Paths)
+}
+
+var vtsListMutex sync.Mutex
+
+func init() {
+	android.RegisterMakeVarsProvider(pctx, makeVarsProvider)
+}
+
+func makeVarsProvider(ctx android.MakeVarsContext) {
+	vtsList := vtsList(ctx.Config()).Strings()
+	sort.Strings(vtsList)
+
+	ctx.Strict("VTS_FILE_LIST", strings.Join(vtsList, " "))
+}
diff --git a/camera/Android.bp b/camera/Android.bp
new file mode 100644
index 0000000..ee8afc5
--- /dev/null
+++ b/camera/Android.bp
@@ -0,0 +1,7 @@
+subdirs = [
+    "common/V1_0",
+    "device/V1_0",
+    "device/V3_2",
+    "metadata/V3_2",
+    "provider/V2_4",
+]
diff --git a/camera/device/V1_0/Android.bp b/camera/device/V1_0/Android.bp
index d942605..0c68fad 100644
--- a/camera/device/V1_0/Android.bp
+++ b/camera/device/V1_0/Android.bp
@@ -10,10 +10,10 @@
         ":android.hardware.camera.device@1.0_hal",
     ],
     out: [
+        "android/hardware/camera/device/1.0/CameraDevice.vts.cpp",
+        "android/hardware/camera/device/1.0/CameraDeviceCallback.vts.cpp",
         "android/hardware/camera/device/1.0/CameraDevicePreviewCallback.vts.cpp",
         "android/hardware/camera/device/1.0/types.vts.cpp",
-        "android/hardware/camera/device/1.0/CameraDeviceCallback.vts.cpp",
-        "android/hardware/camera/device/1.0/CameraDevice.vts.cpp",
     ],
 }
 
@@ -25,10 +25,10 @@
         ":android.hardware.camera.device@1.0_hal",
     ],
     out: [
+        "android/hardware/camera/device/1.0/CameraDevice.vts.h",
+        "android/hardware/camera/device/1.0/CameraDeviceCallback.vts.h",
         "android/hardware/camera/device/1.0/CameraDevicePreviewCallback.vts.h",
         "android/hardware/camera/device/1.0/types.vts.h",
-        "android/hardware/camera/device/1.0/CameraDeviceCallback.vts.h",
-        "android/hardware/camera/device/1.0/CameraDevice.vts.h",
     ],
 }
 
@@ -73,10 +73,10 @@
         ":android.hardware.camera.device@1.0_hal",
     ],
     out: [
+        "android/hardware/camera/device/1.0/CameraDevice.vts.cpp",
+        "android/hardware/camera/device/1.0/CameraDeviceCallback.vts.cpp",
         "android/hardware/camera/device/1.0/CameraDevicePreviewCallback.vts.cpp",
         "android/hardware/camera/device/1.0/types.vts.cpp",
-        "android/hardware/camera/device/1.0/CameraDeviceCallback.vts.cpp",
-        "android/hardware/camera/device/1.0/CameraDevice.vts.cpp",
     ],
 }
 
@@ -88,10 +88,10 @@
         ":android.hardware.camera.device@1.0_hal",
     ],
     out: [
+        "android/hardware/camera/device/1.0/CameraDevice.vts.h",
+        "android/hardware/camera/device/1.0/CameraDeviceCallback.vts.h",
         "android/hardware/camera/device/1.0/CameraDevicePreviewCallback.vts.h",
         "android/hardware/camera/device/1.0/types.vts.h",
-        "android/hardware/camera/device/1.0/CameraDeviceCallback.vts.h",
-        "android/hardware/camera/device/1.0/CameraDevice.vts.h",
     ],
 }
 
diff --git a/camera/device/V3_2/Android.bp b/camera/device/V3_2/Android.bp
index 5afd91f..220c8a3 100644
--- a/camera/device/V3_2/Android.bp
+++ b/camera/device/V3_2/Android.bp
@@ -10,10 +10,10 @@
         ":android.hardware.camera.device@3.2_hal",
     ],
     out: [
+        "android/hardware/camera/device/3.2/CameraDevice.vts.cpp",
+        "android/hardware/camera/device/3.2/CameraDeviceCallback.vts.cpp",
         "android/hardware/camera/device/3.2/CameraDeviceSession.vts.cpp",
         "android/hardware/camera/device/3.2/types.vts.cpp",
-        "android/hardware/camera/device/3.2/CameraDeviceCallback.vts.cpp",
-        "android/hardware/camera/device/3.2/CameraDevice.vts.cpp",
     ],
 }
 
@@ -25,10 +25,10 @@
         ":android.hardware.camera.device@3.2_hal",
     ],
     out: [
+        "android/hardware/camera/device/3.2/CameraDevice.vts.h",
+        "android/hardware/camera/device/3.2/CameraDeviceCallback.vts.h",
         "android/hardware/camera/device/3.2/CameraDeviceSession.vts.h",
         "android/hardware/camera/device/3.2/types.vts.h",
-        "android/hardware/camera/device/3.2/CameraDeviceCallback.vts.h",
-        "android/hardware/camera/device/3.2/CameraDevice.vts.h",
     ],
 }
 
@@ -52,15 +52,15 @@
         "libprotobuf-cpp-full",
         "android.hardware.camera.device@3.2",
         "android.hardware.camera.common.vts.driver@1.0",
+        "android.hardware.graphics.allocator.vts.driver@2.0",
         "android.hardware.graphics.common.vts.driver@1.0",
         "android.hidl.base@1.0",
-        "android.hardware.graphics.allocator.vts.driver@2.0",
     ],
     export_shared_lib_headers: [
         "android.hardware.camera.common.vts.driver@1.0",
+        "android.hardware.graphics.allocator.vts.driver@2.0",
         "android.hardware.graphics.common.vts.driver@1.0",
         "android.hidl.base@1.0",
-        "android.hardware.graphics.allocator.vts.driver@2.0",
     ],
 }
 
@@ -73,10 +73,10 @@
         ":android.hardware.camera.device@3.2_hal",
     ],
     out: [
+        "android/hardware/camera/device/3.2/CameraDevice.vts.cpp",
+        "android/hardware/camera/device/3.2/CameraDeviceCallback.vts.cpp",
         "android/hardware/camera/device/3.2/CameraDeviceSession.vts.cpp",
         "android/hardware/camera/device/3.2/types.vts.cpp",
-        "android/hardware/camera/device/3.2/CameraDeviceCallback.vts.cpp",
-        "android/hardware/camera/device/3.2/CameraDevice.vts.cpp",
     ],
 }
 
@@ -88,10 +88,10 @@
         ":android.hardware.camera.device@3.2_hal",
     ],
     out: [
+        "android/hardware/camera/device/3.2/CameraDevice.vts.h",
+        "android/hardware/camera/device/3.2/CameraDeviceCallback.vts.h",
         "android/hardware/camera/device/3.2/CameraDeviceSession.vts.h",
         "android/hardware/camera/device/3.2/types.vts.h",
-        "android/hardware/camera/device/3.2/CameraDeviceCallback.vts.h",
-        "android/hardware/camera/device/3.2/CameraDevice.vts.h",
     ],
 }
 
@@ -109,9 +109,9 @@
         "libprotobuf-cpp-full",
         "android.hardware.camera.device@3.2",
         "android.hardware.camera.common@1.0-vts.profiler",
+        "android.hardware.graphics.allocator@2.0-vts.profiler",
         "android.hardware.graphics.common@1.0-vts.profiler",
         "android.hidl.base@1.0",
-        "android.hardware.graphics.allocator@2.0-vts.profiler",
     ],
 }
 
diff --git a/camera/provider/V2_4/Android.bp b/camera/provider/V2_4/Android.bp
index f734db3..b1ad3c7 100644
--- a/camera/provider/V2_4/Android.bp
+++ b/camera/provider/V2_4/Android.bp
@@ -10,8 +10,8 @@
         ":android.hardware.camera.provider@2.4_hal",
     ],
     out: [
-        "android/hardware/camera/provider/2.4/CameraProviderCallback.vts.cpp",
         "android/hardware/camera/provider/2.4/CameraProvider.vts.cpp",
+        "android/hardware/camera/provider/2.4/CameraProviderCallback.vts.cpp",
     ],
 }
 
@@ -23,8 +23,8 @@
         ":android.hardware.camera.provider@2.4_hal",
     ],
     out: [
-        "android/hardware/camera/provider/2.4/CameraProviderCallback.vts.h",
         "android/hardware/camera/provider/2.4/CameraProvider.vts.h",
+        "android/hardware/camera/provider/2.4/CameraProviderCallback.vts.h",
     ],
 }
 
@@ -47,20 +47,20 @@
         "libcamera_metadata",
         "libprotobuf-cpp-full",
         "android.hardware.camera.provider@2.4",
-        "android.hidl.base@1.0",
-        "android.hardware.graphics.allocator.vts.driver@2.0",
-        "android.hardware.camera.device.vts.driver@1.0",
-        "android.hardware.graphics.common.vts.driver@1.0",
-        "android.hardware.camera.device.vts.driver@3.2",
         "android.hardware.camera.common.vts.driver@1.0",
+        "android.hardware.camera.device.vts.driver@1.0",
+        "android.hardware.camera.device.vts.driver@3.2",
+        "android.hardware.graphics.allocator.vts.driver@2.0",
+        "android.hardware.graphics.common.vts.driver@1.0",
+        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
-        "android.hidl.base@1.0",
-        "android.hardware.graphics.allocator.vts.driver@2.0",
-        "android.hardware.camera.device.vts.driver@1.0",
-        "android.hardware.graphics.common.vts.driver@1.0",
-        "android.hardware.camera.device.vts.driver@3.2",
         "android.hardware.camera.common.vts.driver@1.0",
+        "android.hardware.camera.device.vts.driver@1.0",
+        "android.hardware.camera.device.vts.driver@3.2",
+        "android.hardware.graphics.allocator.vts.driver@2.0",
+        "android.hardware.graphics.common.vts.driver@1.0",
+        "android.hidl.base@1.0",
     ],
 }
 
@@ -73,8 +73,8 @@
         ":android.hardware.camera.provider@2.4_hal",
     ],
     out: [
-        "android/hardware/camera/provider/2.4/CameraProviderCallback.vts.cpp",
         "android/hardware/camera/provider/2.4/CameraProvider.vts.cpp",
+        "android/hardware/camera/provider/2.4/CameraProviderCallback.vts.cpp",
     ],
 }
 
@@ -86,8 +86,8 @@
         ":android.hardware.camera.provider@2.4_hal",
     ],
     out: [
-        "android/hardware/camera/provider/2.4/CameraProviderCallback.vts.h",
         "android/hardware/camera/provider/2.4/CameraProvider.vts.h",
+        "android/hardware/camera/provider/2.4/CameraProviderCallback.vts.h",
     ],
 }
 
@@ -104,12 +104,12 @@
         "libvts_multidevice_proto",
         "libprotobuf-cpp-full",
         "android.hardware.camera.provider@2.4",
-        "android.hidl.base@1.0",
-        "android.hardware.graphics.allocator@2.0-vts.profiler",
-        "android.hardware.camera.device@1.0-vts.profiler",
-        "android.hardware.graphics.common@1.0-vts.profiler",
-        "android.hardware.camera.device@3.2-vts.profiler",
         "android.hardware.camera.common@1.0-vts.profiler",
+        "android.hardware.camera.device@1.0-vts.profiler",
+        "android.hardware.camera.device@3.2-vts.profiler",
+        "android.hardware.graphics.allocator@2.0-vts.profiler",
+        "android.hardware.graphics.common@1.0-vts.profiler",
+        "android.hidl.base@1.0",
     ],
 }
 
diff --git a/configstore/Android.bp b/configstore/Android.bp
new file mode 100644
index 0000000..ffa62cd
--- /dev/null
+++ b/configstore/Android.bp
@@ -0,0 +1,3 @@
+subdirs = [
+    "V1_0",
+]
diff --git a/contexthub/Android.bp b/contexthub/Android.bp
new file mode 100644
index 0000000..ffa62cd
--- /dev/null
+++ b/contexthub/Android.bp
@@ -0,0 +1,3 @@
+subdirs = [
+    "V1_0",
+]
diff --git a/contexthub/V1_0/Android.bp b/contexthub/V1_0/Android.bp
index b250a52..70fa2dd 100644
--- a/contexthub/V1_0/Android.bp
+++ b/contexthub/V1_0/Android.bp
@@ -10,8 +10,8 @@
         ":android.hardware.contexthub@1.0_hal",
     ],
     out: [
-        "android/hardware/contexthub/1.0/ContexthubCallback.vts.cpp",
         "android/hardware/contexthub/1.0/Contexthub.vts.cpp",
+        "android/hardware/contexthub/1.0/ContexthubCallback.vts.cpp",
         "android/hardware/contexthub/1.0/types.vts.cpp",
     ],
 }
@@ -24,8 +24,8 @@
         ":android.hardware.contexthub@1.0_hal",
     ],
     out: [
-        "android/hardware/contexthub/1.0/ContexthubCallback.vts.h",
         "android/hardware/contexthub/1.0/Contexthub.vts.h",
+        "android/hardware/contexthub/1.0/ContexthubCallback.vts.h",
         "android/hardware/contexthub/1.0/types.vts.h",
     ],
 }
@@ -65,8 +65,8 @@
         ":android.hardware.contexthub@1.0_hal",
     ],
     out: [
-        "android/hardware/contexthub/1.0/ContexthubCallback.vts.cpp",
         "android/hardware/contexthub/1.0/Contexthub.vts.cpp",
+        "android/hardware/contexthub/1.0/ContexthubCallback.vts.cpp",
         "android/hardware/contexthub/1.0/types.vts.cpp",
     ],
 }
@@ -79,8 +79,8 @@
         ":android.hardware.contexthub@1.0_hal",
     ],
     out: [
-        "android/hardware/contexthub/1.0/ContexthubCallback.vts.h",
         "android/hardware/contexthub/1.0/Contexthub.vts.h",
+        "android/hardware/contexthub/1.0/ContexthubCallback.vts.h",
         "android/hardware/contexthub/1.0/types.vts.h",
     ],
 }
diff --git a/drm/Android.bp b/drm/Android.bp
new file mode 100644
index 0000000..ffa62cd
--- /dev/null
+++ b/drm/Android.bp
@@ -0,0 +1,3 @@
+subdirs = [
+    "V1_0",
+]
diff --git a/drm/V1_0/Android.bp b/drm/V1_0/Android.bp
index 0ed1858..14232b5 100644
--- a/drm/V1_0/Android.bp
+++ b/drm/V1_0/Android.bp
@@ -10,12 +10,12 @@
         ":android.hardware.drm@1.0_hal",
     ],
     out: [
-        "android/hardware/drm/1.0/DrmPluginListener.vts.cpp",
+        "android/hardware/drm/1.0/CryptoFactory.vts.cpp",
+        "android/hardware/drm/1.0/CryptoPlugin.vts.cpp",
         "android/hardware/drm/1.0/DrmFactory.vts.cpp",
         "android/hardware/drm/1.0/DrmPlugin.vts.cpp",
-        "android/hardware/drm/1.0/CryptoFactory.vts.cpp",
+        "android/hardware/drm/1.0/DrmPluginListener.vts.cpp",
         "android/hardware/drm/1.0/types.vts.cpp",
-        "android/hardware/drm/1.0/CryptoPlugin.vts.cpp",
     ],
 }
 
@@ -27,12 +27,12 @@
         ":android.hardware.drm@1.0_hal",
     ],
     out: [
-        "android/hardware/drm/1.0/DrmPluginListener.vts.h",
+        "android/hardware/drm/1.0/CryptoFactory.vts.h",
+        "android/hardware/drm/1.0/CryptoPlugin.vts.h",
         "android/hardware/drm/1.0/DrmFactory.vts.h",
         "android/hardware/drm/1.0/DrmPlugin.vts.h",
-        "android/hardware/drm/1.0/CryptoFactory.vts.h",
+        "android/hardware/drm/1.0/DrmPluginListener.vts.h",
         "android/hardware/drm/1.0/types.vts.h",
-        "android/hardware/drm/1.0/CryptoPlugin.vts.h",
     ],
 }
 
@@ -71,12 +71,12 @@
         ":android.hardware.drm@1.0_hal",
     ],
     out: [
-        "android/hardware/drm/1.0/DrmPluginListener.vts.cpp",
+        "android/hardware/drm/1.0/CryptoFactory.vts.cpp",
+        "android/hardware/drm/1.0/CryptoPlugin.vts.cpp",
         "android/hardware/drm/1.0/DrmFactory.vts.cpp",
         "android/hardware/drm/1.0/DrmPlugin.vts.cpp",
-        "android/hardware/drm/1.0/CryptoFactory.vts.cpp",
+        "android/hardware/drm/1.0/DrmPluginListener.vts.cpp",
         "android/hardware/drm/1.0/types.vts.cpp",
-        "android/hardware/drm/1.0/CryptoPlugin.vts.cpp",
     ],
 }
 
@@ -88,12 +88,12 @@
         ":android.hardware.drm@1.0_hal",
     ],
     out: [
-        "android/hardware/drm/1.0/DrmPluginListener.vts.h",
+        "android/hardware/drm/1.0/CryptoFactory.vts.h",
+        "android/hardware/drm/1.0/CryptoPlugin.vts.h",
         "android/hardware/drm/1.0/DrmFactory.vts.h",
         "android/hardware/drm/1.0/DrmPlugin.vts.h",
-        "android/hardware/drm/1.0/CryptoFactory.vts.h",
+        "android/hardware/drm/1.0/DrmPluginListener.vts.h",
         "android/hardware/drm/1.0/types.vts.h",
-        "android/hardware/drm/1.0/CryptoPlugin.vts.h",
     ],
 }
 
diff --git a/dumpstate/Android.bp b/dumpstate/Android.bp
new file mode 100644
index 0000000..ffa62cd
--- /dev/null
+++ b/dumpstate/Android.bp
@@ -0,0 +1,3 @@
+subdirs = [
+    "V1_0",
+]
diff --git a/evs/Android.bp b/evs/Android.bp
new file mode 100644
index 0000000..ffa62cd
--- /dev/null
+++ b/evs/Android.bp
@@ -0,0 +1,3 @@
+subdirs = [
+    "V1_0",
+]
diff --git a/evs/V1_0/Android.bp b/evs/V1_0/Android.bp
index cf33e06..00d2f9a 100644
--- a/evs/V1_0/Android.bp
+++ b/evs/V1_0/Android.bp
@@ -10,11 +10,11 @@
         ":android.hardware.evs@1.0_hal",
     ],
     out: [
-        "android/hardware/evs/1.0/EvsEnumerator.vts.cpp",
-        "android/hardware/evs/1.0/EvsCameraStream.vts.cpp",
         "android/hardware/evs/1.0/EvsCamera.vts.cpp",
-        "android/hardware/evs/1.0/types.vts.cpp",
+        "android/hardware/evs/1.0/EvsCameraStream.vts.cpp",
         "android/hardware/evs/1.0/EvsDisplay.vts.cpp",
+        "android/hardware/evs/1.0/EvsEnumerator.vts.cpp",
+        "android/hardware/evs/1.0/types.vts.cpp",
     ],
 }
 
@@ -26,11 +26,11 @@
         ":android.hardware.evs@1.0_hal",
     ],
     out: [
-        "android/hardware/evs/1.0/EvsEnumerator.vts.h",
-        "android/hardware/evs/1.0/EvsCameraStream.vts.h",
         "android/hardware/evs/1.0/EvsCamera.vts.h",
-        "android/hardware/evs/1.0/types.vts.h",
+        "android/hardware/evs/1.0/EvsCameraStream.vts.h",
         "android/hardware/evs/1.0/EvsDisplay.vts.h",
+        "android/hardware/evs/1.0/EvsEnumerator.vts.h",
+        "android/hardware/evs/1.0/types.vts.h",
     ],
 }
 
@@ -69,11 +69,11 @@
         ":android.hardware.evs@1.0_hal",
     ],
     out: [
-        "android/hardware/evs/1.0/EvsEnumerator.vts.cpp",
-        "android/hardware/evs/1.0/EvsCameraStream.vts.cpp",
         "android/hardware/evs/1.0/EvsCamera.vts.cpp",
-        "android/hardware/evs/1.0/types.vts.cpp",
+        "android/hardware/evs/1.0/EvsCameraStream.vts.cpp",
         "android/hardware/evs/1.0/EvsDisplay.vts.cpp",
+        "android/hardware/evs/1.0/EvsEnumerator.vts.cpp",
+        "android/hardware/evs/1.0/types.vts.cpp",
     ],
 }
 
@@ -85,11 +85,11 @@
         ":android.hardware.evs@1.0_hal",
     ],
     out: [
-        "android/hardware/evs/1.0/EvsEnumerator.vts.h",
-        "android/hardware/evs/1.0/EvsCameraStream.vts.h",
         "android/hardware/evs/1.0/EvsCamera.vts.h",
-        "android/hardware/evs/1.0/types.vts.h",
+        "android/hardware/evs/1.0/EvsCameraStream.vts.h",
         "android/hardware/evs/1.0/EvsDisplay.vts.h",
+        "android/hardware/evs/1.0/EvsEnumerator.vts.h",
+        "android/hardware/evs/1.0/types.vts.h",
     ],
 }
 
diff --git a/gatekeeper/Android.bp b/gatekeeper/Android.bp
new file mode 100644
index 0000000..ffa62cd
--- /dev/null
+++ b/gatekeeper/Android.bp
@@ -0,0 +1,3 @@
+subdirs = [
+    "V1_0",
+]
diff --git a/gnss/Android.bp b/gnss/Android.bp
new file mode 100644
index 0000000..ffa62cd
--- /dev/null
+++ b/gnss/Android.bp
@@ -0,0 +1,3 @@
+subdirs = [
+    "V1_0",
+]
diff --git a/gnss/V1_0/Android.bp b/gnss/V1_0/Android.bp
index 0a5e4ab..304b982 100644
--- a/gnss/V1_0/Android.bp
+++ b/gnss/V1_0/Android.bp
@@ -10,27 +10,27 @@
         ":android.hardware.gnss@1.0_hal",
     ],
     out: [
-        "android/hardware/gnss/1.0/GnssGeofenceCallback.vts.cpp",
-        "android/hardware/gnss/1.0/AGnssRil.vts.cpp",
-        "android/hardware/gnss/1.0/GnssGeofencing.vts.cpp",
         "android/hardware/gnss/1.0/AGnss.vts.cpp",
+        "android/hardware/gnss/1.0/AGnssCallback.vts.cpp",
+        "android/hardware/gnss/1.0/AGnssRil.vts.cpp",
+        "android/hardware/gnss/1.0/AGnssRilCallback.vts.cpp",
+        "android/hardware/gnss/1.0/Gnss.vts.cpp",
+        "android/hardware/gnss/1.0/GnssBatching.vts.cpp",
+        "android/hardware/gnss/1.0/GnssBatchingCallback.vts.cpp",
+        "android/hardware/gnss/1.0/GnssCallback.vts.cpp",
+        "android/hardware/gnss/1.0/GnssConfiguration.vts.cpp",
+        "android/hardware/gnss/1.0/GnssDebug.vts.cpp",
+        "android/hardware/gnss/1.0/GnssGeofenceCallback.vts.cpp",
+        "android/hardware/gnss/1.0/GnssGeofencing.vts.cpp",
+        "android/hardware/gnss/1.0/GnssMeasurement.vts.cpp",
+        "android/hardware/gnss/1.0/GnssMeasurementCallback.vts.cpp",
         "android/hardware/gnss/1.0/GnssNavigationMessage.vts.cpp",
         "android/hardware/gnss/1.0/GnssNavigationMessageCallback.vts.cpp",
-        "android/hardware/gnss/1.0/AGnssRilCallback.vts.cpp",
-        "android/hardware/gnss/1.0/GnssConfiguration.vts.cpp",
-        "android/hardware/gnss/1.0/GnssCallback.vts.cpp",
         "android/hardware/gnss/1.0/GnssNi.vts.cpp",
         "android/hardware/gnss/1.0/GnssNiCallback.vts.cpp",
         "android/hardware/gnss/1.0/GnssXtra.vts.cpp",
-        "android/hardware/gnss/1.0/GnssBatchingCallback.vts.cpp",
-        "android/hardware/gnss/1.0/types.vts.cpp",
-        "android/hardware/gnss/1.0/Gnss.vts.cpp",
-        "android/hardware/gnss/1.0/AGnssCallback.vts.cpp",
-        "android/hardware/gnss/1.0/GnssBatching.vts.cpp",
-        "android/hardware/gnss/1.0/GnssMeasurement.vts.cpp",
         "android/hardware/gnss/1.0/GnssXtraCallback.vts.cpp",
-        "android/hardware/gnss/1.0/GnssMeasurementCallback.vts.cpp",
-        "android/hardware/gnss/1.0/GnssDebug.vts.cpp",
+        "android/hardware/gnss/1.0/types.vts.cpp",
     ],
 }
 
@@ -42,27 +42,27 @@
         ":android.hardware.gnss@1.0_hal",
     ],
     out: [
-        "android/hardware/gnss/1.0/GnssGeofenceCallback.vts.h",
-        "android/hardware/gnss/1.0/AGnssRil.vts.h",
-        "android/hardware/gnss/1.0/GnssGeofencing.vts.h",
         "android/hardware/gnss/1.0/AGnss.vts.h",
+        "android/hardware/gnss/1.0/AGnssCallback.vts.h",
+        "android/hardware/gnss/1.0/AGnssRil.vts.h",
+        "android/hardware/gnss/1.0/AGnssRilCallback.vts.h",
+        "android/hardware/gnss/1.0/Gnss.vts.h",
+        "android/hardware/gnss/1.0/GnssBatching.vts.h",
+        "android/hardware/gnss/1.0/GnssBatchingCallback.vts.h",
+        "android/hardware/gnss/1.0/GnssCallback.vts.h",
+        "android/hardware/gnss/1.0/GnssConfiguration.vts.h",
+        "android/hardware/gnss/1.0/GnssDebug.vts.h",
+        "android/hardware/gnss/1.0/GnssGeofenceCallback.vts.h",
+        "android/hardware/gnss/1.0/GnssGeofencing.vts.h",
+        "android/hardware/gnss/1.0/GnssMeasurement.vts.h",
+        "android/hardware/gnss/1.0/GnssMeasurementCallback.vts.h",
         "android/hardware/gnss/1.0/GnssNavigationMessage.vts.h",
         "android/hardware/gnss/1.0/GnssNavigationMessageCallback.vts.h",
-        "android/hardware/gnss/1.0/AGnssRilCallback.vts.h",
-        "android/hardware/gnss/1.0/GnssConfiguration.vts.h",
-        "android/hardware/gnss/1.0/GnssCallback.vts.h",
         "android/hardware/gnss/1.0/GnssNi.vts.h",
         "android/hardware/gnss/1.0/GnssNiCallback.vts.h",
         "android/hardware/gnss/1.0/GnssXtra.vts.h",
-        "android/hardware/gnss/1.0/GnssBatchingCallback.vts.h",
-        "android/hardware/gnss/1.0/types.vts.h",
-        "android/hardware/gnss/1.0/Gnss.vts.h",
-        "android/hardware/gnss/1.0/AGnssCallback.vts.h",
-        "android/hardware/gnss/1.0/GnssBatching.vts.h",
-        "android/hardware/gnss/1.0/GnssMeasurement.vts.h",
         "android/hardware/gnss/1.0/GnssXtraCallback.vts.h",
-        "android/hardware/gnss/1.0/GnssMeasurementCallback.vts.h",
-        "android/hardware/gnss/1.0/GnssDebug.vts.h",
+        "android/hardware/gnss/1.0/types.vts.h",
     ],
 }
 
@@ -101,27 +101,27 @@
         ":android.hardware.gnss@1.0_hal",
     ],
     out: [
-        "android/hardware/gnss/1.0/GnssGeofenceCallback.vts.cpp",
-        "android/hardware/gnss/1.0/AGnssRil.vts.cpp",
-        "android/hardware/gnss/1.0/GnssGeofencing.vts.cpp",
         "android/hardware/gnss/1.0/AGnss.vts.cpp",
+        "android/hardware/gnss/1.0/AGnssCallback.vts.cpp",
+        "android/hardware/gnss/1.0/AGnssRil.vts.cpp",
+        "android/hardware/gnss/1.0/AGnssRilCallback.vts.cpp",
+        "android/hardware/gnss/1.0/Gnss.vts.cpp",
+        "android/hardware/gnss/1.0/GnssBatching.vts.cpp",
+        "android/hardware/gnss/1.0/GnssBatchingCallback.vts.cpp",
+        "android/hardware/gnss/1.0/GnssCallback.vts.cpp",
+        "android/hardware/gnss/1.0/GnssConfiguration.vts.cpp",
+        "android/hardware/gnss/1.0/GnssDebug.vts.cpp",
+        "android/hardware/gnss/1.0/GnssGeofenceCallback.vts.cpp",
+        "android/hardware/gnss/1.0/GnssGeofencing.vts.cpp",
+        "android/hardware/gnss/1.0/GnssMeasurement.vts.cpp",
+        "android/hardware/gnss/1.0/GnssMeasurementCallback.vts.cpp",
         "android/hardware/gnss/1.0/GnssNavigationMessage.vts.cpp",
         "android/hardware/gnss/1.0/GnssNavigationMessageCallback.vts.cpp",
-        "android/hardware/gnss/1.0/AGnssRilCallback.vts.cpp",
-        "android/hardware/gnss/1.0/GnssConfiguration.vts.cpp",
-        "android/hardware/gnss/1.0/GnssCallback.vts.cpp",
         "android/hardware/gnss/1.0/GnssNi.vts.cpp",
         "android/hardware/gnss/1.0/GnssNiCallback.vts.cpp",
         "android/hardware/gnss/1.0/GnssXtra.vts.cpp",
-        "android/hardware/gnss/1.0/GnssBatchingCallback.vts.cpp",
-        "android/hardware/gnss/1.0/types.vts.cpp",
-        "android/hardware/gnss/1.0/Gnss.vts.cpp",
-        "android/hardware/gnss/1.0/AGnssCallback.vts.cpp",
-        "android/hardware/gnss/1.0/GnssBatching.vts.cpp",
-        "android/hardware/gnss/1.0/GnssMeasurement.vts.cpp",
         "android/hardware/gnss/1.0/GnssXtraCallback.vts.cpp",
-        "android/hardware/gnss/1.0/GnssMeasurementCallback.vts.cpp",
-        "android/hardware/gnss/1.0/GnssDebug.vts.cpp",
+        "android/hardware/gnss/1.0/types.vts.cpp",
     ],
 }
 
@@ -133,27 +133,27 @@
         ":android.hardware.gnss@1.0_hal",
     ],
     out: [
-        "android/hardware/gnss/1.0/GnssGeofenceCallback.vts.h",
-        "android/hardware/gnss/1.0/AGnssRil.vts.h",
-        "android/hardware/gnss/1.0/GnssGeofencing.vts.h",
         "android/hardware/gnss/1.0/AGnss.vts.h",
+        "android/hardware/gnss/1.0/AGnssCallback.vts.h",
+        "android/hardware/gnss/1.0/AGnssRil.vts.h",
+        "android/hardware/gnss/1.0/AGnssRilCallback.vts.h",
+        "android/hardware/gnss/1.0/Gnss.vts.h",
+        "android/hardware/gnss/1.0/GnssBatching.vts.h",
+        "android/hardware/gnss/1.0/GnssBatchingCallback.vts.h",
+        "android/hardware/gnss/1.0/GnssCallback.vts.h",
+        "android/hardware/gnss/1.0/GnssConfiguration.vts.h",
+        "android/hardware/gnss/1.0/GnssDebug.vts.h",
+        "android/hardware/gnss/1.0/GnssGeofenceCallback.vts.h",
+        "android/hardware/gnss/1.0/GnssGeofencing.vts.h",
+        "android/hardware/gnss/1.0/GnssMeasurement.vts.h",
+        "android/hardware/gnss/1.0/GnssMeasurementCallback.vts.h",
         "android/hardware/gnss/1.0/GnssNavigationMessage.vts.h",
         "android/hardware/gnss/1.0/GnssNavigationMessageCallback.vts.h",
-        "android/hardware/gnss/1.0/AGnssRilCallback.vts.h",
-        "android/hardware/gnss/1.0/GnssConfiguration.vts.h",
-        "android/hardware/gnss/1.0/GnssCallback.vts.h",
         "android/hardware/gnss/1.0/GnssNi.vts.h",
         "android/hardware/gnss/1.0/GnssNiCallback.vts.h",
         "android/hardware/gnss/1.0/GnssXtra.vts.h",
-        "android/hardware/gnss/1.0/GnssBatchingCallback.vts.h",
-        "android/hardware/gnss/1.0/types.vts.h",
-        "android/hardware/gnss/1.0/Gnss.vts.h",
-        "android/hardware/gnss/1.0/AGnssCallback.vts.h",
-        "android/hardware/gnss/1.0/GnssBatching.vts.h",
-        "android/hardware/gnss/1.0/GnssMeasurement.vts.h",
         "android/hardware/gnss/1.0/GnssXtraCallback.vts.h",
-        "android/hardware/gnss/1.0/GnssMeasurementCallback.vts.h",
-        "android/hardware/gnss/1.0/GnssDebug.vts.h",
+        "android/hardware/gnss/1.0/types.vts.h",
     ],
 }
 
diff --git a/graphics/Android.bp b/graphics/Android.bp
new file mode 100644
index 0000000..b949100
--- /dev/null
+++ b/graphics/Android.bp
@@ -0,0 +1,6 @@
+subdirs = [
+    "allocator/V2_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
index f453c78..6ccbfac 100644
--- a/graphics/allocator/V2_0/Android.bp
+++ b/graphics/allocator/V2_0/Android.bp
@@ -11,8 +11,8 @@
     ],
     out: [
         "android/hardware/graphics/allocator/2.0/Allocator.vts.cpp",
-        "android/hardware/graphics/allocator/2.0/types.vts.cpp",
         "android/hardware/graphics/allocator/2.0/AllocatorClient.vts.cpp",
+        "android/hardware/graphics/allocator/2.0/types.vts.cpp",
     ],
 }
 
@@ -25,8 +25,8 @@
     ],
     out: [
         "android/hardware/graphics/allocator/2.0/Allocator.vts.h",
-        "android/hardware/graphics/allocator/2.0/types.vts.h",
         "android/hardware/graphics/allocator/2.0/AllocatorClient.vts.h",
+        "android/hardware/graphics/allocator/2.0/types.vts.h",
     ],
 }
 
@@ -68,8 +68,8 @@
     ],
     out: [
         "android/hardware/graphics/allocator/2.0/Allocator.vts.cpp",
-        "android/hardware/graphics/allocator/2.0/types.vts.cpp",
         "android/hardware/graphics/allocator/2.0/AllocatorClient.vts.cpp",
+        "android/hardware/graphics/allocator/2.0/types.vts.cpp",
     ],
 }
 
@@ -82,8 +82,8 @@
     ],
     out: [
         "android/hardware/graphics/allocator/2.0/Allocator.vts.h",
-        "android/hardware/graphics/allocator/2.0/types.vts.h",
         "android/hardware/graphics/allocator/2.0/AllocatorClient.vts.h",
+        "android/hardware/graphics/allocator/2.0/types.vts.h",
     ],
 }
 
diff --git a/graphics/composer/V2_1/Android.bp b/graphics/composer/V2_1/Android.bp
index f336ea4..58b838b 100644
--- a/graphics/composer/V2_1/Android.bp
+++ b/graphics/composer/V2_1/Android.bp
@@ -11,8 +11,8 @@
     ],
     out: [
         "android/hardware/graphics/composer/2.1/Composer.vts.cpp",
-        "android/hardware/graphics/composer/2.1/ComposerClient.vts.cpp",
         "android/hardware/graphics/composer/2.1/ComposerCallback.vts.cpp",
+        "android/hardware/graphics/composer/2.1/ComposerClient.vts.cpp",
         "android/hardware/graphics/composer/2.1/types.vts.cpp",
     ],
 }
@@ -26,8 +26,8 @@
     ],
     out: [
         "android/hardware/graphics/composer/2.1/Composer.vts.h",
-        "android/hardware/graphics/composer/2.1/ComposerClient.vts.h",
         "android/hardware/graphics/composer/2.1/ComposerCallback.vts.h",
+        "android/hardware/graphics/composer/2.1/ComposerClient.vts.h",
         "android/hardware/graphics/composer/2.1/types.vts.h",
     ],
 }
@@ -70,8 +70,8 @@
     ],
     out: [
         "android/hardware/graphics/composer/2.1/Composer.vts.cpp",
-        "android/hardware/graphics/composer/2.1/ComposerClient.vts.cpp",
         "android/hardware/graphics/composer/2.1/ComposerCallback.vts.cpp",
+        "android/hardware/graphics/composer/2.1/ComposerClient.vts.cpp",
         "android/hardware/graphics/composer/2.1/types.vts.cpp",
     ],
 }
@@ -85,8 +85,8 @@
     ],
     out: [
         "android/hardware/graphics/composer/2.1/Composer.vts.h",
-        "android/hardware/graphics/composer/2.1/ComposerClient.vts.h",
         "android/hardware/graphics/composer/2.1/ComposerCallback.vts.h",
+        "android/hardware/graphics/composer/2.1/ComposerClient.vts.h",
         "android/hardware/graphics/composer/2.1/types.vts.h",
     ],
 }
diff --git a/graphics/mapper/V2_0/Android.bp b/graphics/mapper/V2_0/Android.bp
index 3ca4769..90a8712 100644
--- a/graphics/mapper/V2_0/Android.bp
+++ b/graphics/mapper/V2_0/Android.bp
@@ -10,8 +10,8 @@
         ":android.hardware.graphics.mapper@2.0_hal",
     ],
     out: [
-        "android/hardware/graphics/mapper/2.0/types.vts.cpp",
         "android/hardware/graphics/mapper/2.0/Mapper.vts.cpp",
+        "android/hardware/graphics/mapper/2.0/types.vts.cpp",
     ],
 }
 
@@ -23,8 +23,8 @@
         ":android.hardware.graphics.mapper@2.0_hal",
     ],
     out: [
-        "android/hardware/graphics/mapper/2.0/types.vts.h",
         "android/hardware/graphics/mapper/2.0/Mapper.vts.h",
+        "android/hardware/graphics/mapper/2.0/types.vts.h",
     ],
 }
 
@@ -67,8 +67,8 @@
         ":android.hardware.graphics.mapper@2.0_hal",
     ],
     out: [
-        "android/hardware/graphics/mapper/2.0/types.vts.cpp",
         "android/hardware/graphics/mapper/2.0/Mapper.vts.cpp",
+        "android/hardware/graphics/mapper/2.0/types.vts.cpp",
     ],
 }
 
@@ -80,8 +80,8 @@
         ":android.hardware.graphics.mapper@2.0_hal",
     ],
     out: [
-        "android/hardware/graphics/mapper/2.0/types.vts.h",
         "android/hardware/graphics/mapper/2.0/Mapper.vts.h",
+        "android/hardware/graphics/mapper/2.0/types.vts.h",
     ],
 }
 
diff --git a/health/Android.bp b/health/Android.bp
new file mode 100644
index 0000000..ffa62cd
--- /dev/null
+++ b/health/Android.bp
@@ -0,0 +1,3 @@
+subdirs = [
+    "V1_0",
+]
diff --git a/ir/Android.bp b/ir/Android.bp
new file mode 100644
index 0000000..ffa62cd
--- /dev/null
+++ b/ir/Android.bp
@@ -0,0 +1,3 @@
+subdirs = [
+    "V1_0",
+]
diff --git a/ir/V1_0/target/Android.mk b/ir/V1_0/target/Android.mk
index 65631ed..bd1a082 100644
--- a/ir/V1_0/target/Android.mk
+++ b/ir/V1_0/target/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2016 The Android Open Source Project
+# 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.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := HalIrHidlTargetTest
+LOCAL_MODULE := VtsHalIrV1_0Target
 VTS_CONFIG_SRC_DIR := testcases/hal/ir/V1_0/target
 include test/vts/tools/build/Android.host_config.mk
diff --git a/ir/V1_0/target/AndroidTest.xml b/ir/V1_0/target/AndroidTest.xml
index bf3d236..d20807e 100644
--- a/ir/V1_0/target/AndroidTest.xml
+++ b/ir/V1_0/target/AndroidTest.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2016 The Android Open Source Project
+<!-- 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.
@@ -13,19 +13,19 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Config for VTS IR HIDL HAL's target-side test cases">
+<configuration description="Config for VTS VtsHalIrV1_0Target test cases">
     <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
-        <option name="push-group" value="HidlHalTest.push" />
+        <option name="push-group" value="HidlHalTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
+    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
-        <option name="test-module-name" value="HalIrHidlTargetTest"/>
+        <option name="test-module-name" value="VtsHalIrV1_0Target"/>
         <option name="binary-test-sources" value="
-            _32bit::DATA/nativetest/ir_hidl_hal_test/ir_hidl_hal_test,
-            _64bit::DATA/nativetest64/ir_hidl_hal_test/ir_hidl_hal_test,
-            "/>
-        <option name="binary-test-type" value="hal_hidl_gtest" />
-        <option name="precondition-hwbinder-service" value="android.hardware.ir" />
-        <option name="test-timeout" value="1m" />
+          _32bit::DATA/nativetest/VtsHalIrV1_0TargetTest/VtsHalIrV1_0TargetTest,
+          _64bit::DATA/nativetest64/VtsHalIrV1_0TargetTest/VtsHalIrV1_0TargetTest,
+          "/>
+        <option name="binary-test-type" value="hal_hidl_gtest"/>
+        <option name="precondition-lshal" value="android.hardware.ir@1.0"/>
+        <option name="test-timeout" value="1m"/>
     </test>
 </configuration>
diff --git a/ir/V1_0/target_profiling/Android.mk b/ir/V1_0/target_profiling/Android.mk
new file mode 100644
index 0000000..8c16ab2
--- /dev/null
+++ b/ir/V1_0/target_profiling/Android.mk
@@ -0,0 +1,23 @@
+#
+# 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 := VtsHalIrV1_0TargetProfiling
+VTS_CONFIG_SRC_DIR := testcases/hal/ir/V1_0/target_profiling
+include test/vts/tools/build/Android.host_config.mk
diff --git a/ir/V1_0/target_profiling/AndroidTest.xml b/ir/V1_0/target_profiling/AndroidTest.xml
new file mode 100644
index 0000000..80edd7d
--- /dev/null
+++ b/ir/V1_0/target_profiling/AndroidTest.xml
@@ -0,0 +1,35 @@
+<?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 VtsHalIrV1_0TargetProfiling test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="push-group" value="HidlHalTest.push"/>
+        <option name="cleanup" value="true"/>
+        <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-sources" value="
+          _32bit::DATA/nativetest/VtsHalIrV1_0TargetTest/VtsHalIrV1_0TargetTest,
+          _64bit::DATA/nativetest64/VtsHalIrV1_0TargetTest/VtsHalIrV1_0TargetTest,
+          "/>
+        <option name="binary-test-type" value="hal_hidl_gtest"/>
+        <option name="enable-profiling" value="true"/>
+        <option name="precondition-lshal" value="android.hardware.ir@1.0"/>
+        <option name="test-timeout" value="1m"/>
+    </test>
+</configuration>
diff --git a/keymaster/Android.bp b/keymaster/Android.bp
new file mode 100644
index 0000000..3f37ec1
--- /dev/null
+++ b/keymaster/Android.bp
@@ -0,0 +1,3 @@
+subdirs = [
+    "V3_0",
+]
diff --git a/light/Android.bp b/light/Android.bp
new file mode 100644
index 0000000..141036c
--- /dev/null
+++ b/light/Android.bp
@@ -0,0 +1,3 @@
+subdirs = [
+    "V2_0",
+]
diff --git a/light/V2_0/Android.bp b/light/V2_0/Android.bp
index 97ff37e..fc449a4 100644
--- a/light/V2_0/Android.bp
+++ b/light/V2_0/Android.bp
@@ -10,8 +10,8 @@
         ":android.hardware.light@2.0_hal",
     ],
     out: [
-        "android/hardware/light/2.0/types.vts.cpp",
         "android/hardware/light/2.0/Light.vts.cpp",
+        "android/hardware/light/2.0/types.vts.cpp",
     ],
 }
 
@@ -23,8 +23,8 @@
         ":android.hardware.light@2.0_hal",
     ],
     out: [
-        "android/hardware/light/2.0/types.vts.h",
         "android/hardware/light/2.0/Light.vts.h",
+        "android/hardware/light/2.0/types.vts.h",
     ],
 }
 
@@ -63,8 +63,8 @@
         ":android.hardware.light@2.0_hal",
     ],
     out: [
-        "android/hardware/light/2.0/types.vts.cpp",
         "android/hardware/light/2.0/Light.vts.cpp",
+        "android/hardware/light/2.0/types.vts.cpp",
     ],
 }
 
@@ -76,8 +76,8 @@
         ":android.hardware.light@2.0_hal",
     ],
     out: [
-        "android/hardware/light/2.0/types.vts.h",
         "android/hardware/light/2.0/Light.vts.h",
+        "android/hardware/light/2.0/types.vts.h",
     ],
 }
 
diff --git a/media/Android.bp b/media/Android.bp
new file mode 100644
index 0000000..fc7ada8
--- /dev/null
+++ b/media/Android.bp
@@ -0,0 +1,4 @@
+subdirs = [
+    "V1_0",
+    "omx/V1_0",
+]
diff --git a/media/omx/V1_0/Android.bp b/media/omx/V1_0/Android.bp
index 08dd8b8..5afab18 100644
--- a/media/omx/V1_0/Android.bp
+++ b/media/omx/V1_0/Android.bp
@@ -10,14 +10,14 @@
         ":android.hardware.media.omx@1.0_hal",
     ],
     out: [
-        "android/hardware/media/omx/1.0/OmxBufferSource.vts.cpp",
-        "android/hardware/media/omx/1.0/OmxProducerListener.vts.cpp",
-        "android/hardware/media/omx/1.0/OmxNode.vts.cpp",
         "android/hardware/media/omx/1.0/GraphicBufferSource.vts.cpp",
-        "android/hardware/media/omx/1.0/OmxObserver.vts.cpp",
         "android/hardware/media/omx/1.0/Omx.vts.cpp",
-        "android/hardware/media/omx/1.0/types.vts.cpp",
         "android/hardware/media/omx/1.0/OmxBufferProducer.vts.cpp",
+        "android/hardware/media/omx/1.0/OmxBufferSource.vts.cpp",
+        "android/hardware/media/omx/1.0/OmxNode.vts.cpp",
+        "android/hardware/media/omx/1.0/OmxObserver.vts.cpp",
+        "android/hardware/media/omx/1.0/OmxProducerListener.vts.cpp",
+        "android/hardware/media/omx/1.0/types.vts.cpp",
     ],
 }
 
@@ -29,14 +29,14 @@
         ":android.hardware.media.omx@1.0_hal",
     ],
     out: [
-        "android/hardware/media/omx/1.0/OmxBufferSource.vts.h",
-        "android/hardware/media/omx/1.0/OmxProducerListener.vts.h",
-        "android/hardware/media/omx/1.0/OmxNode.vts.h",
         "android/hardware/media/omx/1.0/GraphicBufferSource.vts.h",
-        "android/hardware/media/omx/1.0/OmxObserver.vts.h",
         "android/hardware/media/omx/1.0/Omx.vts.h",
-        "android/hardware/media/omx/1.0/types.vts.h",
         "android/hardware/media/omx/1.0/OmxBufferProducer.vts.h",
+        "android/hardware/media/omx/1.0/OmxBufferSource.vts.h",
+        "android/hardware/media/omx/1.0/OmxNode.vts.h",
+        "android/hardware/media/omx/1.0/OmxObserver.vts.h",
+        "android/hardware/media/omx/1.0/OmxProducerListener.vts.h",
+        "android/hardware/media/omx/1.0/types.vts.h",
     ],
 }
 
@@ -79,14 +79,14 @@
         ":android.hardware.media.omx@1.0_hal",
     ],
     out: [
-        "android/hardware/media/omx/1.0/OmxBufferSource.vts.cpp",
-        "android/hardware/media/omx/1.0/OmxProducerListener.vts.cpp",
-        "android/hardware/media/omx/1.0/OmxNode.vts.cpp",
         "android/hardware/media/omx/1.0/GraphicBufferSource.vts.cpp",
-        "android/hardware/media/omx/1.0/OmxObserver.vts.cpp",
         "android/hardware/media/omx/1.0/Omx.vts.cpp",
-        "android/hardware/media/omx/1.0/types.vts.cpp",
         "android/hardware/media/omx/1.0/OmxBufferProducer.vts.cpp",
+        "android/hardware/media/omx/1.0/OmxBufferSource.vts.cpp",
+        "android/hardware/media/omx/1.0/OmxNode.vts.cpp",
+        "android/hardware/media/omx/1.0/OmxObserver.vts.cpp",
+        "android/hardware/media/omx/1.0/OmxProducerListener.vts.cpp",
+        "android/hardware/media/omx/1.0/types.vts.cpp",
     ],
 }
 
@@ -98,14 +98,14 @@
         ":android.hardware.media.omx@1.0_hal",
     ],
     out: [
-        "android/hardware/media/omx/1.0/OmxBufferSource.vts.h",
-        "android/hardware/media/omx/1.0/OmxProducerListener.vts.h",
-        "android/hardware/media/omx/1.0/OmxNode.vts.h",
         "android/hardware/media/omx/1.0/GraphicBufferSource.vts.h",
-        "android/hardware/media/omx/1.0/OmxObserver.vts.h",
         "android/hardware/media/omx/1.0/Omx.vts.h",
-        "android/hardware/media/omx/1.0/types.vts.h",
         "android/hardware/media/omx/1.0/OmxBufferProducer.vts.h",
+        "android/hardware/media/omx/1.0/OmxBufferSource.vts.h",
+        "android/hardware/media/omx/1.0/OmxNode.vts.h",
+        "android/hardware/media/omx/1.0/OmxObserver.vts.h",
+        "android/hardware/media/omx/1.0/OmxProducerListener.vts.h",
+        "android/hardware/media/omx/1.0/types.vts.h",
     ],
 }
 
diff --git a/memtrack/Android.bp b/memtrack/Android.bp
new file mode 100644
index 0000000..ffa62cd
--- /dev/null
+++ b/memtrack/Android.bp
@@ -0,0 +1,3 @@
+subdirs = [
+    "V1_0",
+]
diff --git a/nfc/Android.bp b/nfc/Android.bp
new file mode 100644
index 0000000..ffa62cd
--- /dev/null
+++ b/nfc/Android.bp
@@ -0,0 +1,3 @@
+subdirs = [
+    "V1_0",
+]
diff --git a/nfc/V1_0/host/NfcHidlBasicTest.py b/nfc/V1_0/host/VtsHalNfcV1_0HostTest.py
similarity index 100%
rename from nfc/V1_0/host/NfcHidlBasicTest.py
rename to nfc/V1_0/host/VtsHalNfcV1_0HostTest.py
diff --git a/nfc/V1_0/host/binderize/Android.mk b/nfc/V1_0/host/binderize/Android.mk
index 9ef5ad1..25fce74 100644
--- a/nfc/V1_0/host/binderize/Android.mk
+++ b/nfc/V1_0/host/binderize/Android.mk
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := NfcHidlBinderizeBasicTest
+LOCAL_MODULE := VtsHalNfcV1_0HostBinderize
 VTS_CONFIG_SRC_DIR := testcases/hal/nfc/V1_0/host/binderize
 include test/vts/tools/build/Android.host_config.mk
diff --git a/nfc/V1_0/host/binderize/AndroidTest.xml b/nfc/V1_0/host/binderize/AndroidTest.xml
index 898cefc..6f2fed4 100644
--- a/nfc/V1_0/host/binderize/AndroidTest.xml
+++ b/nfc/V1_0/host/binderize/AndroidTest.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2016 The Android Open Source Project
+<!-- 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.
@@ -20,11 +20,13 @@
         <option name="push" value="spec/hardware/interfaces/nfc/1.0/vts/Nfc.vts->/data/local/tmp/spec/Nfc.vts" />
         <option name="push" value="spec/hardware/interfaces/nfc/1.0/vts/NfcClientCallback.vts->/data/local/tmp/spec/NfcClientCallback.vts" />
         <option name="push" value="spec/hardware/interfaces/nfc/1.0/vts/types.vts->/data/local/tmp/spec/types.vts" />
+        <option name="push" value="DATA/lib/android.hardware.nfc.vts.driver@1.0.so->/data/local/tmp/32/android.hardware.nfc.vts.driver@1.0.so"/>
+        <option name="push" value="DATA/lib64/android.hardware.nfc.vts.driver@1.0.so->/data/local/tmp/64/android.hardware.nfc.vts.driver@1.0.so"/>
     </target_preparer>
     <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
-        <option name="test-module-name" value="NfcHidlBinderizeBasicTest" />
-        <option name="test-case-path" value="vts/testcases/hal/nfc/V1_0/host/NfcHidlBasicTest" />
+        <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" />
     </test>
 </configuration>
diff --git a/nfc/V1_0/host/passthrough/Android.mk b/nfc/V1_0/host/passthrough/Android.mk
index 74630bb..b8f330f 100644
--- a/nfc/V1_0/host/passthrough/Android.mk
+++ b/nfc/V1_0/host/passthrough/Android.mk
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := NfcHidlPassthroughBasicTest
+LOCAL_MODULE := VtsHalNfcV1_0HostPassthrough
 VTS_CONFIG_SRC_DIR := testcases/hal/nfc/V1_0/host/passthrough
 include test/vts/tools/build/Android.host_config.mk
diff --git a/nfc/V1_0/host/passthrough/AndroidTest.xml b/nfc/V1_0/host/passthrough/AndroidTest.xml
index cc36b85..94b509b 100644
--- a/nfc/V1_0/host/passthrough/AndroidTest.xml
+++ b/nfc/V1_0/host/passthrough/AndroidTest.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2016 The Android Open Source Project
+<!-- 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.
@@ -20,11 +20,13 @@
         <option name="push" value="spec/hardware/interfaces/nfc/1.0/vts/Nfc.vts->/data/local/tmp/spec/Nfc.vts" />
         <option name="push" value="spec/hardware/interfaces/nfc/1.0/vts/NfcClientCallback.vts->/data/local/tmp/spec/NfcClientCallback.vts" />
         <option name="push" value="spec/hardware/interfaces/nfc/1.0/vts/types.vts->/data/local/tmp/spec/types.vts" />
+        <option name="push" value="DATA/lib/android.hardware.nfc.vts.driver@1.0.so->/data/local/tmp/32/android.hardware.nfc.vts.driver@1.0.so"/>
+        <option name="push" value="DATA/lib64/android.hardware.nfc.vts.driver@1.0.so->/data/local/tmp/64/android.hardware.nfc.vts.driver@1.0.so"/>
     </target_preparer>
     <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
-        <option name="test-module-name" value="NfcHidlPassthroughBasicTest" />
-        <option name="test-case-path" value="vts/testcases/hal/nfc/V1_0/host/NfcHidlBasicTest" />
+        <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" />
     </test>
 </configuration>
diff --git a/nfc/V1_0/host_profiling/Android.mk b/nfc/V1_0/host_profiling/Android.mk
new file mode 100644
index 0000000..1cdd983
--- /dev/null
+++ b/nfc/V1_0/host_profiling/Android.mk
@@ -0,0 +1,23 @@
+#
+# 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 := VtsHalNfcV1_0HostProfiling
+VTS_CONFIG_SRC_DIR := testcases/hal/nfc/V1_0/host_profiling
+include test/vts/tools/build/Android.host_config.mk
diff --git a/nfc/V1_0/host_profiling/AndroidTest.xml b/nfc/V1_0/host_profiling/AndroidTest.xml
new file mode 100644
index 0000000..847f20d
--- /dev/null
+++ b/nfc/V1_0/host_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 VtsHalNfcV1_0HostProfiling test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="push-group" value="HidlHalTest.push"/>
+        <option name="cleanup" value="true"/>
+        <option name="push" value="spec/hardware/interfaces/nfc/1.0/vts/Nfc.vts->/data/local/tmp/spec/Nfc.vts"/>
+        <option name="push" value="spec/hardware/interfaces/nfc/1.0/vts/NfcClientCallback.vts->/data/local/tmp/spec/NfcClientCallback.vts"/>
+        <option name="push" value="spec/hardware/interfaces/nfc/1.0/vts/types.vts->/data/local/tmp/spec/types.vts"/>
+        <option name="push" value="DATA/lib/android.hardware.nfc.vts.driver@1.0.so->/data/local/tmp/32/android.hardware.nfc.vts.driver@1.0.so"/>
+        <option name="push" value="DATA/lib64/android.hardware.nfc.vts.driver@1.0.so->/data/local/tmp/64/android.hardware.nfc.vts.driver@1.0.so"/>
+        <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/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="1m"/>
+    </test>
+</configuration>
diff --git a/nfc/V1_0/target/Android.mk b/nfc/V1_0/target/Android.mk
index 327482d..52fd286 100644
--- a/nfc/V1_0/target/Android.mk
+++ b/nfc/V1_0/target/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2016 The Android Open Source Project
+# 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.
@@ -16,10 +16,8 @@
 
 LOCAL_PATH := $(call my-dir)
 
-include $(call all-subdir-makefiles)
-
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := HalNfcHidlTargetBasicTest
+LOCAL_MODULE := VtsHalNfcV1_0Target
 VTS_CONFIG_SRC_DIR := testcases/hal/nfc/V1_0/target
 include test/vts/tools/build/Android.host_config.mk
diff --git a/nfc/V1_0/target/AndroidTest.xml b/nfc/V1_0/target/AndroidTest.xml
index 9576183..129807d 100644
--- a/nfc/V1_0/target/AndroidTest.xml
+++ b/nfc/V1_0/target/AndroidTest.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2016 The Android Open Source Project
+<!-- 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.
@@ -13,18 +13,19 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Config for VTS NFC HIDL HAL's basic target-side test cases">
+<configuration description="Config for VTS VtsHalNfcV1_0Target test cases">
     <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
-        <option name="push-group" value="HidlHalTest.push" />
+        <option name="push-group" value="HidlHalTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
+    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
-        <option name="test-module-name" value="HalNfcHidlTargetBasicTest" />
+        <option name="test-module-name" value="VtsHalNfcV1_0Target"/>
         <option name="binary-test-sources" value="
-            _32bit::DATA/nativetest/nfc_hidl_hal_test/nfc_hidl_hal_test,
-            _64bit::DATA/nativetest64/nfc_hidl_hal_test/nfc_hidl_hal_test,
-            "/>
-        <option name="binary-test-type" value="gtest" />
-        <option name="test-timeout" value="10m" />
+          _32bit::DATA/nativetest/VtsHalNfcV1_0TargetTest/VtsHalNfcV1_0TargetTest,
+          _64bit::DATA/nativetest64/VtsHalNfcV1_0TargetTest/VtsHalNfcV1_0TargetTest,
+          "/>
+        <option name="binary-test-type" value="hal_hidl_gtest"/>
+        <option name="precondition-lshal" value="android.hardware.nfc@1.0"/>
+        <option name="test-timeout" value="1m"/>
     </test>
 </configuration>
diff --git a/nfc/V1_0/target_profiling/Android.mk b/nfc/V1_0/target_profiling/Android.mk
index d46139d..909f990 100644
--- a/nfc/V1_0/target_profiling/Android.mk
+++ b/nfc/V1_0/target_profiling/Android.mk
@@ -1,23 +1,23 @@
 #
-## Copyright (C) 2016 The Android Open Source Project
+# Copyright (C) 2017 The Android Open Source Project
 #
-## Licensed under the Apache License, Version 2.0 (the "License");
+# 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.
-# #
+# 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 := NfcHidlTargetProfilingTest
+LOCAL_MODULE := VtsHalNfcV1_0TargetProfiling
 VTS_CONFIG_SRC_DIR := testcases/hal/nfc/V1_0/target_profiling
 include test/vts/tools/build/Android.host_config.mk
diff --git a/nfc/V1_0/target_profiling/AndroidTest.xml b/nfc/V1_0/target_profiling/AndroidTest.xml
index 3b570f9..3c42c2d 100644
--- a/nfc/V1_0/target_profiling/AndroidTest.xml
+++ b/nfc/V1_0/target_profiling/AndroidTest.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2016 The Android Open Source Project
+<!-- 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.
@@ -13,19 +13,23 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Config for VTS NFC HIDL HAL's target-side profiling test cases">
+<configuration description="Config for VTS VtsHalNfcV1_0TargetProfiling test cases">
     <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
-        <option name="push-group" value="HidlHalTest.push" />
+        <option name="push-group" value="HidlHalTest.push"/>
+        <option name="cleanup" value="true"/>
+        <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" />
+    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
-        <option name="test-module-name" value="NfcHidlTargetProfilingTest" />
+        <option name="test-module-name" value="VtsHalNfcV1_0TargetProfiling"/>
         <option name="binary-test-sources" value="
-            _32bit::DATA/nativetest/nfc_hidl_hal_test/nfc_hidl_hal_test,
-            _64bit::DATA/nativetest64/nfc_hidl_hal_test/nfc_hidl_hal_test,
-            "/>
-        <option name="binary-test-type" value="gtest" />
-        <option name="test-timeout" value="25m" />
-    <option name="enable-profiling" value="true" />
+          _32bit::DATA/nativetest/VtsHalNfcV1_0TargetTest/VtsHalNfcV1_0TargetTest,
+          _64bit::DATA/nativetest64/VtsHalNfcV1_0TargetTest/VtsHalNfcV1_0TargetTest,
+          "/>
+        <option name="binary-test-type" value="hal_hidl_gtest"/>
+        <option name="enable-profiling" value="true"/>
+        <option name="precondition-lshal" value="android.hardware.nfc@1.0"/>
+        <option name="test-timeout" value="1m"/>
     </test>
 </configuration>
diff --git a/power/Android.bp b/power/Android.bp
new file mode 100644
index 0000000..ffa62cd
--- /dev/null
+++ b/power/Android.bp
@@ -0,0 +1,3 @@
+subdirs = [
+    "V1_0",
+]
diff --git a/radio/Android.bp b/radio/Android.bp
new file mode 100644
index 0000000..ffa62cd
--- /dev/null
+++ b/radio/Android.bp
@@ -0,0 +1,3 @@
+subdirs = [
+    "V1_0",
+]
diff --git a/radio/V1_0/Android.bp b/radio/V1_0/Android.bp
index 45f7af9..0d7a678 100644
--- a/radio/V1_0/Android.bp
+++ b/radio/V1_0/Android.bp
@@ -10,11 +10,11 @@
         ":android.hardware.radio@1.0_hal",
     ],
     out: [
+        "android/hardware/radio/1.0/Radio.vts.cpp",
         "android/hardware/radio/1.0/RadioIndication.vts.cpp",
         "android/hardware/radio/1.0/RadioResponse.vts.cpp",
-        "android/hardware/radio/1.0/SapCallback.vts.cpp",
-        "android/hardware/radio/1.0/Radio.vts.cpp",
         "android/hardware/radio/1.0/Sap.vts.cpp",
+        "android/hardware/radio/1.0/SapCallback.vts.cpp",
         "android/hardware/radio/1.0/types.vts.cpp",
     ],
 }
@@ -27,11 +27,11 @@
         ":android.hardware.radio@1.0_hal",
     ],
     out: [
+        "android/hardware/radio/1.0/Radio.vts.h",
         "android/hardware/radio/1.0/RadioIndication.vts.h",
         "android/hardware/radio/1.0/RadioResponse.vts.h",
-        "android/hardware/radio/1.0/SapCallback.vts.h",
-        "android/hardware/radio/1.0/Radio.vts.h",
         "android/hardware/radio/1.0/Sap.vts.h",
+        "android/hardware/radio/1.0/SapCallback.vts.h",
         "android/hardware/radio/1.0/types.vts.h",
     ],
 }
@@ -71,11 +71,11 @@
         ":android.hardware.radio@1.0_hal",
     ],
     out: [
+        "android/hardware/radio/1.0/Radio.vts.cpp",
         "android/hardware/radio/1.0/RadioIndication.vts.cpp",
         "android/hardware/radio/1.0/RadioResponse.vts.cpp",
-        "android/hardware/radio/1.0/SapCallback.vts.cpp",
-        "android/hardware/radio/1.0/Radio.vts.cpp",
         "android/hardware/radio/1.0/Sap.vts.cpp",
+        "android/hardware/radio/1.0/SapCallback.vts.cpp",
         "android/hardware/radio/1.0/types.vts.cpp",
     ],
 }
@@ -88,11 +88,11 @@
         ":android.hardware.radio@1.0_hal",
     ],
     out: [
+        "android/hardware/radio/1.0/Radio.vts.h",
         "android/hardware/radio/1.0/RadioIndication.vts.h",
         "android/hardware/radio/1.0/RadioResponse.vts.h",
-        "android/hardware/radio/1.0/SapCallback.vts.h",
-        "android/hardware/radio/1.0/Radio.vts.h",
         "android/hardware/radio/1.0/Sap.vts.h",
+        "android/hardware/radio/1.0/SapCallback.vts.h",
         "android/hardware/radio/1.0/types.vts.h",
     ],
 }
diff --git a/radio/V1_0/target/Android.mk b/radio/V1_0/target/Android.mk
new file mode 100644
index 0000000..0d74d51
--- /dev/null
+++ b/radio/V1_0/target/Android.mk
@@ -0,0 +1,23 @@
+#
+# 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 := VtsHalRadioV1_0Target
+VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_0/target
+include test/vts/tools/build/Android.host_config.mk
diff --git a/radio/V1_0/target/AndroidTest.xml b/radio/V1_0/target/AndroidTest.xml
new file mode 100644
index 0000000..aa4347a
--- /dev/null
+++ b/radio/V1_0/target/AndroidTest.xml
@@ -0,0 +1,31 @@
+<?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 VtsHalRadioV1_0Target test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="push-group" value="HidlHalTest.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-sources" value="
+          _32bit::DATA/nativetest/VtsHalRadioV1_0TargetTest/VtsHalRadioV1_0TargetTest,
+          _64bit::DATA/nativetest64/VtsHalRadioV1_0TargetTest/VtsHalRadioV1_0TargetTest,
+          "/>
+        <option name="binary-test-type" value="hal_hidl_gtest"/>
+        <option name="precondition-lshal" value="android.hardware.radio@1.0"/>
+        <option name="test-timeout" value="10m"/>
+    </test>
+</configuration>
diff --git a/radio/V1_0/target_profiling/Android.mk b/radio/V1_0/target_profiling/Android.mk
new file mode 100644
index 0000000..b5310f3
--- /dev/null
+++ b/radio/V1_0/target_profiling/Android.mk
@@ -0,0 +1,23 @@
+#
+# 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 := VtsHalRadioV1_0TargetProfiling
+VTS_CONFIG_SRC_DIR := testcases/hal/radio/V1_0/target_profiling
+include test/vts/tools/build/Android.host_config.mk
diff --git a/radio/V1_0/target_profiling/AndroidTest.xml b/radio/V1_0/target_profiling/AndroidTest.xml
new file mode 100644
index 0000000..da6fdcf
--- /dev/null
+++ b/radio/V1_0/target_profiling/AndroidTest.xml
@@ -0,0 +1,35 @@
+<?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 VtsHalRadioV1_0TargetProfiling test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="push-group" value="HidlHalTest.push"/>
+        <option name="cleanup" value="true"/>
+        <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-sources" value="
+          _32bit::DATA/nativetest/VtsHalRadioV1_0TargetTest/VtsHalRadioV1_0TargetTest,
+          _64bit::DATA/nativetest64/VtsHalRadioV1_0TargetTest/VtsHalRadioV1_0TargetTest,
+          "/>
+        <option name="binary-test-type" value="hal_hidl_gtest"/>
+        <option name="enable-profiling" value="true"/>
+        <option name="precondition-lshal" value="android.hardware.radio@1.0"/>
+        <option name="test-timeout" value="10m"/>
+    </test>
+</configuration>
diff --git a/script/build/__init__.py b/script/build/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/script/build/__init__.py
diff --git a/script/build/build_rule_gen.py b/script/build/build_rule_gen.py
new file mode 100644
index 0000000..676a445
--- /dev/null
+++ b/script/build/build_rule_gen.py
@@ -0,0 +1,229 @@
+#!/usr/bin/env python3.4
+#
+# 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 os
+
+from vts_spec_parser import VtsSpecParser
+import build_rule_gen_utils as utils
+
+
+class BuildRuleGen(object):
+    """Build rule generator for test/vts-testcase/hal."""
+    _ANDROID_BUILD_TOP = os.environ.get('ANDROID_BUILD_TOP')
+    if not _ANDROID_BUILD_TOP:
+        print 'Run "lunch" command first.'
+        sys.exit(1)
+    _PROJECT_PATH = os.path.join(_ANDROID_BUILD_TOP, 'test', 'vts-testcase',
+                                 'hal')
+    _VTS_BUILD_TEMPLATE = os.path.join(_PROJECT_PATH, 'script', 'build',
+                                       'template', 'vts_build_template.bp')
+
+    def __init__(self):
+        """BuildRuleGen constructor."""
+        self._vts_spec_parser = VtsSpecParser()
+
+    def UpdateBuildRule(self):
+        """Updates build rules under test/vts-testcase/hal."""
+        hal_list = self._vts_spec_parser.HalNamesAndVersions()
+        self.UpdateTopLevelBuildRule()
+        self.UpdateHalDirBuildRule(hal_list)
+
+    def UpdateTopLevelBuildRule(self):
+        """Updates test/vts-testcase/hal/Android.bp"""
+        utils.WriteBuildRule(
+            os.path.join(self._PROJECT_PATH, 'Android.bp'),
+            self._TopLevelBuildRule())
+
+    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, self._SecondLevelBuildRule(v))
+
+    def UpdateHalDirBuildRule(self, hal_list):
+        """Updates build rules for vts drivers/profilers.
+
+        Updates vts drivers/profilers for each pair of (hal_name, hal_version)
+        in hal_list.
+
+        Args:
+            hal_list: list of tuple of strings. For example,
+                [('vibrator', '1.3'), ('sensors', '1.7')]
+        """
+        for target in hal_list:
+            hal_name = target[0]
+            hal_version = target[1]
+
+            file_path = os.path.join(self._PROJECT_PATH,
+                                     utils.HalNameDir(hal_name),
+                                     utils.HalVerDir(hal_version), 'Android.bp')
+
+            utils.WriteBuildRule(file_path, self._VtsBuildRuleFromTemplate(
+                self._VTS_BUILD_TEMPLATE, hal_name, hal_version))
+
+    def _TopLevelBuildRule(self):
+        """Returns build rules for test/vts-testcase/hal/Android.bp.
+
+        Args:
+          hal_list: list of tuple of strings. For example,
+              [('vibrator', '1.3'), ('sensors', '1.7')]
+        """
+        result = '// This file was auto-generated. Do not edit manually.\n'
+        result += 'subdirs = [\n'
+        result += '    "*",\n'
+        result += ']\n'
+        return result
+
+    def _SecondLevelBuildRule(self, hal_subdirs):
+        """Returns build rules for test/vts-testcase/hal/*/Android.bp.
+
+        Args:
+          hal_subname: list of strings, sub-dirs of the hal,
+              e.g. for 'audio/effect/1.0' it would be 'effect/V1_0'.
+        """
+        result = 'subdirs = [\n'
+        for subdir in hal_subdirs:
+            result += '    "%s",\n' % subdir
+        result += ']\n'
+        return result
+
+    def _VtsBuildRuleFromTemplate(self, template_path, hal_name, hal_version):
+        """Returns build rules in string form by filling out a template.
+
+        Reads template from given path and fills it out.
+
+        Args:
+          template_path: string, path to build rule template file.
+          hal_name: string, name of the hal, e.g. 'vibrator'.
+          hal_version: string, version of the hal, e.g '7.4'
+
+        Returns:
+          string, complete build rules in string form
+        """
+        with open(template_path) as template_file:
+            build_template = str(template_file.read())
+        return self._FillOutBuildRuleTemplate(hal_name, hal_version,
+                                              build_template)
+
+    def _FillOutBuildRuleTemplate(self, hal_name, hal_version, template):
+        """Returns build rules in string form by filling out given template.
+
+        Args:
+          hal_name: string, name of the hal, e.g. 'vibrator'.
+          hal_version: string, version of the hal, e.g '7.4'
+          template: string, build rule template to fill out.
+
+        Returns:
+          string, complete build rule in string form.
+        """
+
+        def GeneratedOutput(hal_name, hal_version, extension):
+            """Formats list of vts spec names into a string.
+
+            Formats list of vts spec name for given hal_name, hal_version
+            into a string that can be inserted into build template.
+
+            Args:
+              hal_name: string, name of the hal, e.g. 'vibrator'.
+              hal_version: string, version of the hal, e.g '7.4'
+              extension: string, extension of files e.g. '.cpp'.
+
+            Returns:
+              string, to be inserted into build template.
+            """
+            result = []
+            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)
+
+        def ImportedDriverPackages(imported_packages):
+            """Formats list of imported packages into a string.
+
+            Formats list of imported packages for given hal_name, hal_version
+            into a string that can be inserted into build template.
+
+            Args:
+              imported_packages: list of imported packages
+
+            Returns:
+              string, to be inserted into build template.
+            """
+            result = []
+            for package in imported_packages:
+                prefix = 'android.hardware.'
+                if package.startswith(prefix):
+                    vts_driver_name = package.replace('@', '.vts.driver@')
+                    result.append('"%s",' % vts_driver_name)
+                else:
+                    result.append('"%s",' % package)
+            return '\n        '.join(result)
+
+        def ImportedProfilerPackages(imported_packages):
+            """Formats list of imported packages into a string.
+
+            Formats list of imported packages for given hal_name, hal_version
+            into a string that can be inserted into build template.
+
+            Args:
+              imported_packages: list of imported packages
+
+            Returns:
+              string, to be inserted into build template.
+            """
+            result = []
+            for package in imported_packages:
+                prefix = 'android.hardware.'
+                if package.startswith(prefix):
+                    vts_driver_name = package + "-vts.profiler"
+                    result.append('"%s",' % vts_driver_name)
+                else:
+                    result.append('"%s",' % package)
+            return '\n        '.join(result)
+
+        build_rule = 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(
+            '{GENERATED_SOURCES}',
+            GeneratedOutput(hal_name, hal_version, '.cpp'))
+        build_rule = build_rule.replace(
+            '{GENERATED_HEADERS}', GeneratedOutput(hal_name, hal_version, '.h'))
+
+        imported_packages = self._vts_spec_parser.ImportedPackagesList(
+            hal_name, hal_version)
+        build_rule = build_rule.replace(
+            '{IMPORTED_DRIVER_PACKAGES}',
+            ImportedDriverPackages(imported_packages))
+        build_rule = build_rule.replace(
+            '{IMPORTED_PROFILER_PACKAGES}',
+            ImportedProfilerPackages(imported_packages))
+
+        return build_rule
diff --git a/script/build/build_rule_gen_utils.py b/script/build/build_rule_gen_utils.py
new file mode 100644
index 0000000..a1f4fbf
--- /dev/null
+++ b/script/build/build_rule_gen_utils.py
@@ -0,0 +1,49 @@
+#!/usr/bin/env python3.4
+#
+# Copyright (C) 2016 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.
+#
+"""Utility functions for build rule generator."""
+
+import os
+
+
+def HalNameDir(hal_name):
+    """Returns directory name corresponding to hal name."""
+    return hal_name.replace('.', '/')
+
+
+def HalVerDir(hal_version):
+    """Returns directory name corresponding to hal version."""
+    return "V" + hal_version.replace('.', '_')
+
+
+def WriteBuildRule(file_path, build_rule):
+    """Writes the build rule into specified file.
+
+    Opens file_path and writes build_rule into it. Creates intermediate
+    directories if necessary.
+
+    Args:
+      file_path: string, path to file to which to write.
+      build_rule: string, build rule to be written into file.
+    """
+    print 'Updating %s' % file_path
+    dir_path = os.path.dirname(file_path)
+
+    if not os.path.exists(dir_path):
+        os.makedirs(dir_path)
+
+    with open(file_path, 'w') as bp_file:
+        bp_file.write(build_rule)
diff --git a/build/template/vts_build_template.bp b/script/build/template/vts_build_template.bp
similarity index 100%
rename from build/template/vts_build_template.bp
rename to script/build/template/vts_build_template.bp
diff --git a/script/build/vts_spec_parser.py b/script/build/vts_spec_parser.py
new file mode 100644
index 0000000..c6cfe12
--- /dev/null
+++ b/script/build/vts_spec_parser.py
@@ -0,0 +1,169 @@
+#!/usr/bin/env python3.4
+#
+# 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 fnmatch
+import os
+import shutil
+import subprocess
+import sys
+
+ANDROID_BUILD_TOP = os.environ.get('ANDROID_BUILD_TOP')
+if not ANDROID_BUILD_TOP:
+    print 'Run "lunch" command first.'
+    sys.exit(1)
+
+# TODO(trong): use proper packaging without referencing modules from source.
+TEST_VTS_DIR = os.path.join(ANDROID_BUILD_TOP, 'test', 'vts')
+sys.path.append(TEST_VTS_DIR)
+from proto import ComponentSpecificationMessage_pb2 as CompSpecMsg
+from google.protobuf import text_format
+import build_rule_gen_utils as utils
+
+
+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, tmp_dir='./tmp'):
+        """VtsSpecParser constructor.
+
+        For every unique pair of (hal name, hal version) available under
+        hardware/interfaces, generates .vts files using hidl-gen.
+
+        Args:
+            tmp_dir: string, temporary directory to which to write .vts files.
+        """
+        self._tmp_dir = tmp_dir
+        hal_list = self.HalNamesAndVersions()
+
+        print "Generating .vts specs."
+        for target in hal_list:
+            hal_name = target[0]
+            hal_version = target[1]
+            self.GenerateVtsSpecs(hal_name, hal_version)
+
+    def __del__(self):
+        """VtsSpecParser destructor.
+
+        Removes all temporary files that were generated.
+        """
+        print "Removing temp files."
+        if os.path.exists(self._tmp_dir):
+            shutil.rmtree(self._tmp_dir)
+
+    def ImportedPackagesList(self, hal_name, hal_version):
+        """Returns a list of imported packages.
+
+        Args:
+          hal_name: string, name of the hal, e.g. 'vibrator'.
+          hal_version: string, version of the hal, e.g '7.4'
+
+        Returns:
+          list of strings. For example,
+              ['android.hardware.vibrator@1.3', 'android.hidl.base@1.7']
+        """
+
+        vts_spec_protos = self.VtsSpecProtos(hal_name, hal_version)
+
+        imported_packages = set()
+        for vts_spec in vts_spec_protos:
+            for package in getattr(vts_spec, 'import', []):
+                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)
+
+        return sorted(imported_packages)
+
+    def GenerateVtsSpecs(self, hal_name, hal_version):
+        """Generates VTS specs.
+
+        Uses hidl-gen to generate .vts files under a tmp directory.
+
+        Args:
+          hal_name: string, name of the hal, e.g. 'vibrator'.
+          hal_version: string, version of the hal, e.g '7.4'
+          tmp_dir: string, location to which to write tmp files.
+        """
+        hidl_gen_cmd = (
+            'hidl-gen -o {TEMP_DIR} -L vts '
+            '-r android.hardware:{HW_IFACE_DIR} '
+            '-r android.hidl:{ANDROID_BUILD_TOP}/system/libhidl/transport '
+            'android.hardware.{HAL_NAME}@{HAL_VERSION}').format(
+                TEMP_DIR=self._tmp_dir,
+                HW_IFACE_DIR=self.HW_IFACE_DIR,
+                ANDROID_BUILD_TOP=ANDROID_BUILD_TOP,
+                HAL_NAME=hal_name,
+                HAL_VERSION=hal_version)
+        subprocess.call(hidl_gen_cmd, shell=True)
+
+    def HalNamesAndVersions(self):
+        """Returns a list of hals and version present under hardware/interfaces.
+
+        Returns:
+          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))
+        return sorted(result)
+
+    def VtsSpecNames(self, hal_name, hal_version):
+        """Returns list of .vts file names for given hal name and version.
+
+        hal_name: string, name of the hal, e.g. 'vibrator'.
+        hal_version: string, version of the hal, e.g '7.4'
+
+        Returns:
+          list of string, .vts files for given hal name and version,
+              e.g. ['Vibrator.vts', 'types.vts']
+        """
+        vts_spec_dir = os.path.join(self._tmp_dir, 'android', 'hardware',
+                                    utils.HalNameDir(hal_name), hal_version)
+        vts_spec_names = filter(lambda x: x.endswith('.vts'),
+                                os.listdir(vts_spec_dir))
+        return sorted(vts_spec_names)
+
+    def VtsSpecProtos(self, hal_name, hal_version):
+        """Returns list of .vts protos for given hal name and version.
+
+        hal_name: string, name of the hal, e.g. 'vibrator'.
+        hal_version: string, version of the hal, e.g '7.4'
+
+        Returns:
+          list of ComponentSpecificationMessages
+        """
+        vts_spec_dir = os.path.join(self._tmp_dir, 'android', 'hardware',
+                                    utils.HalNameDir(hal_name), hal_version)
+        vts_spec_protos = []
+        for vts_spec in self.VtsSpecNames(hal_name, hal_version):
+            spec_proto = CompSpecMsg.ComponentSpecificationMessage()
+            vts_spec_path = os.path.join(vts_spec_dir, vts_spec)
+            with open(vts_spec_path, 'r') as spec_file:
+                spec_string = spec_file.read()
+                text_format.Merge(spec_string, spec_proto)
+
+            vts_spec_protos.append(spec_proto)
+        return vts_spec_protos
diff --git a/script/configure/__init__.py b/script/configure/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/script/configure/__init__.py
diff --git a/script/configure/test_case_creator.py b/script/configure/test_case_creator.py
new file mode 100755
index 0000000..afea8b4
--- /dev/null
+++ b/script/configure/test_case_creator.py
@@ -0,0 +1,389 @@
+#!/usr/bin/env python
+#
+# Copyright 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.
+#
+
+# Create the configuration files for a hidl hal test.
+# This script copy a template which contains Android.mk and AndroidTest.xml
+# files under test/vts-testcases/hal/ based on the hal package name.
+
+import datetime
+import os
+import sys
+
+from build.vts_spec_parser import VtsSpecParser
+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_PACKAGE_PREFIX = 'android.hardware.'
+
+ANDROID_MK_FILE_NAME = 'Android.mk'
+ANDROID_TEST_XML_FILE_NAME = 'AndroidTest.xml'
+
+
+class TestCaseCreator(object):
+    """Init a test case directory with helloworld test case.
+
+    Attributes:
+        hal_package_name: string, package name of the testing hal. e.g. android.hardware.nfc@1.0.
+        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.
+        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_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.
+        build_top: string, equal to environment variable ANDROID_BUILD_TOP.
+        vts_spec_parser: tools that generates and parses vts spec with hidl-gen.
+        current_year: current year.
+    """
+
+    def __init__(self, vts_spec_parser, hal_package_name):
+        '''Initialize class attributes.'''
+        self._hal_package_name = hal_package_name
+
+        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)
+        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,
+                       test_type,
+                       time_out='1m',
+                       is_profiling=False,
+                       update_only=False):
+        """Create the necessary configuration files to launch a test case.
+
+        Args:
+          test_type: type of the test.
+          time_out: timeout of the test.
+          is_profiling: whether to create a profiling test case.
+          update_only: flag to only update existing test configure.
+
+        Returns:
+          boolean, whether created/updated a test case successfully.
+        """
+        self._test_type = test_type
+        self._time_out = time_out
+        self._is_profiling = is_profiling
+
+        self._test_module_name = self.GetVtsHalTestModuleName()
+        if is_profiling:
+            self._test_name = self._test_module_name + 'Profiling'
+        else:
+            self._test_name = self._test_module_name
+
+        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 os.path.exists(self._test_dir):
+            print 'WARNING: Test directory already exists. Continuing...'
+        elif not update_only:
+            try:
+                os.makedirs(self._test_dir)
+            except:
+                print('Error: Failed to create test directory at %s. '
+                      'Exiting...' % self.test_dir)
+                return False
+        else:
+            print('WARNING: Test directory does not exists, stop updating.')
+            return True
+
+        self.CreateAndroidMk()
+        self.CreateAndroidTestXml()
+        return True
+
+    def GetVtsTargetTestSourceFileName(self):
+        """Get the name of target side test source file ."""
+        test_binary_name = self._test_module_name + 'Test.cpp'
+        return os.path.join(self.GetHalInterfacePath(), 'vts/functional',
+                            test_binary_name)
+
+    def GetVtsHostTestScriptFileName(self):
+        """Get the name of host side test script file ."""
+        test_script_name = self._test_module_name + 'Test.py'
+        return os.path.join(
+            self.GetHalTestCasePath(ignore_profiling=True), test_script_name)
+
+    def GetVtsHalTestModuleName(self):
+        """Get the test model name with format VtsHalHalNameVersionTestType."""
+        sub_names = self._hal_name.split('.')
+        hal_name_upper_camel = ''.join(x.title() for x in sub_names)
+        return 'VtsHal' + hal_name_upper_camel + self.GetHalVersionToken(
+        ) + self._test_type.title()
+
+    def GetHalPath(self):
+        """Get the hal path based on hal name."""
+        return self._hal_name.replace('.', '/')
+
+    def GetHalVersionToken(self):
+        """Get a string of the hal version."""
+        return 'V' + self._hal_version.replace('.', '_')
+
+    def GetHalInterfacePath(self):
+        """Get the directory that stores the .hal files."""
+        return os.path.join(self._build_top, HAL_INTERFACE_PATH,
+                            self.GetHalPath(), self._hal_version)
+
+    def GetHalTestCasePath(self, ignore_profiling=False):
+        """Get the directory that stores the test case."""
+        test_dir = self._test_type
+        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)
+
+    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:]))
+
+    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'
+        })
+        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})
+
+        self.GenerateTestOptionConfigure(test)
+
+        target = os.path.join(self._test_dir, ANDROID_TEST_XML_FILE_NAME)
+        with open(target, 'w') as f:
+            print 'Creating %s' % target
+            f.write(XML_HEADER)
+            f.write(LICENSE_STATEMENT_XML.format(year=self._current_year))
+            f.write(self.Prettify(configuration))
+
+    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': 'push-group',
+                       'value': 'HidlHalTest.push'})
+
+        imported_package_lists = self._vts_spec_parser.ImportedPackagesList(
+            self._hal_name, self._hal_version)
+        imported_package_lists.append(self._hal_package_name)
+        # Generate additional push files e.g driver/profiler/vts_spec
+        if self._test_type == 'host':
+            ET.SubElement(file_pusher, 'option',
+                          {'name': 'cleanup',
+                           'value': 'true'})
+            vts_spec_lists = self._vts_spec_parser.VtsSpecNames(
+                self._hal_name, self._hal_version)
+            for vts_spec in vts_spec_lists:
+                push_spec = VTS_SPEC_PUSH_TEMPLATE.format(
+                    hal_path=self._hal_name.replace('.', '/'),
+                    hal_version=self._hal_version,
+                    vts_file=vts_spec)
+                ET.SubElement(file_pusher, 'option',
+                              {'name': 'push',
+                               'value': push_spec})
+            for imported_package in imported_package_lists:
+                if imported_package.startswith(HAL_PACKAGE_PREFIX):
+                    dirver_package_name = imported_package.replace(
+                        '@', '.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'})
+            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})
+
+    def GenerateTestOptionConfigure(self, test):
+        """Create the test option configuration within AndroidTest.xml
+
+        Args:
+          test: parent xml element for test option configure.
+        """
+        ET.SubElement(test, 'option',
+                      {'name': 'test-module-name',
+                       'value': self._test_name})
+
+        if self._test_type == 'target':
+            test_binary = TEST_BINEARY_TEMPLATE.format(
+                test_name=self._test_module_name + 'Test')
+            ET.SubElement(test, 'option', {
+                'name': 'binary-test-sources',
+                'value': test_binary
+            })
+            ET.SubElement(test, 'option', {
+                'name': 'binary-test-type',
+                'value': 'hal_hidl_gtest'
+            })
+        else:
+            test_script = 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})
+
+        if self._is_profiling:
+            ET.SubElement(test, 'option',
+                          {'name': 'enable-profiling',
+                           'value': 'true'})
+
+        ET.SubElement(test, 'option', {
+            'name': 'precondition-lshal',
+            'value': self._hal_package_name
+        })
+        ET.SubElement(test, 'option',
+                      {'name': 'test-timeout',
+                       'value': self._time_out})
+
+    def Prettify(self, elem):
+        """Create a pretty-printed XML string for the Element.
+
+        Args:
+          elem: a xml element.
+
+        Regurns:
+          A pretty-printed XML string for the Element.
+        """
+        doc = minidom.Document()
+        declaration = doc.toxml()
+        rough_string = ET.tostring(elem, 'utf-8')
+        reparsed = minidom.parseString(rough_string)
+        return unescape(
+            reparsed.toprettyxml(indent="    ")[len(declaration) + 1:])
+
+
+LICENSE_STATEMENT_POUND = """#
+# Copyright (C) {year} 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.
+#
+"""
+
+LICENSE_STATEMENT_XML = """<!-- Copyright (C) {year} 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.
+-->
+"""
+
+ANDROID_MK_TEMPLATE = """LOCAL_PATH := $(call my-dir)
+
+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 = """
+          _32bit::DATA/nativetest/{test_name}/{test_name},
+          _64bit::DATA/nativetest64/{test_name}/{test_name},
+          """
+TEST_SCRIPT_TEMPLATE = 'vts/testcases/{hal_path}/{hal_version}/host/{test_name}'
+
+VTS_SPEC_PUSH_TEMPLATE = 'spec/hardware/interfaces/{hal_path}/{hal_version}/vts/{vts_file}->/data/local/tmp/spec/{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}'
diff --git a/script/launch_hal_test.py b/script/launch_hal_test.py
new file mode 100755
index 0000000..c06b375
--- /dev/null
+++ b/script/launch_hal_test.py
@@ -0,0 +1,95 @@
+#!/usr/bin/env python
+#
+# Copyright 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 argparse
+import os
+import re
+import sys
+
+from build.vts_spec_parser import VtsSpecParser
+from configure.test_case_creator import TestCaseCreator
+
+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))+'
+
+
+def main():
+    parser = argparse.ArgumentParser(description='Initiate a test case.')
+    parser.add_argument(
+        '--test_type',
+        dest='test_type',
+        required=False,
+        help='Test type, such as HidlHalTest, HostDrivenTest, etc.')
+    parser.add_argument(
+        '--time_out',
+        dest='time_out',
+        required=False,
+        help='Timeout for the test, default is 1m')
+    parser.add_argument(
+        '--enable_profiling',
+        dest='enable_profiling',
+        action='store_true',
+        required=False,
+        help='Whether to create profiling tests')
+    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)
+    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...'
+        sys.exit(1)
+
+    if not args.test_type:
+        args.test_type = 'target'
+    elif args.test_type != 'target' and args.test_type != 'host':
+        print 'Unsupported test type. 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)
+
+    vts_spec_parser = VtsSpecParser()
+    test_case_creater = TestCaseCreator(vts_spec_parser, args.hal_package_name)
+    if not test_case_creater.LaunchTestCase(args.test_type, args.time_out):
+        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_profiling=True):
+            print('Error: Failed to launch profiling test for %s. Exiting...' %
+                  args.hal_package_name)
+            sys.exit(1)
+
+
+if __name__ == '__main__':
+    main()
diff --git a/update_makefiles.py b/script/update_makefiles.py
similarity index 82%
rename from update_makefiles.py
rename to script/update_makefiles.py
index c8aae5c..338b85b 100644
--- a/update_makefiles.py
+++ b/script/update_makefiles.py
@@ -24,13 +24,12 @@
   cd test/vts-testcase/hal && python update_makefiles.py
 """
 
-from build.build_rule_gen import UpdateBuildRule
+from build.build_rule_gen import BuildRuleGen
 import os
 import sys
 
 if __name__ == "__main__":
     usage = (
-    'Need to run from test/vts-testcase/hal!!!\n\n'
     'Updates .bp and .mk files under test/vts-testcase/hal.\n'
     'Among .bp and .mk files affected are:\n'
     '1. test/vts-testcase/hal/Android.bp\n'
@@ -38,11 +37,7 @@
     'Usage:\n'
     '  cd test/vts-testcase/hal && python update_makefiles.py\n')
 
-    PROJECT_DIR = os.path.dirname(os.path.abspath(__file__))
-    CWD = os.getcwd()
-    if CWD != PROJECT_DIR:
-        print usage
-        sys.exit(1)
 
     print 'Updating build rules.'
-    UpdateBuildRule()
+    build_rule_gen = BuildRuleGen()
+    build_rule_gen.UpdateBuildRule()
diff --git a/sensors/Android.bp b/sensors/Android.bp
new file mode 100644
index 0000000..ffa62cd
--- /dev/null
+++ b/sensors/Android.bp
@@ -0,0 +1,3 @@
+subdirs = [
+    "V1_0",
+]
diff --git a/sensors/V1_0/host/SensorsHidlTest.py b/sensors/V1_0/host/SensorsHidlTest.py
index 3c7fbbb..cb15a57 100644
--- a/sensors/V1_0/host/SensorsHidlTest.py
+++ b/sensors/V1_0/host/SensorsHidlTest.py
@@ -81,18 +81,21 @@
         logging.info("sensors_types: %s", sensors_types)
         logging.info("OK: %s", sensors_types.OK)
         logging.info("BAD_VALUE: %s", sensors_types.BAD_VALUE)
+        logging.info("NO_MEMORY: %s", sensors_types.NO_MEMORY)
         logging.info("PERMISSION_DENIED: %s", sensors_types.PERMISSION_DENIED)
         logging.info("INVALID_OPERATION: %s", sensors_types.INVALID_OPERATION)
-        asserts.assertEqual(sensors_types.OK, 0);
-        asserts.assertEqual(sensors_types.BAD_VALUE, -22);
+        asserts.assertEqual(sensors_types.OK, 0)
+        asserts.assertEqual(sensors_types.NO_MEMORY, -12)
+        asserts.assertEqual(sensors_types.BAD_VALUE, -22)
+        asserts.assertEqual(sensors_types.INVALID_OPERATION, -38)
 
         logging.info("sensor types:")
-        logging.info("SENSOR_TYPE_ACCELEROMETER: %s", sensors_types.SENSOR_TYPE_ACCELEROMETER)
-        logging.info("SENSOR_TYPE_GEOMAGNETIC_FIELD: %s", sensors_types.SENSOR_TYPE_GEOMAGNETIC_FIELD)
-        logging.info("SENSOR_TYPE_GYROSCOPE: %s", sensors_types.SENSOR_TYPE_GYROSCOPE)
-        asserts.assertEqual(sensors_types.SENSOR_TYPE_ACCELEROMETER, 1);
-        asserts.assertEqual(sensors_types.SENSOR_TYPE_GEOMAGNETIC_FIELD, 2);
-        asserts.assertEqual(sensors_types.SENSOR_TYPE_GYROSCOPE, 4);
+        logging.info("ACCELEROMETER: %s", sensors_types.ACCELEROMETER)
+        logging.info("MAGNETIC_FIELD: %s", sensors_types.MAGNETIC_FIELD)
+        logging.info("GYROSCOPE: %s", sensors_types.GYROSCOPE)
+        asserts.assertEqual(sensors_types.ACCELEROMETER, 1)
+        asserts.assertEqual(sensors_types.MAGNETIC_FIELD, 2)
+        asserts.assertEqual(sensors_types.GYROSCOPE, 4)
 
 if __name__ == "__main__":
     test_runner.main()
diff --git a/soundtrigger/Android.bp b/soundtrigger/Android.bp
new file mode 100644
index 0000000..141036c
--- /dev/null
+++ b/soundtrigger/Android.bp
@@ -0,0 +1,3 @@
+subdirs = [
+    "V2_0",
+]
diff --git a/soundtrigger/V2_0/Android.bp b/soundtrigger/V2_0/Android.bp
index 724fdbc..414463d 100644
--- a/soundtrigger/V2_0/Android.bp
+++ b/soundtrigger/V2_0/Android.bp
@@ -10,9 +10,9 @@
         ":android.hardware.soundtrigger@2.0_hal",
     ],
     out: [
+        "android/hardware/soundtrigger/2.0/SoundTriggerHw.vts.cpp",
         "android/hardware/soundtrigger/2.0/SoundTriggerHwCallback.vts.cpp",
         "android/hardware/soundtrigger/2.0/types.vts.cpp",
-        "android/hardware/soundtrigger/2.0/SoundTriggerHw.vts.cpp",
     ],
 }
 
@@ -24,9 +24,9 @@
         ":android.hardware.soundtrigger@2.0_hal",
     ],
     out: [
+        "android/hardware/soundtrigger/2.0/SoundTriggerHw.vts.h",
         "android/hardware/soundtrigger/2.0/SoundTriggerHwCallback.vts.h",
         "android/hardware/soundtrigger/2.0/types.vts.h",
-        "android/hardware/soundtrigger/2.0/SoundTriggerHw.vts.h",
     ],
 }
 
@@ -67,9 +67,9 @@
         ":android.hardware.soundtrigger@2.0_hal",
     ],
     out: [
+        "android/hardware/soundtrigger/2.0/SoundTriggerHw.vts.cpp",
         "android/hardware/soundtrigger/2.0/SoundTriggerHwCallback.vts.cpp",
         "android/hardware/soundtrigger/2.0/types.vts.cpp",
-        "android/hardware/soundtrigger/2.0/SoundTriggerHw.vts.cpp",
     ],
 }
 
@@ -81,9 +81,9 @@
         ":android.hardware.soundtrigger@2.0_hal",
     ],
     out: [
+        "android/hardware/soundtrigger/2.0/SoundTriggerHw.vts.h",
         "android/hardware/soundtrigger/2.0/SoundTriggerHwCallback.vts.h",
         "android/hardware/soundtrigger/2.0/types.vts.h",
-        "android/hardware/soundtrigger/2.0/SoundTriggerHw.vts.h",
     ],
 }
 
diff --git a/tests/Android.bp b/tests/Android.bp
new file mode 100644
index 0000000..770767a
--- /dev/null
+++ b/tests/Android.bp
@@ -0,0 +1,14 @@
+subdirs = [
+    "bar/V1_0",
+    "baz/V1_0",
+    "expression/V1_0",
+    "foo/V1_0",
+    "inheritance/V1_0",
+    "libhwbinder/V1_0",
+    "memory/V1_0",
+    "msgq/V1_0",
+    "pointer/V1_0",
+    "versioning/V1_0",
+    "versioning/V2_2",
+    "versioning/V2_3",
+]
diff --git a/tests/bar/V1_0/Android.bp b/tests/bar/V1_0/Android.bp
index b2c2807..8ef023d 100644
--- a/tests/bar/V1_0/Android.bp
+++ b/tests/bar/V1_0/Android.bp
@@ -11,11 +11,11 @@
     ],
     out: [
         "android/hardware/tests/bar/1.0/Bar.vts.cpp",
-        "android/hardware/tests/bar/1.0/types.vts.cpp",
         "android/hardware/tests/bar/1.0/Complicated.vts.cpp",
-        "android/hardware/tests/bar/1.0/ImportRules.vts.cpp",
         "android/hardware/tests/bar/1.0/FooCallback.vts.cpp",
+        "android/hardware/tests/bar/1.0/ImportRules.vts.cpp",
         "android/hardware/tests/bar/1.0/ImportTypes.vts.cpp",
+        "android/hardware/tests/bar/1.0/types.vts.cpp",
     ],
 }
 
@@ -28,11 +28,11 @@
     ],
     out: [
         "android/hardware/tests/bar/1.0/Bar.vts.h",
-        "android/hardware/tests/bar/1.0/types.vts.h",
         "android/hardware/tests/bar/1.0/Complicated.vts.h",
-        "android/hardware/tests/bar/1.0/ImportRules.vts.h",
         "android/hardware/tests/bar/1.0/FooCallback.vts.h",
+        "android/hardware/tests/bar/1.0/ImportRules.vts.h",
         "android/hardware/tests/bar/1.0/ImportTypes.vts.h",
+        "android/hardware/tests/bar/1.0/types.vts.h",
     ],
 }
 
@@ -55,12 +55,12 @@
         "libcamera_metadata",
         "libprotobuf-cpp-full",
         "android.hardware.tests.bar@1.0",
-        "android.hidl.base@1.0",
         "android.hardware.tests.foo.vts.driver@1.0",
+        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
-        "android.hidl.base@1.0",
         "android.hardware.tests.foo.vts.driver@1.0",
+        "android.hidl.base@1.0",
     ],
 }
 
@@ -74,11 +74,11 @@
     ],
     out: [
         "android/hardware/tests/bar/1.0/Bar.vts.cpp",
-        "android/hardware/tests/bar/1.0/types.vts.cpp",
         "android/hardware/tests/bar/1.0/Complicated.vts.cpp",
-        "android/hardware/tests/bar/1.0/ImportRules.vts.cpp",
         "android/hardware/tests/bar/1.0/FooCallback.vts.cpp",
+        "android/hardware/tests/bar/1.0/ImportRules.vts.cpp",
         "android/hardware/tests/bar/1.0/ImportTypes.vts.cpp",
+        "android/hardware/tests/bar/1.0/types.vts.cpp",
     ],
 }
 
@@ -91,11 +91,11 @@
     ],
     out: [
         "android/hardware/tests/bar/1.0/Bar.vts.h",
-        "android/hardware/tests/bar/1.0/types.vts.h",
         "android/hardware/tests/bar/1.0/Complicated.vts.h",
-        "android/hardware/tests/bar/1.0/ImportRules.vts.h",
         "android/hardware/tests/bar/1.0/FooCallback.vts.h",
+        "android/hardware/tests/bar/1.0/ImportRules.vts.h",
         "android/hardware/tests/bar/1.0/ImportTypes.vts.h",
+        "android/hardware/tests/bar/1.0/types.vts.h",
     ],
 }
 
@@ -112,8 +112,8 @@
         "libvts_multidevice_proto",
         "libprotobuf-cpp-full",
         "android.hardware.tests.bar@1.0",
-        "android.hidl.base@1.0",
         "android.hardware.tests.foo@1.0-vts.profiler",
+        "android.hidl.base@1.0",
     ],
 }
 
diff --git a/tests/baz/V1_0/Android.bp b/tests/baz/V1_0/Android.bp
index da33f21..bb0f268 100644
--- a/tests/baz/V1_0/Android.bp
+++ b/tests/baz/V1_0/Android.bp
@@ -10,10 +10,10 @@
         ":android.hardware.tests.baz@1.0_hal",
     ],
     out: [
-        "android/hardware/tests/baz/1.0/types.vts.cpp",
-        "android/hardware/tests/baz/1.0/BazCallback.vts.cpp",
         "android/hardware/tests/baz/1.0/Base.vts.cpp",
         "android/hardware/tests/baz/1.0/Baz.vts.cpp",
+        "android/hardware/tests/baz/1.0/BazCallback.vts.cpp",
+        "android/hardware/tests/baz/1.0/types.vts.cpp",
     ],
 }
 
@@ -25,10 +25,10 @@
         ":android.hardware.tests.baz@1.0_hal",
     ],
     out: [
-        "android/hardware/tests/baz/1.0/types.vts.h",
-        "android/hardware/tests/baz/1.0/BazCallback.vts.h",
         "android/hardware/tests/baz/1.0/Base.vts.h",
         "android/hardware/tests/baz/1.0/Baz.vts.h",
+        "android/hardware/tests/baz/1.0/BazCallback.vts.h",
+        "android/hardware/tests/baz/1.0/types.vts.h",
     ],
 }
 
@@ -67,10 +67,10 @@
         ":android.hardware.tests.baz@1.0_hal",
     ],
     out: [
-        "android/hardware/tests/baz/1.0/types.vts.cpp",
-        "android/hardware/tests/baz/1.0/BazCallback.vts.cpp",
         "android/hardware/tests/baz/1.0/Base.vts.cpp",
         "android/hardware/tests/baz/1.0/Baz.vts.cpp",
+        "android/hardware/tests/baz/1.0/BazCallback.vts.cpp",
+        "android/hardware/tests/baz/1.0/types.vts.cpp",
     ],
 }
 
@@ -82,10 +82,10 @@
         ":android.hardware.tests.baz@1.0_hal",
     ],
     out: [
-        "android/hardware/tests/baz/1.0/types.vts.h",
-        "android/hardware/tests/baz/1.0/BazCallback.vts.h",
         "android/hardware/tests/baz/1.0/Base.vts.h",
         "android/hardware/tests/baz/1.0/Baz.vts.h",
+        "android/hardware/tests/baz/1.0/BazCallback.vts.h",
+        "android/hardware/tests/baz/1.0/types.vts.h",
     ],
 }
 
diff --git a/tests/expression/V1_0/Android.bp b/tests/expression/V1_0/Android.bp
index ac85ddd..ed93a78 100644
--- a/tests/expression/V1_0/Android.bp
+++ b/tests/expression/V1_0/Android.bp
@@ -10,8 +10,8 @@
         ":android.hardware.tests.expression@1.0_hal",
     ],
     out: [
-        "android/hardware/tests/expression/1.0/ExpressionExt.vts.cpp",
         "android/hardware/tests/expression/1.0/Expression.vts.cpp",
+        "android/hardware/tests/expression/1.0/ExpressionExt.vts.cpp",
     ],
 }
 
@@ -23,8 +23,8 @@
         ":android.hardware.tests.expression@1.0_hal",
     ],
     out: [
-        "android/hardware/tests/expression/1.0/ExpressionExt.vts.h",
         "android/hardware/tests/expression/1.0/Expression.vts.h",
+        "android/hardware/tests/expression/1.0/ExpressionExt.vts.h",
     ],
 }
 
@@ -63,8 +63,8 @@
         ":android.hardware.tests.expression@1.0_hal",
     ],
     out: [
-        "android/hardware/tests/expression/1.0/ExpressionExt.vts.cpp",
         "android/hardware/tests/expression/1.0/Expression.vts.cpp",
+        "android/hardware/tests/expression/1.0/ExpressionExt.vts.cpp",
     ],
 }
 
@@ -76,8 +76,8 @@
         ":android.hardware.tests.expression@1.0_hal",
     ],
     out: [
-        "android/hardware/tests/expression/1.0/ExpressionExt.vts.h",
         "android/hardware/tests/expression/1.0/Expression.vts.h",
+        "android/hardware/tests/expression/1.0/ExpressionExt.vts.h",
     ],
 }
 
diff --git a/tests/foo/V1_0/Android.bp b/tests/foo/V1_0/Android.bp
index 3c5dbae..57e9695 100644
--- a/tests/foo/V1_0/Android.bp
+++ b/tests/foo/V1_0/Android.bp
@@ -10,12 +10,12 @@
         ":android.hardware.tests.foo@1.0_hal",
     ],
     out: [
-        "android/hardware/tests/foo/1.0/types.vts.cpp",
         "android/hardware/tests/foo/1.0/Foo.vts.cpp",
-        "android/hardware/tests/foo/1.0/MyTypes.vts.cpp",
-        "android/hardware/tests/foo/1.0/TheirTypes.vts.cpp",
         "android/hardware/tests/foo/1.0/FooCallback.vts.cpp",
+        "android/hardware/tests/foo/1.0/MyTypes.vts.cpp",
         "android/hardware/tests/foo/1.0/Simple.vts.cpp",
+        "android/hardware/tests/foo/1.0/TheirTypes.vts.cpp",
+        "android/hardware/tests/foo/1.0/types.vts.cpp",
     ],
 }
 
@@ -27,12 +27,12 @@
         ":android.hardware.tests.foo@1.0_hal",
     ],
     out: [
-        "android/hardware/tests/foo/1.0/types.vts.h",
         "android/hardware/tests/foo/1.0/Foo.vts.h",
-        "android/hardware/tests/foo/1.0/MyTypes.vts.h",
-        "android/hardware/tests/foo/1.0/TheirTypes.vts.h",
         "android/hardware/tests/foo/1.0/FooCallback.vts.h",
+        "android/hardware/tests/foo/1.0/MyTypes.vts.h",
         "android/hardware/tests/foo/1.0/Simple.vts.h",
+        "android/hardware/tests/foo/1.0/TheirTypes.vts.h",
+        "android/hardware/tests/foo/1.0/types.vts.h",
     ],
 }
 
@@ -71,12 +71,12 @@
         ":android.hardware.tests.foo@1.0_hal",
     ],
     out: [
-        "android/hardware/tests/foo/1.0/types.vts.cpp",
         "android/hardware/tests/foo/1.0/Foo.vts.cpp",
-        "android/hardware/tests/foo/1.0/MyTypes.vts.cpp",
-        "android/hardware/tests/foo/1.0/TheirTypes.vts.cpp",
         "android/hardware/tests/foo/1.0/FooCallback.vts.cpp",
+        "android/hardware/tests/foo/1.0/MyTypes.vts.cpp",
         "android/hardware/tests/foo/1.0/Simple.vts.cpp",
+        "android/hardware/tests/foo/1.0/TheirTypes.vts.cpp",
+        "android/hardware/tests/foo/1.0/types.vts.cpp",
     ],
 }
 
@@ -88,12 +88,12 @@
         ":android.hardware.tests.foo@1.0_hal",
     ],
     out: [
-        "android/hardware/tests/foo/1.0/types.vts.h",
         "android/hardware/tests/foo/1.0/Foo.vts.h",
-        "android/hardware/tests/foo/1.0/MyTypes.vts.h",
-        "android/hardware/tests/foo/1.0/TheirTypes.vts.h",
         "android/hardware/tests/foo/1.0/FooCallback.vts.h",
+        "android/hardware/tests/foo/1.0/MyTypes.vts.h",
         "android/hardware/tests/foo/1.0/Simple.vts.h",
+        "android/hardware/tests/foo/1.0/TheirTypes.vts.h",
+        "android/hardware/tests/foo/1.0/types.vts.h",
     ],
 }
 
diff --git a/tests/inheritance/V1_0/Android.bp b/tests/inheritance/V1_0/Android.bp
index c3c9e52..d4a2a47 100644
--- a/tests/inheritance/V1_0/Android.bp
+++ b/tests/inheritance/V1_0/Android.bp
@@ -10,10 +10,10 @@
         ":android.hardware.tests.inheritance@1.0_hal",
     ],
     out: [
-        "android/hardware/tests/inheritance/1.0/Parent.vts.cpp",
         "android/hardware/tests/inheritance/1.0/Child.vts.cpp",
         "android/hardware/tests/inheritance/1.0/Fetcher.vts.cpp",
         "android/hardware/tests/inheritance/1.0/Grandparent.vts.cpp",
+        "android/hardware/tests/inheritance/1.0/Parent.vts.cpp",
     ],
 }
 
@@ -25,10 +25,10 @@
         ":android.hardware.tests.inheritance@1.0_hal",
     ],
     out: [
-        "android/hardware/tests/inheritance/1.0/Parent.vts.h",
         "android/hardware/tests/inheritance/1.0/Child.vts.h",
         "android/hardware/tests/inheritance/1.0/Fetcher.vts.h",
         "android/hardware/tests/inheritance/1.0/Grandparent.vts.h",
+        "android/hardware/tests/inheritance/1.0/Parent.vts.h",
     ],
 }
 
@@ -67,10 +67,10 @@
         ":android.hardware.tests.inheritance@1.0_hal",
     ],
     out: [
-        "android/hardware/tests/inheritance/1.0/Parent.vts.cpp",
         "android/hardware/tests/inheritance/1.0/Child.vts.cpp",
         "android/hardware/tests/inheritance/1.0/Fetcher.vts.cpp",
         "android/hardware/tests/inheritance/1.0/Grandparent.vts.cpp",
+        "android/hardware/tests/inheritance/1.0/Parent.vts.cpp",
     ],
 }
 
@@ -82,10 +82,10 @@
         ":android.hardware.tests.inheritance@1.0_hal",
     ],
     out: [
-        "android/hardware/tests/inheritance/1.0/Parent.vts.h",
         "android/hardware/tests/inheritance/1.0/Child.vts.h",
         "android/hardware/tests/inheritance/1.0/Fetcher.vts.h",
         "android/hardware/tests/inheritance/1.0/Grandparent.vts.h",
+        "android/hardware/tests/inheritance/1.0/Parent.vts.h",
     ],
 }
 
diff --git a/tests/pointer/V1_0/Android.bp b/tests/pointer/V1_0/Android.bp
index 848fc5c..57fed08 100644
--- a/tests/pointer/V1_0/Android.bp
+++ b/tests/pointer/V1_0/Android.bp
@@ -10,8 +10,8 @@
         ":android.hardware.tests.pointer@1.0_hal",
     ],
     out: [
-        "android/hardware/tests/pointer/1.0/Pointer.vts.cpp",
         "android/hardware/tests/pointer/1.0/Graph.vts.cpp",
+        "android/hardware/tests/pointer/1.0/Pointer.vts.cpp",
     ],
 }
 
@@ -23,8 +23,8 @@
         ":android.hardware.tests.pointer@1.0_hal",
     ],
     out: [
-        "android/hardware/tests/pointer/1.0/Pointer.vts.h",
         "android/hardware/tests/pointer/1.0/Graph.vts.h",
+        "android/hardware/tests/pointer/1.0/Pointer.vts.h",
     ],
 }
 
@@ -63,8 +63,8 @@
         ":android.hardware.tests.pointer@1.0_hal",
     ],
     out: [
-        "android/hardware/tests/pointer/1.0/Pointer.vts.cpp",
         "android/hardware/tests/pointer/1.0/Graph.vts.cpp",
+        "android/hardware/tests/pointer/1.0/Pointer.vts.cpp",
     ],
 }
 
@@ -76,8 +76,8 @@
         ":android.hardware.tests.pointer@1.0_hal",
     ],
     out: [
-        "android/hardware/tests/pointer/1.0/Pointer.vts.h",
         "android/hardware/tests/pointer/1.0/Graph.vts.h",
+        "android/hardware/tests/pointer/1.0/Pointer.vts.h",
     ],
 }
 
diff --git a/thermal/Android.bp b/thermal/Android.bp
new file mode 100644
index 0000000..43fbe44
--- /dev/null
+++ b/thermal/Android.bp
@@ -0,0 +1,4 @@
+subdirs = [
+    "V1_0",
+    "V1_0/target_stress",
+]
diff --git a/thermal/V1_0/target_stress/Android.bp b/thermal/V1_0/target_stress/Android.bp
new file mode 100644
index 0000000..5e33c2e
--- /dev/null
+++ b/thermal/V1_0/target_stress/Android.bp
@@ -0,0 +1,37 @@
+//
+// 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.
+//
+
+cc_test {
+    name: "thermal_hidl_stress_test",
+    gtest: true,
+    srcs: ["thermal_hidl_stress_test.cpp"],
+    shared_libs: [
+        "libbase",
+        "liblog",
+        "libcutils",
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "libnativehelper",
+        "libutils",
+        "android.hardware.thermal@1.0",
+    ],
+    static_libs: ["libgtest"],
+    cflags: [
+        "-O0",
+        "-g",
+    ],
+}
diff --git a/thermal/V1_0/target_stress/Android.mk b/thermal/V1_0/target_stress/Android.mk
new file mode 100644
index 0000000..023cfa5
--- /dev/null
+++ b/thermal/V1_0/target_stress/Android.mk
@@ -0,0 +1,25 @@
+#
+# 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 $(call all-subdir-makefiles)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := ThermalHidlTargetStressTest
+VTS_CONFIG_SRC_DIR := testcases/hal/thermal/V1_0/target_stress
+include test/vts/tools/build/Android.host_config.mk
diff --git a/thermal/V1_0/target_stress/AndroidTest.xml b/thermal/V1_0/target_stress/AndroidTest.xml
new file mode 100644
index 0000000..793c401
--- /dev/null
+++ b/thermal/V1_0/target_stress/AndroidTest.xml
@@ -0,0 +1,31 @@
+<?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 THERMAL HAL's target-side stress test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="push-group" value="HidlHalTest.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-sources" value="
+            _32bit::DATA/nativetest/thermal_hidl_stress_test/thermal_hidl_stress_test,
+            _64bit::DATA/nativetest64/thermal_hidl_stress_test/thermal_hidl_stress_test,
+            "/>
+        <option name="binary-test-type" value="gtest" />
+        <option name="test-timeout" value="1m" />
+    </test>
+</configuration>
+
diff --git a/thermal/V1_0/target_stress/thermal_hidl_stress_test.cpp b/thermal/V1_0/target_stress/thermal_hidl_stress_test.cpp
new file mode 100644
index 0000000..34be82a
--- /dev/null
+++ b/thermal/V1_0/target_stress/thermal_hidl_stress_test.cpp
@@ -0,0 +1,112 @@
+/*
+ * 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.
+ */
+
+#define LOG_TAG "thermal_hidl_target_stress_test"
+
+#include <android-base/logging.h>
+#include <android/hardware/thermal/1.0/IThermal.h>
+#include <android/hardware/thermal/1.0/types.h>
+
+#include <gtest/gtest.h>
+#include <chrono>
+#include <condition_variable>
+#include <mutex>
+
+using ::android::hardware::hidl_vec;
+using ::android::hardware::thermal::V1_0::CoolingDevice;
+using ::android::hardware::thermal::V1_0::CpuUsage;
+using ::android::hardware::thermal::V1_0::IThermal;
+using ::android::hardware::thermal::V1_0::Temperature;
+using ::android::hardware::thermal::V1_0::ThermalStatus;
+using ::android::hardware::thermal::V1_0::ThermalStatusCode;
+using ::android::sp;
+
+#define NUMBER_LOOPS 100
+#define TIMEOUT_PERIOD 1
+
+class ThermalHidlStressTest : public ::testing::Test {
+ public:
+  virtual void SetUp() override {
+    thermal_ = IThermal::getService();
+    ASSERT_NE(thermal_, nullptr);
+    count_ = 0;
+  }
+
+  /* Test code calls this function to wait for callback */
+  inline std::cv_status wait() {
+    std::unique_lock<std::mutex> lock(mtx_);
+
+    std::cv_status status = std::cv_status::no_timeout;
+    auto now = std::chrono::system_clock::now();
+    while (count_ == 0) {
+      status = cv_.wait_until(lock, now + std::chrono::seconds(TIMEOUT_PERIOD));
+      if (status == std::cv_status::timeout) return status;
+    }
+    count_--;
+    return status;
+  }
+
+ protected:
+  sp<IThermal> thermal_;
+  std::mutex mtx_;
+  std::condition_variable cv_;
+  int count_;
+};
+
+/* Stress test for Thermal::getTemperatures(). */
+TEST_F(ThermalHidlStressTest, stressTemperatures) {
+  for (int loops = 0; loops < NUMBER_LOOPS; loops++) {
+    thermal_->getTemperatures(
+        [&](ThermalStatus status, hidl_vec<Temperature> /* temperatures */) {
+          EXPECT_EQ(ThermalStatusCode::SUCCESS, status.code);
+          /* Inform the test about callback. */
+          std::unique_lock<std::mutex> lock(mtx_);
+          count_++;
+          cv_.notify_one();
+        });
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+  }
+}
+
+/* Stress test for Thermal::getCpuUsages(). */
+TEST_F(ThermalHidlStressTest, stressCpuUsages) {
+  for (int loops = 0; loops < NUMBER_LOOPS; loops++) {
+    thermal_->getCpuUsages(
+        [&](ThermalStatus status, hidl_vec<CpuUsage> /* cpuUsages */) {
+          EXPECT_EQ(ThermalStatusCode::SUCCESS, status.code);
+          /* Inform the test about callback. */
+          std::unique_lock<std::mutex> lock(mtx_);
+          count_++;
+          cv_.notify_one();
+        });
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+  }
+}
+
+/* Stress test for Thermal::getCoolingDevices(). */
+TEST_F(ThermalHidlStressTest, stressCoolingDevices) {
+  for (int loops = 0; loops < NUMBER_LOOPS; loops++) {
+    thermal_->getCoolingDevices(
+        [&](ThermalStatus status, hidl_vec<CoolingDevice> /* coolingDevice */) {
+          EXPECT_EQ(ThermalStatusCode::SUCCESS, status.code);
+          /* Inform the test about callback. */
+          std::unique_lock<std::mutex> lock(mtx_);
+          count_++;
+          cv_.notify_one();
+        });
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+  }
+}
diff --git a/tv/Android.bp b/tv/Android.bp
new file mode 100644
index 0000000..cf1c9be
--- /dev/null
+++ b/tv/Android.bp
@@ -0,0 +1,4 @@
+subdirs = [
+    "cec/V1_0",
+    "input/V1_0",
+]
diff --git a/tv/cec/V1_0/host/TvCecHidlTest.py b/tv/cec/V1_0/host/TvCecHidlTest.py
index 9e71c57..6d9c822 100644
--- a/tv/cec/V1_0/host/TvCecHidlTest.py
+++ b/tv/cec/V1_0/host/TvCecHidlTest.py
@@ -56,16 +56,28 @@
             hw_binder_service_name="cec-hal-1-0",
             bits=64 if self.dut.is64Bit else 32)
 
+    def setUpTest(self):
+        """Setup function that will be called every time before executing each
+        test case in the test class."""
+        if self.enable_profiling:
+            profiling_utils.EnableVTSProfiling(self.dut.shell.one)
+
+    def tearDownTest(self):
+        """TearDown function that will be called every time after executing each
+        test case in the test class."""
+        if self.enable_profiling:
+            profiling_trace_path = getattr(
+                self, self.VTS_PROFILING_TRACING_PATH, "")
+            self.ProcessTraceDataForTestCase(self.dut, profiling_trace_path)
+            profiling_utils.DisableVTSProfiling(self.dut.shell.one)
+
     def tearDownClass(self):
         """To be executed when all test cases are finished."""
         if getattr(self, keys.ConfigKeys.IKEY_ENABLE_COVERAGE, False):
             self.SetCoverageData(coverage_utils.GetGcdaDict(self.dut))
 
         if self.enable_profiling:
-            profiling_trace_path = getattr(
-                self, self.VTS_PROFILING_TRACING_PATH, "")
-            self.ProcessTraceDataForTestCase(self.dut, profiling_trace_path)
-            profiling_utils.DisableVTSProfiling(self.dut.shell.one)
+            self.ProcessAndUploadTraceData()
 
     def testGetCecVersion1(self):
         """A simple test case which queries the cec version."""
diff --git a/tv/input/V1_0/Android.bp b/tv/input/V1_0/Android.bp
index 51d83e3..5b74c5b 100644
--- a/tv/input/V1_0/Android.bp
+++ b/tv/input/V1_0/Android.bp
@@ -10,9 +10,9 @@
         ":android.hardware.tv.input@1.0_hal",
     ],
     out: [
-        "android/hardware/tv/input/1.0/types.vts.cpp",
         "android/hardware/tv/input/1.0/TvInput.vts.cpp",
         "android/hardware/tv/input/1.0/TvInputCallback.vts.cpp",
+        "android/hardware/tv/input/1.0/types.vts.cpp",
     ],
 }
 
@@ -24,9 +24,9 @@
         ":android.hardware.tv.input@1.0_hal",
     ],
     out: [
-        "android/hardware/tv/input/1.0/types.vts.h",
         "android/hardware/tv/input/1.0/TvInput.vts.h",
         "android/hardware/tv/input/1.0/TvInputCallback.vts.h",
+        "android/hardware/tv/input/1.0/types.vts.h",
     ],
 }
 
@@ -49,12 +49,12 @@
         "libcamera_metadata",
         "libprotobuf-cpp-full",
         "android.hardware.tv.input@1.0",
-        "android.hidl.base@1.0",
         "android.hardware.audio.common.vts.driver@2.0",
+        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
-        "android.hidl.base@1.0",
         "android.hardware.audio.common.vts.driver@2.0",
+        "android.hidl.base@1.0",
     ],
 }
 
@@ -67,9 +67,9 @@
         ":android.hardware.tv.input@1.0_hal",
     ],
     out: [
-        "android/hardware/tv/input/1.0/types.vts.cpp",
         "android/hardware/tv/input/1.0/TvInput.vts.cpp",
         "android/hardware/tv/input/1.0/TvInputCallback.vts.cpp",
+        "android/hardware/tv/input/1.0/types.vts.cpp",
     ],
 }
 
@@ -81,9 +81,9 @@
         ":android.hardware.tv.input@1.0_hal",
     ],
     out: [
-        "android/hardware/tv/input/1.0/types.vts.h",
         "android/hardware/tv/input/1.0/TvInput.vts.h",
         "android/hardware/tv/input/1.0/TvInputCallback.vts.h",
+        "android/hardware/tv/input/1.0/types.vts.h",
     ],
 }
 
@@ -100,8 +100,8 @@
         "libvts_multidevice_proto",
         "libprotobuf-cpp-full",
         "android.hardware.tv.input@1.0",
-        "android.hidl.base@1.0",
         "android.hardware.audio.common@2.0-vts.profiler",
+        "android.hidl.base@1.0",
     ],
 }
 
diff --git a/tv/input/V1_0/host/TvInputHidlTest.py b/tv/input/V1_0/host/TvInputHidlTest.py
index 251b4f0..bc41945 100644
--- a/tv/input/V1_0/host/TvInputHidlTest.py
+++ b/tv/input/V1_0/host/TvInputHidlTest.py
@@ -24,6 +24,7 @@
 from vts.runners.host import test_runner
 from vts.utils.python.controllers import android_device
 from vts.utils.python.coverage import coverage_utils
+from vts.utils.python.profiling import profiling_utils
 
 
 class TvInputHidlTest(base_test_with_webdb.BaseTestWithWebDbClass):
@@ -48,11 +49,29 @@
 
         self.dut.shell.InvokeTerminal("one")
 
+    def setUpTest(self):
+        """Setup function that will be called every time before executing each
+        test case in the test class."""
+        if self.enable_profiling:
+            profiling_utils.EnableVTSProfiling(self.dut.shell.one)
+
+    def tearDownTest(self):
+        """TearDown function that will be called every time after executing each
+        test case in the test class."""
+        if self.enable_profiling:
+            profiling_trace_path = getattr(
+                self, self.VTS_PROFILING_TRACING_PATH, "")
+            self.ProcessTraceDataForTestCase(self.dut, profiling_trace_path)
+            profiling_utils.DisableVTSProfiling(self.dut.shell.one)
+
     def tearDownClass(self):
         """To be executed when all test cases are finished."""
         if getattr(self, keys.ConfigKeys.IKEY_ENABLE_COVERAGE, False):
             self.SetCoverageData(coverage_utils.GetGcdaDict(self.dut))
 
+        if self.enable_profiling:
+            self.ProcessAndUploadTraceData()
+
     def testGetStreamConfigurations(self):
         configs = self.dut.hal.tv_input.getStreamConfigurations(0)
         logging.info('return value of getStreamConfigurations(0): %s', configs)
diff --git a/usb/Android.bp b/usb/Android.bp
new file mode 100644
index 0000000..ffa62cd
--- /dev/null
+++ b/usb/Android.bp
@@ -0,0 +1,3 @@
+subdirs = [
+    "V1_0",
+]
diff --git a/usb/V1_0/Android.bp b/usb/V1_0/Android.bp
index 382f05a..1b21de6 100644
--- a/usb/V1_0/Android.bp
+++ b/usb/V1_0/Android.bp
@@ -10,9 +10,9 @@
         ":android.hardware.usb@1.0_hal",
     ],
     out: [
-        "android/hardware/usb/1.0/types.vts.cpp",
         "android/hardware/usb/1.0/Usb.vts.cpp",
         "android/hardware/usb/1.0/UsbCallback.vts.cpp",
+        "android/hardware/usb/1.0/types.vts.cpp",
     ],
 }
 
@@ -24,9 +24,9 @@
         ":android.hardware.usb@1.0_hal",
     ],
     out: [
-        "android/hardware/usb/1.0/types.vts.h",
         "android/hardware/usb/1.0/Usb.vts.h",
         "android/hardware/usb/1.0/UsbCallback.vts.h",
+        "android/hardware/usb/1.0/types.vts.h",
     ],
 }
 
@@ -65,9 +65,9 @@
         ":android.hardware.usb@1.0_hal",
     ],
     out: [
-        "android/hardware/usb/1.0/types.vts.cpp",
         "android/hardware/usb/1.0/Usb.vts.cpp",
         "android/hardware/usb/1.0/UsbCallback.vts.cpp",
+        "android/hardware/usb/1.0/types.vts.cpp",
     ],
 }
 
@@ -79,9 +79,9 @@
         ":android.hardware.usb@1.0_hal",
     ],
     out: [
-        "android/hardware/usb/1.0/types.vts.h",
         "android/hardware/usb/1.0/Usb.vts.h",
         "android/hardware/usb/1.0/UsbCallback.vts.h",
+        "android/hardware/usb/1.0/types.vts.h",
     ],
 }
 
diff --git a/vibrator/Android.bp b/vibrator/Android.bp
new file mode 100644
index 0000000..ffa62cd
--- /dev/null
+++ b/vibrator/Android.bp
@@ -0,0 +1,3 @@
+subdirs = [
+    "V1_0",
+]
diff --git a/vr/Android.bp b/vr/Android.bp
new file mode 100644
index 0000000..ffa62cd
--- /dev/null
+++ b/vr/Android.bp
@@ -0,0 +1,3 @@
+subdirs = [
+    "V1_0",
+]
diff --git a/vr/V1_0/target_profiling/AndroidTest.xml b/vr/V1_0/target_profiling/AndroidTest.xml
index 10c9611..ba12606 100644
--- a/vr/V1_0/target_profiling/AndroidTest.xml
+++ b/vr/V1_0/target_profiling/AndroidTest.xml
@@ -19,7 +19,7 @@
     </target_preparer>
     <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
-        <option name="test-module-name" value="VrHidlTargetTest" />
+        <option name="test-module-name" value="VrHidlTargetProfilingTest" />
         <option name="binary-test-sources" value="
             _32bit::DATA/nativetest/vr_hidl_hal_test/vr_hidl_hal_test,
             _64bit::DATA/nativetest64/vr_hidl_hal_test/vr_hidl_hal_test,
diff --git a/wifi/Android.bp b/wifi/Android.bp
new file mode 100644
index 0000000..e066854
--- /dev/null
+++ b/wifi/Android.bp
@@ -0,0 +1,4 @@
+subdirs = [
+    "V1_0",
+    "supplicant/V1_0",
+]
diff --git a/wifi/V1_0/Android.bp b/wifi/V1_0/Android.bp
index e896229..0050c3a 100644
--- a/wifi/V1_0/Android.bp
+++ b/wifi/V1_0/Android.bp
@@ -10,20 +10,20 @@
         ":android.hardware.wifi@1.0_hal",
     ],
     out: [
+        "android/hardware/wifi/1.0/Wifi.vts.cpp",
+        "android/hardware/wifi/1.0/WifiApIface.vts.cpp",
         "android/hardware/wifi/1.0/WifiChip.vts.cpp",
-        "android/hardware/wifi/1.0/WifiStaIfaceEventCallback.vts.cpp",
-        "android/hardware/wifi/1.0/WifiRttControllerEventCallback.vts.cpp",
-        "android/hardware/wifi/1.0/WifiNanIfaceEventCallback.vts.cpp",
+        "android/hardware/wifi/1.0/WifiChipEventCallback.vts.cpp",
         "android/hardware/wifi/1.0/WifiEventCallback.vts.cpp",
         "android/hardware/wifi/1.0/WifiIface.vts.cpp",
-        "android/hardware/wifi/1.0/Wifi.vts.cpp",
-        "android/hardware/wifi/1.0/WifiP2pIface.vts.cpp",
-        "android/hardware/wifi/1.0/WifiStaIface.vts.cpp",
-        "android/hardware/wifi/1.0/WifiApIface.vts.cpp",
-        "android/hardware/wifi/1.0/types.vts.cpp",
         "android/hardware/wifi/1.0/WifiNanIface.vts.cpp",
-        "android/hardware/wifi/1.0/WifiChipEventCallback.vts.cpp",
+        "android/hardware/wifi/1.0/WifiNanIfaceEventCallback.vts.cpp",
+        "android/hardware/wifi/1.0/WifiP2pIface.vts.cpp",
         "android/hardware/wifi/1.0/WifiRttController.vts.cpp",
+        "android/hardware/wifi/1.0/WifiRttControllerEventCallback.vts.cpp",
+        "android/hardware/wifi/1.0/WifiStaIface.vts.cpp",
+        "android/hardware/wifi/1.0/WifiStaIfaceEventCallback.vts.cpp",
+        "android/hardware/wifi/1.0/types.vts.cpp",
     ],
 }
 
@@ -35,20 +35,20 @@
         ":android.hardware.wifi@1.0_hal",
     ],
     out: [
+        "android/hardware/wifi/1.0/Wifi.vts.h",
+        "android/hardware/wifi/1.0/WifiApIface.vts.h",
         "android/hardware/wifi/1.0/WifiChip.vts.h",
-        "android/hardware/wifi/1.0/WifiStaIfaceEventCallback.vts.h",
-        "android/hardware/wifi/1.0/WifiRttControllerEventCallback.vts.h",
-        "android/hardware/wifi/1.0/WifiNanIfaceEventCallback.vts.h",
+        "android/hardware/wifi/1.0/WifiChipEventCallback.vts.h",
         "android/hardware/wifi/1.0/WifiEventCallback.vts.h",
         "android/hardware/wifi/1.0/WifiIface.vts.h",
-        "android/hardware/wifi/1.0/Wifi.vts.h",
-        "android/hardware/wifi/1.0/WifiP2pIface.vts.h",
-        "android/hardware/wifi/1.0/WifiStaIface.vts.h",
-        "android/hardware/wifi/1.0/WifiApIface.vts.h",
-        "android/hardware/wifi/1.0/types.vts.h",
         "android/hardware/wifi/1.0/WifiNanIface.vts.h",
-        "android/hardware/wifi/1.0/WifiChipEventCallback.vts.h",
+        "android/hardware/wifi/1.0/WifiNanIfaceEventCallback.vts.h",
+        "android/hardware/wifi/1.0/WifiP2pIface.vts.h",
         "android/hardware/wifi/1.0/WifiRttController.vts.h",
+        "android/hardware/wifi/1.0/WifiRttControllerEventCallback.vts.h",
+        "android/hardware/wifi/1.0/WifiStaIface.vts.h",
+        "android/hardware/wifi/1.0/WifiStaIfaceEventCallback.vts.h",
+        "android/hardware/wifi/1.0/types.vts.h",
     ],
 }
 
@@ -87,20 +87,20 @@
         ":android.hardware.wifi@1.0_hal",
     ],
     out: [
+        "android/hardware/wifi/1.0/Wifi.vts.cpp",
+        "android/hardware/wifi/1.0/WifiApIface.vts.cpp",
         "android/hardware/wifi/1.0/WifiChip.vts.cpp",
-        "android/hardware/wifi/1.0/WifiStaIfaceEventCallback.vts.cpp",
-        "android/hardware/wifi/1.0/WifiRttControllerEventCallback.vts.cpp",
-        "android/hardware/wifi/1.0/WifiNanIfaceEventCallback.vts.cpp",
+        "android/hardware/wifi/1.0/WifiChipEventCallback.vts.cpp",
         "android/hardware/wifi/1.0/WifiEventCallback.vts.cpp",
         "android/hardware/wifi/1.0/WifiIface.vts.cpp",
-        "android/hardware/wifi/1.0/Wifi.vts.cpp",
-        "android/hardware/wifi/1.0/WifiP2pIface.vts.cpp",
-        "android/hardware/wifi/1.0/WifiStaIface.vts.cpp",
-        "android/hardware/wifi/1.0/WifiApIface.vts.cpp",
-        "android/hardware/wifi/1.0/types.vts.cpp",
         "android/hardware/wifi/1.0/WifiNanIface.vts.cpp",
-        "android/hardware/wifi/1.0/WifiChipEventCallback.vts.cpp",
+        "android/hardware/wifi/1.0/WifiNanIfaceEventCallback.vts.cpp",
+        "android/hardware/wifi/1.0/WifiP2pIface.vts.cpp",
         "android/hardware/wifi/1.0/WifiRttController.vts.cpp",
+        "android/hardware/wifi/1.0/WifiRttControllerEventCallback.vts.cpp",
+        "android/hardware/wifi/1.0/WifiStaIface.vts.cpp",
+        "android/hardware/wifi/1.0/WifiStaIfaceEventCallback.vts.cpp",
+        "android/hardware/wifi/1.0/types.vts.cpp",
     ],
 }
 
@@ -112,20 +112,20 @@
         ":android.hardware.wifi@1.0_hal",
     ],
     out: [
+        "android/hardware/wifi/1.0/Wifi.vts.h",
+        "android/hardware/wifi/1.0/WifiApIface.vts.h",
         "android/hardware/wifi/1.0/WifiChip.vts.h",
-        "android/hardware/wifi/1.0/WifiStaIfaceEventCallback.vts.h",
-        "android/hardware/wifi/1.0/WifiRttControllerEventCallback.vts.h",
-        "android/hardware/wifi/1.0/WifiNanIfaceEventCallback.vts.h",
+        "android/hardware/wifi/1.0/WifiChipEventCallback.vts.h",
         "android/hardware/wifi/1.0/WifiEventCallback.vts.h",
         "android/hardware/wifi/1.0/WifiIface.vts.h",
-        "android/hardware/wifi/1.0/Wifi.vts.h",
-        "android/hardware/wifi/1.0/WifiP2pIface.vts.h",
-        "android/hardware/wifi/1.0/WifiStaIface.vts.h",
-        "android/hardware/wifi/1.0/WifiApIface.vts.h",
-        "android/hardware/wifi/1.0/types.vts.h",
         "android/hardware/wifi/1.0/WifiNanIface.vts.h",
-        "android/hardware/wifi/1.0/WifiChipEventCallback.vts.h",
+        "android/hardware/wifi/1.0/WifiNanIfaceEventCallback.vts.h",
+        "android/hardware/wifi/1.0/WifiP2pIface.vts.h",
         "android/hardware/wifi/1.0/WifiRttController.vts.h",
+        "android/hardware/wifi/1.0/WifiRttControllerEventCallback.vts.h",
+        "android/hardware/wifi/1.0/WifiStaIface.vts.h",
+        "android/hardware/wifi/1.0/WifiStaIfaceEventCallback.vts.h",
+        "android/hardware/wifi/1.0/types.vts.h",
     ],
 }
 
diff --git a/wifi/V1_0/target/Android.mk b/wifi/V1_0/target/Android.mk
index be04354..e97ffd2 100644
--- a/wifi/V1_0/target/Android.mk
+++ b/wifi/V1_0/target/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2016 The Android Open Source Project
+# 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.
@@ -18,6 +18,6 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := HalWifiHidlTargetTest
+LOCAL_MODULE := VtsHalWifiV1_0Target
 VTS_CONFIG_SRC_DIR := testcases/hal/wifi/V1_0/target
 include test/vts/tools/build/Android.host_config.mk
diff --git a/wifi/V1_0/target/AndroidTest.xml b/wifi/V1_0/target/AndroidTest.xml
index 1099a5a..86efcb2 100644
--- a/wifi/V1_0/target/AndroidTest.xml
+++ b/wifi/V1_0/target/AndroidTest.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2016 The Android Open Source Project
+<!-- 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.
@@ -13,18 +13,19 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Config for VTS WiFi HIDL HAL's basic target-side test cases">
+<configuration description="Config for VTS VtsHalWifiV1_0Target test cases">
     <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
-        <option name="push-group" value="HidlHalTest.push" />
+        <option name="push-group" value="HidlHalTest.push"/>
     </target_preparer>
-    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
+    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
-        <option name="test-module-name" value="HalWifiHidlTargetTest" />
+        <option name="test-module-name" value="VtsHalWifiV1_0Target"/>
         <option name="binary-test-sources" value="
-            _32bit::DATA/nativetest/wifi_hidl_test/wifi_hidl_test,
-            _64bit::DATA/nativetest64/wifi_hidl_test/wifi_hidl_test,
-            "/>
-        <option name="binary-test-type" value="gtest" />
-        <option name="test-timeout" value="10m" />
+          _32bit::DATA/nativetest/VtsHalWifiV1_0TargetTest/VtsHalWifiV1_0TargetTest,
+          _64bit::DATA/nativetest64/VtsHalWifiV1_0TargetTest/VtsHalWifiV1_0TargetTest,
+          "/>
+        <option name="binary-test-type" value="hal_hidl_gtest"/>
+        <option name="precondition-lshal" value="android.hardware.wifi@1.0"/>
+        <option name="test-timeout" value="10m"/>
     </test>
 </configuration>
diff --git a/wifi/V1_0/target_profiling/Android.mk b/wifi/V1_0/target_profiling/Android.mk
new file mode 100644
index 0000000..1a19308
--- /dev/null
+++ b/wifi/V1_0/target_profiling/Android.mk
@@ -0,0 +1,23 @@
+#
+# 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 := VtsHalWifiV1_0TargetProfiling
+VTS_CONFIG_SRC_DIR := testcases/hal/wifi/V1_0/target_profiling
+include test/vts/tools/build/Android.host_config.mk
diff --git a/wifi/V1_0/target_profiling/AndroidTest.xml b/wifi/V1_0/target_profiling/AndroidTest.xml
new file mode 100644
index 0000000..5842605
--- /dev/null
+++ b/wifi/V1_0/target_profiling/AndroidTest.xml
@@ -0,0 +1,35 @@
+<?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 VtsHalWifiV1_0TargetProfiling test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="push-group" value="HidlHalTest.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>
+    <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-sources" value="
+          _32bit::DATA/nativetest/VtsHalWifiV1_0TargetTest/VtsHalWifiV1_0TargetTest,
+          _64bit::DATA/nativetest64/VtsHalWifiV1_0TargetTest/VtsHalWifiV1_0TargetTest,
+          "/>
+        <option name="binary-test-type" value="hal_hidl_gtest"/>
+        <option name="enable-profiling" value="true"/>
+        <option name="precondition-lshal" value="android.hardware.wifi@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
index dcd4c8d..896413a 100644
--- a/wifi/supplicant/V1_0/Android.bp
+++ b/wifi/supplicant/V1_0/Android.bp
@@ -10,19 +10,19 @@
         ":android.hardware.wifi.supplicant@1.0_hal",
     ],
     out: [
-        "android/hardware/wifi/supplicant/1.0/SupplicantStaNetworkCallback.vts.cpp",
-        "android/hardware/wifi/supplicant/1.0/SupplicantP2pNetworkCallback.vts.cpp",
+        "android/hardware/wifi/supplicant/1.0/Supplicant.vts.cpp",
+        "android/hardware/wifi/supplicant/1.0/SupplicantCallback.vts.cpp",
+        "android/hardware/wifi/supplicant/1.0/SupplicantIface.vts.cpp",
+        "android/hardware/wifi/supplicant/1.0/SupplicantNetwork.vts.cpp",
         "android/hardware/wifi/supplicant/1.0/SupplicantP2pIface.vts.cpp",
+        "android/hardware/wifi/supplicant/1.0/SupplicantP2pIfaceCallback.vts.cpp",
+        "android/hardware/wifi/supplicant/1.0/SupplicantP2pNetwork.vts.cpp",
+        "android/hardware/wifi/supplicant/1.0/SupplicantP2pNetworkCallback.vts.cpp",
         "android/hardware/wifi/supplicant/1.0/SupplicantStaIface.vts.cpp",
         "android/hardware/wifi/supplicant/1.0/SupplicantStaIfaceCallback.vts.cpp",
-        "android/hardware/wifi/supplicant/1.0/SupplicantIface.vts.cpp",
-        "android/hardware/wifi/supplicant/1.0/Supplicant.vts.cpp",
-        "android/hardware/wifi/supplicant/1.0/SupplicantP2pNetwork.vts.cpp",
-        "android/hardware/wifi/supplicant/1.0/SupplicantCallback.vts.cpp",
-        "android/hardware/wifi/supplicant/1.0/SupplicantNetwork.vts.cpp",
-        "android/hardware/wifi/supplicant/1.0/types.vts.cpp",
-        "android/hardware/wifi/supplicant/1.0/SupplicantP2pIfaceCallback.vts.cpp",
         "android/hardware/wifi/supplicant/1.0/SupplicantStaNetwork.vts.cpp",
+        "android/hardware/wifi/supplicant/1.0/SupplicantStaNetworkCallback.vts.cpp",
+        "android/hardware/wifi/supplicant/1.0/types.vts.cpp",
     ],
 }
 
@@ -34,19 +34,19 @@
         ":android.hardware.wifi.supplicant@1.0_hal",
     ],
     out: [
-        "android/hardware/wifi/supplicant/1.0/SupplicantStaNetworkCallback.vts.h",
-        "android/hardware/wifi/supplicant/1.0/SupplicantP2pNetworkCallback.vts.h",
+        "android/hardware/wifi/supplicant/1.0/Supplicant.vts.h",
+        "android/hardware/wifi/supplicant/1.0/SupplicantCallback.vts.h",
+        "android/hardware/wifi/supplicant/1.0/SupplicantIface.vts.h",
+        "android/hardware/wifi/supplicant/1.0/SupplicantNetwork.vts.h",
         "android/hardware/wifi/supplicant/1.0/SupplicantP2pIface.vts.h",
+        "android/hardware/wifi/supplicant/1.0/SupplicantP2pIfaceCallback.vts.h",
+        "android/hardware/wifi/supplicant/1.0/SupplicantP2pNetwork.vts.h",
+        "android/hardware/wifi/supplicant/1.0/SupplicantP2pNetworkCallback.vts.h",
         "android/hardware/wifi/supplicant/1.0/SupplicantStaIface.vts.h",
         "android/hardware/wifi/supplicant/1.0/SupplicantStaIfaceCallback.vts.h",
-        "android/hardware/wifi/supplicant/1.0/SupplicantIface.vts.h",
-        "android/hardware/wifi/supplicant/1.0/Supplicant.vts.h",
-        "android/hardware/wifi/supplicant/1.0/SupplicantP2pNetwork.vts.h",
-        "android/hardware/wifi/supplicant/1.0/SupplicantCallback.vts.h",
-        "android/hardware/wifi/supplicant/1.0/SupplicantNetwork.vts.h",
-        "android/hardware/wifi/supplicant/1.0/types.vts.h",
-        "android/hardware/wifi/supplicant/1.0/SupplicantP2pIfaceCallback.vts.h",
         "android/hardware/wifi/supplicant/1.0/SupplicantStaNetwork.vts.h",
+        "android/hardware/wifi/supplicant/1.0/SupplicantStaNetworkCallback.vts.h",
+        "android/hardware/wifi/supplicant/1.0/types.vts.h",
     ],
 }
 
@@ -85,19 +85,19 @@
         ":android.hardware.wifi.supplicant@1.0_hal",
     ],
     out: [
-        "android/hardware/wifi/supplicant/1.0/SupplicantStaNetworkCallback.vts.cpp",
-        "android/hardware/wifi/supplicant/1.0/SupplicantP2pNetworkCallback.vts.cpp",
+        "android/hardware/wifi/supplicant/1.0/Supplicant.vts.cpp",
+        "android/hardware/wifi/supplicant/1.0/SupplicantCallback.vts.cpp",
+        "android/hardware/wifi/supplicant/1.0/SupplicantIface.vts.cpp",
+        "android/hardware/wifi/supplicant/1.0/SupplicantNetwork.vts.cpp",
         "android/hardware/wifi/supplicant/1.0/SupplicantP2pIface.vts.cpp",
+        "android/hardware/wifi/supplicant/1.0/SupplicantP2pIfaceCallback.vts.cpp",
+        "android/hardware/wifi/supplicant/1.0/SupplicantP2pNetwork.vts.cpp",
+        "android/hardware/wifi/supplicant/1.0/SupplicantP2pNetworkCallback.vts.cpp",
         "android/hardware/wifi/supplicant/1.0/SupplicantStaIface.vts.cpp",
         "android/hardware/wifi/supplicant/1.0/SupplicantStaIfaceCallback.vts.cpp",
-        "android/hardware/wifi/supplicant/1.0/SupplicantIface.vts.cpp",
-        "android/hardware/wifi/supplicant/1.0/Supplicant.vts.cpp",
-        "android/hardware/wifi/supplicant/1.0/SupplicantP2pNetwork.vts.cpp",
-        "android/hardware/wifi/supplicant/1.0/SupplicantCallback.vts.cpp",
-        "android/hardware/wifi/supplicant/1.0/SupplicantNetwork.vts.cpp",
-        "android/hardware/wifi/supplicant/1.0/types.vts.cpp",
-        "android/hardware/wifi/supplicant/1.0/SupplicantP2pIfaceCallback.vts.cpp",
         "android/hardware/wifi/supplicant/1.0/SupplicantStaNetwork.vts.cpp",
+        "android/hardware/wifi/supplicant/1.0/SupplicantStaNetworkCallback.vts.cpp",
+        "android/hardware/wifi/supplicant/1.0/types.vts.cpp",
     ],
 }
 
@@ -109,19 +109,19 @@
         ":android.hardware.wifi.supplicant@1.0_hal",
     ],
     out: [
-        "android/hardware/wifi/supplicant/1.0/SupplicantStaNetworkCallback.vts.h",
-        "android/hardware/wifi/supplicant/1.0/SupplicantP2pNetworkCallback.vts.h",
+        "android/hardware/wifi/supplicant/1.0/Supplicant.vts.h",
+        "android/hardware/wifi/supplicant/1.0/SupplicantCallback.vts.h",
+        "android/hardware/wifi/supplicant/1.0/SupplicantIface.vts.h",
+        "android/hardware/wifi/supplicant/1.0/SupplicantNetwork.vts.h",
         "android/hardware/wifi/supplicant/1.0/SupplicantP2pIface.vts.h",
+        "android/hardware/wifi/supplicant/1.0/SupplicantP2pIfaceCallback.vts.h",
+        "android/hardware/wifi/supplicant/1.0/SupplicantP2pNetwork.vts.h",
+        "android/hardware/wifi/supplicant/1.0/SupplicantP2pNetworkCallback.vts.h",
         "android/hardware/wifi/supplicant/1.0/SupplicantStaIface.vts.h",
         "android/hardware/wifi/supplicant/1.0/SupplicantStaIfaceCallback.vts.h",
-        "android/hardware/wifi/supplicant/1.0/SupplicantIface.vts.h",
-        "android/hardware/wifi/supplicant/1.0/Supplicant.vts.h",
-        "android/hardware/wifi/supplicant/1.0/SupplicantP2pNetwork.vts.h",
-        "android/hardware/wifi/supplicant/1.0/SupplicantCallback.vts.h",
-        "android/hardware/wifi/supplicant/1.0/SupplicantNetwork.vts.h",
-        "android/hardware/wifi/supplicant/1.0/types.vts.h",
-        "android/hardware/wifi/supplicant/1.0/SupplicantP2pIfaceCallback.vts.h",
         "android/hardware/wifi/supplicant/1.0/SupplicantStaNetwork.vts.h",
+        "android/hardware/wifi/supplicant/1.0/SupplicantStaNetworkCallback.vts.h",
+        "android/hardware/wifi/supplicant/1.0/types.vts.h",
     ],
 }
 
diff --git a/wifi/supplicant/V1_0/target/Android.mk b/wifi/supplicant/V1_0/target/Android.mk
new file mode 100644
index 0000000..f0c4e5e
--- /dev/null
+++ b/wifi/supplicant/V1_0/target/Android.mk
@@ -0,0 +1,23 @@
+#
+# 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 := VtsHalWifiSupplicantV1_0Target
+VTS_CONFIG_SRC_DIR := testcases/hal/wifi/supplicant/V1_0/target
+include test/vts/tools/build/Android.host_config.mk
diff --git a/wifi/supplicant/V1_0/target/AndroidTest.xml b/wifi/supplicant/V1_0/target/AndroidTest.xml
new file mode 100644
index 0000000..3137ea9
--- /dev/null
+++ b/wifi/supplicant/V1_0/target/AndroidTest.xml
@@ -0,0 +1,31 @@
+<?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_0Target test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="push-group" value="HidlHalTest.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-sources" value="
+          _32bit::DATA/nativetest/VtsHalWifiSupplicantV1_0TargetTest/VtsHalWifiSupplicantV1_0TargetTest,
+          _64bit::DATA/nativetest64/VtsHalWifiSupplicantV1_0TargetTest/VtsHalWifiSupplicantV1_0TargetTest,
+          "/>
+        <option name="binary-test-type" value="hal_hidl_gtest"/>
+        <option name="precondition-lshal" value="android.hardware.wifi.supplicant@1.0"/>
+        <option name="test-timeout" value="1m"/>
+    </test>
+</configuration>
diff --git a/wifi/supplicant/V1_0/target_profiling/Android.mk b/wifi/supplicant/V1_0/target_profiling/Android.mk
new file mode 100644
index 0000000..89127ed
--- /dev/null
+++ b/wifi/supplicant/V1_0/target_profiling/Android.mk
@@ -0,0 +1,23 @@
+#
+# 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 := VtsHalWifiSupplicantV1_0TargetProfiling
+VTS_CONFIG_SRC_DIR := testcases/hal/wifi/supplicant/V1_0/target_profiling
+include test/vts/tools/build/Android.host_config.mk
diff --git a/wifi/supplicant/V1_0/target_profiling/AndroidTest.xml b/wifi/supplicant/V1_0/target_profiling/AndroidTest.xml
new file mode 100644
index 0000000..ddafff8
--- /dev/null
+++ b/wifi/supplicant/V1_0/target_profiling/AndroidTest.xml
@@ -0,0 +1,35 @@
+<?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_0TargetProfiling test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="push-group" value="HidlHalTest.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"/>
+    </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-sources" value="
+          _32bit::DATA/nativetest/VtsHalWifiSupplicantV1_0TargetTest/VtsHalWifiSupplicantV1_0TargetTest,
+          _64bit::DATA/nativetest64/VtsHalWifiSupplicantV1_0TargetTest/VtsHalWifiSupplicantV1_0TargetTest,
+          "/>
+        <option name="binary-test-type" value="hal_hidl_gtest"/>
+        <option name="enable-profiling" value="true"/>
+        <option name="precondition-lshal" value="android.hardware.wifi.supplicant@1.0"/>
+        <option name="test-timeout" value="1m"/>
+    </test>
+</configuration>