Platform: ROCKCHIP
OS: Android 6.0
Kernel: 3.10.92
Android4.4 -> Android6.0 有点细微变化, 但是整体框架不变, 使用守护进程的方式和kernel通信,
拿到信息后再和上层service交互, 属于沟通的桥梁.
main -> system/core/healthd/healthd.cpp
healthd_init ->
healthd_mode_ops->init ->
healthd_mode_android_init ->
healthd_register_event //callback为binder_event()
new BatteryPropertiesRegistrar -> BatteryPropertiesRegistrar.cpp //用于和Battery Service通信。
gBatteryPropertiesRegistrar->publish ->
OS: Android 6.0
Kernel: 3.10.92
Android4.4 -> Android6.0 有点细微变化, 但是整体框架不变, 使用守护进程的方式和kernel通信,
拿到信息后再和上层service交互, 属于沟通的桥梁.
main -> system/core/healthd/healthd.cpp
healthd_init ->
healthd_mode_ops->init ->
healthd_mode_android_init ->
healthd_register_event //callback为binder_event()
new BatteryPropertiesRegistrar -> BatteryPropertiesRegistrar.cpp //用于和Battery Service通信。
gBatteryPropertiesRegistrar->publish ->

本文详细介绍了在ROCKCHIP平台上的Android 6.0系统中,电池信息守护进程healthd的工作原理。healthd作为kernel与上层service之间的桥梁,通过初始化、注册事件回调以及设置定时器来获取并更新电池状态,与Battery Service进行通信,确保系统能及时获取准确的电池信息。
最低0.47元/天 解锁文章
2049

被折叠的 条评论
为什么被折叠?



