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

参考资料

相关推荐
2501_91592143几秒前
iPhone HTTPS 抓包在真机环境下面临的常见问题
android·ios·小程序·https·uni-app·iphone·webview
nono牛36 分钟前
Android init服务.rc文件,支持开机自启动和手动控制
android
消失的旧时光-19431 小时前
从前端路由到 Android ARouter:观察者模式在不同平台的同一种落地
android·前端·观察者模式·flutter
nono牛1 小时前
安卓rc-属性触发Hello World服务设计
android
2501_915918411 小时前
iOS 图片资源保护方法,分析图片在二次打包和资源篡改中的实际风险
android·ios·小程序·https·uni-app·iphone·webview
2501_937193141 小时前
中兴机顶盒纯净固件|多机型适配+刷机解析
android·源码·源代码管理·机顶盒
TAEHENGV1 小时前
提醒列表模块 Cordova 与 OpenHarmony 混合开发实战
android·java·harmonyos
渡我白衣1 小时前
计算机组成原理(10):逻辑门电路
android·人工智能·windows·嵌入式硬件·硬件工程·计组·数电
Zender Han1 小时前
Flutter EasyRefresh 最新版本:自定义 Header / Footer 详解与实践
android·flutter·ios
鹏程十八少2 小时前
Android ANR项目实战:Reason: Broadcast { act=android.intent.action.TIME_TICK}
android·前端·人工智能