Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error multi-hal build android.hardware.sensors has a conflict #2

Open
kataklysmo opened this issue Jan 23, 2024 · 2 comments
Open

Error multi-hal build android.hardware.sensors has a conflict #2

kataklysmo opened this issue Jan 23, 2024 · 2 comments

Comments

@kataklysmo
Copy link

kataklysmo commented Jan 23, 2024

During the build i got the following error:

getDeviceHalManifest: -2147483648 VINTF parse error: Cannot add manifest fragment /vendor/etc/vintf/manifest/android.hardware.
[email protected]:HAL "android.hardware.sensors" has a conflict.

The content of the file [email protected] is the same as [email protected] located into st/sensors-hal/2.0

android.hardware.sensors hwbinder 2.0 ISensors default

I have not seen/found anything in the documentation about this error, is there any aditional information about it?

@mariotesi
Copy link
Contributor

Hello,

What Android version are you building the HAL for ?
What Sensors HAL binary do you want to integrate into your Android distribution? the one for Multi-hal or HIDL 2.0 or AIDL?
please, may you list the PRODUCT_PACKAGES being included into the device.mk files related to your build of sensors_hal ?

@kataklysmo
Copy link
Author

kataklysmo commented Jan 26, 2024

Hi Mario,

I'm building the HIDL 2.0 version under android 12.

There is a default hardware/interfaces/sensors/2.0/multihal already defined in my build, and it's why it's failing as the version defined is the same as the one used in the ST build.

Android Manifests

HIDL and native HALs may use multiple version fields as long as they represent distinct major versions, with only one minor version per major version provided. For example, 3.1 and 3.2 can't coexist, but 1.0 and 3.4 can. This applies to all hal elements with the same name, unless override="true".

Using the override property inside [email protected] the build is working.

<manifest version="1.0" type="device">
    <hal format="hidl" override="true">
        <name>android.hardware.sensors</name>
        <transport>hwbinder</transport>
        <version>2.0</version>
        <interface>
            <name>ISensors</name>
            <instance>default</instance>
        </interface>
    </hal>
</manifest>

Once the system is booted up i can see how the service is started:
01-01 02:07:15.180 0 0 I init : starting service 'vendor.sensors-hal-2-0-multihal'...
01-01 02:07:15.195 0 0 I init : starting service 'vendor.sensors-hal-2.0-stmicroelectronics'...
01-26 09:52:52.599 0 0 I init : starting service 'vendor.sensors.qti'...

In my case i'm using the lsm6dso and the lis3mdl_magn, both chips are working fine and i can read raw data from them.
imagen
imagen
imagen

But once i try to check the number of sensors available is 0.

dumpsys sensorservice
No Sensors on the device
devInitCheck : 0

I tested it with and without selinux enabled with the same result. About the PRODUCT_PACKAGES there is nothing relevant in my board.mk config, i will check the default ones and let you know.

Thanks Mario.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants