از 27 مارس 2025، توصیه می کنیم از android-latest-release به جای aosp-main برای ساختن و کمک به AOSP استفاده کنید. برای اطلاعات بیشتر، به تغییرات AOSP مراجعه کنید.
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
پروژه منبع باز Android (AOSP) کد منبع اندرویدی در دسترس عموم و قابل تغییر است. هر کسی می تواند AOSP را برای دستگاه خود بارگیری و تغییر دهد. AOSP یک پیاده سازی کامل و کاملا کاربردی از پلتفرم موبایل اندروید را ارائه می دهد.
دو سطح سازگاری برای دستگاههای پیادهسازی AOSP وجود دارد: سازگاری AOSP و سازگاری Android. یک دستگاه سازگار با AOSP باید با فهرست الزامات موجود در سند تعریف سازگاری (CDD) مطابقت داشته باشد. یک دستگاه سازگار با Android باید با فهرست الزامات موجود در CDD و الزامات نرمافزار فروشنده (VSR) و آزمایشهایی مانند موارد موجود در مجموعه تست فروشنده (VTS) و مجموعه تست سازگاری (CTS) مطابقت داشته باشد. برای اطلاعات بیشتر در مورد سازگاری Android، به برنامه سازگاری Android مراجعه کنید.
معماری AOSP
پشته نرم افزار برای AOSP شامل لایه های زیر است:
شکل 1. معماری پشته نرم افزار AOSP.
در زیر لیستی از تعاریف برای اصطلاحات استفاده شده در شکل 1 آمده است:
برنامه اندروید
برنامه ای که صرفاً با استفاده از API Android ایجاد شده است. Google Play Store به طور گسترده ای برای یافتن و دانلود برنامه های اندروید استفاده می شود، اگرچه گزینه های بسیار دیگری نیز وجود دارد. در برخی موارد، سازنده دستگاه ممکن است بخواهد یک برنامه Android را برای پشتیبانی از عملکرد اصلی دستگاه از قبل نصب کند. اگر به توسعه برنامههای Android علاقه دارید، به developers.android.com مراجعه کنید.
برنامه ممتاز
برنامه ای که با استفاده از ترکیبی از Android و APIهای سیستم ایجاد شده است. این برنامهها باید بهعنوان برنامههای ممتاز روی یک دستگاه از قبل نصب شده باشند.
برنامه سازنده دستگاه
برنامه ای که با استفاده از ترکیبی از API Android، API سیستم و دسترسی مستقیم به پیاده سازی فریمورک اندروید ایجاد شده است. از آنجا که سازنده دستگاه ممکن است مستقیماً به APIهای ناپایدار در چارچوب Android دسترسی داشته باشد، این برنامهها باید از قبل روی دستگاه نصب شده باشند و فقط زمانی میتوانند بهروزرسانی شوند که نرمافزار سیستم دستگاه بهروزرسانی شود.
سیستم API
System API نشاندهنده APIهای Android است که فقط برای شرکا و OEMها برای گنجاندن در برنامههای همراه در دسترس هستند. این APIها به عنوان @SystemApi در کد منبع مشخص شده اند.
Android API
Android API API در دسترس عموم برای توسعه دهندگان برنامه اندروید شخص ثالث است. برای اطلاعات در مورد Android API، به مرجع Android API مراجعه کنید.
فریمورک اندروید
گروهی از کلاسهای جاوا، رابطها و سایر کدهای از پیش کامپایلشده که برنامهها بر اساس آنها ساخته میشوند. بخشهایی از چارچوب از طریق استفاده از API Android به صورت عمومی در دسترس هستند. بخشهای دیگر چارچوب فقط برای OEMها از طریق استفاده از APIهای سیستم در دسترس است. کد فریم ورک اندروید در فرآیند یک برنامه اجرا می شود.
خدمات سیستمی
سرویسهای سیستم اجزای ماژولار و متمرکزی مانند system_server ، SurfaceFlinger و MediaService هستند. عملکردی که توسط API چارچوب Android در معرض دید قرار میگیرد، با سرویسهای سیستم برای دسترسی به سختافزار زیربنایی ارتباط برقرار میکند.
زمان اجرا اندروید (ART)
یک محیط زمان اجرا جاوا ارائه شده توسط AOSP. ART ترجمه بایت کد برنامه را به دستورالعمل های مخصوص پردازنده انجام می دهد که توسط محیط زمان اجرا دستگاه اجرا می شوند.
لایه انتزاعی سخت افزاری (HAL)
HAL یک لایه انتزاعی با یک رابط استاندارد برای پیاده سازی فروشندگان سخت افزار است. HALها به اندروید اجازه میدهند که نسبت به پیادهسازی درایورهای سطح پایینتر بیاعتنا باشد. استفاده از HAL به شما این امکان را می دهد که عملکردها را بدون تأثیرگذاری یا اصلاح سیستم سطح بالاتر پیاده سازی کنید. برای اطلاعات بیشتر، به نمای کلی HAL مراجعه کنید.
شیاطین و کتابخانه های بومی
دیمون های بومی در این لایه عبارتند از init , healthd , logd و storaged . این دیمونها مستقیماً با هسته یا سایر رابطها تعامل دارند و به پیادهسازی HAL مبتنی بر فضای کاربر وابسته نیستند.
کتابخانه های بومی در این لایه شامل libc ، liblog ، libutils ، libbinder و libselinux هستند. این کتابخانههای بومی مستقیماً با هسته یا سایر رابطها تعامل دارند و به پیادهسازی HAL مبتنی بر فضای کاربر وابسته نیستند.
هسته
هسته بخش مرکزی هر سیستم عامل است و با سخت افزار زیرین دستگاه صحبت می کند. در صورت امکان، هسته AOSP به ماژول های سخت افزاری و ماژول های خاص فروشنده تقسیم می شود. برای توضیحات، از جمله تعاریف، اجزای هسته AOSP، به نمای کلی کرنل مراجعه کنید.
بعدش چی؟
اگر با AOSP تازه کار هستید و می خواهید توسعه را شروع کنید، به بخش شروع کنید مراجعه کنید.
اگر میخواهید درباره لایه خاصی از AOSP اطلاعات بیشتری کسب کنید، روی نام بخش در ناوبری سمت چپ کلیک کنید و با نمای کلی آن بخش شروع کنید.
محتوا و نمونه کدها در این صفحه مشمول پروانههای توصیفشده در پروانه محتوا هستند. جاوا و OpenJDK علامتهای تجاری یا علامتهای تجاری ثبتشده Oracle و/یا وابستههای آن هستند.
تاریخ آخرین بهروزرسانی 2025-07-28 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","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-28 بهوقت ساعت هماهنگ جهانی."],[],[],null,["# Architecture overview\n\nThe *Android Open Source Project (AOSP)* is publicly available and modifiable\nAndroid source code. Anyone can download and modify AOSP for their device. AOSP\nprovides a complete and fully functional implementation of the Android mobile\nplatform.\n| **Note:** AOSP can't provide support for apps that require backend services, such as a cloud messaging or advanced location services app. AOSP also doesn't include a full set of end-user apps that might be needed for particular types of devices.\n\nThere are two levels of compatibility for devices implementing AOSP: AOSP\ncompatibility and Android compatibility. An *AOSP-compatible device* must\nconform to the list of requirements in the\n[Compatibility Definition Document (CDD)](/docs/compatibility/cdd). An\n*Android-compatible device* must conform to the list of requirements in the CDD\nand Vendor Software Requirements (VSR) and tests such as those in the\n[Vendor Test Suite (VTS)](/docs/core/tests/vts) and\n[Compatibility Test Suite (CTS)](/docs/compatibility/cts). For further\ninformation on Android compatibility, refer to the\n[Android compatibility program](/docs/compatibility).\n\nAOSP architecture\n-----------------\n\nThe software stack for AOSP contains the following layers:\n\n**Figure 1.** AOSP software stack architecture.\n\nFollowing is a list of definitions for terms used in Figure 1:\n\n*Android app*\n: An app created solely using the Android API. Google\n Play Store is widely used to find and download Android apps, though there are\n many other alternatives. In some cases, a device manufacturer might want to\n preinstall an Android app to support the core functionality of the device. If\n you're interested in developing Android apps, refer to\n [developers.android.com](https://developer.android.com/).\n\n*Privileged app*\n: An app created using a combination of the Android and system APIs. These apps\n must be preinstalled as privileged apps on a device.\n\n*Device manufacturer app*\n: An app created using a combination of the Android API, system API, and direct\n access to the Android framework implementation. Because a device manufacturer\n might directly access unstable APIs within the Android framework, these apps\n must be preinstalled on the device and can be updated only when the device's\n system software is updated.\n\n*System API*\n: The System API represents Android APIs available only to partners and\n OEMs for inclusion in bundled applications. These APIs are marked as @SystemApi\n in the source code.\n\n*Android API*\n: The Android API is the publicly available API for third-party Android app\n developers. For information on the Android API, refer to\n [Android API reference](https://developer.android.com/reference).\n\n*Android framework*\n: A group of Java classes, interfaces, and other precompiled code upon which\n apps are built. Portions of the framework are publicly accessible through the\n use of the Android API. Other portions of the framework are\n available only to OEMs through the use of the system APIs. Android\n framework code runs inside an app's process.\n\n*System services*\n: System services are modular, focused components such as `system_server`,\n SurfaceFlinger, and MediaService. Functionality exposed by Android framework API\n communicates with system services to access the underlying hardware.\n\n*Android runtime (ART)*\n: A Java runtime environment provided by AOSP. ART performs the\n translation of the app's bytecode into processor-specific instructions\n that are executed by the device's runtime environment.\n\n*Hardware abstraction layer (HAL)*\n: A HAL is an abstraction layer with a standard interface for hardware vendors\n to implement. HALs allow Android to be agnostic about lower-level driver\n implementations. Using a HAL lets you implement functionality without\n affecting or modifying the higher level system. For further information,\n see the [HAL overview](/docs/core/architecture/hal).\n\n*Native daemons and libraries*\n\n: Native daemons in this layer include `init`, `healthd`, `logd`, and\n `storaged`. These daemons interact directly with the kernel or other interfaces\n and don't depend on a userspace-based HAL implementation.\n\n Native libraries in this layer include `libc`, `liblog`, `libutils`,\n `libbinder`, and `libselinux`. These Native libraries interact directly with\n the kernel or other interfaces and don't depend on a userspace-based HAL\n implementation.\n\n*Kernel*\n\n: The kernel is the central part of any operating system and talks to the\n underlying hardware on a device. Where possible, the AOSP kernel is split\n into hardware-agnostic modules and vendor-specific modules. For a description,\n including definitions, of AOSP kernel components, refer to the\n [Kernel overview](/docs/core/architecture/kernel).\n\nWhat's next?\n------------\n\n- If you're new to AOSP, and want to get started with development, refer to the [Get started section](/docs/setup).\n- If you want to learn more about a specific layer of AOSP, click the section's name in the left navigation and begin with the overview for that section."]]