Car开发之信号调试文档

文件配置:
1.配置carservice

  1. Download attachment: android.hardware.automotive.vehicle@2.0-service
  2. Input Shell Command: adb root
  3. Input Shell Command: adb remount
  4. Input Shell Command: adb push android.hardware.automotive.vehicle@2.0-service /vendor/bin/hw/
  5. Input Shell Command: adb reboot
    New Vehicle Properties should take effect and ready for use after emlautor reboot

2.配置json脚本

  1. 将脚本car_adp_test.json导入adb push json file to /data/local/tmp/
  2. 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

如果需要单个调试,配置完第一步后,执行,

  1. adb root
  2. adb remount
  3. adb shell setenforce 0
  4. 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进去会开不了机一直报错。

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值