Android 8.0 이상에서는 좀 더 모듈식에 가까운 새 아키텍처를 채택하도록 하위 수준 레이어가 재작성됩니다. Android 8.0 이상을 실행하는 기기는 HIDL로 작성된 HAL을 지원해야 하지만 아래와 같은 몇 가지 예외가 있습니다. 이러한 HAL은 패스 스루이거나 바인더화될 수 있습니다. Android 11에서는 AIDL로 작성된 HAL도 지원됩니다. 모든 AIDL HAL은 바인더화됩니다.
바인더화된 HAL. HAL은 HAL 인터페이스 정의 언어(HIDL) 또는 Android 인터페이스 정의 언어(AIDL)로 표현됩니다. 이러한 HAL은 이전 버전의 Android에서 사용되는 기존 및 레거시 HAL을 모두 대체합니다. 바인더화된 HAL에서 Android 프레임워크와 HAL은 바인더 프로세스 간 통신(IPC) 호출을 사용하여 상호 간에 통신합니다. Android 8.0 이상으로 출시되는 모든 기기는 바인더화된 HAL만 지원해야 합니다.
패스 스루 HAL. HIDL로 래핑된 일반 또는 기존 HAL입니다. 이러한 HAL은 기존 HAL을 래핑하고 바인더화된 모드와 동일 프로세스(패스 스루) 모드로 HAL을 제공할 수 있습니다. Android 8.0으로 업그레이드하는 기기에서는 패스 스루 HAL을 사용할 수 있습니다.
공급업체 이미지에 의해 제공되는 다른 모든 HAL은 패스 스루 또는 바인더화 모드에 속할 수 있습니다. 온전히 Treble을 준수하는 기기에서는 전부 바인더화되어야 합니다.
바인더화된 HAL
Android에서는 출시 기기 또는 업그레이드 기기인지 여부와 상관없이 모든 Android 기기에서 다음과 같은 HAL이 바인더화되어야 합니다.
android.hardware.biometrics.fingerprint@2.1. Android 8.0에서 더 이상 볼 수 없는 fingerprintd를 대체합니다.
android.hardware.configstore@1.0. Android 8.0에 새로 도입되었습니다.
android.hardware.dumpstate@1.0. 이 HAL에 의해 제공되는 원래 인터페이스는 심 처리할 수 없어 변경되었습니다. 따라서 dumpstate_board를 기기에 다시 구현해야 합니다(선택적 HAL).
android.hardware.graphics.allocator@2.0. Android 8.0에서 바인더화해야 하므로 파일 설명자를 신뢰할 수 있는 프로세스와 신뢰할 수 없는 프로세스 간에 공유할 필요가 없습니다.
android.hardware.radio@1.0. 자체 프로세스에 상주하는 rild에 의해 제공된 인터페이스를 대체합니다.
android.hardware.usb@1.0. Android 8.0에 새로 도입되었습니다.
android.hardware.wifi@1.0. Android 8.0에 새로 도입되었으며, system_server에 로드되었던 기존 Wi-Fi HAL 라이브러리를 대체합니다.
android.hardware.wifi.supplicant@1.0. 기존 wpa_supplicant 프로세스를 통한 HIDL 인터페이스입니다.
패스 스루 HAL
Android에서는 출시 기기 또는 업그레이드 기기인지 여부와 상관없이 다음과 같은 HAL이 모든 Android 기기에서 패스 스루 모드를 취하도록 요구합니다.
android.hardware.graphics.mapper@1.0. 메모리를 메모리가 상주하는 프로세스에 매핑합니다.
android.hardware.renderscript@1.0. 같은 프로세스의 항목을 전달합니다(openGL과 동일).
위에 나열되지 않은 모든 HAL은 출시 기기에 대해 바인더화되어야 합니다.
동일 프로세스 HAL
동일 프로세스 HAL(SP-HAL)은 항상 해당 HAL이 사용되는 동일한 프로세스에서 열립니다. 여기에는 HIDL에 표현되지 않은 모든 HAL과 바인더화되지 않은 일부가 포함됩니다. SP-HAL 집합의 구성요소는 Google에 의해 제어되며 예외는 없습니다.
SP-HAL에는 다음이 포함됩니다.
openGL
Vulkan
android.hidl.memory@1.0(Android 시스템에 의해 제공되며 항상 패스 스루임)
android.hardware.graphics.mapper@1.0
android.hardware.renderscript@1.0
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2024-02-06(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2024-02-06(UTC)"],[],[],null,["# Hardware abstraction layer (HAL) overview\n\nA *hardware abstraction layer (HAL)* is type of abstraction layer with a\nstandard interface for hardware vendors to implement. A HAL allows hardware\nvendors to implement lower-level, device-specific features without affecting or\nmodifying code in higher-level layers.\n| **Note:** HALs existed before Android 8. However, Android 8 ensured each HAL had a standard interface. For an explanation of HAL architecture before Android 8, refer to [Legacy HALs](/docs/core/architecture/hal/archive).\n\nRequired terms\n--------------\n\nFollowing is a list of definitions for terms used in this section of\ndocumentation:\n\n*Android Interface Definition Language (AIDL)*\n: A Java-like language used to define interfaces in a way that is independent of\n the programming language being used. AIDL allows communication between\n HAL clients and HAL services.\n\n*Binderized HAL*\n: A HAL that communicates with other processes\n using\n [binder inter-process communication (IPC)](/docs/core/architecture/hidl/binder-ipc)\n calls. Binderized HALs run in a separate process from the client that uses them.\n Binderized HALs are registered with a service manager so that clients can\n access their capabilities. HALs written for Android 8 and higher are\n binderized.\n\n*HAL client*\n: The process that accesses the HAL service.\n\n*HAL interface*\n: The common interface used by both the HAL client and service to communicate.\n\n*HAL service*\n\n: The hardware-specific code, such as the code that talks to your specific\n device's camera. You must implement all required HALs listed in the\n compatibility matrix for the release you target in your vendor partition.\n For further information on compatibility matrixes, see\n [Compatibility matrixes](/docs/core/architecture/vintf/comp-matrices).\n\n You can also create a new HAL interface, or extend the interface of a HAL, to\n support your hardware's unique capabilities.\n\n*Hardware Interface Definition Language (HIDL)*\n\n: A language used to define interfaces in a way that is independent of the\n programming language being used. HIDL enables communication between\n HAL clients and HAL services.\n\n | **Note:** As of Android 13, HIDL has been deprecated. Instead of HIDL, you should use Android Interface Definition Language (AIDL) for HALs. HALs previously written using [HIDL](/docs/core/architecture/hidl) are supported.\n\n*Same Process (SP) HAL*\n\n: A restricted set of wrapped HALs. Membership in the set is controlled by\n Google. SP HALs include:\n\n - Stable C mapper 5 HAL\n - OpenGL\n - Vulkan\n - android.hidl.memory@1.0 (provided by the Android system, always wrapped)\n - android.hardware.renderscript@1.0\n\n | **Note:** Some HAL implementations wrap legacy interfaces, such as those in `libhardware`, in an AIDL or HIDL wrapper.\n\n*Wrapped HAL*\n\n: A HAL service that was created before Android 8, but has been wrapped in an\n AIDL or HIDL wrapper to work with Android 8 and higher.\n\nWhat's next?\n------------\n\n- To learn how to implement a HAL service, refer to [AIDL for HALs](/docs/core/architecture/aidl/aidl-hals).\n- To learn how to create or extend an existing HAL, refer to [Attached extended interfaces](/docs/core/architecture/aidl/aidl-hals#attached-extensions)."]]