اعتبارًا من 27 آذار (مارس) 2025، ننصحك باستخدام android-latest-release
بدلاً من aosp-main
لإنشاء AOSP والمساهمة فيه. لمزيد من المعلومات، يُرجى الاطّلاع على التغييرات في AOSP.
تصحيح أخطاء VHAL
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
يمكنك استخدام التعليمات التالية لتفريغ معلومات تصحيح أخطاء VHAL. يؤدي ذلك إلى استدعاء dump()
في واجهة VHAL، والتي لا يتم إدراجها في الواجهة ولكن يتم اكتسابها
بشكل ضمني لجميع خدمات AIDL، مع جميع الوسيطات الإضافية المقدَّمة في الأمر.
adb root && adb shell dumpsys android.hardware.automotive.vehicle.IVehicle/default
استخدِم الأمر التالي لعرض أوامر تصحيح الأخطاء المتوافقة مع مرجع VHAL:
adb root && adb shell dumpsys android.hardware.automotive.vehicle.IVehicle/default --help
على سبيل المثال، يتيح معيار VHAL المرجعي قراءة قيمة سمة
(مثل INFO_VIN
) من خلال:
adb root && adb shell dumpsys android.hardware.automotive.vehicle.IVehicle/default --get INFO_VIN
أو
adb root && adb shell dumpsys android.hardware.automotive.vehicle.IVehicle/default --get 0x11100100
لضبط قيمة سمة، استخدِم --set
، على سبيل المثال، لضبط SEAT_MEMORY_SELECT
لرقم تعريف المنطقة: ROW_1_LEFT
على القيمة 1
:
adb root && adb shell dumpsys android.hardware.automotive.vehicle.IVehicle/default --set SEAT_MEMORY_SELECT -a ROW_1_LEFT -i 1
بالنسبة إلى HIDL VHAL، استخدِم:
adb root && adb shell lshal debug android.hardware.automotive.vehicle@2.0::IVehicle/default
يمكنك أيضًا استخدام اختبار VTS،
VtsHalAutomotiveVehicle_TargetTest
،
للتحقّق من صحة تنفيذ VHAL. يتم تخطّي أيّ من حالتَي الاختبار، useAidlBackend
أو
useHidlBackend
، في حال عدم توفّر الخلفية المحدّدة. يمكن أيضًا تخطّي بعض الاختبارات
لنظام التشغيل AIDL أو HIDL في الخلفية إذا لم يكن نظام التشغيل في الخلفية يتيح هذه الميزة.
يتحقق اختبار VTS من أنّ جميع إعدادات خصائص النظام المتوافقة صحيحة. ويعمل أيضًا على
التحقّق من عمليات VHAL الأساسية للخصائص المتوافقة.
يخضع كل من المحتوى وعيّنات التعليمات البرمجية في هذه الصفحة للتراخيص الموضحّة في ترخيص استخدام المحتوى. إنّ 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,["# Debug VHAL\n\nYou can use the following instructions to dump VHAL debug information. This calls the\n`dump()` method in the VHAL interface, which isn't listed in the interface but is\nimplicitly inherited for all AIDL services, with all the additional arguments provided in the\ncommand. \n\n```\nadb root && adb shell dumpsys android.hardware.automotive.vehicle.IVehicle/default\n```\n\nUse the following command to list the supported debug commands for the reference VHAL: \n\n```\nadb root && adb shell dumpsys android.hardware.automotive.vehicle.IVehicle/default --help\n```\n\nFor example, the reference VHAL supports reading a property value\n(such as `INFO_VIN`) through: \n\n```\nadb root && adb shell dumpsys android.hardware.automotive.vehicle.IVehicle/default --get INFO_VIN\n```\nor \n\n```\nadb root && adb shell dumpsys android.hardware.automotive.vehicle.IVehicle/default --get 0x11100100\n```\n\nTo set a property value, use `--set`, for example, to set `SEAT_MEMORY_SELECT`\nfor the area ID: `ROW_1_LEFT` to value `1`: \n\n```\nadb root && adb shell dumpsys android.hardware.automotive.vehicle.IVehicle/default --set SEAT_MEMORY_SELECT -a ROW_1_LEFT -i 1\n```\n\nFor the HIDL VHAL, use: \n\n```\nadb root && adb shell lshal debug android.hardware.automotive.vehicle@2.0::IVehicle/default\n```\n\nYou can also use the VTS test,\n[`VtsHalAutomotiveVehicle_TargetTest`](https://android.googlesource.com/platform/hardware/interfaces/+/refs/heads/android16-release/automotive/vehicle/vts/src/VtsHalAutomotiveVehicle_TargetTest.cpp),\nto verify your VHAL implementation. Either test case, `useAidlBackend` or\n`useHidlBackend`, is skipped if the specific backend isn't available. Some tests\ncan also be skipped for the AIDL or HIDL backend if the backend doesn't support this feature.\n\nThe VTS test verifies all supported system properties has correct configurations. It also\nverifies basic VHAL operations for supported properties."]]