最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to add custom VHAL properties in Android Automotive 14 - Stack Overflow

programmeradmin0浏览0评论

I have added in the below following path:

  1. hardware/interfaces/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h

    const ConfigDeclaration kVehicleProperties[]{ { .config = { .prop = VENDOR_WRITE_PROP, .access = VehiclePropertyAccess::READ_WRITE, .changeMode = VehiclePropertyChangeMode::ON_CHANGE }, .initialValue = {.int32Values = {123}}},

    //other props }

2.hardware/interfaces/automotive/vehicle/aidl/impl/utils/test_vendor_properties/android/hardware/automotive/vehicle/TestVendorProperty.aidl

VENDOR_WRITE_PROP = 0x105 + 0x20000000 + 0x03000000 + 0x00400000,
  1. hardware/interfaces/automotive/vehicle/2.0/default/impl/vhal_v_2_0/PropertyUtils.h

    constexpr int VENDOR_WRITE_PROP = (int)(0x105 | VehiclePropertyGroup::VENDOR | VehiclePropertyType::STRING | VehicleArea::GLOBAL);

4.hardware/interfaces/automotive/vehicle/aidl/impl/utils/test_vendor_properties/android/hardware/automotive/vehicle/TestVendorProperties.json

  { "property": "TestVendorProperty::VENDOR_WRITE_PROP", "defaultValue": { "stringValue": "Vendor Property" }, "access": "VehiclePropertyAccess::READ_WRITE", "changeMode": "VehiclePropertyChangeMode::ON_CHANGE"},

Then build and verified.But this property is not available in Android emulator.

Also verified through the below command: But this newly added VHAL property is not available. adb shell dumpsys car_service get-property-value

Let me know what I am missing?

发布评论

评论列表(0)

  1. 暂无评论