คุณสามารถใช้คำแนะนำต่อไปนี้เพื่อถ่ายโอนข้อมูลการดีบัก 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 0x11100100
สำหรับ HIDL VHAL ให้ใช้:
adb root && adb shell lshal debug android.hardware.automotive.vehicle@2.0::IVehicle/default
คุณยังสามารถใช้การทดสอบ VTS VtsHalAutomotiveVehicle_TargetTest
เพื่อตรวจสอบการใช้งาน VHAL ของคุณ กรณีทดสอบ useAidlBackend
หรือ useHidlBackend
จะถูกข้ามไปหากไม่มีแบ็กเอนด์เฉพาะ การทดสอบบางอย่างสามารถข้ามได้สำหรับแบ็กเอนด์ AIDL หรือ HIDL หากแบ็กเอนด์ไม่รองรับฟีเจอร์นี้