از 27 مارس 2025، توصیه می کنیم از android-latest-release به جای aosp-main برای ساختن و کمک به AOSP استفاده کنید. برای اطلاعات بیشتر، به تغییرات AOSP مراجعه کنید.
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
دستگاههای اندرویدی شامل چندین پارتیشن یا بخشهای خاصی از فضای ذخیرهسازی هستند که برای قسمتهای خاصی از نرمافزار دستگاه استفاده میشوند. هر پارتیشن شامل یک تصویر پارتیشن (یک فایل IMG) یا عکس فوری از تمام نرم افزارهای پارتیشن است. شکل 1 طرح پارتیشن های هسته روی یک دستگاه را نشان می دهد:
شکل 1. چیدمان پارتیشن های هسته.
پارتیشن ها به سه دسته تقسیم می شوند:
پارتیشن های سیستم پارتیشن هایی هستند که هنگام به روز رسانی سیستم عامل و سایر ویژگی ها به روز می شوند. system ، boot و init_boot پارتیشن های اصلی سیستم هستند.
پارتیشن های فروشنده حاوی کد مخصوص دستگاه و سخت افزار هستند که ممکن است پس از انتشار اولیه هرگز به روز نشوند. پارتیشنهای vendor ، vendor_boot و odm پارتیشنهای فروشنده اصلی هستند.
پارتیشنهای غیرقابل بهروزرسانی، پارتیشنهایی هستند که محتوای آنها یا بهروزرسانی نمیشوند یا با دادههای کاربر بهروزرسانی میشوند.
کدهای موجود در سیستم و پارتیشن های فروشنده می توانند با استفاده از یک رابط پایدار به نام رابط فروشنده (VINTF) تعامل داشته باشند.
پارتیشن های سیستم
در زیر لیستی از تمام پارتیشن های سیستم و کاربرد آنها آمده است:
پارتیشن boot این پارتیشن حاوی یک تصویر هسته عمومی (GKI) است. این پارتیشن همچنین حاوی ramdisk عمومی در دستگاه های راه اندازی شده در اندروید 12 و پایین تر است. برای اطلاعات بیشتر در مورد ramdisk عمومی، به محتویات تصویر ramdisk عمومی مراجعه کنید.
پارتیشن init_boot (اندروید 13 و بالاتر). این پارتیشن شامل یک ramdisk عمومی است. در اندروید 11 و 12، ramdisk عمومی در پارتیشن boot است.
پارتیشن system این پارتیشن حاوی تصویر سیستم مورد استفاده برای محصولات OEM است.
پارتیشن system_ext . این پارتیشن شامل منابع سیستم و ماژول های سیستم اختصاصی است که تصویر سیستم مشترک را در پارتیشن system گسترش می دهد.
پارتیشن system_dlkm . این پارتیشن شامل ماژول های GKI می باشد. برای اطلاعات بیشتر در مورد این پارتیشن، به پیاده سازی پارتیشن ماژول GKI مراجعه کنید.
پارتیشن product این پارتیشن میتواند شامل ماژولهای خاص محصول باشد که با هیچ پارتیشن دیگری همراه نیستند.
پارتیشن pvmfw . این پارتیشن Firmware ماشین مجازی محافظت شده (pvmfw) را ذخیره می کند که اولین کدی است که در VM های محافظت شده اجرا می شود. برای اطلاعات بیشتر، سفتافزار ماشین مجازی محافظتشده را ببینید.
پارتیشن generic_bootloader . این پارتیشن شامل بوت لودر عمومی است.
پارتیشن های فروشنده
در زیر لیستی از تمام پارتیشن های فروشنده و کاربرد آنها آمده است:
پارتیشن vendor_boot . این پارتیشن حاوی کد بوت مخصوص فروشنده است. برای اطلاعات بیشتر، به پارتیشنهای بوت فروشنده مراجعه کنید.
پارتیشن recovery این پارتیشن تصویر بازیابی را ذخیره می کند که در طی فرآیند به روز رسانی over-the-air (OTA) بوت می شود. دستگاههایی که از بهروزرسانیهای یکپارچه پشتیبانی میکنند میتوانند تصاویر بازیابی را بهعنوان یک ramdisk موجود در تصویر boot یا init_boot ذخیره کنند. برای اطلاعات بیشتر درباره بهروزرسانیهای بدون درز، بهروزرسانیهای A/B (بدون درز) را ببینید.
پارتیشن misc این پارتیشن توسط پارتیشن بازیابی استفاده می شود و 4 کیلوبایت یا بزرگتر است.
پارتیشن vbmeta . این پارتیشن حاوی اطلاعات Verified Boot برای همه پارتیشن ها است. این اطلاعات تایید می کند که تصاویر نصب شده در هر پارتیشن قابل اعتماد هستند. برای اطلاعات بیشتر در مورد بوت تایید شده، به بوت تایید شده مراجعه کنید.
پارتیشن vendor این پارتیشن حاوی هر باینری است که خاص فروشنده است و به اندازه کافی عمومی نیست تا در AOSP توزیع شود.
پارتیشن vendor_dlkm . این پارتیشن شامل ماژول های هسته فروشنده است. با ذخیره ماژول های هسته فروشنده در این پارتیشن به جای پارتیشن vendor ، می توانید ماژول های هسته را بدون به روز رسانی پارتیشن vendor به روز کنید. برای اطلاعات بیشتر، به پارتیشنهای Vendor و ODM DKLM مراجعه کنید.
پارتیشن odm این پارتیشن شامل سفارشیسازیهای سازنده طراحی اصلی (ODM) برای بستههای پشتیبانی هیئت مدیره فروشنده (BSP) سیستم روی تراشه (SoC) است. چنین سفارشیسازیهایی ODMها را قادر میسازد تا اجزای SoC را جایگزین یا سفارشی کنند و ماژولهای هسته را برای اجزای برد، دیمونها و ویژگیهای خاص ODM بر روی لایههای انتزاعی سختافزاری (HAL) پیادهسازی کنند. این پارتیشن اختیاری است. معمولاً از این پارتیشن برای سفارشیسازی استفاده میشود تا دستگاهها بتوانند از یک تصویر فروشنده برای چندین SKU سختافزاری استفاده کنند. برای اطلاعات بیشتر، به پارتیشنهای ODM مراجعه کنید.
پارتیشن odm_dlkm . این پارتیشن به ذخیره سازی ماژول های هسته ODM اختصاص یافته است. با ذخیره ماژول های هسته ODM در این پارتیشن، به جای پارتیشن odm ، می توانید ماژول های هسته ODM را بدون به روز رسانی پارتیشن odm به روز کنید. برای اطلاعات بیشتر، به پارتیشنهای Vendor و ODM DKLM مراجعه کنید.
پارتیشن radio این پارتیشن حاوی تصویر رادیویی است و فقط برای دستگاه هایی که دارای رادیو با نرم افزار مخصوص رادیو در یک پارتیشن اختصاصی هستند مورد نیاز است.
پارتیشن های غیرقابل به روز رسانی
در زیر لیستی از تمام پارتیشن های غیرقابل به روز رسانی و کاربرد آنها آمده است:
پارتیشن cache این پارتیشن حاوی دادههای موقتی است و اگر دستگاه شما از بهروزرسانیهای یکپارچه استفاده میکند اختیاری است. این پارتیشن نیازی به نوشتن از بوت لودر ندارد، اما باید پاک شود. اندازه پارتیشن به نوع دستگاه و در دسترس بودن فضا در userdata بستگی دارد. معمولاً 50 تا 100 مگابایت کافی است.
پارتیشن userdata این پارتیشن شامل برنامه ها و داده های نصب شده توسط کاربر، از جمله داده های سفارشی سازی است.
پارتیشن metadata اگر دستگاه شما از رمزگذاری فراداده استفاده می کند، این پارتیشن حاوی کلید رمزگذاری ابرداده است. اندازه این پارتیشن 16 مگابایت یا بزرگتر است، رمزگذاری نشده است و اطلاعات آن عکس فوری نیست. این پارتیشن با بازنشانی کارخانه ای دستگاه پاک می شود.
قوانین و توصیه های به روز رسانی پارتیشن
توصیه می کنیم تمام پارتیشن های سیستم را به طور کلی و همه پارتیشن های فروشنده را به عنوان یک کل دیگر به روز کنید. با به روز رسانی مجموعه پارتیشن ها به عنوان یک کل، می توانید آزمایش کنید تا بررسی کنید که رابط بین تصاویر در هر پارتیشن ثابت بماند.
صرف نظر از اینکه چگونه پارتیشن های خود را به روز می کنید، پارتیشن های زیر باید به دلیل وابستگی های مرتبط و عدم وجود API های پایدار به روز شوند:
پارتیشن های boot و system_dlkm
پارتیشنهای init_boot ، system ، system_ext و product
پارتیشن های پویا
دستگاههای دارای Android 11 و بالاتر میتوانند از پارتیشنهای پویا پشتیبانی کنند، این پارتیشنها یک سیستم پارتیشنبندی فضای کاربران برای Android هستند که به شما امکان میدهند پارتیشنها را در طول بهروزرسانیهای هوایی (OTA) ایجاد، تغییر اندازه یا تخریب کنید. برای اطلاعات بیشتر، پارتیشنهای پویا را ببینید.
انواع محصول سونگ
سیستم ساخت Soong از انواع تصویر برای تقسیم وابستگی های ساخت استفاده می کند. ماژولهای بومی ( /build/soong/cc ) میتوانند ماژولهای فرآیند سیستم را به نوع اصلی و ماژولهای فرآیند فروشنده را به نوع فروشنده تغییر دهند. یک ماژول در یک نوع تصویر نمی تواند به ماژول های دیگر در یک نوع تصویر متفاوت پیوند داده شود.
در Android 12 یا بالاتر، یک ماژول سیستم با vendor_available: true یک نوع فروشنده را علاوه بر نوع اصلی ایجاد میکند. برای ایجاد یک نوع محصول، product_available: true باید تعریف شود. برخی از کتابخانه های VNDK بدون product_available: true برای ماژول های محصول در دسترس نیستند.
محتوا و نمونه کدها در این صفحه مشمول پروانههای توصیفشده در پروانه محتوا هستند. جاوا و OpenJDK علامتهای تجاری یا علامتهای تجاری ثبتشده Oracle و/یا وابستههای آن هستند.
تاریخ آخرین بهروزرسانی 2025-07-29 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","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-29 بهوقت ساعت هماهنگ جهانی."],[],[],null,["# Partitions overview\n\nAndroid devices contain several *partitions* or specific sections of storage\nspace used to contain specific parts of the device's software. Each partition\ncontains a *partition image* (an IMG file) or snapshot of all the software for\nthe partition. Figure 1 shows the layout of core partitions on a device:\n\n**Figure 1.** Layout of core partitions.\n\nPartitions are classified in three categories:\n\n- *System partitions* are partitions that are updated when updating the OS\n and other features. The `system`, `boot`, and `init_boot` are core system\n partitions.\n\n- *Vendor partitions* contain device and hardware-specific code that might\n never be updated after initial release. The `vendor`, `vendor_boot`, and `odm`\n partitions are core vendor partitions.\n\n- *Nonupdatable partitions* are partitions whose contents are either not updated\n or updated with user data.\n\nCode in system and vendor partitions can interact using a stable interface\ncalled the *vendor interface (VINTF)*.\n| **Note:** The separation of system partitions from vendor partitions was part of an Android 11 effort called *Project Treble*. With this architecture, you can update a device's operating system and apps without updating any of hardware-specific code.\n\n### System partitions\n\nFollowing is a list of all system partitions and their use:\n\n- **`boot` partition.** This partition contains a Generic Kernel Image (GKI).\n This partition also contains the generic ramdisk in devices launched in\n Android 12 and lower. For further information on generic ramdisk, see\n [Generic ramdisk image contents](/docs/core/architecture/partitions/generic-boot#generic-boot-ramdisk-image-contents).\n\n- **`init_boot` partition (Android 13 and higher).** This partition contains a\n generic ramdisk. In Android 11 and 12, the generic ramdisk is in the\n `boot` partition.\n\n- **`system` partition.** This partition contains the system image used\n for OEM products.\n\n- **`system_ext` partition.** This partition contains system resources and\n proprietary system modules that extend the common system image in the `system`\n partition.\n\n | **Note:** *Single system image (SSI)* refers to a file, such as a zip file that contains the images of the `system` and `system_ext` partitions and reuses those images across a set of target devices. For further information on SSI, see [Android shared system image](/docs/core/architecture/partitions/shared-system-image).\n- **`system_dlkm` partition.** This partition contains GKI modules. For further\n information on this partition, see [Implement a GKI module partition](/docs/core/architecture/partitions/gki-partitions).\n\n- **`product` partition.** This partition can contain product-specific modules\n that aren't bundled with any other partitions.\n\n | **Note:** The [*Vendor Native Development Kit (VNDK)*](/docs/core/architecture/vndk) is a set of libraries installed in the `system` partition and designed exclusively for vendors to implement their HALs. The `product` and `vendor` partitions can link to VNDK libraries in the `system` partition, but can't link to other libraries in the `system` partition.\n- **`pvmfw` partition.** This partition stores the Protected Virtual Machine\n Firmware (pvmfw) which is the first code that runs in protected VMs. For more\n information, see [Protected Virtual Machine Firmware](https://android.googlesource.com/platform/packages/modules/Virtualization/+/refs/heads/android16-release/guest/pvmfw/README.md).\n\n- **`generic_bootloader` partition.** This partition contains the generic bootloader.\n\n### Vendor partitions\n\nFollowing is a list of all vendor partitions and their use:\n\n- **`vendor_boot` partition.** This partition contains vendor-specific boot\n code. For more information, see [Vendor boot partitions](/docs/core/architecture/partitions/vendor-boot-partitions).\n\n- **`recovery` partition.** This partition stores the recovery image, which is\n booted during the over-the-air (OTA) update process. Devices that support\n seamless updates can store the recovery images as a ramdisk contained in the\n `boot` or `init_boot` image. For more information on seamless updates,\n see [A/B (seamless) updates](/docs/core/ota/ab).\n\n- **`misc` partition.** This partition is used by the recovery partition and is\n 4 KB or larger.\n\n- **`vbmeta` partition.** This partition contains the Verified Boot information\n for all of the partitions. This information verifies that the images installed\n in each partition is trusted. For further information on\n Verified Boot, see\n [Verified Boot](/docs/security/features/verifiedboot).\n\n- **`vendor` partition.** This partition contains any binary that is vendor\n specific and not generic enough to distribute to AOSP.\n\n | **Note:** The [*Vendor Native Development Kit (VNDK)*](/docs/core/architecture/vndk) is a set of libraries installed in the `system` partition and designed exclusively for vendors to implement their HALs. The `product` and `vendor` partitions can link to VNDK libraries in the `system` partition, but can't link to other libraries in the `system` partition.\n- **`vendor_dlkm` partition.** This partition contains vendor\n kernel modules. By storing vendor kernel modules in this partition\n instead of the `vendor` partition, you can update kernel\n modules without updating the `vendor` partition. For more information, see\n [Vendor and ODM DKLM partitions](/docs/core/architecture/partitions/vendor-odm-dlkm-partition).\n\n- **`odm` partition.** This partition contains original design manufacturer\n (ODM)\n customizations to system-on-chip (SoC) vendor board-support packages (BSPs).\n Such customizations enable ODMs to replace or customize SoC components, and\n implement kernel modules for board-specific components, daemons, and\n ODM-specific features on hardware abstraction layers (HALs). This partition is\n optional. Typically this partition is used to contain customizations so that\n devices can\n use a single vendor image for multiple hardware SKUs. For more information,\n see [ODM partitions](/docs/core/architecture/bootloader/partitions/odm-partitions).\n\n- **`odm_dlkm` partition.** This partition is dedicated to storing ODM kernel\n modules. By storing ODM kernel modules in the this partition, instead of\n the `odm` partition, you can update ODM kernel modules without updating the\n `odm` partition. For more information, see\n [Vendor and ODM DKLM partitions](/docs/core/architecture/partitions/vendor-odm-dlkm-partition).\n\n- **`radio` partition.** This partition contains the radio image and is needed\n only for devices that include a radio with radio-specific software in a\n dedicated partition.\n\n| **Note:** Devices that support seamless updates need two partitions, referred to as *slots* (slot A and slot B) for the `boot`, `system`, `vendor`, and `radio` partitions. For further information, see [Partition selection (slots)](/docs/core/ota/ab#slots).\n\n### Nonupdatable partitions\n\nFollowing is a list of all nonupdatable partitions and their use:\n\n- **`cache` partition.** This partition contains temporary data and is optional\n if your device uses seamless updates. This partition doesn't need to be\n writable from the bootloader, but needs to be erasable. The partition\n size depends on the device type and the availability of space on `userdata`;\n typically, 50 to 100 MB is sufficient.\n\n- **`userdata` partition.** This partition contains user-installed apps and\n data, including customization data.\n\n- **`metadata` partition.** If your device uses [metadata encryption](/docs/security/features/encryption/metadata),\n this partition contains the metadata encryption key. The size of this\n partition is 16 MB or larger, it isn't encrypted, and its data isn't\n snapshotted. This partition is erased when the device is factory reset.\n\nPartition update rules and recommendations\n------------------------------------------\n\nWe recommend updating all system partitions as a whole\nand all vendor partitions as another whole. By updating the set of partitions as\na whole, you can test to verify the interfaces between images in each partition\nremain stable.\n\nRegardless of how you update your partitions, the following partitions must\nbe updated due to tightly coupled dependencies and lack of stable APIs:\n\n- The `boot` and `system_dlkm` partitions\n- the `init_boot`, `system`, `system_ext`, and `product` partitions\n\n| **Note:** If all interfaces between the `product` partition and other system partitions have stable ABIs, you can update the `product` partition independently. For furthe information, see [Maintain ABIs between partitions](/docs/core/architecture/partitions/product-partitions#maintaining-abis).\n\nDynamic partitions\n------------------\n\nDevices running Android 11 and higher can support\ndynamic partitions, which are a userspace partitioning system for Android that\nlets you create, resize, or destroy partitions during over-the-air (OTA)\nupdates. For more information, see [Dynamic partitions](/docs/core/ota/dynamic_partitions).\n\n### Soong product variants\n\nThe [Soong](/docs/setup/build) build system uses image variants to split\nbuild dependencies. Native modules (`/build/soong/cc`) can mutate system\nprocess modules to the core variant and vendor process modules to the\nvendor variant; a module in one image variant can't link to other modules in\na different image variant.\n\nIn Android 12 or higher, a system module with\n`vendor_available: true` creates a vendor variant in addition to the core\nvariant. To create a product variant, `product_available: true` must be\ndefined. Some VNDK libraries without `product_available: true` aren't\navailable to product modules."]]