自 2025 年 3 月 27 日起,我們建議您使用 android-latest-release
而非 aosp-main
建構及貢獻 AOSP。詳情請參閱「Android 開放原始碼計畫變更」。
HIDL 架構回溯相容性驗證
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
HIDL HAL 可確保 Android 核心系統 (即 system.img 或架構) 可回溯相容。供應商測試套件 (VTS) 測試可確保 HAL 正常運作 (例如,在所有 1.2 實作項目上執行 1.1 HAL 測試),但您仍需要進行架構測試,確保在提供支援的 HAL (1.0、1.1 或 1.2) 時,架構能與該 HAL 正常運作。
如要進一步瞭解 HAL 介面定義語言 (HIDL),請參閱 HIDL、
HIDL 版本管理和
HIDL HAL 淘汰計畫。
關於 HAL 升級
HAL 升級有兩種類型:主要和次要。大多數系統只包含一個 HAL 實作項目,但系統支援多個實作項目。例如:
android.hardware.teleport@1.0 # initial interface
android.hardware.teleport@1.1 # minor version upgrade
android.hardware.teleport@1.2 # another minor version upgrade
...
android.hardware.teleport@2.0 # major version upgrade
...
系統分區通常會包含架構守護程序 (例如 teleportd
),用於管理與特定一組 HAL 實作項目的通訊。或者,系統可以改為納入實作方便用戶端行為的系統程式庫 (例如 android.hardware.configstore-utils
)。在上述範例中,無論裝置上安裝的 HAL 版本為何,teleportd
都必須運作。
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-07-27 (世界標準時間)。
[[["容易理解","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"]],["上次更新時間:2025-07-27 (世界標準時間)。"],[],[],null,["# HIDL Framework backward compatibility verification\n\n[HIDL HALs](/docs/core/architecture#hidl)\nguarantee the Android core system (aka system.img or the framework) is\nbackward compatible. While [Vendor Test Suite (VTS)](/docs/compatibility/vts)\ntests ensure that HALs work as expected (e.g. 1.1 HAL tests are run on all\n1.2 implementations), framework testing is needed to ensure that when a\nsupported HAL (1.0, 1.1, or 1.2) is provided, the framework works properly\nwith that HAL.\n\nFor details on HAL interface definition language (HIDL), refer to\n[HIDL](/docs/core/architecture/hidl), [HIDL versioning](/docs/core/architecture/hidl/versioning), and [HIDL HAL Deprecation](/docs/core/architecture/vintf/fcm#hal-version-deprecation).\n\nAbout HAL upgrades\n------------------\n\nThere are two types of HAL upgrades: *major* and *minor*.\nMost systems include only one HAL implementation, but multiple\nimplementations are supported. For example: \n\n```\nandroid.hardware.teleport@1.0 # initial interface\nandroid.hardware.teleport@1.1 # minor version upgrade\nandroid.hardware.teleport@1.2 # another minor version upgrade\n...\nandroid.hardware.teleport@2.0 # major version upgrade\n...\n```\n\nThe system partition typically includes a framework daemon (such as\n`teleportd`) that manages communication with a specific group of\nHAL implementations. Alternatively, systems might instead\ninclude a system library (such as\n`android.hardware.configstore-utils`) that implements convenient\nclient behavior. In the example above, `teleportd` must work no\nmatter what version of the HAL is installed on the device."]]