自 2025 年 3 月 27 日起,我們建議您使用 android-latest-release
而非 aosp-main
建構及貢獻 AOSP。詳情請參閱「Android 開放原始碼計畫變更」。
總覽
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
電源管理對汽車應用程式至關重要,且電源需求與行動裝置大不相同,包括:
- 車輛停車時幾乎不耗電。即使過了好幾個月,車輛仍應有足夠的電力可供啟動。
- 後視鏡頭、音訊和啟動畫面 (在 Android 本身啟動前) 的開機反應速度極快。
- 快速啟動 Android 主畫面,方便使用者與裝置互動。
- 重新啟動後,恢復/還原應用程式狀態 (例如電台和導航指引)。
Android Automotive 團隊正在使用新的電源管理方案解決汽車專屬電源管理問題,包括:
- 電源政策。瞭解如何確保硬體和軟體元件 (例如螢幕、音訊和語音互動) 可視需要選擇性開啟或關閉。
- 電源管理。定義 Android Automotive 使用的電源狀態機器,提供休眠/關機/喚醒序列的範例,並列出與電源管理相關的 Vehicle HAL 屬性。
- 車庫模式。
定義低耗電模式,在該模式下,車輛會在停車時執行必要的維護工作 (例如作業系統和應用程式更新)。
- 管理啟動時間。定義 Android 和 Android Automotive 啟動程序的差異,提供最佳化啟動時間的提示,並提供在啟動序列初期啟動後視鏡頭等服務的操作說明。
硬體架構
如下圖所示,車輛微控制器單元 (VMCU) 會執行以下功能:
- 與車輛的原生介面互動。例如控制器區域網路 (CAN) 匯流排。
- 控制應用程式處理器 (AP) 的電力,該處理器負責處理資訊娛樂功能,假設 AP 由 Android 提供動力。
- 透過資料匯流排和通用 I/O (GPIO) 引腳與 AP 通訊,以便通知狀態轉換等活動。

圖 1. 硬體區塊
在車輛關閉時,AP 會進入下列其中一種狀態:
-
當 VMCU 決定保留 AP 的主電源以便立即喚醒時,就會發生「Sleep」。喚醒信號通常會透過 GPIO 傳送至 AP。
-
當 VMCU 決定在切斷主電源時保留記憶體內容時,就會發生「休眠」。通常,AP 會在下次開機時載入已儲存的記憶體內容。
-
當 VMCU 決定保留電池時,系統會執行關機。AP 必須在下次開機時執行冷啟動。
VMCU-AP 資料匯流排必須是雙向介面,例如序列外圍機器介面 (SPI),且必須在 Vehicle HAL 中公開。可用於傳送下列事件:
- 開啟或關閉 AP 顯示。
- AP 喚醒 (可透過 GPIO 發生)。
- 開啟或關閉 AP 後視鏡頭顯示畫面。
- AP 關機完成 (傳送至 VMCU)。
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。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,["# 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)."]]