-
Notifications
You must be signed in to change notification settings - Fork 0
serp vhal
serp-vhal — a SERP-generated VHAL (Vehicle Hardware Abstraction Layer) for Android Automotive OS (AAOS).
The project bridges SERP vehicle services to the AAOS AIDL VHAL interface. SERP services own vehicle state (speed, gear, HVAC, night mode); a generated VehicleHardwareAdapter translates SERP Property::connect() callbacks into AIDL onPropertyEvent calls that CarService consumes. The service interfaces, adapter, and process entry point are all generated from SerpIDL specs — only simulation logic is hand-written.
This project was built end-to-end with AI assistance through the SERP AI-driven workflow.
- Generating a real AAOS VHAL from SerpIDL specs and
serpgen - Bridging SERP property change events to the AIDL VHAL protocol
- Running SERP services on an Android Automotive emulator without any framework modifications
- Simulating live vehicle data visible in standard AAOS system apps
SERP vehicle services
│ Property::mutate() / connect()
▼
VehicleHardwareAdapter (generated SERP ↔ AIDL bridge)
│ onPropertyChangeEvent
▼
SerpVehicleService (AIDL BnVehicle)
│ Binder IPC
▼
CarService (AAOS)
│ CarPropertyManager / CarHvacManager
▼
AAOS system apps
| Service | Simulated behavior |
|---|---|
| VehicleChassis | Speed 0 → 120 km/h, step 5 every 2 s |
| VehicleDriving | Gear P → N → D every 10 s; Night mode day/night toggle every 90 s |
| VehicleHvac | Cabin temperature 16 → 28 → 16 °C every 10 s |
| VehicleEngine | Static initial values |
| VehicleBody / VehicleLights / VehicleAdas | Static initial values |
| VehicleInfo | Static VIN, make, model, year |
REVERSE gear is excluded — it triggers the EVS camera in AAOS which crashes the emulator.
The VHAL binary registers as android.hardware.automotive.vehicle and is pushed to /vendor/bin/hw/. CarService connects automatically after the service restarts.
# Build (requires SERP AAOS SDK and Android NDK)
SERP_AAOS_SDK=/path/to/sdk ./scripts/build.sh --android
# Push to connected AAOS emulator / device (requires adb root)
./scripts/push.sh
# Tail VHAL logcat
./scripts/run.sh --androidAfter deployment, CarService connects and all AAOS vehicle-aware apps receive live data:
# Speed changing every 2 seconds
adb shell cmd car_service get-property-value 0x11600207 0
# Night mode toggling every 90 seconds — switches the entire AAOS UI theme
adb shell cmd car_service get-property-value 0x11200407 0
# Gear cycling P / N / D
adb shell cmd car_service get-property-value 0x11400400 0| Path | Contents |
|---|---|
specs/serp.sidl |
Workspace root |
specs/services/ |
Service interface and service specs |
specs/deployments/ |
AAOS POSIX and gRPC deployment specs |
src/services/ |
Simulation logic (hand-written, survives regeneration) |
build/gen/aaos/ |
Generated AAOS adapter and AIDL bridge |
scripts/ |
Build, push, run, stop helpers |
- serp-src — SERP framework, generator, and AAOS SDK
- Android NDK r27+
- AAOS emulator or device with root access
- Deployment Configurations — AAOS as a deployment target
- Transports — POSIX and DBus transports used by the VHAL
-
Generator Overview — how
serpgenproduces the AAOS adapter - serp-mini-ivi — full IVI platform demonstration
Getting Started
The Development Model
Architecture Language
Code Generator
- Generator Overview
- Generated Code Layout
- Deployment Configurations
- Lifecycle Backends
- CMake Integration
Framework Internals
- Core Concepts
- Services & Lifecycle
- Methods
- Properties
- Notifications
- Timers & Watchdog
- Promises & Async
- Streams
- Commands
- Logging
- Test Engine
- Transports
- Runtime & Debug Tools
VS Code Plugin
Examples