androidandroid-sourcehalhidl

Passthrough HAL's of Android AOSP


I understood that they are 2 types of HAL's in AOSP, Binderized and passthrough hals. According to https://source.android.com/docs/core/architecture/hal-types, passthrough HAL's can be served in binderized and passthrough modes. What is the difference between these modes of passthrough HAL's? I am little bit confused here, even through there are binderized and passthrough HAL's, again there are two modes(passthrough & binderized modes) in passthrough HAL. why? or is my understanding is wrong?

For what kind of HAL's do i need to define hwbinder/passthrough in manifest.xml(i.e., <transport>hwbinder</transport> or <transport arch="32+64">passthrough</transport>)


Solution

    1. binderized mode: The hal have an wraper server, which load the hal impl so, and the client will call the hal by binder. It's the same as binderized hal. It's transport should be set as "hwbinder"
    2. passthrough mode: The hal's impl so will be loaded directly in caller(client). It's transport should be set as "passthrough".

    From the client side, the API to get the hal instance is the same. AOSP has hide the difference, it will query the manifest, and choose the right way to get the hal instance.