हमारा सुझाव है कि 27 मार्च, 2025 से AOSP को बनाने और उसमें योगदान देने के लिए, aosp-main के बजाय android-latest-release का इस्तेमाल करें. ज़्यादा जानकारी के लिए, AOSP में हुए बदलाव लेख पढ़ें.
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
Android 10 और 11 में, पहले चरण के ramdisk में, पहले चरण की init बाइनरी (जो fstab एंट्री के मुताबिक, जल्दी माउंट करने की सुविधा देता है) और वेंडर की fstab फ़ाइलें होती हैं. (जैसा कि Android 9 और उससे पहले के वर्शन में,
system.img में $TARGET_ROOT_OUT का कॉन्टेंट होता है.)
जिन डिवाइसों में बूट-रैमडिस्क (A/B के अलावा) है उनके लिए, पहला चरण init एक स्टैटिक रनटेबल है, जो /init में मौजूद होता है. ये डिवाइस, system.img को /system के तौर पर माउंट करते हैं. इसके बाद, /system पर माउंट किए गए डिवाइस को / पर ले जाने के लिए, स्विच रूट ऑपरेशन करते हैं.
माउंट करने की प्रोसेस पूरी होने के बाद, रैमडिस्क का कॉन्टेंट खाली हो जाता है.
जिन डिवाइसों में रिकवरी को रैमडиск के तौर पर इस्तेमाल किया जाता है उनके लिए, रिकवरी रैमडиск में /init पर फ़र्स्ट स्टेज init मौजूद होता है. ये डिवाइस, पहले रिकवरी कॉम्पोनेंट को एनवायरमेंट से हटाने के लिए, रूट को /first_stage_ramdisk पर स्विच करते हैं. इसके बाद, ये डिवाइस ठीक वैसे ही काम करते हैं जैसे बूट-रैमडिस्क वाले डिवाइस करते हैं. इसका मतलब है कि system.img को /system के तौर पर माउंट करें, माउंट किए गए डिवाइस को / पर ले जाने के लिए रूट को स्विच करें, और माउंट करने के बाद रैमडिस्क का कॉन्टेंट खाली करें. अगर androidboot.force_normal_boot=1, kernel कमांड लाइन (या Android 12 के बाद के वर्शन के bootconfig) में मौजूद है, तो डिवाइस रिकवरी मोड में बूट होने के बजाय, सामान्य रूप से (Android में) बूट होते हैं.
पहले चरण का init पूरा होने के बाद, यह सिस्टम पर SELinux को कॉम्पाइल और लोड करने के लिए, /system/bin/init को selinux_setup आर्ग्युमेंट के साथ चलाता है. आखिर में,
init second_stage आर्ग्युमेंट के साथ /system/bin/init को फिर से चलाता है. इस बिंदु पर, init का मुख्य फ़ेज़ शुरू होता है और init.rc स्क्रिप्ट का इस्तेमाल करके, बूट प्रोसेस जारी रहती है.
यहां दिए गए सेक्शन में, Android 10 से पहले और बाद में, A/B डिवाइसों के लिए, पार्टीशन लेआउट में हुए बदलावों के बारे में बताया गया है.
पार्टिशन लेआउट (A/B डिवाइसों के लिए नहीं)
यहां दिए गए सेक्शन में, Android 10 से पहले और बाद में, A/B डिवाइसों के लिए, पार्टीशन लेआउट में हुए बदलावों के बारे में बताया गया है.
इस पेज पर मौजूद कॉन्टेंट और कोड सैंपल कॉन्टेंट के लाइसेंस में बताए गए लाइसेंस के हिसाब से हैं. 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,["# Ramdisk partitions\n\n| **Note:** This page applies to Android 11 and lower. For Android 12 and greater, see [Generic boot\n| partition](/docs/core/architecture/bootloader/partitions/generic-boot).\n\nIn Android 10 and 11,\nthe first stage ramdisk\ncontains the first stage init binary (which performs early mounting as specified\nby fstab entries) and vendor fstab files. (As in Android 9 and lower,\n`system.img` contains the contents of `$TARGET_ROOT_OUT`.)\n\n- For devices with a boot-ramdisk (non-A/B), first stage init is a static\n executable located at `/init`. These devices mount `system.img` as `/system`,\n then perform a switch root operation to move the mount at `/system` to `/`.\n The contents of the ramdisk are freed after mounting has completed.\n\n- For devices that use recovery as a ramdisk, first stage init is located at\n `/init` within the recovery ramdisk. These devices first switch root to\n `/first_stage_ramdisk` to remove the recovery components from the environment,\n then proceed the same as devices with a boot-ramdisk (that is, mount\n `system.img` as `/system`, switch root to move that mount to `/`, and free\n ramdisk contents after mounting). If `androidboot.force_normal_boot=1` is\n present in the kernel command line (or bootconfig from Android\n 12 onward), devices boot normally (into Android)\n instead of booting into recovery mode.\n\nAfter first stage init finishes, it executes `/system/bin/init` with the\n`selinux_setup` argument to compile and load SELinux onto the system. Finally,\ninit executes `/system/bin/init` again with the `second_stage` argument. At this\npoint, the main phase of init runs and continues the boot process using the\n`init.rc` scripts.\n| **Note:** Android 10 replaces ramdisk contents with a first stage init executable, which is incompatible with how previous ramdisks booted the system.\n\nThe following sections detail differences in partition layouts for non-A/B\ndevices before and after Android 10.\n\nPartition layouts (non-A/B devices)\n-----------------------------------\n\nThe following sections detail differences in partition layouts for non-A/B\ndevices before and after Android 10.\n\n### boot.img\n\n| Ramdisk *(Android 8.x and lower)* | System as root *(Android 9)* | Ramdisk *(Android 10 and 11)* |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Contains a kernel and a `ramdisk.img`. ``` ramdisk.img -/ - init.rc - init - etc -\u003e /system/etc - system/ (mount point) - vendor/ (mount point) - odm/ (mount point) ... ``` | Contains a normal boot kernel only. | Contains a kernel and `ramdisk.img`. ``` ramdisk.img -/ - init - vendor fstab files - system/ (mount point) - vendor/ (mount point) - odm/ (mount point) ... ``` |\n\n### recovery.img\n\nContains a recovery kernel and a recovery `ramdisk.img`\n\n### system.img\n\n| Ramdisk *(Android 8.x and lower)* | System as root *(Android 9)* | Ramdisk *(Android 10 and 11)* |\n|---------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Contains a `system.img`. ``` system.img -/ - bin/ - etc - vendor -\u003e /vendor - ... ``` | Contains the merged contents of `$TARGET_SYSTEM_OUT` and `$TARGET_ROOT_OUT`. ``` system.img -/ - init.rc - init - etc -\u003e /system/etc - system/ - bin/ - etc/ - vendor -\u003e /vendor - ... - vendor/ (mount point) - odm/ (mount point) ... ``` | Contains the merged contents of `$TARGET_SYSTEM_OUT` and `$TARGET_ROOT_OUT`. ``` system.img -/ - init.rc - init -\u003e /system/bin/init - etc -\u003e /system/etc - system/ - bin/ - etc/ - vendor -\u003e /vendor - ... - vendor/ (mount point) - odm/ (mount point) ... ``` |\n\nPartition layouts (A/B devices)\n-------------------------------\n\nThe following sections detail differences in partition layouts for A/B devices\nbefore and after Android 10.\n\n### boot.img\n\n| System as root *(Android 9)* | Ramdisk *(Android 10 and 11)* |\n|------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Contains normal boot kernel and recovery-ramdisk (`BOARD_USES_RECOVERY_AS_BOOT := true`). Recovery-ramdisk is used only to boot into recovery. | Contains normal boot kernel and recovery-ramdisk (`BOARD_USES_RECOVERY_AS_BOOT := true`). Recovery-ramdisk is used to boot into both recovery and Android. ``` ramdisk.img -/ - init -\u003e /system/bin/init - first_stage_ramdisk - vendor fstab files - etc -\u003e /system/etc - system/ (mount point) - vendor/ (mount point) - odm/ (mount point) ... ``` |\n\n### system.img\n\nContains the merged contents of `$TARGET_SYSTEM_OUT` and `$TARGET_ROOT_OUT`. \n\n system.img\n -/\n - init.rc\n - init -\u003e /system/bin/init\n - etc -\u003e /system/etc\n - system/\n - bin/\n - etc/\n - vendor -\u003e /vendor\n - ...\n - vendor/ (mount point)\n - odm/ (mount point)\n ..."]]