Merge "configstore: sandbox with seccomp filter" into oc-mr1-dev
diff --git a/automotive/vehicle/2.1/types.hal b/automotive/vehicle/2.1/types.hal
index 2e361a3..569e1a5 100644
--- a/automotive/vehicle/2.1/types.hal
+++ b/automotive/vehicle/2.1/types.hal
@@ -249,7 +249,10 @@
       | VehicleArea:GLOBAL),
 };
 
-/** The status of the vehicle's fuel system. */
+/**
+ * The status of the vehicle's fuel system.
+ * These values come from the SAE J1979 standard.
+ */
 enum Obd2FuelSystemStatus : int32_t {
   OPEN_INSUFFICIENT_ENGINE_TEMPERATURE = 1,
   CLOSED_LOOP = 2,
@@ -264,7 +267,10 @@
   COMPRESSION = 1,
 };
 
-/** These ignition monitors are common to both SPARK and COMPRESSION. */
+/**
+ * Ignition monitors common to both SPARK and COMPRESSION.
+ * These values come from the SAE J1979 standard.
+ */
 enum Obd2CommonIgnitionMonitors : int32_t {
   COMPONENTS_AVAILABLE = 0x1 << 0,
   COMPONENTS_INCOMPLETE = 0x1 << 1,
@@ -276,7 +282,10 @@
   MISFIRE_INCOMPLETE = 0x1 << 5,
 };
 
-/** Ignition monitors available for SPARK vehicles. */
+/**
+ * Ignition monitors available for SPARK vehicles.
+ * These values come from the SAE J1979 standard.
+ */
 enum Obd2SparkIgnitionMonitors : Obd2CommonIgnitionMonitors {
   EGR_AVAILABLE = 0x1 << 6,
   EGR_INCOMPLETE = 0x1 << 7,
@@ -303,7 +312,10 @@
   CATALYST_INCOMPLETE = 0x1 << 21,
 };
 
-/** Ignition monitors only available for COMPRESSION vehicles. */
+/**
+ * Ignition monitors only available for COMPRESSION vehicles.
+ * These values come from the SAE J1979 standard.
+ */
 enum Obd2CompressionIgnitionMonitors : Obd2CommonIgnitionMonitors {
   EGR_OR_VVT_AVAILABLE = 0x1 << 6,
   EGR_OR_VVT_INCOMPLETE = 0x1 << 7,
@@ -324,7 +336,10 @@
   NMHC_CATALYST_INCOMPLETE = 0x1 << 17,
 };
 
-/** The status of the vehicle's secondary air system. */
+/**
+ * The status of the vehicle's secondary air system.
+ * These values come from the SAE J1979 standard.
+ */
 enum Obd2SecondaryAirStatus : int32_t {
   UPSTREAM = 1,
   DOWNSTREAM_OF_CATALYCIC_CONVERTER = 2,
@@ -332,7 +347,10 @@
   PUMP_ON_FOR_DIAGNOSTICS = 8,
 };
 
