اعتبارًا من 27 آذار (مارس) 2025، ننصحك باستخدام android-latest-release بدلاً من aosp-main لإنشاء AOSP والمساهمة فيه. لمزيد من المعلومات، يُرجى الاطّلاع على التغييرات في AOSP.
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
من خلال منتج جديد باسم trout، يقدّم نظام التشغيل Android Automotive (AAOS) الآن دعمًا
للنشر كجهاز افتراضي ضيف (VM) في البيئات المتوافقة مع معيار
VirtIO. يستند trout إلى منصّة مرجعية افتراضية تدعى
Cuttlefish
، وهو متاح كإعدادات جهاز trout. يمكن العثور على رمز مصدر
مساحة المستخدم على الرابط device/google/trout. يصف الجدول التالي
التكنولوجيا المستخدَمة لإنشاء محاكاة افتراضية لكل نظام فرعي في trout.
يمكن استخدام trout كنقطة بداية لإنشاء استهدافات جديدة لنظام Android في أنظمة الترفيه والمعلومات داخل المركبات (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 بشكلٍ فردي بعمليات تنفيذ مخصّصة، أو الحفاظ على
عمليات التنفيذ التلقائية مع تعديل بعض مَعلمات الضبط لإنشاء
اتصال سليم بين الأجهزة الافتراضية في البيئة المستهدَفة. يتم تنفيذ واجهات HAL هذه (بما في ذلك Vehicle HAL و
Audio Control HAL وDumpstate HAL) من خلال واجهة gRPC مدعومة بربط
vsock بين نظام التشغيل الضيف AAOS والنظام المضيف الذي يقدّم
تنفيذ الميزة الأساسية. ويجب ضبط هذه الإعدادات من خلال تقديم
vsock مَعلمات الاتصال المناسبة كخصائص المورّد. يعمل الرمز المصدر بمثابة
الحقيقة الأساسية التي تحدّد المواقع التي تتوفّر لها إمكانية الضبط ودلالاتها.
إنشاء سمك السلمون المرقط
تجميع مساحة المستخدم
لتجميع مساحة المستخدم:
نزِّل شجرة مصدر Android:
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
إنشاء النواة
بالنسبة إلى الإصدار 1.1 من trout، يتم توفير قاعدة بيانات رمز kernel في AOSP. يتألّف نواة trout
من الرمز نفسه المستخدَم في الإصدار 5.10 من ACK، بالإضافة إلى وحدات
خاصة بنظام التشغيل trout للأنظمة الفرعية VirtIO.
قد يطلب موفّر نظام التشغيل الظاهري إعدادًا مختلفًا للنواة أو وحدات إضافية
يجب تجميعها. احرص على اتّباع هذه الإرشادات المحدّدة، إذا تم تقديمها.
الامتثال
عند تشغيل AAOS كجهاز افتراضي ضيف، هدفنا هو أن يكون الإصدار متوافقًا مع Android من ناحية
الإطار العمل. إنّ المشاكل على جانب المضيف هي من اختصاص كل عملية تنفيذ وخارج نطاق
trout 1.1.
لم نُجري عملية تحقّق إضافية من xTS في الإصدار trout 1.1. يُرجى المتابعة
للاطّلاع على المناقشة أدناه حول توافق CTS في الإصدار trout 1.0.
في الإصدار 1.0 من trout، لا تزال هناك عدة مشاكل في CTS. من المعروف أنّ وحدات CTS التالية
تتضمّن حالات تعذُّر الاختبار:
من المعروف أنّ مناطق CTS-V التالية تتضمّن حالات تعذُّر اجتياز الاختبار:
اختبار مشغّل السيارة
الاختبار الخاص بالمعلِنين الذين يستخدمون تقنية Bluetooth منخفضة الطاقة (BLE)
أداة التحقّق من جودة الفيديوهات البث
الاختبار الخاص بجهاز HID عبر البلوتوث
الاختبار الخاص بجودة الميكروفون الصوتي الفائق الجودة
الاختبار الخاص بجودة مكبّر الصوت الصوتي الفائق الجودة
اختبار الجهاز غير المقفل
الاختبار الخاص باكتشاف أداة الاستشعار الديناميكية
الاختبار الخاص بأداة الاستشعار التي لا تكون على الجسم
الاختبار الخاص بالحركة الكبيرة
الاختبار الخاص بإشعار توجيه إخراج الصوت
الاختبار الخاص بطلب الشبكة أو الاقتراح
ملاحظات الإصدار
تتضمّن الإصدار trout 1.1 المشاكل المعروفة التالية:
لا تتوفّر إصدارات المستخدمين من trout. تم تصميم النظام على أنّه
-userdebug، ما قد يؤثر في بعض اختبارات CTS.
ميزة "التمهيد التحقق من Android" (AVB) غير متاحة.
قد لا تكون بعض الأنظمة الفرعية لنظام Android متاحة، بما في ذلك "الوضع الآمن" وNNHAL.
يتم توفير إمكانية الوصول إلى شبكة الضيوف بشكل عام من خلال محوِّل Wi-Fi افتراضي و
نفق virtio-net. يعتمد الاتصال من جهة المضيف على عملية نشر نظام التشغيل الافتراضي المحدّدة.
قد توفّر بعض عمليات التنفيذ إمكانية استخدام البلوتوث بشكل محدود أو لا توفّرها على الإطلاق.
قد لا تعمل ميزة "إدخال أحداث VHAL" مع بعض أدوات الاستشعار.
يمكن أن تؤدي بعض أعباء العمل الثقيلة إلى حدوث أعطال في تشغيل الصوت.
في بعض عمليات التنفيذ، قد تؤدي إعادة التشغيل باستخدام adb لضيف AAOS إلى إعادة تشغيل النظام بالكامل.
يمكن أن يؤدي STS إلى عدم استقرار النظام ويتطلّب إعادة تشغيله.
للحصول على تفاصيل إضافية، يُرجى الرجوع إلى ملاحظات الإصدار المخصّصة للشركاء لنشر
trout.
يخضع كل من المحتوى وعيّنات التعليمات البرمجية في هذه الصفحة للتراخيص الموضحّة في ترخيص استخدام المحتوى. إنّ Java وOpenJDK هما علامتان تجاريتان مسجَّلتان لشركة Oracle و/أو الشركات التابعة لها.
تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","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-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`."]]