Starting March 27, 2025, we recommend using android-latest-release
instead of aosp-main
to build and contribute to AOSP. For more information, see Changes to AOSP.
HIDL VHAL interface
Stay organized with collections
Save and categorize content based on your preferences.
The HIDL VHAL interface is defined at
IVehicle.hal
and provides these methods.
Method |
Description |
getAllPropConfigs() generates
(vec<VehiclePropConfig>propConfigs);
Lists the configuration of all properties supported by the VHAL. CarService uses supported
properties only.
|
ongetPropConfigs(vec props) generates
(StatusCode status,vec<VehiclePropConfig> propConfigs);
Returns the configuration of selected properties.
|
set(VehiclePropValue propValue) generates
(StatusCodestatus);
Writes a value to a property. The result of the write is defined per property.
|
subscribe(IVehicleCallback callback, vec options)
generates (StatusCode status);
Starts monitoring a property value change.
|
unsubscribe(IVehicleCallback callback, int32_t propId)
generates (StatusCode status);
Stops monitoring a property value change for a previous subscribed
property.
|
The HIDL VHAL uses these callback interfaces:
Callback |
Description |
oneway |
onPropertyEvent(vecpropValues);
Notifies vehicle property's value change. Apply only to subscribed properties.
|
oneway |
onPropertySetError(StatusCode errorCode,int32_t propId,int32_tareaId);
Returns async property set errors that can not be associated with a specific set operation.
|
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-08-29 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 UTC."],[],[],null,["# HIDL VHAL interface\n\nThe HIDL VHAL interface is defined at\n[`IVehicle.hal`](https://android.googlesource.com/platform/hardware/interfaces/+/refs/heads/android16-release/automotive/vehicle/2.0/IVehicle.hal)\nand provides these methods.\n\n| Method | Description |\n|--------|-------------|\n| `getAllPropConfigs()` **generates** `(vec\u003cVehiclePropConfig\u003epropConfigs);` Lists the configuration of all properties supported by the VHAL. CarService uses supported properties only. ||\n| `ongetPropConfigs(vec` props) **generates** `(StatusCode status,vec\u003cVehiclePropConfig\u003e propConfigs);` Returns the configuration of selected properties. ||\n| `set(VehiclePropValue propValue)` **generates** `(StatusCodestatus);` Writes a value to a property. The result of the write is defined per property. ||\n| `subscribe(IVehicleCallback callback, vec` options) **generates** `(StatusCode status);` Starts monitoring a property value change. ||\n| `unsubscribe(IVehicleCallback callback, int32_t propId)` **generates** `(StatusCode status);` Stops monitoring a property value change for a previous subscribed property. ||\n\nThe HIDL VHAL uses these callback interfaces:\n\n| Callback | Description |\n|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `oneway` | `onPropertyEvent(vec`propValues); Notifies vehicle property's value change. Apply only to subscribed properties. |\n| `oneway` | `onPropertySetError(StatusCode errorCode,int32_t propId,int32_tareaId);` Returns async property set errors that can not be associated with a specific set operation. |"]]