Through a new product entitled trout, Android Automotive OS (AAOS) now provides support for deployment as a guest virtual machine in environments compatible with the VirtIO standard. trout is based on the Cuttlefish virtual reference platform and is available as the trout device configuration. The userspace source code can be found at device/google/trout.

Getting Started

trout can be directly compiled for x86 (aosp_trout_x86) and arm64 (aosp_trout_arm64) and launched, with limited functionality, through launch_cvd in the same way other Cuttlefish-based images are launched.


trout includes most Android Automotive OS functionality, namely:

Feature Technology
Audio Control HAL vsock/gRPC
Dumpstate HAL vsock/gRPC
Extended View System (EVS) virtio-video and vendor extensions
Garage Mode vsock/gRPC
Graphics virtio-gpu
Sensor HAL 2.0 virtio-scmi and IIO
Touchscreen input virtio-input
Vehicle HAL vsock/gRPC

More related techhologies will be provided in future releases, including audio and Arm TrustZone integration. Support for connectivity features (such as Broadcast Radio, Wi-Fi, and Bluetooth) is limited in trout as each depends on pass-throughs specific to actual hardware. Android Common Kernel includes provisions for a VirtWiFi network that can be used to establish a tunnel.

Extending trout

trout can be used as a starting point to create new In-Vehicle Infotainment (IVI) Android targets. The build infrastructure is designed to be extended and customized. For example:

# Inherit trout-arm64 default values and settings
$(call inherit-product, device/google/trout/

# Customize HALs as needed LOCAL_VHAL_PRODUCT_PACKAGE := vendor.oem.vhal@2.0-service LOCAL_AUDIO_PRODUCT_PACKAGE :=
# Configure SELinux policy BOARD_SEPOLICY_DIRS += device/oem/car/sepolicy/vendor/oem
# Configure properties LOCAL_DUMPSTATE_PROPERTIES := \ ro.vendor.dumpstate.server.cid=22 \ ro.vendor.dumpstate.server.port=406 \ ro.vendor.helpersystem.log_loc=/data/dumpstate
[... and more as needed ...]

Several Android HALs can be individually replaced with custom implementations, or the default implementations maintained but certain configuration parameters adjusted to establish proper inter-VM communication in the target environment. These HALs (including Vehicle HAL, Audio Control HAL, and Dumpstate HAL) are implemented by means of a gRPC interface backed by a vsock connection between the AAOS guest and a host system providing the underlying feature implementation. These must be configured by means of supplying the proper vsock connection parameters as vendor properties.

Validating trout

While the CDD is being updated to address virtualization, scenarios may vary depending upon the actual deployment of AAOS.