اعتبارًا من 27 آذار (مارس) 2025، ننصحك باستخدام android-latest-release بدلاً من aosp-main لإنشاء AOSP والمساهمة فيه. لمزيد من المعلومات، يُرجى الاطّلاع على التغييرات في AOSP.
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
التنفيذ
يمكن للأجهزة التي تعمل بنظام التشغيل Android 9 والإصدارات الأقدم والتي تتضمّن قسمَي A/B
استخدام القسم غير النشط system_other (على سبيل المثال،
system_bعندما يكون القسم slot_a نشطًا) لتخزين ملفات VDEX/ODEX التي تم تحسينها مسبقًا. عند استخدام system_other، يتم ضبط ro.cp_system_other_odex على 1 لخدمة مدير الحِزم لضبط sys.cppreopt=requested لـ cppreopts.rc لكي يتخذ إجراءً بشأنه.
في نظام التشغيل Android 10، تم تقديم libfs_avb
للسماح بالتحقق من بروتوكول AVB المستقل للقسيمة
system_other. تتم إضافة بنية VBMeta لهذا القسم
إلى نهاية القسم للتحقّق منه باستخدام مفتاح عام متوقّع
من نظام الملفات. يتيح نظام إنشاء تطبيقات Android توقيع ملف APK
system_other.img مع تضمين مفتاح التوقيع المقابل
ضمن /product/etc/security/avb/system_other.avbpubkey. تتيح أداة
الإصدار sign_target_files_apks.py أيضًا استبدال مفتاح التوقيع
بإصدار الإصدار.
تحتوي أجهزة A/B التي تم طرحها قبل Android 10 على قسم ملف شخصي
system_other، حتى إذا تمت ترقيتها إلى Android 10 مع ضبط
PRODUCT_RETROFIT_DYNAMIC_PARTITIONS على true.
يجب أن تحتوي أجهزة A/B التي تم تشغيلها باستخدام Android 10 على قسم برمجي
system_other. يعرض المثال التالي ملف
fstab.postinstall نموذجيًا يفعّل بروتوكول AVB على
system_other.
بالنسبة إلى الأجهزة التي تحتاج إلى تفعيل بروتوكول AVB في قسم system_other، يجب وضع ملف fstab في قسم المنتج وضبط القيمة /product على السمة ro.postinstall.fstab.prefix.
# Use /product/etc/fstab.postinstall to mount system_other. PRODUCT_PRODUCT_PROPERTIES += \ro.postinstall.fstab.prefix=/product
PRODUCT_COPY_FILES+=\$(LOCAL_PATH)/fstab.postinstall:$(TARGET_COPY_OUT_PRODUCT)/etc/fstab.postinstall
يخضع كل من المحتوى وعيّنات التعليمات البرمجية في هذه الصفحة للتراخيص الموضحّة في ترخيص استخدام المحتوى. إنّ 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,["# Verify system_other partition\n\nImplementation\n--------------\n\nAndroid-powered devices with Android 9 and lower that have A/B partitions can\nuse the inactive `system_other` partition (for example,\n`system_b`when `slot_a` is active) to store preoptimized\nVDEX/ODEX files. When `system_other` is used,\n`ro.cp_system_other_odex` is set to 1 for the package manager\nservice to set `sys.cppreopt=requested` for `cppreopts.rc`\nto act on it.\n\nIn Android 10, [`libfs_avb`](https://android.googlesource.com/platform/system/core/+/refs/heads/android16-release/fs_mgr/libfs_avb/)\nis introduced to support standalone AVB verification for the\n`system_other` partition. The VBMeta struct of such a partition is\nappended to the end of the partition, to be verified by an expected public key\nfrom the file system. The Android build system supports signing\n`system_other.img` while including the corresponding signing key\nunder `/product/etc/security/avb/system_other.avbpubkey`. The release\ntool `sign_target_files_apks.py` also supports replacing the signing\nkey to a release version.\n\nA/B devices launched before Android 10 have a physical\n`system_other` partition, even if it's upgraded to Android 10 with\n`PRODUCT_RETROFIT_DYNAMIC_PARTITIONS` set to `true`.\n\n| **Note:** It isn't recommended to enable AVB on these devices. `system_other.img` isn't included in the over-the-air package, which can lead to verification errors after a few A/B updates.\n\nA/B devices launched with Android 10 must have a logical\n`system_other` partition. The following example shows a typical\n`fstab.postinstall` file that enables AVB on\n`system_other`. \n\n```carbon\n#\u003cdev\u003e \u003cmnt_point\u003e \u003ctype\u003e \u003cmnt_flags options\u003e \u003cfs_mgr_flags\u003e\nsystem /postinstall ext4 ro,nosuid,nodev,noexec\nslotselect_other,logical,avb_keys=/product/etc/security/avb/system_other.avbpubkey\n```\n\nDevices that need to enable AVB on the `system_other` partition\nshould place the `fstab` file in the product partition and set the\nproperty `ro.postinstall.fstab.prefix` to `/product`. \n\n```makefile\n# Use /product/etc/fstab.postinstall to mount system_other. PRODUCT_PRODUCT_PROPERTIES += \\\nro.postinstall.fstab.prefix=/product\n\nPRODUCT_COPY_FILES += \\\n$(LOCAL_PATH)/fstab.postinstall:$(TARGET_COPY_OUT_PRODUCT)/etc/fstab.postinstall\n```"]]