自 2025 年 3 月 27 日起,我们建议您使用 android-latest-release
而非 aosp-main
构建 AOSP 并为其做出贡献。如需了解详情,请参阅 AOSP 的变更。
概览
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
电源管理对车载应用至关重要,车载应用对电源的要求与移动设备有很大差异,包括:
- 车辆停放时,耗电量几乎为零。即使在许多个月后,车辆仍应有足够的电池电量来启动。
- 后视摄像头、音频和启动画面(在 Android 本身启动之前)的开机反应极快。
- 可快速启动到 Android 主屏幕,让用户可以与设备互动。
- 重启后可以继续/恢复应用状态(如电台和导航指导)。
Android Automotive 团队正使用新的电源管理方案来解决汽车特有的电源管理问题,这些解决方案包括:
- 电源政策。
了解如何确保根据需要选择性地开启和关闭硬件和软件组件(例如屏幕、音频和语音互动)。
- 电源管理。
定义 Android Automotive 使用的电源状态机,提供休眠/关闭/唤醒序列示例,以及列出与电源管理相关的车载 HAL 属性。
- 车库模式:定义车辆处于停放状态时适用的低功耗模式,在此模式下,车辆会执行必要的维护任务(如操作系统和应用更新)。
- 管理启动时间。
定义 Android 和 Android Automotive 启动过程之间的差异,提供有关优化启动时间的提示,以及给出在启动序列的早期启动后视摄像头等服务的说明。
硬件架构
如下图所示,车载微控制器单元 (VMCU) 具有如下作用:
- 与车辆的原生接口(例如控制器区域网络 (CAN) 总线)连接。
- 控制负责处理信息娱乐功能的应用处理器 (AP) 的电源(假设 AP 由 Android 供电)。
- 通过数据总线和通用 I/O (GPIO) 引脚与 AP 进行通信,以通知状态转换等活动。

图 1. 硬件块
车辆关机后,AP 将进入下列状态之一:
-
在 VMCU 决定保留 AP 的主电源以进行即时唤醒时,会发生睡眠。一般而言,唤醒信号会通过 GPIO 发送到 AP。
-
当 VMCU 在切断主电源的同时决定保留内存内容时,会发生休眠。通常,AP 会在下次开机时加载保存的内存内容。
-
在 VMCU 决定保留电池电量时,会发生关闭。AP 必须在下次开机时进行冷启动。
VMCU-AP 数据总线必须是串行外设接口 (SPI) 等双向接口,并且必须在车载 HAL 中公开。它可用于发送事件,例如:
- AP 屏幕开启或关闭。
- AP 唤醒(可通过 GPIO 进行)。
- AP 后视摄像头显示画面开启或关闭。
- AP 关闭操作完成(发送给 VMCU)。
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-27。
[null,null,["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# Overview\n\n*Power management* is critical to automotive apps, and power\nrequirements differ vastly from mobile devices, including:\n\n- Near-zero power consumption while the vehicle is parked. The vehicle should still have enough battery charge to start, even after many months.\n- Extremely fast power-on response for rear-view camera, audio, and splash screen (before Android itself boots).\n- Quick boot into Android home screen so that user can interact with the device.\n- Resume/restore app states (such as the radio station and navigation guidance) after power cycle.\n\nThe Android Automotive team is addressing automotive-specific power\nmanagement issues with a new power management scheme, including:\n\n- [Power policy](/docs/automotive/power/power_policy). Learn how to ensure that hardware and software components (such as display, audio, and voice interaction) are selectively turned on and off as needed.\n- [Power management](/docs/automotive/power/power). Defines the power state machine used by Android Automotive, provides example sleep/shutdown/wake sequences, and lists the Vehicle HAL properties related to power management.\n- [Garage Mode](/docs/automotive/power/garage_mode). Defines a low power mode in which the vehicle executes necessary maintenance tasks (such as OS and app updates) while the vehicle is parked.\n- [Managing boot time](/docs/automotive/power/boot_time). Defines differences between the Android and Android Automotive boot processes, provides tips for optimizing boot time, and gives instructions for starting services such as the rear view camera early in the boot sequence.\n\nHardware architecture\n---------------------\n\nAs illustrated in the figure below, the Vehicle Microcontroller Unit (VMCU):\n\n- Interfaces with the vehicle's native interface. For example, the Controller Area Network (CAN) bus.\n- Controls the power of the app processor (AP), which handles infotainment, presuming the AP is powered by Android.\n- Communicates to the AP through the data bus and general purpose I/O (GPIO) pins to inform activities such as state transitions. \n\n **Figure 1.** Hardware blocks\n\nOn vehicle power off, the AP enters into one of the following states:\n\n- **Sleep** occurs when the VMCU decides to retain the AP's\n main power for instant wake-up. Typically, a wake-up signal would be sent to\n the AP through the GPIO.\n\n- **Hibernation** occurs when the VMCU decides to keep the memory contents while\n cutting the main power. Typically, The AP loades the saved memory contents at the next power on.\n\n- **Shutdown** occurs when the VMCU decides to reserve\n battery. The AP must cold boot at next power on.\n\nThe VMCU-AP data bus must be a bidirectional interface such as Serial\nPeripheral Interface (SPI), and must be exposed in the Vehicle HAL. It may be\nused to send events such as:\n\n- AP display On or Off.\n- AP wake-up (can occur through the GPIO).\n- AP rear-view camera display On or Off.\n- AP shut-down complete (to the VMCU)."]]