-/** The fuel type(s) supported by a vehicle. */
+/**
+ * The fuel type(s) supported by a vehicle.
+ * These values come from the SAE J1979 standard.
+ */
 enum Obd2FuelType : int32_t {
   NOT_AVAILABLE = 0,
   GASOLINE = 1,
@@ -366,14 +384,16 @@
  * Some of the properties are represented as an integer mapping to another enum. In those cases
  * expect a comment by the property definition describing the enum to look at for the mapping.
  * Any value greater than the last reserved index is available to vendors to map their extensions.
+ * While these values do not directly map to SAE J1979 PIDs, an equivalence is listed next
+ * to each one to aid implementors.
  */
 enum DiagnosticIntegerSensorIndex : int32_t {
   /** refer to FuelSystemStatus for a description of this value. */
-  FUEL_SYSTEM_STATUS = 0,
-  MALFUNCTION_INDICATOR_LIGHT_ON = 1,
+  FUEL_SYSTEM_STATUS = 0, /* PID 0x03 */
+  MALFUNCTION_INDICATOR_LIGHT_ON = 1, /* PID 0x01 */
 
   /** refer to IgnitionMonitorKind for a description of this value. */
-  IGNITION_MONITORS_SUPPORTED = 2,
+  IGNITION_MONITORS_SUPPORTED = 2, /* PID 0x01 */
 
   /**
    * The value of this sensor is a bitmask that specifies whether ignition-specific
@@ -381,39 +401,39 @@
    * bits in this value are given by, respectively, SparkIgnitionMonitors and
    * CompressionIgnitionMonitors depending on the value of IGNITION_MONITORS_SUPPORTED.
    */
-  IGNITION_SPECIFIC_MONITORS = 3,
-  INTAKE_AIR_TEMPERATURE = 4,
+  IGNITION_SPECIFIC_MONITORS = 3, /* PID 0x01 */
+  INTAKE_AIR_TEMPERATURE = 4, /* PID 0x0F */
 
   /** refer to SecondaryAirStatus for a description of this value. */
-  COMMANDED_SECONDARY_AIR_STATUS = 5,
-  NUM_OXYGEN_SENSORS_PRESENT = 6,
-  RUNTIME_SINCE_ENGINE_START = 7,
-  DISTANCE_TRAVELED_WITH_MALFUNCTION_INDICATOR_LIGHT_ON = 8,
-  WARMUPS_SINCE_CODES_CLEARED = 9,
-  DISTANCE_TRAVELED_SINCE_CODES_CLEARED = 10,
-  ABSOLUTE_BAROMETRIC_PRESSURE = 11,
-  CONTROL_MODULE_VOLTAGE = 12,
-  AMBIENT_AIR_TEMPERATURE = 13,
-  TIME_WITH_MALFUNCTION_LIGHT_ON = 14,
-  TIME_SINCE_TROUBLE_CODES_CLEARED = 15,
-  MAX_FUEL_AIR_EQUIVALENCE_RATIO = 16,
-  MAX_OXYGEN_SENSOR_VOLTAGE = 17,
-  MAX_OXYGEN_SENSOR_CURRENT = 18,
-  MAX_INTAKE_MANIFOLD_ABSOLUTE_PRESSURE = 19,
-  MAX_AIR_FLOW_RATE_FROM_MASS_AIR_FLOW_SENSOR = 20,
+  COMMANDED_SECONDARY_AIR_STATUS = 5, /* PID 0x12 */
+  NUM_OXYGEN_SENSORS_PRESENT = 6, /* PID 0x13 */
+  RUNTIME_SINCE_ENGINE_START = 7, /* PID 0x1F */
+  DISTANCE_TRAVELED_WITH_MALFUNCTION_INDICATOR_LIGHT_ON = 8, /* PID 0x21 */
+  WARMUPS_SINCE_CODES_CLEARED = 9, /* PID 0x30 */
+  DISTANCE_TRAVELED_SINCE_CODES_CLEARED = 10, /* PID 0x31 */
+  ABSOLUTE_BAROMETRIC_PRESSURE = 11, /* PID 0x33 */
+  CONTROL_MODULE_VOLTAGE = 12, /* PID 0x42 */
+  AMBIENT_AIR_TEMPERATURE = 13, /* PID 0x46 */
+  TIME_WITH_MALFUNCTION_LIGHT_ON = 14, /* PID 0x4D */
+  TIME_SINCE_TROUBLE_CODES_CLEARED = 15, /* PID 0x4E */
+  MAX_FUEL_AIR_EQUIVALENCE_RATIO = 16, /* PID 0x4F */
+  MAX_OXYGEN_SENSOR_VOLTAGE = 17, /* PID 0x4F */
+  MAX_OXYGEN_SENSOR_CURRENT = 18, /* PID 0x4F */
+  MAX_INTAKE_MANIFOLD_ABSOLUTE_PRESSURE = 19, /* PID 0x4F */
+  MAX_AIR_FLOW_RATE_FROM_MASS_AIR_FLOW_SENSOR = 20, /* PID 0x50 */
 
   /** refer to FuelType for a description of this value. */
-  FUEL_TYPE = 21,
-  FUEL_RAIL_ABSOLUTE_PRESSURE = 22,
-  ENGINE_OIL_TEMPERATURE = 23,
-  DRIVER_DEMAND_PERCENT_TORQUE = 24,
-  ENGINE_ACTUAL_PERCENT_TORQUE = 25,
-  ENGINE_REFERENCE_PERCENT_TORQUE = 26,
-  ENGINE_PERCENT_TORQUE_DATA_IDLE = 27,
-  ENGINE_PERCENT_TORQUE_DATA_POINT1 = 28,
-  ENGINE_PERCENT_TORQUE_DATA_POINT2 = 29,
-  ENGINE_PERCENT_TORQUE_DATA_POINT3 = 30,
-  ENGINE_PERCENT_TORQUE_DATA_POINT4 = 31,
+  FUEL_TYPE = 21, /* PID 0x51 */
+  FUEL_RAIL_ABSOLUTE_PRESSURE = 22, /* PID 0x59 */
+  ENGINE_OIL_TEMPERATURE = 23, /* PID 0x5C */
+  DRIVER_DEMAND_PERCENT_TORQUE = 24, /* PID 0x61 */
+  ENGINE_ACTUAL_PERCENT_TORQUE = 25, /* PID 0x62 */
+  ENGINE_REFERENCE_PERCENT_TORQUE = 26, /* PID 0x63 */
+  ENGINE_PERCENT_TORQUE_DATA_IDLE = 27, /* PID 0x64 */
+  ENGINE_PERCENT_TORQUE_DATA_POINT1 = 28, /* PID 0x64 */
+  ENGINE_PERCENT_TORQUE_DATA_POINT2 = 29, /* PID 0x64 */
+  ENGINE_PERCENT_TORQUE_DATA_POINT3 = 30, /* PID 0x64 */
+  ENGINE_PERCENT_TORQUE_DATA_POINT4 = 31, /* PID 0x64 */
   LAST_SYSTEM_INDEX = ENGINE_PERCENT_TORQUE_DATA_POINT4,
 };
 
@@ -421,79 +441,81 @@
  * This enum provides the canonical mapping for sensor properties that have a floating-point value.
  * The ordering of the values is taken from the OBD2 specification.
  * Any value greater than the last reserved index is available to vendors to map their extensions.
+ * While these values do not directly map to SAE J1979 PIDs, an equivalence is listed next
+ * to each one to aid implementors.
  */
 enum DiagnosticFloatSensorIndex : int32_t {
-  CALCULATED_ENGINE_LOAD = 0,
-  ENGINE_COOLANT_TEMPERATURE = 1,
-  SHORT_TERM_FUEL_TRIM_BANK1 = 2,
-  LONG_TERM_FUEL_TRIM_BANK1 = 3,
-  SHORT_TERM_FUEL_TRIM_BANK2 = 4,
-  LONG_TERM_FUEL_TRIM_BANK2 = 5,
-  FUEL_PRESSURE = 6,
-  INTAKE_MANIFOLD_ABSOLUTE_PRESSURE = 7,
-  ENGINE_RPM = 8,
-  VEHICLE_SPEED = 9,
-  TIMING_ADVANCE = 10,
-  MAF_AIR_FLOW_RATE = 11,
-  THROTTLE_POSITION = 12,
-  OXYGEN_SENSOR1_VOLTAGE = 13,
-  OXYGEN_SENSOR1_SHORT_TERM_FUEL_TRIM = 14,
-  OXYGEN_SENSOR1_FUEL_AIR_EQUIVALENCE_RATIO = 15,
-  OXYGEN_SENSOR2_VOLTAGE = 16,
-  OXYGEN_SENSOR2_SHORT_TERM_FUEL_TRIM = 17,
-  OXYGEN_SENSOR2_FUEL_AIR_EQUIVALENCE_RATIO = 18,
-  OXYGEN_SENSOR3_VOLTAGE = 19,
-  OXYGEN_SENSOR3_SHORT_TERM_FUEL_TRIM = 20,
-  OXYGEN_SENSOR3_FUEL_AIR_EQUIVALENCE_RATIO = 21,
-  OXYGEN_SENSOR4_VOLTAGE = 22,
-  OXYGEN_SENSOR4_SHORT_TERM_FUEL_TRIM = 23,
-  OXYGEN_SENSOR4_FUEL_AIR_EQUIVALENCE_RATIO = 24,
-  OXYGEN_SENSOR5_VOLTAGE = 25,
-  OXYGEN_SENSOR5_SHORT_TERM_FUEL_TRIM = 26,
-  OXYGEN_SENSOR5_FUEL_AIR_EQUIVALENCE_RATIO = 27,
-  OXYGEN_SENSOR6_VOLTAGE = 28,
-  OXYGEN_SENSOR6_SHORT_TERM_FUEL_TRIM = 29,
-  OXYGEN_SENSOR6_FUEL_AIR_EQUIVALENCE_RATIO = 30,
-  OXYGEN_SENSOR7_VOLTAGE = 31,
-  OXYGEN_SENSOR7_SHORT_TERM_FUEL_TRIM = 32,
-  OXYGEN_SENSOR7_FUEL_AIR_EQUIVALENCE_RATIO = 33,
-  OXYGEN_SENSOR8_VOLTAGE = 34,
-  OXYGEN_SENSOR8_SHORT_TERM_FUEL_TRIM = 35,
-  OXYGEN_SENSOR8_FUEL_AIR_EQUIVALENCE_RATIO = 36,
-  FUEL_RAIL_PRESSURE = 37,
-  FUEL_RAIL_GAUGE_PRESSURE = 38,
-  COMMANDED_EXHAUST_GAS_RECIRCULATION = 39,
-  EXHAUST_GAS_RECIRCULATION_ERROR = 40,
-  COMMANDED_EVAPORATIVE_PURGE = 41,
-  FUEL_TANK_LEVEL_INPUT = 42,
-  EVAPORATION_SYSTEM_VAPOR_PRESSURE = 43,
-  CATALYST_TEMPERATURE_BANK1_SENSOR1 = 44,
-  CATALYST_TEMPERATURE_BANK2_SENSOR1 = 45,
-  CATALYST_TEMPERATURE_BANK1_SENSOR2 = 46,
-  CATALYST_TEMPERATURE_BANK2_SENSOR2 = 47,
-  ABSOLUTE_LOAD_VALUE = 48,
-  FUEL_AIR_COMMANDED_EQUIVALENCE_RATIO = 49,
-  RELATIVE_THROTTLE_POSITION = 50,
-  ABSOLUTE_THROTTLE_POSITION_B = 51,
-  ABSOLUTE_THROTTLE_POSITION_C = 52,
-  ACCELERATOR_PEDAL_POSITION_D = 53,
-  ACCELERATOR_PEDAL_POSITION_E = 54,
-  ACCELERATOR_PEDAL_POSITION_F = 55,
-  COMMANDED_THROTTLE_ACTUATOR = 56,
-  ETHANOL_FUEL_PERCENTAGE = 57,
-  ABSOLUTE_EVAPORATION_SYSTEM_VAPOR_PRESSURE = 58,
-  SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK1 = 59,
-  SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK2 = 60,
-  SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK3 = 61,
-  SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK4 = 62,
-  LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK1 = 63,
-  LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK2 = 64,
-  LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK3 = 65,
-  LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK4 = 66,
-  RELATIVE_ACCELERATOR_PEDAL_POSITION = 67,
-  HYBRID_BATTERY_PACK_REMAINING_LIFE = 68,
-  FUEL_INJECTION_TIMING = 69,
-  ENGINE_FUEL_RATE = 70,
+  CALCULATED_ENGINE_LOAD = 0, /* PID 0x04 */
+  ENGINE_COOLANT_TEMPERATURE = 1, /* PID 0x05 */
+  SHORT_TERM_FUEL_TRIM_BANK1 = 2, /* PID 0x06 */
+  LONG_TERM_FUEL_TRIM_BANK1 = 3, /* PID 0x07 */
+  SHORT_TERM_FUEL_TRIM_BANK2 = 4, /* PID 0x08 */
+  LONG_TERM_FUEL_TRIM_BANK2 = 5, /* PID 0x09 */
+  FUEL_PRESSURE = 6, /* PID 0x0A */
+  INTAKE_MANIFOLD_ABSOLUTE_PRESSURE = 7, /* PID 0x0B */
+  ENGINE_RPM = 8, /* PID 0x0C */
+  VEHICLE_SPEED = 9, /* PID 0x0D */
+  TIMING_ADVANCE = 10, /* PID 0x0E */
+  MAF_AIR_FLOW_RATE = 11, /* PID 0x10 */
+  THROTTLE_POSITION = 12, /* PID 0x11 */
+  OXYGEN_SENSOR1_VOLTAGE = 13, /* PID 0x14 */
+  OXYGEN_SENSOR1_SHORT_TERM_FUEL_TRIM = 14, /* PID 0x14 */
+  OXYGEN_SENSOR1_FUEL_AIR_EQUIVALENCE_RATIO = 15, /* PID 0x24 */
+  OXYGEN_SENSOR2_VOLTAGE = 16, /* PID 0x15 */
+  OXYGEN_SENSOR2_SHORT_TERM_FUEL_TRIM = 17, /* PID 0x15 */
+  OXYGEN_SENSOR2_FUEL_AIR_EQUIVALENCE_RATIO = 18, /* PID 0x25 */
+  OXYGEN_SENSOR3_VOLTAGE = 19, /* PID 0x16 */
+  OXYGEN_SENSOR3_SHORT_TERM_FUEL_TRIM = 20, /* PID 0x16 */
+  OXYGEN_SENSOR3_FUEL_AIR_EQUIVALENCE_RATIO = 21, /* PID 0x26 */
+  OXYGEN_SENSOR4_VOLTAGE = 22, /* PID 0x17 */
+  OXYGEN_SENSOR4_SHORT_TERM_FUEL_TRIM = 23, /* PID 0x17 */
+  OXYGEN_SENSOR4_FUEL_AIR_EQUIVALENCE_RATIO = 24, /* PID 0x27 */
+  OXYGEN_SENSOR5_VOLTAGE = 25, /* PID 0x18 */
+  OXYGEN_SENSOR5_SHORT_TERM_FUEL_TRIM = 26, /* PID 0x18 */
+  OXYGEN_SENSOR5_FUEL_AIR_EQUIVALENCE_RATIO = 27, /* PID 0x28 */
+  OXYGEN_SENSOR6_VOLTAGE = 28, /* PID 0x19 */
+  OXYGEN_SENSOR6_SHORT_TERM_FUEL_TRIM = 29, /* PID 0x19 */
+  OXYGEN_SENSOR6_FUEL_AIR_EQUIVALENCE_RATIO = 30, /* PID 0x29 */
+  OXYGEN_SENSOR7_VOLTAGE = 31, /* PID 0x1A */
+  OXYGEN_SENSOR7_SHORT_TERM_FUEL_TRIM = 32, /* PID 0x1A */
+  OXYGEN_SENSOR7_FUEL_AIR_EQUIVALENCE_RATIO = 33, /* PID 0x2A */
+  OXYGEN_SENSOR8_VOLTAGE = 34, /* PID 0x1B */
+  OXYGEN_SENSOR8_SHORT_TERM_FUEL_TRIM = 35, /* PID 0x1B */
+  OXYGEN_SENSOR8_FUEL_AIR_EQUIVALENCE_RATIO = 36, /* PID 0x2B */
+  FUEL_RAIL_PRESSURE = 37, /* PID 0x22 */
+  FUEL_RAIL_GAUGE_PRESSURE = 38, /* PID 0x23 */
+  COMMANDED_EXHAUST_GAS_RECIRCULATION = 39, /* PID 0x2C */
+  EXHAUST_GAS_RECIRCULATION_ERROR = 40, /* PID 0x2D */
+  COMMANDED_EVAPORATIVE_PURGE = 41, /* PID 0x2E */
+  FUEL_TANK_LEVEL_INPUT = 42, /* PID 0x2F */
+  EVAPORATION_SYSTEM_VAPOR_PRESSURE = 43, /* PID 0x32 */
+  CATALYST_TEMPERATURE_BANK1_SENSOR1 = 44, /* PID 0x3C */
+  CATALYST_TEMPERATURE_BANK2_SENSOR1 = 45, /* PID 0x3D */
+  CATALYST_TEMPERATURE_BANK1_SENSOR2 = 46, /* PID 0x3E */
+  CATALYST_TEMPERATURE_BANK2_SENSOR2 = 47, /* PID 0x3F */
+  ABSOLUTE_LOAD_VALUE = 48, /* PID 0x43 */
+  FUEL_AIR_COMMANDED_EQUIVALENCE_RATIO = 49, /* PID 0x44 */
+  RELATIVE_THROTTLE_POSITION = 50, /* PID 0x45 */
+  ABSOLUTE_THROTTLE_POSITION_B = 51, /* PID 0x47 */
+  ABSOLUTE_THROTTLE_POSITION_C = 52, /* PID 0x48 */
+  ACCELERATOR_PEDAL_POSITION_D = 53, /* PID 0x49 */
+  ACCELERATOR_PEDAL_POSITION_E = 54, /* PID 0x4A */
+  ACCELERATOR_PEDAL_POSITION_F = 55, /* PID 0x4B */
+  COMMANDED_THROTTLE_ACTUATOR = 56, /* PID 0x4C */
+  ETHANOL_FUEL_PERCENTAGE = 57,/* PID 0x52 */
+  ABSOLUTE_EVAPORATION_SYSTEM_VAPOR_PRESSURE = 58, /* PID 0x53 */
+  SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK1 = 59, /* PID 0x55 */
+  SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK2 = 60, /* PID 0x57 */
+  SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK3 = 61,/* PID 0x55 */
+  SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK4 = 62, /* PID 0x57 */
+  LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK1 = 63, /* PID 0x56 */
+  LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK2 = 64, /* PID 0x58 */
+  LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK3 = 65, /* PID 0x56 */
+  LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK4 = 66, /* PID 0x58 */
+  RELATIVE_ACCELERATOR_PEDAL_POSITION = 67, /* PID 0x5A */
+  HYBRID_BATTERY_PACK_REMAINING_LIFE = 68, /* PID 0x5B */
+  FUEL_INJECTION_TIMING = 69, /* PID 0x5D */
+  ENGINE_FUEL_RATE = 70, /* PID 0x5E */
   LAST_SYSTEM_INDEX = ENGINE_FUEL_RATE,
 };
 
diff --git a/biometrics/fingerprint/2.1/vts/functional/Android.bp b/biometrics/fingerprint/2.1/vts/functional/Android.bp
index 27b7157..bee3657 100644
--- a/biometrics/fingerprint/2.1/vts/functional/Android.bp
+++ b/biometrics/fingerprint/2.1/vts/functional/Android.bp
@@ -16,21 +16,8 @@
 
 cc_test {
     name: "VtsHalBiometricsFingerprintV2_1TargetTest",
-    defaults: ["hidl_defaults"],
+    defaults: ["VtsHalTargetTestDefaults"],
     srcs: ["VtsHalBiometricsFingerprintV2_1TargetTest.cpp"],
-    shared_libs: [
-        "libbase",
-        "libhidltransport",
-        "libhardware",
-        "libhidlbase",
-        "liblog",
-        "libutils",
-        "android.hardware.biometrics.fingerprint@2.1",
-    ],
-    static_libs: ["VtsHalHidlTargetTestBase"],
-    cflags: [
-        "-O0",
-        "-g",
-    ]
+    static_libs: ["android.hardware.biometrics.fingerprint@2.1"],
 }
 
diff --git a/boot/1.0/vts/functional/Android.bp b/boot/1.0/vts/functional/Android.bp
index 5b14f54..2ef89f3 100644
--- a/boot/1.0/vts/functional/Android.bp
+++ b/boot/1.0/vts/functional/Android.bp
@@ -16,20 +16,7 @@
 
 cc_test {
     name: "VtsHalBootV1_0TargetTest",
-    defaults: ["hidl_defaults"],
+    defaults: ["VtsHalTargetTestDefaults"],
     srcs: ["VtsHalBootV1_0TargetTest.cpp"],
-    shared_libs: [
-        "libbase",
-        "liblog",
-        "libcutils",
-        "libhidlbase",
-        "libnativehelper",
-        "libutils",
-        "android.hardware.boot@1.0",
-    ],
-    static_libs: ["VtsHalHidlTargetTestBase"],
-    cflags: [
-        "-O0",
-        "-g",
-    ]
+    static_libs: ["android.hardware.boot@1.0"],
 }
diff --git a/broadcastradio/1.0/vts/functional/Android.bp b/broadcastradio/1.0/vts/functional/Android.bp
index cf52f49..f31a2dc 100644
--- a/broadcastradio/1.0/vts/functional/Android.bp
+++ b/broadcastradio/1.0/vts/functional/Android.bp
@@ -16,21 +16,7 @@
 
 cc_test {
     name: "VtsHalBroadcastradioV1_0TargetTest",
-    defaults: ["hidl_defaults"],
+    defaults: ["VtsHalTargetTestDefaults"],
     srcs: ["VtsHalBroadcastradioV1_0TargetTest.cpp"],
-    shared_libs: [
-        "libbase",
-        "liblog",
-        "libcutils",
-        "libhidlbase",
-        "libhidltransport",
-        "libnativehelper",
-        "libutils",
-        "android.hardware.broadcastradio@1.0",
-    ],
-    static_libs: ["VtsHalHidlTargetTestBase"],
-    cflags: [
-        "-O0",
-        "-g",
-    ],
+    static_libs: ["android.hardware.broadcastradio@1.0"],
 }
diff --git a/broadcastradio/1.1/vts/functional/Android.bp b/broadcastradio/1.1/vts/functional/Android.bp
index 6e5c84c..4b93cbc 100644
--- a/broadcastradio/1.1/vts/functional/Android.bp
+++ b/broadcastradio/1.1/vts/functional/Android.bp
@@ -16,28 +16,13 @@
 
 cc_test {
     name: "VtsHalBroadcastradioV1_1TargetTest",
-    defaults: ["hidl_defaults"],
+    defaults: ["VtsHalTargetTestDefaults"],
     srcs: ["VtsHalBroadcastradioV1_1TargetTest.cpp"],
-    shared_libs: [
-        "libbase",
-        "liblog",
-        "libcutils",
-        "libhidlbase",
-        "libhidltransport",
-        "libnativehelper",
-        "libutils",
+    static_libs: [
         "android.hardware.broadcastradio@1.0",
         "android.hardware.broadcastradio@1.1",
-    ],
-    static_libs: [
-        "VtsHalHidlTargetTestBase",
         "android.hardware.broadcastradio@1.1-utils-lib",
         "android.hardware.broadcastradio@1.1-vts-utils-lib",
         "libgmock",
     ],
-    cflags: [
-        "-Wextra",
-        "-O0",
-        "-g",
-    ],
 }
diff --git a/configstore/1.0/vts/functional/Android.bp b/configstore/1.0/vts/functional/Android.bp
index 1775538..1b8a591 100644
--- a/configstore/1.0/vts/functional/Android.bp
+++ b/configstore/1.0/vts/functional/Android.bp
@@ -16,19 +16,8 @@
 
 cc_test {
     name: "VtsHalConfigstoreV1_0TargetTest",
-    defaults: ["hidl_defaults"],
+    defaults: ["VtsHalTargetTestDefaults"],
     srcs: ["VtsHalConfigstoreV1_0TargetTest.cpp"],
-    shared_libs: [
-        "libbase",
-        "libhidlbase",
-        "liblog",
-        "libutils",
-        "android.hardware.configstore@1.0",
-    ],
-    static_libs: ["VtsHalHidlTargetTestBase"],
-    cflags: [
-        "-O0",
-        "-g",
-    ]
+    static_libs: ["android.hardware.configstore@1.0"],
 }
 
diff --git a/configstore/1.1/vts/functional/Android.bp b/configstore/1.1/vts/functional/Android.bp
index 5cfa483..59beb09 100644
--- a/configstore/1.1/vts/functional/Android.bp
+++ b/configstore/1.1/vts/functional/Android.bp
@@ -16,19 +16,11 @@
 
 cc_test {
     name: "VtsHalConfigstoreV1_1TargetTest",
-    defaults: ["hidl_defaults"],
+    defaults: ["VtsHalTargetTestDefaults"],
     srcs: ["VtsHalConfigstoreV1_1TargetTest.cpp"],
-    shared_libs: [
-        "libbase",
-        "libhidlbase",
-        "liblog",
-        "libutils",
+    static_libs: [
+        "android.hardware.configstore@1.0",
         "android.hardware.configstore@1.1",
     ],
-    static_libs: ["VtsHalHidlTargetTestBase"],
-    cflags: [
-        "-O0",
-        "-g",
-    ]
 }
 
diff --git a/contexthub/1.0/vts/functional/Android.bp b/contexthub/1.0/vts/functional/Android.bp
index c35386d..7c6e8c7 100644
--- a/contexthub/1.0/vts/functional/Android.bp
+++ b/contexthub/1.0/vts/functional/Android.bp
@@ -16,19 +16,8 @@
 
 cc_test {
     name: "VtsHalContexthubV1_0TargetTest",
-    defaults: ["hidl_defaults"],
+    defaults: ["VtsHalTargetTestDefaults"],
     srcs: ["VtsHalContexthubV1_0TargetTest.cpp"],
-    shared_libs: [
-        "liblog",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.contexthub@1.0",
-    ],
-    static_libs: ["VtsHalHidlTargetTestBase"],
-    cflags: [
-        "-O0",
-        "-g",
-    ]
+    static_libs: ["android.hardware.contexthub@1.0"],
 }
 
diff --git a/dumpstate/1.0/vts/functional/Android.bp b/dumpstate/1.0/vts/functional/Android.bp
index a1c735b..1ab530f 100644
--- a/dumpstate/1.0/vts/functional/Android.bp
+++ b/dumpstate/1.0/vts/functional/Android.bp
@@ -15,18 +15,7 @@
 
 cc_test {
     name: "VtsHalDumpstateV1_0TargetTest",
-    defaults: ["hidl_defaults"],
+    defaults: ["VtsHalTargetTestDefaults"],
     srcs: ["VtsHalDumpstateV1_0TargetTest.cpp"],
-    shared_libs: [
-        "android.hardware.dumpstate@1.0",
-        "libcutils",
-        "libhidlbase",
-        "liblog",
-        "libutils",
-    ],
-    static_libs: ["VtsHalHidlTargetTestBase"],
-    cflags: [
-        "-O0",
-        "-g",
-    ]
+    static_libs: ["android.hardware.dumpstate@1.0"],
 }
diff --git a/gatekeeper/1.0/vts/functional/Android.bp b/gatekeeper/1.0/vts/functional/Android.bp
index 70cb615..aa1da7b 100644
--- a/gatekeeper/1.0/vts/functional/Android.bp
+++ b/gatekeeper/1.0/vts/functional/Android.bp
@@ -16,21 +16,7 @@
 
 cc_test {
     name: "VtsHalGatekeeperV1_0TargetTest",
-    defaults: ["hidl_defaults"],
+    defaults: ["VtsHalTargetTestDefaults"],
     srcs: ["VtsHalGatekeeperV1_0TargetTest.cpp"],
-    shared_libs: [
-        "libbase",
-        "liblog",
-        "libcutils",
-        "libhidlbase",
-        "libhidltransport",
-        "libnativehelper",
-        "libutils",
-        "android.hardware.gatekeeper@1.0",
-    ],
-    static_libs: ["VtsHalHidlTargetTestBase"],
-    cflags: [
-        "-O0",
-        "-g",
-    ]
+    static_libs: ["android.hardware.gatekeeper@1.0"],
 }
diff --git a/gnss/1.0/vts/functional/Android.bp b/gnss/1.0/vts/functional/Android.bp
index 6d96059..d7713db 100644
--- a/gnss/1.0/vts/functional/Android.bp
+++ b/gnss/1.0/vts/functional/Android.bp
@@ -16,21 +16,7 @@
 
 cc_test {
     name: "VtsHalGnssV1_0TargetTest",
-    defaults: ["hidl_defaults"],
+    defaults: ["VtsHalTargetTestDefaults"],
     srcs: ["VtsHalGnssV1_0TargetTest.cpp"],
-    shared_libs: [
-        "android.hardware.gnss@1.0",
-        "libbase",
-        "libcutils",
-        "libhidlbase",
-        "libhidltransport",
-        "liblog",
-        "libnativehelper",
-        "libutils",
-    ],
-    static_libs: ["VtsHalHidlTargetTestBase"],
-    cflags: [
-        "-O0",
-        "-g",
-    ],
-}
\ No newline at end of file
+    static_libs: ["android.hardware.gnss@1.0"],
+}
diff --git a/health/1.0/vts/functional/Android.bp b/health/1.0/vts/functional/Android.bp
index 1a4c8c8..8742651 100644
--- a/health/1.0/vts/functional/Android.bp
+++ b/health/1.0/vts/functional/Android.bp
@@ -16,17 +16,7 @@
 
 cc_test {
     name: "VtsHalHealthV1_0TargetTest",
-    defaults: ["hidl_defaults"],
+    defaults: ["VtsHalTargetTestDefaults"],
     srcs: ["VtsHalHealthV1_0TargetTest.cpp"],
-    shared_libs: [
-        "libhidlbase",
-        "liblog",
-        "libutils",
-        "android.hardware.health@1.0",
-    ],
-    static_libs: ["VtsHalHidlTargetTestBase"],
-    cflags: [
-        "-O0",
-        "-g",
-    ]
+    static_libs: ["android.hardware.health@1.0"],
 }
diff --git a/keymaster/3.0/vts/functional/Android.bp b/keymaster/3.0/vts/functional/Android.bp
new file mode 100644
index 0000000..7d96704
--- /dev/null
+++ b/keymaster/3.0/vts/functional/Android.bp
@@ -0,0 +1,32 @@
+//
+// 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: "VtsHalKeymasterV3_0TargetTest",
+    defaults: ["VtsHalTargetTestDefaults"],
+    srcs: [
+        "authorization_set.cpp",
+        "attestation_record.cpp",
+        "key_param_output.cpp",
+        "keymaster_hidl_hal_test.cpp",
+        "keystore_tags_utils.cpp",
+    ],
+    static_libs: [
+        "android.hardware.keymaster@3.0",
+        "libcrypto",
+        "libsoftkeymasterdevice",
+    ],
+}
diff --git a/keymaster/3.0/vts/functional/Android.mk b/keymaster/3.0/vts/functional/Android.mk
deleted file mode 100644
index 4098664..0000000
--- a/keymaster/3.0/vts/functional/Android.mk
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright (C) 2017 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := VtsHalKeymasterV3_0TargetTest
-LOCAL_SRC_FILES := \
-        authorization_set.cpp \
-        attestation_record.cpp \
-        key_param_output.cpp \
-        keymaster_hidl_hal_test.cpp \
-        keystore_tags_utils.cpp \
-
-LOCAL_SHARED_LIBRARIES := \
-        android.hardware.keymaster@3.0 \
-        libcrypto \
-        libhidlbase \
-        liblog \
-        libsoftkeymasterdevice \
-        libutils \
-
-LOCAL_STATIC_LIBRARIES := \
-        VtsHalHidlTargetTestBase \
-
-LOCAL_CFLAGS := -Wall -Werror
-
-include $(BUILD_NATIVE_TEST)
diff --git a/keymaster/Android.bp b/keymaster/Android.bp
index 09b8cb2..90a0195 100644
--- a/keymaster/Android.bp
+++ b/keymaster/Android.bp
@@ -1,4 +1,5 @@
 // This is an autogenerated file, do not edit.
 subdirs = [
     "3.0",
+    "3.0/vts/functional",
 ]
diff --git a/light/2.0/vts/functional/Android.bp b/light/2.0/vts/functional/Android.bp
index 0558ff2..e0ec4cf 100644
--- a/light/2.0/vts/functional/Android.bp
+++ b/light/2.0/vts/functional/Android.bp
@@ -16,19 +16,8 @@
 
 cc_test {
     name: "VtsHalLightV2_0TargetTest",
-    defaults: ["hidl_defaults"],
+    defaults: ["VtsHalTargetTestDefaults"],
     srcs: ["VtsHalLightV2_0TargetTest.cpp"],
-    shared_libs: [
-        "libbase",
-        "libhidlbase",
-        "liblog",
-        "libutils",
-        "android.hardware.light@2.0",
-    ],
-    static_libs: ["VtsHalHidlTargetTestBase"],
-    cflags: [
-        "-O0",
-        "-g",
-    ]
+    static_libs: ["android.hardware.light@2.0"],
 }
 
diff --git a/memtrack/1.0/vts/functional/Android.bp b/memtrack/1.0/vts/functional/Android.bp
index 71e6111..2d833e7 100644
--- a/memtrack/1.0/vts/functional/Android.bp
+++ b/memtrack/1.0/vts/functional/Android.bp
@@ -16,20 +16,7 @@
 
 cc_test {
     name: "VtsHalMemtrackV1_0TargetTest",
-    defaults: ["hidl_defaults"],
+    defaults: ["VtsHalTargetTestDefaults"],
     srcs: ["VtsHalMemtrackV1_0TargetTest.cpp"],
-    shared_libs: [
-        "libbase",
-        "liblog",
-        "libcutils",
-        "libhardware",
-        "libhidlbase",
-        "libutils",
-        "android.hardware.memtrack@1.0",
-    ],
-    static_libs: ["VtsHalHidlTargetTestBase"],
-    cflags: [
-        "-O0",
-        "-g",
-    ]
+    static_libs: ["android.hardware.memtrack@1.0"],
 }
diff --git a/neuralnetworks/1.0/vts/functional/Android.bp b/neuralnetworks/1.0/vts/functional/Android.bp
index 96eb4cb..d76b2c3 100644
--- a/neuralnetworks/1.0/vts/functional/Android.bp
+++ b/neuralnetworks/1.0/vts/functional/Android.bp
@@ -17,21 +17,11 @@
 cc_test {
     name: "VtsHalNeuralnetworksV1_0TargetTest",
     srcs: ["VtsHalNeuralnetworksV1_0TargetTest.cpp"],
-    defaults: ["hidl_defaults"],
-    shared_libs: [
-        "libbase",
-        "libhidlbase",
-        "libhidlmemory",
-        "libhidltransport",
-        "liblog",
-        "libutils",
+    defaults: ["VtsHalTargetTestDefaults"],
+    static_libs: [
         "android.hardware.neuralnetworks@1.0",
         "android.hidl.allocator@1.0",
         "android.hidl.memory@1.0",
-    ],
-    static_libs: ["VtsHalHidlTargetTestBase"],
-    cflags: [
-        "-O0",
-        "-g",
+        "libhidlmemory",
     ],
 }
diff --git a/oemlock/1.0/vts/functional/Android.bp b/oemlock/1.0/vts/functional/Android.bp
index a13b3dc..20737a1 100644
--- a/oemlock/1.0/vts/functional/Android.bp
+++ b/oemlock/1.0/vts/functional/Android.bp
@@ -16,21 +16,7 @@
 
 cc_test {
     name: "VtsHalOemLockV1_0TargetTest",
-    defaults: ["hidl_defaults"],
+    defaults: ["VtsHalTargetTestDefaults"],
     srcs: ["VtsHalOemLockV1_0TargetTest.cpp"],
-    shared_libs: [
-        "libbase",
-        "liblog",
-        "libcutils",
-        "libhidlbase",
-        "libhidltransport",
-        "libnativehelper",
-        "libutils",
-        "android.hardware.oemlock@1.0",
-    ],
-    static_libs: ["VtsHalHidlTargetTestBase"],
-    cflags: [
-        "-O0",
-        "-g",
-    ],
+    static_libs: ["android.hardware.oemlock@1.0"],
 }
diff --git a/power/1.0/vts/functional/Android.bp b/power/1.0/vts/functional/Android.bp
index 5ab1eb4..45f74fc 100644
--- a/power/1.0/vts/functional/Android.bp
+++ b/power/1.0/vts/functional/Android.bp
@@ -16,21 +16,7 @@
 
 cc_test {
     name: "VtsHalPowerV1_0TargetTest",
-    defaults: ["hidl_defaults"],
+    defaults: ["VtsHalTargetTestDefaults"],
     srcs: ["VtsHalPowerV1_0TargetTest.cpp"],
-    shared_libs: [
-        "libbase",
-        "liblog",
-        "libcutils",
-        "libhidlbase",
-        "libhidltransport",
-        "libnativehelper",
-        "libutils",
-        "android.hardware.power@1.0",
-    ],
-    static_libs: ["VtsHalHidlTargetTestBase"],
-    cflags: [
-        "-O0",
-        "-g",
-    ]
+    static_libs: ["android.hardware.power@1.0"],
 }
diff --git a/power/1.1/vts/functional/Android.bp b/power/1.1/vts/functional/Android.bp
index f886bd2..604cd36 100644
--- a/power/1.1/vts/functional/Android.bp
+++ b/power/1.1/vts/functional/Android.bp
@@ -16,19 +16,10 @@
 
 cc_test {
     name: "VtsHalPowerV1_1TargetTest",
-    defaults: ["hidl_defaults"],
+    defaults: ["VtsHalTargetTestDefaults"],
     srcs: ["VtsHalPowerV1_1TargetTest.cpp"],
-    shared_libs: [
-        "libbase",
-        "liblog",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
+    static_libs: [
+        "android.hardware.power@1.0",
         "android.hardware.power@1.1",
     ],
-    static_libs: ["VtsHalHidlTargetTestBase"],
-    cflags: [
-        "-O0",
-        "-g",
-    ]
 }
diff --git a/sensors/1.0/vts/functional/Android.bp b/sensors/1.0/vts/functional/Android.bp
index af149ba..a49307d 100644
--- a/sensors/1.0/vts/functional/Android.bp
+++ b/sensors/1.0/vts/functional/Android.bp
@@ -16,19 +16,8 @@
 
 cc_test {
     name: "VtsHalSensorsV1_0TargetTest",
-    defaults: ["hidl_defaults"],
+    defaults: ["VtsHalTargetTestDefaults"],
     srcs: ["VtsHalSensorsV1_0TargetTest.cpp"],
-    shared_libs: [
-        "android.hardware.sensors@1.0",
-        "libcutils",
-        "libhidlbase",
-        "liblog",
-        "libutils",
-    ],
-    static_libs: ["VtsHalHidlTargetTestBase"],
-    cflags: [
-        "-O0",
-        "-g",
-    ],
+    static_libs: ["android.hardware.sensors@1.0"],
 }
 
diff --git a/soundtrigger/2.0/vts/functional/Android.bp b/soundtrigger/2.0/vts/functional/Android.bp
index 8f0cc4e..be6b3a8 100644
--- a/soundtrigger/2.0/vts/functional/Android.bp
+++ b/soundtrigger/2.0/vts/functional/Android.bp
@@ -16,21 +16,7 @@
 
 cc_test {
     name: "VtsHalSoundtriggerV2_0TargetTest",
-    defaults: ["hidl_defaults"],
+    defaults: ["VtsHalTargetTestDefaults"],
     srcs: ["VtsHalSoundtriggerV2_0TargetTest.cpp"],
-    shared_libs: [
-        "libbase",
-        "liblog",
-        "libcutils",
-        "libhidlbase",
-        "libhidltransport",
-        "libnativehelper",
-        "libutils",
-        "android.hardware.soundtrigger@2.0",
-    ],
-    static_libs: ["VtsHalHidlTargetTestBase"],
-    cflags: [
-        "-O0",
-        "-g",
-    ],
+    static_libs: ["android.hardware.soundtrigger@2.0"],
 }
diff --git a/thermal/1.0/vts/functional/Android.bp b/thermal/1.0/vts/functional/Android.bp
index 9046882..f661f1e 100644
--- a/thermal/1.0/vts/functional/Android.bp
+++ b/thermal/1.0/vts/functional/Android.bp
@@ -16,22 +16,8 @@
 
 cc_test {
     name: "VtsHalThermalV1_0TargetTest",
-    defaults: ["hidl_defaults"],
+    defaults: ["VtsHalTargetTestDefaults"],
     srcs: ["VtsHalThermalV1_0TargetTest.cpp"],
-    shared_libs: [
-        "libbase",
-        "liblog",
-        "libcutils",
-        "libhidlbase",
-        "libhidltransport",
-        "libnativehelper",
-        "libutils",
-        "android.hardware.thermal@1.0",
-    ],
-    static_libs: ["VtsHalHidlTargetTestBase"],
-    cflags: [
-        "-O0",
-        "-g",
-    ],
+    static_libs: ["android.hardware.thermal@1.0"],
 }
 
diff --git a/tv/input/1.0/vts/functional/Android.bp b/tv/input/1.0/vts/functional/Android.bp
index c862429..978830c 100644
--- a/tv/input/1.0/vts/functional/Android.bp
+++ b/tv/input/1.0/vts/functional/Android.bp
@@ -16,22 +16,8 @@
 
 cc_test {
     name: "VtsHalTvInputV1_0TargetTest",
-    defaults: ["hidl_defaults"],
+    defaults: ["VtsHalTargetTestDefaults"],
     srcs: ["VtsHalTvInputV1_0TargetTest.cpp"],
-    shared_libs: [
-        "libbase",
-        "liblog",
-        "libcutils",
-        "libhidlbase",
-        "libhidltransport",
-        "libnativehelper",
-        "libutils",
-        "android.hardware.tv.input@1.0",
-    ],
-    static_libs: ["VtsHalHidlTargetTestBase"],
-    cflags: [
-        "-O0",
-        "-g",
-    ]
+    static_libs: ["android.hardware.tv.input@1.0"],
 }
 
diff --git a/usb/1.0/vts/functional/Android.bp b/usb/1.0/vts/functional/Android.bp
index 7438bc7..96d3c0e 100644
--- a/usb/1.0/vts/functional/Android.bp
+++ b/usb/1.0/vts/functional/Android.bp
@@ -16,21 +16,7 @@
 
 cc_test {
     name: "VtsHalUsbV1_0TargetTest",
-    defaults: ["hidl_defaults"],
+    defaults: ["VtsHalTargetTestDefaults"],
     srcs: ["VtsHalUsbV1_0TargetTest.cpp"],
-    shared_libs: [
-        "libbase",
-        "liblog",
-        "libcutils",
-        "libhidlbase",
-        "libhidltransport",
-        "libnativehelper",
-        "libutils",
-        "android.hardware.usb@1.0",
-    ],
-    static_libs: ["VtsHalHidlTargetTestBase"],
-    cflags: [
-        "-O0",
-        "-g",
-    ],
+    static_libs: ["android.hardware.usb@1.0"],
 }
diff --git a/usb/1.1/vts/functional/Android.bp b/usb/1.1/vts/functional/Android.bp
index 820f794..4bb3203 100644
--- a/usb/1.1/vts/functional/Android.bp
+++ b/usb/1.1/vts/functional/Android.bp
@@ -16,23 +16,11 @@
 
 cc_test {
     name: "VtsHalUsbV1_1TargetTest",
-    defaults: ["hidl_defaults"],
+    defaults: ["VtsHalTargetTestDefaults"],
     srcs: ["VtsHalUsbV1_1TargetTest.cpp"],
-    shared_libs: [
-        "libbase",
-        "liblog",
-        "libcutils",
-        "libhidlbase",
-        "libhidltransport",
-        "libnativehelper",
-        "libutils",
+    static_libs: [
         "android.hardware.usb@1.0",
         "android.hardware.usb@1.1",
     ],
-    static_libs: ["VtsHalHidlTargetTestBase"],
-    cflags: [
-        "-O0",
-        "-g",
-    ],
 }
 
diff --git a/vibrator/1.0/vts/functional/Android.bp b/vibrator/1.0/vts/functional/Android.bp
index 9e25def..016d627 100644
--- a/vibrator/1.0/vts/functional/Android.bp
+++ b/vibrator/1.0/vts/functional/Android.bp
@@ -16,19 +16,8 @@
 
 cc_test {
     name: "VtsHalVibratorV1_0TargetTest",
-    defaults: ["hidl_defaults"],
+    defaults: ["VtsHalTargetTestDefaults"],
     srcs: ["VtsHalVibratorV1_0TargetTest.cpp"],
-    shared_libs: [
-        "libbase",
-        "libhidlbase",
-        "liblog",
-        "libutils",
-        "android.hardware.vibrator@1.0",
-    ],
-    static_libs: ["VtsHalHidlTargetTestBase"],
-    cflags: [
-        "-O0",
-        "-g",
-    ],
+    static_libs: ["android.hardware.vibrator@1.0"],
 }
 
diff --git a/vibrator/1.1/vts/functional/Android.bp b/vibrator/1.1/vts/functional/Android.bp
index 5baa8ed..4f6454b 100644
--- a/vibrator/1.1/vts/functional/Android.bp
+++ b/vibrator/1.1/vts/functional/Android.bp
@@ -16,19 +16,11 @@
 
 cc_test {
     name: "VtsHalVibratorV1_1TargetTest",
-    defaults: ["hidl_defaults"],
+    defaults: ["VtsHalTargetTestDefaults"],
     srcs: ["VtsHalVibratorV1_1TargetTest.cpp"],
-    shared_libs: [
-        "libbase",
-        "libhidlbase",
-        "liblog",
-        "libutils",
+    static_libs: [
+        "android.hardware.vibrator@1.0",
         "android.hardware.vibrator@1.1",
     ],
-    static_libs: ["VtsHalHidlTargetTestBase"],
-    cflags: [
-        "-O0",
-        "-g",
-    ],
 }
 
diff --git a/vr/1.0/vts/functional/Android.bp b/vr/1.0/vts/functional/Android.bp
index 5d5a99a..4029137 100644
--- a/vr/1.0/vts/functional/Android.bp
+++ b/vr/1.0/vts/functional/Android.bp
@@ -16,17 +16,7 @@
 
 cc_test {
     name: "VtsHalVrV1_0TargetTest",
-    defaults: ["hidl_defaults"],
+    defaults: ["VtsHalTargetTestDefaults"],
     srcs: ["VtsHalVrV1_0TargetTest.cpp"],
-    shared_libs: [
-        "liblog",
-        "libhidlbase",
-        "libutils",
-        "android.hardware.vr@1.0",
-    ],
-    static_libs: ["VtsHalHidlTargetTestBase"],
-    cflags: [
-       "-O0",
-        "-g",
-    ]
+    static_libs: ["android.hardware.vr@1.0"],
 }
diff --git a/weaver/1.0/vts/functional/Android.bp b/weaver/1.0/vts/functional/Android.bp
index 9b0ff6d..0089d89 100644
--- a/weaver/1.0/vts/functional/Android.bp
+++ b/weaver/1.0/vts/functional/Android.bp
@@ -16,21 +16,7 @@
 
 cc_test {
     name: "VtsHalWeaverV1_0TargetTest",
-    defaults: ["hidl_defaults"],
+    defaults: ["VtsHalTargetTestDefaults"],
     srcs: ["VtsHalWeaverV1_0TargetTest.cpp"],
-    shared_libs: [
-        "libbase",
-        "liblog",
-        "libcutils",
-        "libhidlbase",
-        "libhidltransport",
-        "libnativehelper",
-        "libutils",
-        "android.hardware.weaver@1.0",
-    ],
-    static_libs: ["VtsHalHidlTargetTestBase"],
-    cflags: [
-        "-O0",
-        "-g",
-    ],
+    static_libs: ["android.hardware.weaver@1.0"],
 }
diff --git a/wifi/1.1/vts/functional/Android.bp b/wifi/1.1/vts/functional/Android.bp
index 6b0baf7..1b0c12d 100644
--- a/wifi/1.1/vts/functional/Android.bp
+++ b/wifi/1.1/vts/functional/Android.bp
@@ -16,24 +16,13 @@
 
 cc_test {
     name: "VtsHalWifiV1_1TargetTest",
-    defaults: ["hidl_defaults"],
+    defaults: ["VtsHalTargetTestDefaults"],
     srcs: [
         "VtsHalWifiV1_1TargetTest.cpp",
         "wifi_chip_hidl_test.cpp"],
-    shared_libs: [
-        "libbase",
-        "liblog",
-        "libcutils",
-        "libhidlbase",
-        "libhidltransport",
-        "libnativehelper",
-        "libutils",
+    static_libs: [
+        "VtsHalWifiV1_0TargetTestUtil",
         "android.hardware.wifi@1.0",
         "android.hardware.wifi@1.1",
     ],
-    static_libs: ["VtsHalWifiV1_0TargetTestUtil", "VtsHalHidlTargetTestBase"],
-    cflags: [
-        "-O0",
-        "-g",
-    ],
 }
diff --git a/wifi/offload/1.0/vts/functional/Android.bp b/wifi/offload/1.0/vts/functional/Android.bp
index f907a89..140e45e 100644
--- a/wifi/offload/1.0/vts/functional/Android.bp
+++ b/wifi/offload/1.0/vts/functional/Android.bp
@@ -16,21 +16,7 @@
 
 cc_test {
     name: "VtsHalWifiOffloadV1_0TargetTest",
-    defaults: ["hidl_defaults"],
+    defaults: ["VtsHalTargetTestDefaults"],
     srcs: ["VtsHalWifiOffloadV1_0TargetTest.cpp"],
-    shared_libs: [
-        "libbase",
-        "liblog",
-        "libcutils",
-        "libhidlbase",
-        "libhidltransport",
-        "libnativehelper",
-        "libutils",
-        "android.hardware.wifi.offload@1.0",
-    ],
-    static_libs: ["VtsHalHidlTargetTestBase"],
-    cflags: [
-        "-O0",
-        "-g",
-    ],
+    static_libs: ["android.hardware.wifi.offload@1.0"],
 }