context hub: update vts files and add driver/profiler genrules

Test: mma
Bug: 34466754
Change-Id: Ia13d899bfee03745c8091dd79139229bb17fb46e
diff --git a/contexthub/1.0/Android.bp b/contexthub/1.0/Android.bp
index 5798306..e25c70d 100644
--- a/contexthub/1.0/Android.bp
+++ b/contexthub/1.0/Android.bp
@@ -62,3 +62,114 @@
         "android.hidl.base@1.0",
     ],
 }
+
+genrule {
+    name: "android.hardware.contexthub.vts.driver@1.0_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.contexthub@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/contexthub/1.0/ $(genDir)/android/hardware/contexthub/1.0/",
+    srcs: [
+        "types.hal",
+        "IContexthub.hal",
+        "IContexthubCallback.hal",
+    ],
+    out: [
+        "android/hardware/contexthub/1.0/types.vts.cpp",
+        "android/hardware/contexthub/1.0/Contexthub.vts.cpp",
+        "android/hardware/contexthub/1.0/ContexthubCallback.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.contexthub.vts.driver@1.0_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.contexthub@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/contexthub/1.0/ $(genDir)/android/hardware/contexthub/1.0/",
+    srcs: [
+        "types.hal",
+        "IContexthub.hal",
+        "IContexthubCallback.hal",
+    ],
+    out: [
+        "android/hardware/contexthub/1.0/types.vts.h",
+        "android/hardware/contexthub/1.0/Contexthub.vts.h",
+        "android/hardware/contexthub/1.0/ContexthubCallback.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.contexthub.vts.driver@1.0",
+    generated_sources: ["android.hardware.contexthub.vts.driver@1.0_genc++"],
+    generated_headers: ["android.hardware.contexthub.vts.driver@1.0_genc++_headers"],
+    export_generated_headers: ["android.hardware.contexthub.vts.driver@1.0_genc++_headers"],
+    shared_libs: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "liblog",
+        "libutils",
+        "libcutils",
+        "libvts_common",
+        "libvts_datatype",
+        "libvts_measurement",
+        "libvts_multidevice_proto",
+        "libcamera_metadata",
+        "libprotobuf-cpp-full",
+        "android.hidl.base@1.0",
+        "android.hardware.contexthub@1.0",
+    ],
+    export_shared_lib_headers: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "libutils",
+        "android.hidl.base@1.0",
+    ],
+}
+
+genrule {
+    name: "android.hardware.contexthub@1.0-vts.profiler_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.contexthub@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/contexthub/1.0/ $(genDir)/android/hardware/contexthub/1.0/",
+    srcs: [
+        "types.hal",
+        "IContexthub.hal",
+        "IContexthubCallback.hal",
+    ],
+    out: [
+        "android/hardware/contexthub/1.0/types.vts.cpp",
+        "android/hardware/contexthub/1.0/Contexthub.vts.cpp",
+        "android/hardware/contexthub/1.0/ContexthubCallback.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.contexthub@1.0-vts.profiler_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.contexthub@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/contexthub/1.0/ $(genDir)/android/hardware/contexthub/1.0/",
+    srcs: [
+        "types.hal",
+        "IContexthub.hal",
+        "IContexthubCallback.hal",
+    ],
+    out: [
+        "android/hardware/contexthub/1.0/types.vts.h",
+        "android/hardware/contexthub/1.0/Contexthub.vts.h",
+        "android/hardware/contexthub/1.0/ContexthubCallback.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.contexthub@1.0-vts.profiler",
+    generated_sources: ["android.hardware.contexthub@1.0-vts.profiler_genc++"],
+    generated_headers: ["android.hardware.contexthub@1.0-vts.profiler_genc++_headers"],
+    export_generated_headers: ["android.hardware.contexthub@1.0-vts.profiler_genc++_headers"],
+    shared_libs: [
+        "libbase",
+        "libhidlbase",
+        "libhidltransport",
+        "libvts_profiling",
+        "libvts_multidevice_proto",
+        "libprotobuf-cpp-full",
+        "android.hidl.base@1.0",
+        "android.hardware.contexthub@1.0",
+    ],
+}
diff --git a/contexthub/1.0/vts/Contexthub.vts b/contexthub/1.0/vts/Contexthub.vts
index b4e42f5..b06efe6 100644
--- a/contexthub/1.0/vts/Contexthub.vts
+++ b/contexthub/1.0/vts/Contexthub.vts
@@ -6,8 +6,494 @@
 
 import: "android.hardware.contexthub@1.0::IContexthubCallback"
 import: "android.hardware.contexthub@1.0::types"
+import: "android.hidl.base@1.0::types"
 
 interface: {
+    attribute: {
+        name: "::android::hardware::contexthub::V1_0::Result"
+        type: TYPE_ENUM
+        enum_value: {
+            scalar_type: "uint32_t"
+
+            enumerator: "OK"
+            scalar_value: {
+                uint32_t: 0
+            }
+            enumerator: "UNKNOWN_FAILURE"
+            scalar_value: {
+                uint32_t: 1
+            }
+            enumerator: "BAD_PARAMS"
+            scalar_value: {
+                uint32_t: 2
+            }
+            enumerator: "NOT_INIT"
+            scalar_value: {
+                uint32_t: 3
+            }
+            enumerator: "TRANSACTION_FAILED"
+            scalar_value: {
+                uint32_t: 4
+            }
+            enumerator: "TRANSACTION_PENDING"
+            scalar_value: {
+                uint32_t: 5
+            }
+        }
+    }
+
+    attribute: {
+        name: "::android::hardware::contexthub::V1_0::NanoAppFlags"
+        type: TYPE_ENUM
+        enum_value: {
+            scalar_type: "uint32_t"
+
+            enumerator: "SIGNED"
+            scalar_value: {
+                uint32_t: 1
+            }
+            enumerator: "ENCRYPTED"
+            scalar_value: {
+                uint32_t: 2
+            }
+        }
+    }
+
+    attribute: {
+        name: "::android::hardware::contexthub::V1_0::NanoAppBinary"
+        type: TYPE_STRUCT
+        struct_value: {
+            name: "appId"
+            type: TYPE_SCALAR
+            scalar_type: "uint64_t"
+        }
+        struct_value: {
+            name: "appVersion"
+            type: TYPE_SCALAR
+            scalar_type: "uint32_t"
+        }
+        struct_value: {
+            name: "flags"
+            type: TYPE_MASK
+            scalar_type: "uint32_t"
+            predefined_type: "::android::hardware::contexthub::V1_0::NanoAppFlags"
+        }
+        struct_value: {
+            name: "targetChreApiMajorVersion"
+            type: TYPE_SCALAR
+            scalar_type: "uint8_t"
+        }
+        struct_value: {
+            name: "targetChreApiMinorVersion"
+            type: TYPE_SCALAR
+            scalar_type: "uint8_t"
+        }
+        struct_value: {
+            name: "customBinary"
+            type: TYPE_VECTOR
+            vector_value: {
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
+    }
+
+    attribute: {
+        name: "::android::hardware::contexthub::V1_0::SensorType"
+        type: TYPE_ENUM
+        enum_value: {
+            scalar_type: "uint32_t"
+
+            enumerator: "RESERVED"
+            scalar_value: {
+                uint32_t: 0
+            }
+            enumerator: "ACCELEROMETER"
+            scalar_value: {
+                uint32_t: 1
+            }
+            enumerator: "GYROSCOPE"
+            scalar_value: {
+                uint32_t: 2
+            }
+            enumerator: "MAGNETOMETER"
+            scalar_value: {
+                uint32_t: 3
+            }
+            enumerator: "BAROMETER"
+            scalar_value: {
+                uint32_t: 4
+            }
+            enumerator: "PROXIMITY_SENSOR"
+            scalar_value: {
+                uint32_t: 5
+            }
+            enumerator: "AMBIENT_LIGHT_SENSOR"
+            scalar_value: {
+                uint32_t: 6
+            }
+            enumerator: "STATIONARY_DETECT"
+            scalar_value: {
+                uint32_t: 7
+            }
+            enumerator: "INSTANT_MOTION_DETECT"
+            scalar_value: {
+                uint32_t: 8
+            }
+            enumerator: "GPS"
+            scalar_value: {
+                uint32_t: 256
+            }
+            enumerator: "WIFI"
+            scalar_value: {
+                uint32_t: 512
+            }
+            enumerator: "AUDIO"
+            scalar_value: {
+                uint32_t: 768
+            }
+            enumerator: "CAMERA"
+            scalar_value: {
+                uint32_t: 1024
+            }
+            enumerator: "BLE"
+            scalar_value: {
+                uint32_t: 1280
+            }
+            enumerator: "WWAN"
+            scalar_value: {
+                uint32_t: 1536
+            }
+            enumerator: "PRIVATE_SENSOR_BASE"
+            scalar_value: {
+                uint32_t: 65536
+            }
+        }
+    }
+
+    attribute: {
+        name: "::android::hardware::contexthub::V1_0::PhysicalSensor"
+        type: TYPE_STRUCT
+        struct_value: {
+            name: "sensorType"
+            type: TYPE_ENUM
+            predefined_type: "::android::hardware::contexthub::V1_0::SensorType"
+        }
+        struct_value: {
+            name: "type"
+            type: TYPE_STRING
+        }
+        struct_value: {
+            name: "name"
+            type: TYPE_STRING
+        }
+        struct_value: {
+            name: "vendor"
+            type: TYPE_STRING
+        }
+        struct_value: {
+            name: "version"
+            type: TYPE_SCALAR
+            scalar_type: "uint32_t"
+        }
+        struct_value: {
+            name: "fifoReservedCount"
+            type: TYPE_SCALAR
+            scalar_type: "uint32_t"
+        }
+        struct_value: {
+            name: "fifoMaxCount"
+            type: TYPE_SCALAR
+            scalar_type: "uint32_t"
+        }
+        struct_value: {
+            name: "minDelayMs"
+            type: TYPE_SCALAR
+            scalar_type: "uint64_t"
+        }
+        struct_value: {
+            name: "maxDelayMs"
+            type: TYPE_SCALAR
+            scalar_type: "uint64_t"
+        }
+        struct_value: {
+            name: "peakPowerMw"
+            type: TYPE_SCALAR
+            scalar_type: "float_t"
+        }
+    }
+
+    attribute: {
+        name: "::android::hardware::contexthub::V1_0::ContextHub"
+        type: TYPE_STRUCT
+        struct_value: {
+            name: "name"
+            type: TYPE_STRING
+        }
+        struct_value: {
+            name: "vendor"
+            type: TYPE_STRING
+        }
+        struct_value: {
+            name: "toolchain"
+            type: TYPE_STRING
+        }
+        struct_value: {
+            name: "platformVersion"
+            type: TYPE_SCALAR
+            scalar_type: "uint32_t"
+        }
+        struct_value: {
+            name: "toolchainVersion"
+            type: TYPE_SCALAR
+            scalar_type: "uint32_t"
+        }
+        struct_value: {
+            name: "hubId"
+            type: TYPE_SCALAR
+            scalar_type: "uint32_t"
+        }
+        struct_value: {
+            name: "peakMips"
+            type: TYPE_SCALAR
+            scalar_type: "float_t"
+        }
+        struct_value: {
+            name: "stoppedPowerDrawMw"
+            type: TYPE_SCALAR
+            scalar_type: "float_t"
+        }
+        struct_value: {
+            name: "sleepPowerDrawMw"
+            type: TYPE_SCALAR
+            scalar_type: "float_t"
+        }
+        struct_value: {
+            name: "peakPowerDrawMw"
+            type: TYPE_SCALAR
+            scalar_type: "float_t"
+        }
+        struct_value: {
+            name: "connectedSensors"
+            type: TYPE_VECTOR
+            vector_value: {
+                type: TYPE_STRUCT
+                predefined_type: "::android::hardware::contexthub::V1_0::PhysicalSensor"
+            }
+        }
+        struct_value: {
+            name: "maxSupportedMsgLen"
+            type: TYPE_SCALAR
+            scalar_type: "uint32_t"
+        }
+        struct_value: {
+            name: "chrePlatformId"
+            type: TYPE_SCALAR
+            scalar_type: "uint64_t"
+        }
+        struct_value: {
+            name: "chreApiMajorVersion"
+            type: TYPE_SCALAR
+            scalar_type: "uint8_t"
+        }
+        struct_value: {
+            name: "chreApiMinorVersion"
+            type: TYPE_SCALAR
+            scalar_type: "uint8_t"
+        }
+        struct_value: {
+            name: "chrePatchVersion"
+            type: TYPE_SCALAR
+            scalar_type: "uint16_t"
+        }
+    }
+
+    attribute: {
+        name: "::android::hardware::contexthub::V1_0::HostEndPoint"
+        type: TYPE_ENUM
+        enum_value: {
+            scalar_type: "uint16_t"
+
+            enumerator: "BROADCAST"
+            scalar_value: {
+                uint16_t: 65535
+            }
+            enumerator: "UNSPECIFIED"
+            scalar_value: {
+                uint16_t: 65534
+            }
+        }
+    }
+
+    attribute: {
+        name: "::android::hardware::contexthub::V1_0::ContextHubMsg"
+        type: TYPE_STRUCT
+        struct_value: {
+            name: "appName"
+            type: TYPE_SCALAR
+            scalar_type: "uint64_t"
+        }
+        struct_value: {
+            name: "hostEndPoint"
+            type: TYPE_SCALAR
+            scalar_type: "uint16_t"
+        }
+        struct_value: {
+            name: "msgType"
+            type: TYPE_SCALAR
+            scalar_type: "uint32_t"
+        }
+        struct_value: {
+            name: "msg"
+            type: TYPE_VECTOR
+            vector_value: {
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
+    }
+
+    attribute: {
+        name: "::android::hardware::contexthub::V1_0::HubMemoryType"
+        type: TYPE_ENUM
+        enum_value: {
+            scalar_type: "uint32_t"
+
+            enumerator: "MAIN"
+            scalar_value: {
+                uint32_t: 0
+            }
+            enumerator: "SECONDARY"
+            scalar_value: {
+                uint32_t: 1
+            }
+            enumerator: "TCM"
+            scalar_value: {
+                uint32_t: 2
+            }
+        }
+    }
+
+    attribute: {
+        name: "::android::hardware::contexthub::V1_0::HubMemoryFlag"
+        type: TYPE_ENUM
+        enum_value: {
+            scalar_type: "uint32_t"
+
+            enumerator: "READ"
+            scalar_value: {
+                uint32_t: 1
+            }
+            enumerator: "WRITE"
+            scalar_value: {
+                uint32_t: 2
+            }
+            enumerator: "EXEC"
+            scalar_value: {
+                uint32_t: 4
+            }
+        }
+    }
+
+    attribute: {
+        name: "::android::hardware::contexthub::V1_0::MemRange"
+        type: TYPE_STRUCT
+        struct_value: {
+            name: "totalBytes"
+            type: TYPE_SCALAR
+            scalar_type: "uint32_t"
+        }
+        struct_value: {
+            name: "freeBytes"
+            type: TYPE_SCALAR
+            scalar_type: "uint32_t"
+        }
+        struct_value: {
+            name: "type"
+            type: TYPE_ENUM
+            predefined_type: "::android::hardware::contexthub::V1_0::HubMemoryType"
+        }
+        struct_value: {
+            name: "flags"
+            type: TYPE_MASK
+            scalar_type: "uint32_t"
+            predefined_type: "::android::hardware::contexthub::V1_0::HubMemoryFlag"
+        }
+    }
+
+    attribute: {
+        name: "::android::hardware::contexthub::V1_0::AsyncEventType"
+        type: TYPE_ENUM
+        enum_value: {
+            scalar_type: "uint32_t"
+
+            enumerator: "RESTARTED"
+            scalar_value: {
+                uint32_t: 1
+            }
+        }
+    }
+
+    attribute: {
+        name: "::android::hardware::contexthub::V1_0::TransactionResult"
+        type: TYPE_ENUM
+        enum_value: {
+            scalar_type: "int32_t"
+
+            enumerator: "SUCCESS"
+            scalar_value: {
+                int32_t: 0
+            }
+            enumerator: "FAILURE"
+            scalar_value: {
+                int32_t: 1
+            }
+        }
+    }
+
+    attribute: {
+        name: "::android::hardware::contexthub::V1_0::HubAppInfo"
+        type: TYPE_STRUCT
+        struct_value: {
+            name: "appId"
+            type: TYPE_SCALAR
+            scalar_type: "uint64_t"
+        }
+        struct_value: {
+            name: "version"
+            type: TYPE_SCALAR
+            scalar_type: "uint32_t"
+        }
+        struct_value: {
+            name: "memUsage"
+            type: TYPE_VECTOR
+            vector_value: {
+                type: TYPE_STRUCT
+                predefined_type: "::android::hardware::contexthub::V1_0::MemRange"
+            }
+        }
+        struct_value: {
+            name: "enabled"
+            type: TYPE_SCALAR
+            scalar_type: "bool_t"
+        }
+    }
+
+    attribute: {
+        name: "::android::hidl::base::V1_0::DebugInfo"
+        type: TYPE_STRUCT
+        struct_value: {
+            name: "pid"
+            type: TYPE_SCALAR
+            scalar_type: "int32_t"
+        }
+        struct_value: {
+            name: "ptr"
+            type: TYPE_SCALAR
+            scalar_type: "uint64_t"
+        }
+    }
+
     api: {
         name: "getHubs"
         return_type_hidl: {
@@ -31,8 +517,7 @@
         }
         arg: {
             type: TYPE_HIDL_CALLBACK
-            predefined_type: "IContexthubCallback"
-            is_callback: true
+            predefined_type: "::android::hardware::contexthub::V1_0::IContexthubCallback"
         }
     }
 
diff --git a/contexthub/1.0/vts/ContexthubCallback.vts b/contexthub/1.0/vts/ContexthubCallback.vts
index c3784e8..7897a83 100644
--- a/contexthub/1.0/vts/ContexthubCallback.vts
+++ b/contexthub/1.0/vts/ContexthubCallback.vts
@@ -5,8 +5,494 @@
 package: "android.hardware.contexthub"
 
 import: "android.hardware.contexthub@1.0::types"
+import: "android.hidl.base@1.0::types"
 
 interface: {
+    attribute: {
+        name: "::android::hardware::contexthub::V1_0::Result"
+        type: TYPE_ENUM
+        enum_value: {
+            scalar_type: "uint32_t"
+
+            enumerator: "OK"
+            scalar_value: {
+                uint32_t: 0
+            }
+            enumerator: "UNKNOWN_FAILURE"
+            scalar_value: {
+                uint32_t: 1
+            }
+            enumerator: "BAD_PARAMS"
+            scalar_value: {
+                uint32_t: 2
+            }
+            enumerator: "NOT_INIT"
+            scalar_value: {
+                uint32_t: 3
+            }
+            enumerator: "TRANSACTION_FAILED"
+            scalar_value: {
+                uint32_t: 4
+            }
+            enumerator: "TRANSACTION_PENDING"
+            scalar_value: {
+                uint32_t: 5
+            }
+        }
+    }
+
+    attribute: {
+        name: "::android::hardware::contexthub::V1_0::NanoAppFlags"
+        type: TYPE_ENUM
+        enum_value: {
+            scalar_type: "uint32_t"
+
+            enumerator: "SIGNED"
+            scalar_value: {
+                uint32_t: 1
+            }
+            enumerator: "ENCRYPTED"
+            scalar_value: {
+                uint32_t: 2
+            }
+        }
+    }
+
+    attribute: {
+        name: "::android::hardware::contexthub::V1_0::NanoAppBinary"
+        type: TYPE_STRUCT
+        struct_value: {
+            name: "appId"
+            type: TYPE_SCALAR
+            scalar_type: "uint64_t"
+        }
+        struct_value: {
+            name: "appVersion"
+            type: TYPE_SCALAR
+            scalar_type: "uint32_t"
+        }
+        struct_value: {
+            name: "flags"
+            type: TYPE_MASK
+            scalar_type: "uint32_t"
+            predefined_type: "::android::hardware::contexthub::V1_0::NanoAppFlags"
+        }
+        struct_value: {
+            name: "targetChreApiMajorVersion"
+            type: TYPE_SCALAR
+            scalar_type: "uint8_t"
+        }
+        struct_value: {
+            name: "targetChreApiMinorVersion"
+            type: TYPE_SCALAR
+            scalar_type: "uint8_t"
+        }
+        struct_value: {
+            name: "customBinary"
+            type: TYPE_VECTOR
+            vector_value: {
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
+    }
+
+    attribute: {
+        name: "::android::hardware::contexthub::V1_0::SensorType"
+        type: TYPE_ENUM
+        enum_value: {
+            scalar_type: "uint32_t"
+
+            enumerator: "RESERVED"
+            scalar_value: {
+                uint32_t: 0
+            }
+            enumerator: "ACCELEROMETER"
+            scalar_value: {
+                uint32_t: 1
+            }
+            enumerator: "GYROSCOPE"
+            scalar_value: {
+                uint32_t: 2
+            }
+            enumerator: "MAGNETOMETER"
+            scalar_value: {
+                uint32_t: 3
+            }
+            enumerator: "BAROMETER"
+            scalar_value: {
+                uint32_t: 4
+            }
+            enumerator: "PROXIMITY_SENSOR"
+            scalar_value: {
+                uint32_t: 5
+            }
+            enumerator: "AMBIENT_LIGHT_SENSOR"
+            scalar_value: {
+                uint32_t: 6
+            }
+            enumerator: "STATIONARY_DETECT"
+            scalar_value: {
+                uint32_t: 7
+            }
+            enumerator: "INSTANT_MOTION_DETECT"
+            scalar_value: {
+                uint32_t: 8
+            }
+            enumerator: "GPS"
+            scalar_value: {
+                uint32_t: 256
+            }
+            enumerator: "WIFI"
+            scalar_value: {
+                uint32_t: 512
+            }
+            enumerator: "AUDIO"
+            scalar_value: {
+                uint32_t: 768
+            }
+            enumerator: "CAMERA"
+            scalar_value: {
+                uint32_t: 1024
+            }
+            enumerator: "BLE"
+            scalar_value: {
+                uint32_t: 1280
+            }
+            enumerator: "WWAN"
+            scalar_value: {
+                uint32_t: 1536
+            }
+            enumerator: "PRIVATE_SENSOR_BASE"
+            scalar_value: {
+                uint32_t: 65536
+            }
+        }
+    }
+
+    attribute: {
+        name: "::android::hardware::contexthub::V1_0::PhysicalSensor"
+        type: TYPE_STRUCT
+        struct_value: {
+            name: "sensorType"
+            type: TYPE_ENUM
+            predefined_type: "::android::hardware::contexthub::V1_0::SensorType"
+        }
+        struct_value: {
+            name: "type"
+            type: TYPE_STRING
+        }
+        struct_value: {
+            name: "name"
+            type: TYPE_STRING
+        }
+        struct_value: {
+            name: "vendor"
+            type: TYPE_STRING
+        }
+        struct_value: {
+            name: "version"
+            type: TYPE_SCALAR
+            scalar_type: "uint32_t"
+        }
+        struct_value: {
+            name: "fifoReservedCount"
+            type: TYPE_SCALAR
+            scalar_type: "uint32_t"
+        }
+        struct_value: {
+            name: "fifoMaxCount"
+            type: TYPE_SCALAR
+            scalar_type: "uint32_t"
+        }
+        struct_value: {
+            name: "minDelayMs"
+            type: TYPE_SCALAR
+            scalar_type: "uint64_t"
+        }
+        struct_value: {
+            name: "maxDelayMs"
+            type: TYPE_SCALAR
+            scalar_type: "uint64_t"
+        }
+        struct_value: {
+            name: "peakPowerMw"
+            type: TYPE_SCALAR
+            scalar_type: "float_t"
+        }
+    }
+
+    attribute: {
+        name: "::android::hardware::contexthub::V1_0::ContextHub"
+        type: TYPE_STRUCT
+        struct_value: {
+            name: "name"
+            type: TYPE_STRING
+        }
+        struct_value: {
+            name: "vendor"
+            type: TYPE_STRING
+        }
+        struct_value: {
+            name: "toolchain"
+            type: TYPE_STRING
+        }
+        struct_value: {
+            name: "platformVersion"
+            type: TYPE_SCALAR
+            scalar_type: "uint32_t"
+        }
+        struct_value: {
+            name: "toolchainVersion"
+            type: TYPE_SCALAR
+            scalar_type: "uint32_t"
+        }
+        struct_value: {
+            name: "hubId"
+            type: TYPE_SCALAR
+            scalar_type: "uint32_t"
+        }
+        struct_value: {
+            name: "peakMips"
+            type: TYPE_SCALAR
+            scalar_type: "float_t"
+        }
+        struct_value: {
+            name: "stoppedPowerDrawMw"
+            type: TYPE_SCALAR
+            scalar_type: "float_t"
+        }
+        struct_value: {
+            name: "sleepPowerDrawMw"
+            type: TYPE_SCALAR
+            scalar_type: "float_t"
+        }
+        struct_value: {
+            name: "peakPowerDrawMw"
+            type: TYPE_SCALAR
+            scalar_type: "float_t"
+        }
+        struct_value: {
+            name: "connectedSensors"
+            type: TYPE_VECTOR
+            vector_value: {
+                type: TYPE_STRUCT
+                predefined_type: "::android::hardware::contexthub::V1_0::PhysicalSensor"
+            }
+        }
+        struct_value: {
+            name: "maxSupportedMsgLen"
+            type: TYPE_SCALAR
+            scalar_type: "uint32_t"
+        }
+        struct_value: {
+            name: "chrePlatformId"
+            type: TYPE_SCALAR
+            scalar_type: "uint64_t"
+        }
+        struct_value: {
+            name: "chreApiMajorVersion"
+            type: TYPE_SCALAR
+            scalar_type: "uint8_t"
+        }
+        struct_value: {
+            name: "chreApiMinorVersion"
+            type: TYPE_SCALAR
+            scalar_type: "uint8_t"
+        }
+        struct_value: {
+            name: "chrePatchVersion"
+            type: TYPE_SCALAR
+            scalar_type: "uint16_t"
+        }
+    }
+
+    attribute: {
+        name: "::android::hardware::contexthub::V1_0::HostEndPoint"
+        type: TYPE_ENUM
+        enum_value: {
+            scalar_type: "uint16_t"
+
+            enumerator: "BROADCAST"
+            scalar_value: {
+                uint16_t: 65535
+            }
+            enumerator: "UNSPECIFIED"
+            scalar_value: {
+                uint16_t: 65534
+            }
+        }
+    }
+
+    attribute: {
+        name: "::android::hardware::contexthub::V1_0::ContextHubMsg"
+        type: TYPE_STRUCT
+        struct_value: {
+            name: "appName"
+            type: TYPE_SCALAR
+            scalar_type: "uint64_t"
+        }
+        struct_value: {
+            name: "hostEndPoint"
+            type: TYPE_SCALAR
+            scalar_type: "uint16_t"
+        }
+        struct_value: {
+            name: "msgType"
+            type: TYPE_SCALAR
+            scalar_type: "uint32_t"
+        }
+        struct_value: {
+            name: "msg"
+            type: TYPE_VECTOR
+            vector_value: {
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
+    }
+
+    attribute: {
+        name: "::android::hardware::contexthub::V1_0::HubMemoryType"
+        type: TYPE_ENUM
+        enum_value: {
+            scalar_type: "uint32_t"
+
+            enumerator: "MAIN"
+            scalar_value: {
+                uint32_t: 0
+            }
+            enumerator: "SECONDARY"
+            scalar_value: {
+                uint32_t: 1
+            }
+            enumerator: "TCM"
+            scalar_value: {
+                uint32_t: 2
+            }
+        }
+    }
+
+    attribute: {
+        name: "::android::hardware::contexthub::V1_0::HubMemoryFlag"
+        type: TYPE_ENUM
+        enum_value: {
+            scalar_type: "uint32_t"
+
+            enumerator: "READ"
+            scalar_value: {
+                uint32_t: 1
+            }
+            enumerator: "WRITE"
+            scalar_value: {
+                uint32_t: 2
+            }
+            enumerator: "EXEC"
+            scalar_value: {
+                uint32_t: 4
+            }
+        }
+    }
+
+    attribute: {
+        name: "::android::hardware::contexthub::V1_0::MemRange"
+        type: TYPE_STRUCT
+        struct_value: {
+            name: "totalBytes"
+            type: TYPE_SCALAR
+            scalar_type: "uint32_t"
+        }
+        struct_value: {
+            name: "freeBytes"
+            type: TYPE_SCALAR
+            scalar_type: "uint32_t"
+        }
+        struct_value: {
+            name: "type"
+            type: TYPE_ENUM
+            predefined_type: "::android::hardware::contexthub::V1_0::HubMemoryType"
+        }
+        struct_value: {
+            name: "flags"
+            type: TYPE_MASK
+            scalar_type: "uint32_t"
+            predefined_type: "::android::hardware::contexthub::V1_0::HubMemoryFlag"
+        }
+    }
+
+    attribute: {
+        name: "::android::hardware::contexthub::V1_0::AsyncEventType"
+        type: TYPE_ENUM
+        enum_value: {
+            scalar_type: "uint32_t"
+
+            enumerator: "RESTARTED"
+            scalar_value: {
+                uint32_t: 1
+            }
+        }
+    }
+
+    attribute: {
+        name: "::android::hardware::contexthub::V1_0::TransactionResult"
+        type: TYPE_ENUM
+        enum_value: {
+            scalar_type: "int32_t"
+
+            enumerator: "SUCCESS"
+            scalar_value: {
+                int32_t: 0
+            }
+            enumerator: "FAILURE"
+            scalar_value: {
+                int32_t: 1
+            }
+        }
+    }
+
+    attribute: {
+        name: "::android::hardware::contexthub::V1_0::HubAppInfo"
+        type: TYPE_STRUCT
+        struct_value: {
+            name: "appId"
+            type: TYPE_SCALAR
+            scalar_type: "uint64_t"
+        }
+        struct_value: {
+            name: "version"
+            type: TYPE_SCALAR
+            scalar_type: "uint32_t"
+        }
+        struct_value: {
+            name: "memUsage"
+            type: TYPE_VECTOR
+            vector_value: {
+                type: TYPE_STRUCT
+                predefined_type: "::android::hardware::contexthub::V1_0::MemRange"
+            }
+        }
+        struct_value: {
+            name: "enabled"
+            type: TYPE_SCALAR
+            scalar_type: "bool_t"
+        }
+    }
+
+    attribute: {
+        name: "::android::hidl::base::V1_0::DebugInfo"
+        type: TYPE_STRUCT
+        struct_value: {
+            name: "pid"
+            type: TYPE_SCALAR
+            scalar_type: "int32_t"
+        }
+        struct_value: {
+            name: "ptr"
+            type: TYPE_SCALAR
+            scalar_type: "uint64_t"
+        }
+    }
+
     api: {
         name: "handleClientMsg"
         arg: {
diff --git a/contexthub/1.0/vts/types.vts b/contexthub/1.0/vts/types.vts
index 12576b1..4f5dfcf 100644
--- a/contexthub/1.0/vts/types.vts
+++ b/contexthub/1.0/vts/types.vts
@@ -71,6 +71,7 @@
     struct_value: {
         name: "flags"
         type: TYPE_MASK
+        scalar_type: "uint32_t"
         predefined_type: "::android::hardware::contexthub::V1_0::NanoAppFlags"
     }
     struct_value: {
@@ -411,6 +412,7 @@
     struct_value: {
         name: "flags"
         type: TYPE_MASK
+        scalar_type: "uint32_t"
         predefined_type: "::android::hardware::contexthub::V1_0::HubMemoryFlag"
     }
 }