ตั้งแต่วันที่ 27 มีนาคม 2025 เป็นต้นไป เราขอแนะนำให้ใช้ android-latest-release
แทน aosp-main
เพื่อสร้างและมีส่วนร่วมใน AOSP โปรดดูข้อมูลเพิ่มเติมที่หัวข้อการเปลี่ยนแปลงใน AOSP
ภาพรวม
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
การจัดการพลังงานมีความสำคัญอย่างยิ่งต่อแอปยานยนต์ และข้อกำหนดด้านพลังงานจะแตกต่างจากอุปกรณ์เคลื่อนที่อย่างมาก ซึ่งรวมถึงข้อกำหนดต่อไปนี้
- การใช้พลังงานเกือบเป็น 0 เมื่อรถจอดอยู่ รถยนต์ควรมีแบตเตอรี่เหลืออยู่มากพอที่จะสตาร์ทได้ แม้ว่าจะผ่านไปหลายเดือนแล้วก็ตาม
- การตอบสนองที่รวดเร็วมากเมื่อเปิดเครื่องสำหรับกล้องมองหลัง เสียง และหน้าจอแนะนำ (ก่อนที่ Android จะบูต)
- บูตเข้าสู่หน้าจอหลักของ Android อย่างรวดเร็วเพื่อให้ผู้ใช้โต้ตอบกับอุปกรณ์ได้
- กลับมาทำงานต่อ/กู้คืนสถานะแอป (เช่น สถานีวิทยุและคำแนะนำการนำทาง) หลังจากปิดแล้วเปิดใหม่
ทีม Android Automotive กำลังแก้ไขปัญหาการจัดการพลังงานเฉพาะยานยนต์ด้วยรูปแบบการจัดการพลังงานใหม่ ซึ่งรวมถึงสิ่งต่อไปนี้
- นโยบายเกี่ยวกับพลังงาน
ดูวิธีตรวจสอบว่าเปิดและปิดคอมโพเนนต์ฮาร์ดแวร์และซอฟต์แวร์ (เช่น จอแสดงผล เสียง และการโต้ตอบด้วยเสียง) ตามต้องการ
- การจัดการพลังงาน
กำหนดสถานะการทำงานของระบบที่ใช้โดย Android Automotive, แสดงตัวอย่างลำดับการเข้าสู่โหมดสลีป/ปิดเครื่อง/ตื่นขึ้น และแสดงรายการพร็อพเพอร์ตี้ HAL ของยานพาหนะที่เกี่ยวกับการจัดการพลังงาน
- โหมดโรงรถ
กำหนดโหมดพลังงานต่ำซึ่งยานพาหนะจะดำเนินการบำรุงรักษาที่จำเป็น (เช่น การอัปเดตระบบปฏิบัติการและแอป) ขณะจอดรถ
- การจัดการเวลาในการบูต
อธิบายความแตกต่างระหว่างกระบวนการบูตของ Android กับ Android Automotive ให้คำแนะนำในการเพิ่มประสิทธิภาพเวลาบูต และแสดงวิธีการเริ่มบริการต่างๆ เช่น กล้องมองหลังในช่วงต้นของลำดับการบูต
สถาปัตยกรรมฮาร์ดแวร์
ดังที่แสดงในรูปภาพด้านล่าง หน่วยไมโครคอนโทรลเลอร์ของยานพาหนะ (VMCU) จะทําหน้าที่ต่อไปนี้
- เชื่อมต่อกับอินเทอร์เฟซของรถ เช่น บัส Controller Area Network (CAN)
- ควบคุมกำลังของตัวประมวลผลแอป (AP) ซึ่งจัดการอินโฟเทนเมนต์ โดยสมมติว่า AP ทำงานด้วยระบบ Android
- สื่อสารกับ AP ผ่านบัสข้อมูลและขา I/O (GPIO) อเนกประสงค์เพื่อแจ้งกิจกรรมต่างๆ เช่น การเปลี่ยนสถานะ

รูปที่ 1 บล็อกฮาร์ดแวร์
เมื่อปิดระบบรถ AP จะเข้าสู่สถานะใดสถานะหนึ่งต่อไปนี้
-
โหมดสลีปจะเกิดขึ้นเมื่อ VMCU ตัดสินใจที่จะเก็บพลังงานหลักของ AP ไว้เพื่อให้ตื่นขึ้นได้ทันที โดยปกติแล้ว ระบบจะส่งสัญญาณการปลุกไปยัง AP ผ่าน GPIO
-
โหมดพักจะเกิดขึ้นเมื่อ VMCU ตัดสินใจเก็บเนื้อหาหน่วยความจำไว้ขณะตัดไฟหลัก โดยปกติแล้ว AP จะโหลดเนื้อหาหน่วยความจำที่บันทึกไว้เมื่อเปิดเครื่องครั้งถัดไป
-
การปิดระบบจะเกิดขึ้นเมื่อ VMCU ตัดสินใจที่จะสำรองแบตเตอรี่ AP ต้องทำการบูตแบบ Cold Boot เมื่อเปิดเครื่องครั้งถัดไป
บัสข้อมูล VMCU-AP ต้องเป็นอินเทอร์เฟซแบบ 2 ทิศทาง เช่น Serial Peripheral Interface (SPI) และต้องแสดงใน HAL ของยานพาหนะ ซึ่งอาจใช้เพื่อส่งเหตุการณ์ต่างๆ เช่น
- เปิดหรือปิดการแสดง AP
- การปลุก AP (ทำได้ผ่าน GPIO)
- เปิดหรือปิดจอแสดงผลกล้องมองหลัง AP
- AP ปิดสนิทแล้ว (ไปยัง VMCU)
ตัวอย่างเนื้อหาและโค้ดในหน้าเว็บนี้ขึ้นอยู่กับใบอนุญาตที่อธิบายไว้ในใบอนุญาตการใช้เนื้อหา Java และ OpenJDK เป็นเครื่องหมายการค้าหรือเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-27 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"]],["อัปเดตล่าสุด 2025-07-27 UTC"],[],[],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)."]]