I have my custom AIDL HAL and my custom client which connects to this HAL in this way:
binder = ServiceManager.getService("my.custom.hal.ICustomThing/default");
This worked well when this was “system HAL” but I want to do it more properly and make it a “vendor HAL”.
This is why in both Android.bp files (aidl_interface and client) I’ve marked them with vendor: true.
Then I got build issue in client:
sdk_version must have a value when the module is located at vendor
so I’ve set sdk_version and this time I got issue:
This module has conflicting settings. sdk_version is not empty, which means this module cannot use platform APIs
so I’ve removed platform_apis: true from client’s Android.bp and this time I got issue:
error: cannot find symbol import android.os.ServiceManager;
because ServiceManager is a SystemAPI.
To me it looks like vicious circle. vendor: true requires sdk_version which can’t be set with platform_apis which I need to access the HAL through getService. Am I missing something?