HAL(Hardware abstraction layer) is built onLinuxa set of main programs above the driver, which does not belong toLinuxkernel, but belongs toLinuxthe application layer above the kernel layer,Googleto beAndroidIncreaseHALThe main purpose of the test is to avoid direct access to the applicationLinuxDrive, there is also an important reason to protect "private property" for those who both want to publish based onAndroidof theLinuxdrivers, and companies and individuals who do not want to expose their core business logic. HALThis is the gospel. HALis notLinuxpart of the kernel, but is locatedAndroidthe System runtime layer,Androiddoes not require source code open source,HALbelong toAndroid, so there is no need for open source. HALThe architecture rationale isAndroidthe system uses the library (. Sofile) is called in the kernel space.Linuxdrive (typically accessed through device files). ThenAndroidApplications (APKfile) can beNDKProgram AccessHALLibrary, or directly in theAndroidaccess in the applicationHALin the library (directly usingJavacode access). Write a supportHALof theLinuxdriver steps: First step: WriteLinuxdriver; Step two: WriteHAL Library; Part III: PreparationService Library. Higher version ofAndroidSystem forHALincreased theStub, is for each of theHALThe shared library specifies aID, and then use thisIDmatch Certain rules to findLinuxshared libraries, soLinuxthe shared library changes the file name and moves the location conveniently.
Nineth Chapter: Hardware Abstraction Layer: HAL