اعتبارًا من 27 آذار (مارس) 2025، ننصحك باستخدام android-latest-release بدلاً من aosp-main لإنشاء AOSP والمساهمة فيه. لمزيد من المعلومات، يُرجى الاطّلاع على التغييرات في AOSP.
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
تستند نواة Android إلى نواة Linux Long Term Supported (LTS). في Google، يتم دمج نُسخ LTS مع تصحيحات خاصة بنظام Android لتكوين نُسخ Android الأساسية الشائعة (ACK).
يتم إنشاء حِزم ACK من مستودع kernel/common. هذا المستودع هو مجموعة شاملة من حزمة Linux الأساسية، ويتضمّن تصحيحات إضافية خاصة بنظام Android.
يُطلق على حِزم ACK التي تتضمّن الإصدار 5.10 والإصدارات الأحدث أيضًا اسم حِزم *نواة GKI. تتيح نِوى GKI فصل رمز نواة النظام الأساسي
العام غير المرتبط بالأجهزة ووحدات GKI عن وحدات المورّد الخاصة بالأجهزة.
يتم تفعيل التفاعل بين نواة GKI ووحدات البائع من خلال
واجهة وحدة النواة (KMI) التي تتألف من قوائم الرموز التي تحدّد
الوظائف والبيانات العامة التي تتطلّبها وحدات البائع. يوضّح الشكل 1 بنية نواة GKI ووحدة المورّد:
الشكل 1. بنية وحدة النواة ووحدة المورّد في GKI
مسرد مصطلحات النواة
في ما يلي المصطلحات المستخدَمة في مستندات النواة.
أنواع النواة
نواة Android المشتركة (ACK)
نواة مشتقة من نواة LTS وتتضمّن تصحيحات مهمة لمنتدى Android. لم يتم دمج هذه التصحيحات في إصدار Linux الرئيسي أو في نواة GKI طويلة الأمد.
لا يمكن نقل ميزات Android 12 إلى الإصدارات السابقة من النواة 4.19، وستكون مجموعة الميزات مشابهة لتلك المتوفّرة على جهاز تم إطلاقه بالإصدار 4.19 من نظام التشغيل Android 11 وتمت ترقيته إلى Android 12.
نواة Generic Kernel Image (GKI)
أي إصدار 5.10 والإصدارات الأحدث من نواة ACK(aarch64 فقط) يتضمّن نواة GKI الجزأين التاليين:
نواة عامة: هي جزء من نواة GKI مشترك بين جميع الأجهزة.
وحدات GKI: وحدات نواة أنشأتها Google ويمكن تحميلها بشكل ديناميكي على الأجهزة عند الاقتضاء. يتم إنشاء هذه الوحدات النمطية كعناصر
من نواة GKI، ويتم توفيرها مع GKI كأرشيف system_dlkm_staging_archive.tar.gz. توقّع Google وحدات GKI باستخدام زوج المفاتيح الذي يتم إنشاؤه أثناء إنشاء النواة، وتكون هذه الوحدات متوافقة فقط مع نواة GKI التي تم إنشاؤها باستخدامها.
نواة Linux متوافقة لمدة تتراوح بين سنتَين و6 سنوات يتم إصدار نواة LTS مرة واحدة في السنة، وهي الأساس لكل نواة Android المشتركة من Google.
أنواع الفروع
فرع نواة ACK KMI
الفرع الذي يتم إنشاء نواة GKI له تتطابق أسماء الفروع مع إصدارات النواة، مثل android15-6.6.
Android-mainline
فرع التطوير الأساسي لميزات Android عند الإعلان عن
نواة LTS جديدة في المصدر الرئيسي، يتم إنشاء فرع من
نواة GKI الجديدة المطابقة من android-mainline.
الإصدار الرئيسي من Linux
: هو فرع التطوير الأساسي لنواة Linux الأصلية، بما في ذلك نواة LTS.
مصطلحات أخرى
صورة التشغيل المتحقّق منه
يتم تسليم النواة في شكل ثنائي (boot.img) وتثبيتها على الجهاز.
تُعدّ هذه الصورة معتمَدة لأنّها تتضمّن شهادات مضمّنة، وبالتالي يمكن لـ Google التحقّق من أنّ الجهاز يتضمّن نواة معتمَدة من Google.
وحدة نواة قابلة للتحميل بشكل ديناميكي (DLKM)
وحدة يمكن تحميلها بشكل ديناميكي أثناء تشغيل الجهاز، وذلك حسب احتياجات الجهاز. إنّ GKI ووحدات المورّدات كلاهما نوعان من وحدات DLKM. يتم إصدار وحدات DLKM بتنسيق .ko، ويمكن أن تكون برامج تشغيل أو يمكنها توفير وظائف أخرى لنواة النظام.
مشروع GKI
أحد مشاريع Google التي تهدف إلى معالجة تجزئة النواة من خلال فصل وظائف النواة الأساسية الشائعة عن وظائف SoC الخاصة بالمورّد ووظائف دعم اللوحة في وحدات قابلة للتحميل.
صورة النواة العامة (GKI)
: هي صورة تمهيد معتمَدة من Google تحتوي على نواة GKI تم إنشاؤها من
شجرة مصدر ACK ومناسبة لتثبيتها على قسم التمهيد
لجهاز يعمل بنظام التشغيل Android.
واجهة وحدة النواة (KMI)
واجهة بين نواة GKI ووحدات المورّدين تتيح إمكانية تحديث وحدات المورّدين بشكل مستقل عن نواة GKI. تتألف هذه الواجهة من دوال النواة والبيانات العامة التي تم تحديدها على أنّها تبعيات المورّد/مصنّع المعدات الأصلية باستخدام قوائم الرموز لكل شريك.
وحدة المورّدين
وحدة خاصة بالأجهزة طوّرها أحد الشركاء وتحتوي على منظومة على الرقاقة (SoC) ووظائف خاصة بالجهاز. وحدة البائع هي نوع من وحدات النواة التي يمكن تحميلها بشكل ديناميكي.
الخطوات التالية
إذا كنت حديث العهد بتطوير نواة Android، ابدأ بقراءة ما يلي:
إذا كنت حديث العهد بتطوير نواة GKI، ابدأ بقراءة تطوير GKI.
يخضع كل من المحتوى وعيّنات التعليمات البرمجية في هذه الصفحة للتراخيص الموضحّة في ترخيص استخدام المحتوى. إنّ Java وOpenJDK هما علامتان تجاريتان مسجَّلتان لشركة Oracle و/أو الشركات التابعة لها.
تاريخ التعديل الأخير: 2025-07-27 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","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 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# Kernel overview\n\nThe Android kernel is based on an upstream\n[Linux Long Term Supported (LTS) kernel](https://www.kernel.org/category/lts). At Google, LTS kernels are combined\nwith Android-specific patches to form *Android Common Kernels (ACKs)*.\n\nACKs are built from the [kernel/common](https://android.googlesource.com/kernel/common) repository. This repository is a\nsuperset of the upstream Linux kernel, with additional Android-specific patches.\n\nACKs that are 5.10 and higher are also known as \\*generic kernel images (GKI)\nkernels. GKI kernels support the separation of the hardware-agnostic *generic\ncore kernel* code and [GKI modules](/docs/core/architecture/kernel/modules#gki-modules) from hardware-specific\n[vendor modules](/docs/core/architecture/kernel/modules#vendor-modules).\n\nThe interaction between the GKI kernel and vendor modules is enabled by the\n*Kernel Module Interface (KMI)* consisting of symbol lists identifying the\nfunctions and global data required by vendor modules. Figure 1 shows the GKI\nkernel and vendor module architecture:\n\n**Figure 1.** GKI kernel and vendor module architecture.\n| **Note:** The GKI kernel, GKI module, and vendor module architecture is the result of a multi-year effort known as the Generic Kernel Image (GKI) project. For information about this project and its phases, refer to [The Generic Kernel Image (GKI) project](/docs/core/architecture/kernel/generic-kernel-image).\n| **Note:** Kernels are referred to by their platform version followed by a kernel version. For example, `android15-6.6` is kernel for Android 15 with a version of `6.6`.\n\nKernel glossary\n---------------\n\nFollowing are terms used throughout the kernel documentation.\n\n### Kernel types\n\n*Android Common Kernel (ACK)*\n: A kernel that is downstream of a LTS kernel and includes patches that are\n important to the Android community. These patches haven't been merged into\n Linux mainline or Long Term GKI kernels.\n\nKernel with versions of 5.10 and higher are also referred to as\n[Generic Kernel Image (GKI)](#gkik) kernels.\n\n*Android Open Source Project (AOSP) kernel*\n: See [Android Common Kernel](#ack).\n\nAndroid 12 features can't be backported to 4.19 kernels; the feature set would\nbe similar to a device that launched with 4.19 on Android 11 and upgraded to\nAndroid 12.\n\n*Generic Kernel Image (GKI) kernel*\n\n: Any 5.10 and higher [ACK kernel](#ack)(aarch64 only). The GKI kernel has these\n two parts:\n\n - *Generic kernel* - The portion of the GKI kernel that is common across\n all devices.\n\n - *GKI modules* - Kernel modules built by Google that can be dynamically\n loaded on devices where applicable. These modules are built as artifacts\n of the GKI kernel and are delivered alongside GKI as the\n `system_dlkm_staging_archive.tar.gz` archive. GKI modules are signed by\n Google using the kernel build time key pair and are compatible only with the\n GKI kernel that they're built with.\n\n*Kernel Module Interface (KMI) kernel*\n\n: See [GKI kernel](#gkik).\n\n*Long Term Supported (LTS) kernel*\n\n: A Linux kernel that's supported for 2 to 6 years. [LTS kernels](https://www.kernel.org/category/lts) are\n released once per year and are the basis for each of Google's\n [Android Common Kernels](#ack).\n\n### Branch types\n\n*ACK KMI kernel branch*\n: The branch for which [GKI kernels](#gkik) are built. Branch names correspond\n to kernel versions, such as `android15-6.6`.\n\n*Android-mainline*\n: The primary development branch for Android features. When a new\n [LTS kernel](#lts) is declared upstream, the corresponding new\n [GKI kernel](#gkik)GKI kernel is branched from android-mainline.\n\n*Linux mainline*\n:The primary development branch for the upstream Linux kernels, including LTS\nkernels.\n\n### Other terms\n\n*Certified boot image*\n: The kernel delivered in binary form (`boot.img`) and flashed onto the device.\n This image is considered certified because contains embedded certificates so\n Google can verify that the device ships with a kernel certified by Google.\n\n*Dynamically loadable kernel module (DLKM)*\n: A module that can be dynamically loaded during device boot depending on the\n needs of the device. GKI and vendor modules are both types of DLKMs. DLKMs are\n released in `.ko` form and can be drivers or can deliver other kernel\n functionality.\n\n*GKI project*\n: A Google project addressing kernel fragmentation by separating common core\n kernel functionality from vendor-specific SoC and board support into loadable\n modules.\n\n*Generic Kernel Image (GKI)*\n:A boot image certified by Google that contains a [GKI kernel](#gkik) built from\nan [ACK](#ack) source tree and is suitable to be flashed to the boot partition\nof an Android-powered device.\n\n*Kernel Module Interface (KMI)*\n: An interface between the [GKI kernel](#gkik) and vendor modules allowing\n vendor modules to be updated independently of the GKI kernel. This interface\n consists of kernel functions and global data that have been identified as\n vendor/OEM dependencies using per-partner symbol lists.\n\n*Vendor module*\n: A hardware-specific module developed by a partner and that contains SoC and\n device-specific functionality. A vendor module is a type of dynamically loadable\n kernel module.\n\nWhat's next\n-----------\n\nIf you're new to Android kernel development, start by reading the\nfollowing:\n\n- [Long Term Stable Kernels](/docs/core/architecture/kernel/releases) - Background on upstream LTS kernels which feed into ACKs.\n- [Android Common Kernels](/docs/core/architecture/kernel/android-common) - Background on ACKs.\n\nIf you're new to GKI kernel development, start by reading\n[GKI development](/docs/core/architecture/kernel/gki-dev)."]]