[null,null,["最后更新时间 (UTC):2025-07-26。"],[],[],null,["# Reference platform\n\nThrough a new product named `trout`, Android Automotive (AAOS) now provides support\nfor deployment as a guest virtual machine (VM) in environments compatible with the\n[VirtIO](https://github.com/oasis-tcs/virtio-spec)\nstandard. `trout` is based on the\n[Cuttlefish](/docs/devices/cuttlefish)\nvirtual reference platform and is available as the `trout` device configuration. The\nuserspace source code can be found at `device/google/trout`. The table\nbelow describes the technology used to virtualize each of the subsystems in `trout`.\n| The current release of `trout` is version 1.1 and is based on Android 13 QPR1.\n\n| Feature | Technology |\n|------------------------------------------------------------------------------------------------|-----------------------|\n| [Audio Control HAL](/docs/automotive/virtualization/architecture#audio) | `vsock/gRPC` |\n| [Audio HAL](/docs/automotive/virtualization/architecture#audio) | `virtio-snd` |\n| [Bluetooth](/docs/automotive/virtualization/architecture#bt) | `virtio-console` |\n| [Dumpstate HAL](/docs/automotive/virtualization/architecture#dumpstate) | `vsock/gRPC` |\n| [Extended View System (EVS)](/docs/automotive/virtualization/architecture#evs) | `virtio-video` |\n| [Garage mode](/docs/automotive/virtualization/architecture#garage) | `vsock/gRPC` |\n| [Graphics](/docs/automotive/virtualization/architecture#graphics) | `virtio-gpu` |\n| [Global navigation satellite system (GNSS)](/docs/automotive/virtualization/architecture#gnss) | `virtio-console` |\n| [Sensor HAL 2.0](/docs/automotive/virtualization/architecture#sensor-hal) | `virtio-scmi and IIO` |\n| [Touchscreen input](/docs/automotive/virtualization/architecture#other) | `virtio-input` |\n| [Vehicle HAL](/docs/automotive/virtualization/architecture#vehicle-hal) | `vsock/gRPC` |\n\nExtend trout\n------------\n\n`trout` can be used as a starting point to create new In-Vehicle Infotainment (IVI)\nAndroid targets. The build infrastructure is designed to be extended and customized.\nFor example: \n\n```\n# Inherit trout-arm64 default values and settings\n$(call inherit-product, device/google/trout/aosp_trout_arm64.mk)\n\n# Customize HALs as needed\nLOCAL_VHAL_PRODUCT_PACKAGE := vendor.oem.vhal@2.0-service\nLOCAL_AUDIO_PRODUCT_PACKAGE := vendor.oem.audio@6.0-impl\n\n# Configure SELinux policy\nBOARD_SEPOLICY_DIRS += device/oem/car/sepolicy/vendor/oem\n\n# Configure properties\nLOCAL_DUMPSTATE_PROPERTIES := \\\n ro.vendor.dumpstate.server.cid=22 \\\n ro.vendor.dumpstate.server.port=406 \\\n ro.vendor.helpersystem.log_loc=/data/dumpstate\n\n[... and more as needed ...]\n```\n\nSeveral Android HALs can be individually replaced with custom implementations, or the\ndefault implementations maintained but certain configuration parameters adjusted to establish\nproper inter-VM communication in the target environment. These HALs (including Vehicle HAL,\nAudio Control HAL, and Dumpstate HAL) are implemented by means of a gRPC interface backed by a\n`vsock` connection between the AAOS guest and a host system providing the\nunderlying feature implementation. These must be configured by means of supplying the proper\n`vsock` connection parameters as vendor properties. The source code acts as the ultimate\nground truth on which properties are available for configuration and their semantics.\n\nBuild trout\n-----------\n\n### Compile the userspace\n\nTo compile the userspace:\n\n1. Download the Android source tree: \n\n ```\n repo init -u https://android.googlesource.com/platform/manifest -b main\n repo sync -j8\n ```\n2. Build the environment: \n\n ```\n source build/envsetup.sh\n lunch aosp_trout_arm64-userdebug\n make -j24\n ```\n\nBuild the kernel\n----------------\n\nFor `trout` 1.1, the kernel codebase is provided in AOSP. The `trout`\nkernel is composed of the same code as the upstream ACK 5.10, with the addition of\n`trout`-specific modules for VirtIO subsystems.\n\n1. To clone the kernel, run: \n\n ```\n repo init https://android.googlesource.com/kernel/manifest -b trout-android12-5.10 && repo sync\n ```\n2. To build the kernel run: \n\n ```\n BUILD_CONFIG=common-modules/virtual-device/build.config.trout.coqos build/build.sh\n ```\n\nYour hypervisor supplier might have a different kernel configuration required or additional\nmodules that need to be compiled. Be sure to follow this specific guidance, if provided.\n\nCompliance\n----------\n\nWhen AAOS runs as a guest VM, our goal is to be a compatible Android deployment from the\nframework perspective. Host side issues are the purview of each implementation and outside the\nscope of `trout` 1.1.\n\nWe haven't performed additional xTS validation on `trout` 1.1. Continue\nto refer to the below discussion of CTS support in `trout` 1.0.\n\nIn `trout` 1.0, several CTS issues remain. The following CTS modules are known to\ninclude test failures:\n\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| CtsStagedInstallHostTestCases CtsRollbackManagerHostTestCases CtsVideoTestCases CtsHostsideNetworkTests CtsActivityManagerBackgroundActivityTestCases CtsAdbHostTestCases CtsNativeHardwareTestCases CtsContentTestCases CtsCarHostTestCases CtsOsTestCases CtsStatsdHostTestCases CtsVoiceInteractionTestCases CtsViewTestCases CtsCameraTestCases CtsLocationGnssTestCases CtsGraphicsTestCases CtsIncidentHostTestCases CtsInstallHostTestCases CtsNativeVerifiedBootTestCases CtsNetTestCases | CtsWindowManagerDeviceTestCases CtsMediaStressTestCases CtsAppTestCases CtsUsbTests CtsAutoFillServiceTestCases CtsDisplayTestCases CtsMediaTestCases CtsDeqpTestCases CtsDumpsysHostTestCases CtsOpenGLTestCasesCtsLibcoreTestCases CtsSecurityHostTestCases CtsInputMethodTestCases CtsStatsdAtomHostTestCases CtsPermission4TestCases CtsNNAPIBenchmarkTestCases CtsSimpleperfTestCases CtsAccessibilityTestCases CtsAppSecurityHostTestCases CtsKeystoreTestCases |\n\nThe following CTS-V areas are known to include test failures:\n\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Car Launcher test Bluetooth Low Energy (BLE) Advertiser test Streaming Video Quality Verifier Bluetooth HID Device test Hifi Ultrasound Microphone test Hifi Ultrasound Speaker test | Unlocked Device Required test Dynamic Sensor Discovery test Off Body Sensor test Significant Motion test Audio Output Routing Notification test Network Request or Suggestion test |\n\nRelease notes\n-------------\n\n`trout` 1.1 contains the following known issues:\n\n- User builds of `trout` aren't available. The system is built as `-userdebug`, which can affect some CTS tests.\n- Android Verified Boot (AVB) isn't supported.\n- Some Android subsystems might be unavailable, including secure world and NNHAL.\n- Guest network access is generally provided by means of a virtualized Wi-Fi adapter and a `virtio-net` tunnel. Host-side connectivity depends on your specific hypervisor deployment.\n- Some implementations might offer limited or no Bluetooth capability.\n- A VHAL event injection might not work for some sensors.\n- Some heavy workloads can cause audio playback glitches.\n- In some implementations, adb reboot of the AAOS guest might reboot the entire system.\n- STS can cause system instability and require a reboot.\n\nFor additional details, refer to the partner release notes for your specific deployment of\n`trout`."]]