Android HAL hardware module

https://myblog-maurice.blogspot.com/2011/12/android-hal.html

https://github.com/kangear/mokoid-read-only

https://www.dre.vanderbilt.edu/~schmidt/PDF/Android-HAL.pdf

HAL: xxx.so

android\hardware\libhardware:

add include/hardware/XXX.h

add modules/LcdThermalProtection/Android.mk、XXX.cpp

modify modules/Android.mk: hardware_modules := XXX

base.mk add :

#LIBLCDTHERMALPROTECTION
LIBLCDTHERMALPROTECTION := LcdThermalProtection.default

PRODUCT_PACKAGES += $(LIBLCDTHERMALPROTECTION)

============================================

Framework: App -> Manager -> Service -> JNI -> hardware module


app:
SystemServiceRegistry.java -> registerService

hardware: manager
ILcdThermalProtectionManager.aidl
LcdThermalProtectionManager.java -> ILcdThermalProtectionManager.Stub.asInterface

services:
services/core/java/com/android/server
LcdThermalProtectionService.java


jni:
Android.mk
com_android_server_LcdThermalProtectionService.cpp
onload.cpp -> register_android_server_LcdThermalProtectionService


java/com/android/server:
SystemServer.java -> startService

Android.mk -> core/java/android/hardware/ILcdThermalProtectionManager.aidl \

未經允許不得轉載:GoMCU » Android HAL hardware module

評論 搶沙發

  • 暱稱 (必填)
  • 郵箱 (必填)
  • 網址