A partire dal 27 marzo 2025, ti consigliamo di utilizzare android-latest-release
anziché aosp-main
per compilare e contribuire ad AOSP. Per ulteriori informazioni, vedi Modifiche ad AOSP.
Esegui il debug di VHAL
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Puoi utilizzare le seguenti istruzioni per eseguire il dump delle informazioni di debug VHAL. Viene chiamato il metodo dump()
nell'interfaccia VHAL, che non è elencato nell'interfaccia, ma viene ereditato implicitamente per tutti i servizi AIDL, con tutti gli argomenti aggiuntivi forniti nel comando.
adb root && adb shell dumpsys android.hardware.automotive.vehicle.IVehicle/default
Utilizza il seguente comando per elencare i comandi di debug supportati per il VHAL di riferimento:
adb root && adb shell dumpsys android.hardware.automotive.vehicle.IVehicle/default --help
Ad esempio, il VHAL di riferimento supporta la lettura di un valore della proprietà
(ad esempio INFO_VIN
) tramite:
adb root && adb shell dumpsys android.hardware.automotive.vehicle.IVehicle/default --get INFO_VIN
oppure
adb root && adb shell dumpsys android.hardware.automotive.vehicle.IVehicle/default --get 0x11100100
Per impostare un valore della proprietà, utilizza --set
, ad esempio per impostare SEAT_MEMORY_SELECT
per l'ID area: ROW_1_LEFT
sul valore 1
:
adb root && adb shell dumpsys android.hardware.automotive.vehicle.IVehicle/default --set SEAT_MEMORY_SELECT -a ROW_1_LEFT -i 1
Per HIDL VHAL, utilizza:
adb root && adb shell lshal debug android.hardware.automotive.vehicle@2.0::IVehicle/default
Puoi anche utilizzare il test VTS,
VtsHalAutomotiveVehicle_TargetTest
,
per verificare l'implementazione di VHAL. Il test case useAidlBackend
o
useHidlBackend
viene ignorato se il backend specifico non è disponibile. Alcuni test possono essere saltati anche per il backend AIDL o HIDL se il backend non supporta questa funzionalità.
Il test VTS verifica che tutte le proprietà di sistema supportate abbiano configurazioni corrette. Inoltre, verifica le operazioni VHAL di base per le proprietà supportate.
I campioni di contenuti e codice in questa pagina sono soggetti alle licenze descritte nella Licenza per i contenuti. Java e OpenJDK sono marchi o marchi registrati di Oracle e/o delle sue società consociate.
Ultimo aggiornamento 2025-07-26 UTC.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Mancano le informazioni di cui ho bisogno","missingTheInformationINeed","thumb-down"],["Troppo complicato/troppi passaggi","tooComplicatedTooManySteps","thumb-down"],["Obsoleti","outOfDate","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Problema relativo a esempi/codice","samplesCodeIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-07-26 UTC."],[],[],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."]]