AIDL Hal 开发指南2 —— AIDL HAL 整体架构

Google 在 Android11 觉得 HIDL 那一套有点多余,把 HIDL HAL 弃用了。并提供了新的 AIDL HAL。

主要有以下几点变化:

  • 一般情况下 HAL 是一个 binder 服务,注册到 ServiceManager,通过命令 adb shell service list 中有大量的 hal binder 服务。
  • 通常,App 作为 binder 客户端与 Framework 中的系统进程(SystemServer SurfaceFlinger 等)通信,Framework 中的系统进程会作为 hal binder 服务的客户端,访问 hal。一般情况下,App 访问 hal 要经过两次跨进程通信
  • 特殊情况下,比如某个硬件只有一个 App 使用,App 可以直接通过 binder 通信访问到 hal binder 服务。
  • 某些 hal 对性能要求高(主要是显示相关的),hal 层是一个 so 库,系统进程通过 dlopen 的方式加载。这类 hal 叫 stable-c hal

参考资料

相关推荐
Lambert_lin04 小时前
Android grade9.0 之后 自定义apk 名称
android·kotlin
fengci.4 小时前
ctfshow其他(web408-web432)
android·开发语言·前端·学习·php
Kapaseker5 小时前
“点击显示全文” — Compose 实现
android·kotlin
lxysbly5 小时前
安卓土星ss模拟器下载(支持中文、金手指)
android
程序员陆业聪6 小时前
异步初始化框架设计:用拓扑排序干掉启动串行瓶颈
android
君莫啸ོ6 小时前
Android persistent APP调试
android
泥嚎泥嚎6 小时前
【Android】Handler 全面解析
android
Ehtan_Zheng6 小时前
WebView 的现代替代方案:适用于 Jetpack Compose 的 AndroidX Browser
android
朝星6 小时前
Android开发[3]:协程+Flow
android·kotlin
张小潇6 小时前
AOSP15 WMS/AMS系统开发 - WindowManagerService addWindow详解
android