از 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 را برای ویژگی های پشتیبانی شده تأیید می کند.
محتوا و نمونه کدها در این صفحه مشمول پروانههای توصیفشده در پروانه محتوا هستند. جاوا و 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,["# 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."]]