हमारा सुझाव है कि 27 मार्च, 2025 से AOSP को बनाने और उसमें योगदान देने के लिए, aosp-main
के बजाय android-latest-release
का इस्तेमाल करें. ज़्यादा जानकारी के लिए, AOSP में हुए बदलाव लेख पढ़ें.
डिवाइस के चालू होने में लगने वाला समय मैनेज करना
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
बूट प्रोसेस, कार्रवाइयों की एक चेन होती है. यह बूट रोम से शुरू होती है और इसके बाद बूटलोडर,
कर्नल, Init, Zygote, और सिस्टम सर्वर आते हैं. बोल्ड किए गए शब्द से, Android के हिसाब से बूट प्रोसेस के बारे में पता चलता है. वाहन के हिसाब से बूट करने की प्रोसेस में, रिअरव्यू कैमरा (आरवीसी) जैसी शुरुआती सेवाएं, कर्नेल के बूट होने के दौरान शुरू होनी चाहिए.
ऑर्डर |
कॉम्पोनेंट |
Android |
Android Automotive |
1 |
बूट रोम |
बूट लोडर के पहले चरण को इंटरनल रैम में लोड करता है. |
2 |
बूटलोडर |
मेमोरी को शुरू करता है, सुरक्षा की पुष्टि करता है, और कर्नेल को लोड करता है. |
3 |
कर्नेल |
इंटरप्ट कंट्रोलर, मेमोरी प्रोटेक्शन, कैश मेमोरी, और शेड्यूलिंग सेट अप करता है. साथ ही, उपयोगकर्ता के स्पेस की प्रोसेस को लॉन्च करता है. |
रियरव्यू कैमरा (आरवीसी) की प्रोसेस, कर्नेल बूट होने से पहले शुरू हो जाती है. प्रोसेस पूरी होने के बाद, VMCU से GPIO, डिसप्ले पर दिखाने के लिए RVC को ट्रिगर करता है. |
4 |
Init प्रोसेस |
init.rc स्क्रिप्ट को पार्स करता है, फ़ाइल सिस्टम को माउंट करता है, Zygote को लॉन्च करता है, और सिस्टम प्रोसेस को लॉन्च करता है. |
वाहन के लिए एचएएल (वीएचएएल), मुख्य सेवाओं के हिस्से के तौर पर, शुरू करने के चरण के दौरान शुरू होता है. ServiceManager के आधार पर, इसे पिछली स्थितियों में ले जाया जा सकता है. इसके लिए, शेयर की गई लाइब्रेरी (जैसे, init) पर निर्भरता को हटाना ज़रूरी है. |
5 |
युग्मनज |
Android ऑब्जेक्ट के लिए, Java रनटाइम और init मेमोरी सेट अप करता है. |
6 |
सिस्टम सर्वर |
सिस्टम में मौजूद पहला Java कॉम्पोनेंट, Android की मुख्य सेवाओं को शुरू करता है. |
सिस्टम की सभी सेवाएं शुरू होने के बाद, CarService शुरू होती है. |
डिवाइस चालू होने में लगने वाले समय को ऑप्टिमाइज़ करना
अपने सिस्टम के बूट होने में लगने वाले समय को कम करने के लिए, इन दिशा-निर्देशों का पालन करें:
-
कर्नेल. सिर्फ़ इस्तेमाल में आने वाले मॉड्यूल लोड करें और सिर्फ़ इस्तेमाल में आने वाले हार्डवेयर कॉम्पोनेंट को शुरू करें.
-
init.rc
- ब्लॉकिंग ऑपरेशन देखें (कमांड के इस्तेमाल की तुलना में सेवा).
- सिर्फ़ वही शुरू करें जिसका इस्तेमाल किया जाता है.
- सेवाओं के लिए सही प्राथमिकता सेट करना.
-
ज़ाइगोट. क्लास को पहले से लोड करने की सुविधा को ऑप्टिमाइज़ करना (लोड करने के लिए क्लास की सूची तय करें).
-
पैकेज मैनेजर
-
सिस्टम सर्वर. सिर्फ़ उन सिस्टम सेवाओं को चालू करें जिनका इस्तेमाल किया जाता है.
ऑप्टिमाइज़ेशन में मदद पाने के लिए, Google ये टूल उपलब्ध कराता है:
-
Logcat और
dmesg लॉग का विश्लेषण करने के लिए, packages/services/Car/tools/bootanalyze/bootanalyze.py
का इस्तेमाल करें.
-
बूट के दौरान प्रोसेस के लिए I/O रिकॉर्ड करने के लिए, packages/services/Car/tools/bootio/
का इस्तेमाल करें. आपको खास फ़्लैग के साथ कर्नेल को कंपाइल करना होगा (README.md
फ़ाइल देखें).
सेवाएं जल्दी शुरू करना
बूट करने के क्रम में, हो सकता है कि Android बूट होने से पहले ही कुछ सेवाएं शुरू हो जाएं.
रियरव्यू कैमरा
रिअरव्यू कैमरे (आरवीसी) को कर्नेल में मैनेज किया जाना चाहिए. जब वाहन को पीछे की ओर ले जाया जाता है, तो VMCU, नेटिव कर्नेल प्रोसेस को इसकी सूचना देता है. इसके बाद, नेटिव कर्नेल प्रोसेस, डिसप्ले पर आरवीसी इमेज दिखाती है. वाहन का एचएएल, hardware/libhardware/include/hardware/vehicle_camera.h
का इस्तेमाल करके आरवीसी को कंट्रोल कर सकता है.
वाहन एचएएल (वीएचएएल)
कुछ सिस्टम को, उपयोगकर्ता-स्पेस सेवा के शुरू होने (जो बूट क्रम में बाद में होती है) का इंतज़ार करते समय, बूट क्रम के शुरुआती चरणों में CAN डेटा (उदाहरण के लिए, वाहन की स्पीड, गियर की स्थिति) को पढ़ने और बफ़र करने की ज़रूरत पड़ सकती है. इस स्थिति में, VNS और HAL और CAN कंट्रोलर को बहुत पहले शुरू करना ज़रूरी है. आम तौर पर, कुछ सेकंड के अंदर.
-
जिन सिस्टम में /system
को तुरंत माउंट किया जा सकता है वे आसानी से सेवा मैनेजर को लॉन्च कर सकते हैं और फिर VNS को जल्दी लॉन्च कर सकते हैं.
-
जो सिस्टम /system
को तुरंत माउंट नहीं कर सकता उसे सेवा मैनेजर और VNS, दोनों को कर्नेल बूट इमेज में ले जाना होगा. साथ ही, उस पर निर्भर सभी लाइब्रेरी को स्टैटिक तौर पर लिंक करना होगा.
इस पेज पर मौजूद कॉन्टेंट और कोड सैंपल कॉन्टेंट के लाइसेंस में बताए गए लाइसेंस के हिसाब से हैं. 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,["# Manage boot time\n\nThe boot process is a chain of actions starting from the boot ROM, followed by the bootloader,\nkernel, **Init** , **Zygote** , and **system server** (bold\nindicates Android-specific boot process). In the automotive-specific boot process, early services\nsuch as rearview camera (RVC) must start during the kernel boot.\n\n| Order | Component | Android | Android Automotive |\n|-------|---------------|----------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| 1 | Boot ROM | Loads the first stage of the boot loader into internal RAM. ||\n| 2 | Bootloader | Inits memories, verifies for security, and loads kernel. ||\n| 3 | Kernel | Sets up interrupt controllers, memory protection, caches, and scheduling; launches user space processes. | **Rearview camera (RVC)** process starts early in kernel boot. After the process is up, GPIO from VMCU triggers RVC to show on display. |\n| 4 | Init process | Parses `init.rc` scripts, mounts file systems, launches Zygote, launches system process. | **Vehicle HAL (VHAL)** starts during init phase as part of core services. Can be moved to earlier states depending on ServiceManager; requires removing dependencies on shared libraries (such as init). |\n| 5 | Zygote | Sets up Java Runtime and init memory for Android objects. ||\n| 6 | System server | First Java component in the system, starts core Android services. | **CarService** starts after all system services are started. |\n\nOptimize boot time\n------------------\n\nTo improve boot time in your system, use the following guidelines:\n\n- **Kernel.** Load only the modules in use and initialize only the hardware\n components in use.\n\n- `init.rc`\n\n - Watch for blocking operations (service compared to command invocation).\n - Start only what is used.\n - Setting correct priority for services.\n- **Zygote.** Class preloading optimization (specify the list of classes to\n load).\n\n- **Package Manager**\n\n - Optimize product image to include only APKs in use.\n\n - [Enable DEX\n preoptimization](/docs/core/runtime/configure#compilation_options).\n\n- **System server.** Start only the system services that are used.\n\nFor help with optimization, Google provides the following tools:\n\n- Use `packages/services/Car/tools/bootanalyze/bootanalyze.py` to analyze logcat and\n dmesg logs.\n\n- Use `packages/services/Car/tools/bootio/` to record I/O for processes during the\n boot. You must compile the kernel with specific flags (refer to the `README.md`\n file).\n\nStart services early\n--------------------\n\nIn the boot sequence, some services might start before Android starts to boot.\n\n### Rearview camera\n\nThe rearview camera (RVC) should be handled in the kernel. The VMCU notifies the native kernel\nprocess when the vehicle shifts into Reverse, after which the native kernel process displays the\nRVC image onto the display. The vehicle HAL can control the RVC using\n`hardware/libhardware/include/hardware/vehicle_camera.h`.\n\n### Vehicle HAL (VHAL)\n\nSome systems might need to read and buffer CAN data (for example, vehicle speed, gear status)\nduring the early stages of the boot sequence while waiting for the user-space service to start\n(which occurs later in the boot sequence). This scenario requires VNS and the HAL and CAN\ncontrollers to start very early, typically within a few seconds.\n\n- Systems that can quickly mount `/system` can simply launch service manager then\n VNS early.\n\n- System that can't quickly mount `/system` must move both service manager and VNS\n to the kernel boot image and link all dependent libraries statically."]]