HAL know how

作者: 叶非叶 | 来源:发表于2020-12-22 09:46 被阅读0次

    @[TOC](HAL known how)

    What is HAL?

    HAL is short for Hardware abstraction Layer. This is a concept designed by Google to avoid the short of open source which vendors or driver company wanna not open source.

    What for?

    HAL defines a standard APIs for hardware vendors to implement

    Tow generations of HAL

    • The old version : Android OS 7 and below.
    • The newest version : Android OS 8 and higher.

    The Newest HAL : Dynamically Available HALs

    Android 9 supports the dynamic shutdown of Android hardware subsystems when they are not in use or not needed.
    For example, when a user is not using Wi-Fi, the Wi-Fi subsystems should not be taking up memory, power, or other system resources. In earlier versions of Android, HALs/drivers were kept open on Android devices for the entire duration an Android phone was booted.

    Change to HAL

    # some init.rc script associated with the HAL
        service vendor.some-service-name /vendor/bin/hw/some-binary-service
        # init language extension, provides information of what service is served
        # if multiple interfaces are served, they can be specified one on each line
        interface android.hardware.light@2.0::ILight default
        # restarted if hwservicemanager dies
        # would also cause the hal to start early during boot if disabled wasn't set
        class hal
        # will not be restarted if it exits until it is requested to be restarted
        oneshot
        # will only be started when requested
        disabled
        # ... other properties
    

    to be continued >>

    相关文章

      网友评论

        本文标题:HAL know how

        本文链接:https://www.haomeiwen.com/subject/nqmagktx.html