platform_hardware_interfaces/automotive
Felipe Leme 75a27f8b37 Implemented IVehicle::debug() on default Vehicle HAL implementation.
This function allows developer to drive (no pun intend) the VHAL behaviour
using lshal, which is useful when implementing new CarService functionalities
that depend on VHAL properties.

Examples:

$ adb shell lshal debug android.hardware.automotive.vehicle@2.0::IVehicle/default --help
Usage:

[no args]: dumps (id and value) all supported properties
--help: shows this help
--list: lists the ids of all supported properties
--get <PROP1> [PROP2] [PROPN]: dumps the value of specific properties
--set <PROP> <i|s> <VALUE>: sets the value of property PROP, using an arbitrary number
  of key/value parameters (i for int32, s for string)

$ adb shell lshal debug android.hardware.automotive.vehicle@2.0::IVehicle/default | head -2
dumping 87 properties
1: {.timestamp = 0, .areaId = 0, .prop = 299896583, .status = AVAILABLE,
.value = {.int32Values = [3]{42, 1, 10}, .floatValues = [0]{}, .int64Values = [0]{},
.bytes = [0]{}, .stringValue = ""}}

$ adb shell lshal debug android.hardware.automotive.vehicle@2.0::IVehicle/default \
  --set 299896583 s Numbers i 4 i 8 i 15 i 16 i 23 i 42
Set property {.timestamp = 0, .areaId = 0, .prop = 299896583, .status = AVAILABLE,
.value = {.int32Values = [6]{4, 8, 15, 16, 23, 42}, .floatValues = [0]{},
.int64Values = [0]{}, .bytes = [0]{}, .stringValue = "Numbers"}}

$ adb shell lshal debug android.hardware.automotive.vehicle@2.0::IVehicle/default \
  --get 299896583

{.timestamp = 102372810363603, .areaId = 0, .prop = 299896583, .status = AVAILABLE,
.value = {.int32Values = [6]{4, 8, 15, 16, 23, 42}, .floatValues = [0]{},
.int64Values = [0]{}, .bytes = [0]{}, .stringValue = "Numbers"}}

Bug: 146207078
Test: see examples above
Test: atest android.hardware.automotive.vehicle@2.0-manager-unit-tests \
      android.hardware.automotive.vehicle@2.0-default-impl-unit-tests

Change-Id: I2a9bd6f39f2938653a404cab43bdae9e45476529
2020-02-05 15:22:50 -08:00
..
audiocontrol Merge "Remove spurious cflags from AudioControl HAL 1.0" 2020-01-28 19:30:29 +00:00
can/1.0 Refactor baudrate to bitrate 2020-01-11 01:05:59 +00:00
evs Merge "Add fuzzer for EVS HAL" 2020-01-31 02:24:51 +00:00
occupant_awareness/aidl Enable java backend for occupant awareness iface. 2019-12-26 03:22:55 -08:00
vehicle/2.0 Implemented IVehicle::debug() on default Vehicle HAL implementation. 2020-02-05 15:22:50 -08:00
OWNERS Update OWNERS 2019-09-30 13:41:40 -07:00
README.md Explicitly unfreeze the Automotive HALs 2018-06-04 14:21:31 -07:00

Autmotive HALs


Overview:

The automotive HAL tree is used by Android Automotive to discover and operate hardware specific to a car.

The HALs are not (yet) frozen, as the HAL definition is expected to evolve between Android releases.