文件配置: 1.配置carservice
- Download attachment: android.hardware.automotive.vehicle@2.0-service
- Input Shell Command: adb root
- Input Shell Command: adb remount
- Input Shell Command: adb push android.hardware.automotive.vehicle@2.0-service /vendor/bin/hw/
- Input Shell Command: adb reboot
New Vehicle Properties should take effect and ready for use after emlautor reboot
2.配置json脚本
- 将脚本car_adp_test.json导入adb push json file to /data/local/tmp/
- adb shell setenforce 0
然后执行脚本调试命令: lshal debug android.hardware.automotive.vehicle@2.0::IVehicle --set 0x21e00666 -i 2 -s /data/local/tmp/car_adp_test.json
如果需要单个调试,配置完第一步后,执行,
- adb root
- adb remount
- adb shell setenforce 0
- lshal debug android.hardware.automotive.vehicle@2.0::IVehicle --set -i
id如下: const val Vehicle_Camera_LRCF1_ID = 0x2140A200 const val Vehicle_Camera_FVCM_ID = 0x2140A201 const val Vehicle_Camera_RVCM2_ID = 0x2140A202 const val Vehicle_Camera_LTCM_ID = 0x2140A203 const val Vehicle_Camera_RTCM_ID = 0x2140A204 const val Vehicle_Sensor_LRRF_ID = 0x2140A205 const val Vehicle_Sensor_MRRFL_ID = 0x2140A206 const val Vehicle_Sensor_MRRFR_ID = 0x2140A207 const val Vehicle_Sensor_MRRRL_ID = 0x2140A208 const val Vehicle_Sensor_MRRRR_ID = 0x2140A209
车辆行驶状态id:
const val VEHICLE_GEAR_SELECTION = 289408000//car parking or driving
camera value对应如下 0 => UNKNOWN 1 => WORKING 2 => PROBLEMATIC_DIRTY 3 => PROBLEMATIC_FAULTY 车辆行驶状态如下 2 R档 1 N 4 D 8 P
比如修改Vehicle_Camera_LRCF1_ID的sensor状态为working状态: lshal debug android.hardware.automotive.vehicle@2.0::IVehicle –set 0x2140A200 –i 2 修改汽车行驶状态为P档: lshal debug android.hardware.automotive.vehicle@2.0::IVehicle –set 289408000 –i 8
ps: 当然我这是在31即android12上的CarService环境,如果是30的话push进去会开不了机一直报错。
|