Is there any way to connect to AIDL-based HAL service without using hidden API?

114 Views Asked by At

Is there any way to access aidl-based HAL service from some platform service without using hidden API so that the service can be placed into product partition? I currently use below way (from link) to connect to HAL, it works, but the service can only be built into system partition (because ServiceManager is hidden class):

var binder = ServiceManager.waitForDeclaredService(HAL_SERVICE_NAME)
var hal = IMyHal.Stub.asInterface(binder)
0

There are 0 best solutions below