自 2025 年 3 月 27 日起,我们建议您使用 android-latest-release
而非 aosp-main
构建 AOSP 并为其做出贡献。如需了解详情,请参阅 AOSP 的变更。
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 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-04-04。
[null,null,["最后更新时间 (UTC):2025-04-04。"],[],[],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."]]