A server for Android Automotive's gRPC Vehicle HAL, backed by COVESA VSS signals in an Eclipse Kuksa databroker. In Kuksa's terms it is a consumer: it reads signals and publishes none. It is part of vxedge, and is not an Eclipse Kuksa component.
AAOS guest vxvhal Kuksa databroker
CarService -> DefaultVehicleHal VehicleServer (gRPC) kuksa.val.v2
-> GRPCVehicleHardware ─────────────────> mapping ─────> VSS signals <── zone ECUs, CAN, ...
AOSP ships GRPCVehicleHardware (since the android14-release branch), a Vehicle HAL that forwards every
call to a VehicleServer on another machine or VM. vxvhal is that server, built and tested against
android17-release. It reads values from a Kuksa databroker, converts each one
through a mapping table (VSS path to AAOS property ID, area and unit), and streams updates as the databroker
sends them.
| Call | Behavior |
|---|---|
GetAllPropertyConfig |
Every mapped property, with access from its mapping |
GetValues |
Reads the databroker now and converts; NOT_AVAILABLE until the signal has a value |
StartPropertyValuesStream |
Every update from the databroker, converted, with timestamps that only move forward |
Subscribe, Unsubscribe, UpdateSampleRate |
Accepted and recorded; updates are pushed as they arrive, the rate is not enforced |
CheckHealth |
OK when the databroker answers |
SetValues |
Forwards writable mappings through Databroker Actuate; read-only mappings return ACCESS_DENIED |
| Supported-value calls | Not used: no mapped property declares supported-value info |
The default mapping (mappings/default.yaml) carries five properties: PERF_VEHICLE_SPEED from
Vehicle.Speed (km/h to m/s), ENGINE_RPM from Vehicle.Powertrain.CombustionEngine.Speed, and
PERF_ODOMETER from Vehicle.TraveledDistance, and GEAR_SELECTION from
Vehicle.Powertrain.Transmission.SelectedGear, an enum mapped through the row's values table, and
HVAC_TEMPERATURE_SET from the driver's VSS HVAC temperature actuator.
Actuation development targets Databroker 0.7.2. The default mapping includes a single-seat HVAC temperature demo with a 16–28 °C range and 1 °C steps. The range and seat coverage describe the demo and must be adapted to the vehicle. A writable mapping uses access: read_write and must
refer to a VSS actuator served by a provider. For numeric mappings, the write uses
(AAOS value - offset) / scale. Enum mappings reverse the values table, which must be
one-to-one. Set write_type when the actuator's scalar type differs from the AAOS type.
The type and write_type fields accept float, int32, or int64 for their respective type settings.
SetValues reports whether Databroker accepted the request. When no provider serves the
actuator, it returns NOT_AVAILABLE. The property stream reflects values the provider
publishes.
- Its own gRPC port has no TLS or authentication, and listens on
0.0.0.0:9300by default. Keep it on an isolated network, or set--listen. - Missing VSS paths are logged and omitted from the subscription. Reads of those properties
return
NOT_AVAILABLE, and available properties continue streaming. Paths are checked again whenever vxvhal resubscribes. - Sample rates are not enforced, including for the three properties declared continuous.
- Not a vendor Vehicle HAL, and not tested with CTS or VTS.
- Run against one AAOS guest so far: Cuttlefish with AAOS 26Q2 (Android 17, API 37). Speed and
engine speed reached CarService on request, and speed over the property stream (
docs/aaos-cuttlefish.md). Gear was read on request in the vehicle gate. The odometer has not been read in AAOS. Nothing was timed. - The live integration test passed against Databroker 0.7.1 and 0.7.2 with VSS 6.0. The default local container is 0.7.1. CI tests both releases by image digest.
- The mapping is hand-written. COVESA's AASIG binding and its
vspec2aapropertiesgenerator are the source of the pairs, but COVESA describes that mapping as needing an update, and it is one-way.
On Linux, install Rust through rustup, protoc, and Podman. The pinned Rust
toolchain is selected automatically from the repository root. The quickstart
uses Databroker 0.7.2 and its VSS model in the published image.
First confirm that the container name vxvhal-test-databroker is available.
From the repository root, start a broker on loopback port 55556 and run both
examples:
(
set -e
export VXVHAL_TEST_DATABROKER_IMAGE=ghcr.io/eclipse-kuksa/kuksa-databroker@sha256:27a134f15e3caf79156c72434123babb26e9b80bd5423434c85061d074f74658
trap 'scripts/databroker.sh stop' EXIT
endpoint=$(scripts/databroker.sh)
VXVHAL_TEST_DATABROKER="$endpoint" cargo test --locked --test databroker -- --nocapture
)All three integration tests should pass. If port 55556 is in use, set
VXVHAL_TEST_PORT before starting the broker. The block removes the test
container when it exits. The broker has authorization disabled for this local
test; the connection is bound to loopback.
- Read vehicle speed checks conversion from 72 km/h to 20 m/s and a later stream update.
- Write HVAC temperature uses a stub provider and checks the actuation and return update.
- AAOS Cuttlefish connects the VHAL server to an Android guest and verifies reads through CarService.
mappings/ holds the VSS-to-AAOS configuration used by the server.
examples/ explains runnable scenarios using that configuration. tests/
contains the executable checks invoked by the examples.
With a Databroker on the host at port 55555:
cargo run --locked --release -- --databroker http://127.0.0.1:55555 --mapping mappings/default.yaml --listen 127.0.0.1:9300For an AAOS guest, bind to an address the guest can reach. The Cuttlefish walkthrough covers the proxy setup.
On Linux x86-64, install the x86_64-unknown-linux-musl Rust target, protoc,
and a musl C compiler, then run:
rustup target add x86_64-unknown-linux-musl
CC_x86_64_unknown_linux_musl=musl-gcc cargo build --locked --release --target x86_64-unknown-linux-musl --target-dir target
podman build --tag vxvhal --file Containerfile .The container includes the default mapping. Its Databroker URL defaults to
http://127.0.0.1:55555 inside the container's network namespace. Share a
network namespace with the broker or set VXVHAL_DATABROKER to a reachable URL.
Use an HTTPS URL whose hostname or IP matches the broker certificate. For a private CA, pass its PEM certificate. For a publicly trusted broker, the client uses the bundled WebPKI roots when no CA file is supplied.
cargo run --locked --release -- \
--databroker https://broker.example.com:55555 \
--databroker-ca /path/to/ca.pem \
--databroker-token-file /path/to/read.tokenGive the JWT read access to the mapped VSS signals. Use a file readable by the vxvhal process and rotate it by atomically replacing it. Each new Databroker RPC reads the current file. A running subscription uses the credentials from when it opened and picks up the new token when it reconnects. TLS and the token apply to the Databroker connection. See Limits for the AAOS-facing listener.
cargo test # unit tests
export VXVHAL_TEST_DATABROKER=$(scripts/databroker.sh)
cargo test --test databroker # against the pinned Kuksa databroker 0.7.1
scripts/databroker.sh stop
The integration tests cover the speed read and stream, a missing mapping, and the HVAC actuator and provider round trip. See Quickstart for Databroker 0.7.2.
To test TLS and JWT against a native Databroker 0.7.2 release binary and its release-matched VSS file, run the following with OpenSSL and Python 3 available:
scripts/test-databroker-auth.sh /path/to/databroker /path/to/vss_release_6.0.jsonThe script generates disposable credentials, starts the broker on a temporary loopback port, and cleans up the broker and credentials after the test.
Both APIs are vendored, pinned and unmodified (proto/PROVENANCE.md): AOSP's VehicleServer.proto and Vehicle
HAL types from android17-release (AAOS 26Q2, API level 37), and Kuksa's kuksa.val.v2 from the databroker 0.7.1
release.
Apache-2.0. See LICENSE and NOTICE.