از 27 مارس 2025، توصیه می کنیم از android-latest-release به جای aosp-main برای ساختن و کمک به AOSP استفاده کنید. برای اطلاعات بیشتر، به تغییرات AOSP مراجعه کنید.
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
از طریق یک محصول جدید به نام trout ، Android Automotive (AAOS) اکنون از استقرار به عنوان ماشین مجازی مهمان (VM) در محیطهای سازگار با استاندارد VirtIO پشتیبانی میکند. trout بر اساس پلت فرم مرجع مجازی Cuttlefish است و به عنوان پیکربندی دستگاه trout در دسترس است. کد منبع فضای کاربران را میتوانید در device/google/trout پیدا کنید. جدول زیر فناوری مورد استفاده برای مجازی سازی هر یک از زیرسیستم ها در trout را توضیح می دهد.
trout می توان به عنوان نقطه شروع برای ایجاد اهداف اندرویدی جدید In-Vehicle Infotainment (IVI) استفاده کرد. زیرساخت ساخت به گونه ای طراحی شده است که توسعه یافته و سفارشی شود. به عنوان مثال:
# Inherit trout-arm64 default values and settings
$(call inherit-product, device/google/trout/aosp_trout_arm64.mk)
# Customize HALs as needed
LOCAL_VHAL_PRODUCT_PACKAGE := vendor.oem.vhal@2.0-service
LOCAL_AUDIO_PRODUCT_PACKAGE := vendor.oem.audio@6.0-impl
# 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 ...]
چندین HAL Android را میتوان بهصورت جداگانه با پیادهسازیهای سفارشی جایگزین کرد، یا پیادهسازیهای پیشفرض را حفظ کرد، اما پارامترهای پیکربندی خاصی را برای برقراری ارتباط بین VM مناسب در محیط هدف تنظیم کرد. این HALها (شامل Vehicle HAL، Audio Control HAL و Dumpstate HAL) با استفاده از یک رابط gRPC که توسط یک اتصال vsock بین مهمان AAOS و یک سیستم میزبان که اجرای ویژگی اساسی را ارائه میکند، پیادهسازی میشوند. اینها باید با ارائه پارامترهای اتصال vsock مناسب به عنوان ویژگی های فروشنده پیکربندی شوند. کد منبع به عنوان حقیقت پایه ای نهایی عمل می کند که ویژگی ها برای پیکربندی و معنای آنها در دسترس هستند.
ساخت قزل آلا
فضای کاربران را کامپایل کنید
برای کامپایل فضای کاربری:
درخت منبع اندروید را دانلود کنید:
repo init -u https://android.googlesource.com/platform/manifest -b main
repo sync -j8
محیط را بسازید:
source build/envsetup.sh
lunch aosp_trout_arm64-userdebug
make -j24
هسته را بسازید
برای trout 1.1، پایگاه کد هسته در AOSP ارائه شده است. هسته trout از همان کد ACK 5.10 بالادست تشکیل شده است، با اضافه شدن ماژول های مخصوص trout برای زیرسیستم های VirtIO.
تامین کننده هایپروایزر شما ممکن است پیکربندی هسته دیگری مورد نیاز یا ماژول های اضافی داشته باشد که باید کامپایل شوند. در صورت ارائه، حتماً از این راهنمایی خاص پیروی کنید.
انطباق
هنگامی که AAOS به عنوان یک VM مهمان اجرا می شود، هدف ما این است که از منظر چارچوب یک استقرار Android سازگار باشد. مسائل جانبی میزبان در حوزه هر اجرا و خارج از محدوده trout 1.1 است.
ما اعتبار سنجی xTS اضافی را در trout 1.1 انجام نداده ایم. به بحث زیر در مورد پشتیبانی CTS در trout 1.0 مراجعه کنید.
در trout 1.0، چندین مشکل CTS باقی مانده است. ماژولهای CTS زیر شامل خطاهای تست میشوند:
تست مورد نیاز دستگاه باز شده تست کشف سنسور دینامیک تست سنسور خارج از بدن تست حرکت مهم تست اعلان مسیریابی خروجی صدا تست درخواست یا پیشنهاد شبکه
یادداشت های انتشار
trout 1.1 شامل مسائل شناخته شده زیر است:
ساخت کاربر از trout در دسترس نیست. این سیستم بهعنوان -userdebug ساخته شده است که میتواند بر برخی آزمایشهای CTS تأثیر بگذارد.
Android Verified Boot (AVB) پشتیبانی نمیشود.
ممکن است برخی از زیرسیستمهای Android از جمله دنیای امن و NNHAL در دسترس نباشند.
دسترسی به شبکه مهمان عموماً با استفاده از یک آداپتور Wi-Fi مجازی و یک تونل virtio-net ارائه می شود. اتصال سمت میزبان به استقرار هایپروایزر خاص شما بستگی دارد.
برخی از پیاده سازی ها ممکن است قابلیت بلوتوث محدود یا بدون آن را ارائه دهند.
تزریق رویداد VHAL ممکن است برای برخی از سنسورها کار نکند.
برخی از بارهای کاری سنگین می تواند باعث اختلال در پخش صدا شود.
در برخی از پیاده سازی ها، راه اندازی مجدد adb مهمان AAOS ممکن است کل سیستم را راه اندازی مجدد کند.
STS می تواند باعث بی ثباتی سیستم شود و نیاز به راه اندازی مجدد داشته باشد.
برای جزئیات بیشتر، به یادداشت های انتشار شریک برای استقرار خاص trout مراجعه کنید.
محتوا و نمونه کدها در این صفحه مشمول پروانههای توصیفشده در پروانه محتوا هستند. جاوا و OpenJDK علامتهای تجاری یا علامتهای تجاری ثبتشده Oracle و/یا وابستههای آن هستند.
تاریخ آخرین بهروزرسانی 2025-07-29 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2025-07-29 بهوقت ساعت هماهنگ جهانی."],[],[],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`."]]