קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
הטמעה
במכשירים מבוססי Android עם 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 של מחיצה כזו מצורף לסוף המחיצה, כדי שיאומת על ידי מפתח ציבורי צפוי ממערכת הקבצים. מערכת ה-build של Android תומכת בחתימת system_other.img תוך צירוף מפתח החתימה התואם בקטע /product/etc/security/avb/system_other.avbpubkey. כלי ההפצה sign_target_files_apks.py תומך גם בהחלפת מפתח החתימה לגרסה של גרסת build.
במכשירי 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 במחיצה של המוצר ולהגדיר את המאפיין ro.postinstall.fstab.prefix לערך /product.
# 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 (שעון 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,["# 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```"]]