החל מ-27 במרץ 2025, מומלץ להשתמש ב-android-latest-release
במקום ב-aosp-main
כדי ליצור תרומות ל-AOSP. מידע נוסף זמין במאמר שינויים ב-AOSP.
הגדרות של מנהל החבילות (הוחלפה)
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
ההטמעה של dexopt במנהל החבילות רלוונטית רק ל-Android 13 ומטה. ב-Android 14 הוא הוחלף ב-ART Service, והוא יוסר מנהל החבילות בגרסה הבאה. מידע נוסף על הגדרת ART Service זמין במאמר הגדרת ART Service.
החל מגרסה 7.0 של Android, יש דרך גנרית לציין את רמת הידור/אימות שהתרחשה בשלבים שונים.
אפשר להגדיר את רמות הידור באמצעות מאפייני מערכת, והרמות שמוגדרות כברירת מחדל הן:
pm.dexopt.install=speed-profile
זהו מסנן ה-compilation שמשמש להתקנת אפליקציות דרך Google Play או חנויות אפליקציות אחרות. מומלץ להגדיר את מסנן ההתקנה ל-speed-profile
כדי לאפשר שימוש בפרופילים מקובצי המטא-נתונים של dex (ראו בלוג).
הערה: אם לא מציינים פרופיל או שהוא ריק, הערך של speed-profile
שווה לערך של verify
.
pm.dexopt.bg-dexopt=speed-profile
זהו מסנן ה-compilation שמשמש כשהמכשיר לא פעיל וטעון. כדאי לנסות את המסנן speed-profile
של המהדר כדי ליהנות מהיתרונות של הידור לפי פרופיל ולחסוך באחסון.
pm.dexopt.boot-after-ota=verify
מסנן הידור שנעשה בו שימוש אחרי עדכון אוויר. מומלץ מאוד להשתמש במסנן המהדר verify
לאפשרות הזו כדי למנוע זמני אתחול ארוכים מאוד.
pm.dexopt.first-boot=verify
-
מסנן הידור בפעם הראשונה שהמכשיר מופעל. המסנן שבו נעשה שימוש כאן משפיע רק על זמן האתחול אחרי שחזור להגדרות המקוריות. מומלץ להשתמש במסנן verify
כדי למנוע מצב שבו המשתמשים יצטרכו להמתין זמן רב לפני שהם יוכלו להשתמש בטלפון בפעם הראשונה. חשוב לדעת: אם כל האפליקציות בתמונת המערכת כבר עברה הידור באמצעות verify
, speed-profile
או speed
עם ההקשר הנכון של מעמיס הכיתות, הידור האתחול הראשון יודלג ולא תהיה ל-pm.dexopt.first-boot
השפעה.
דוגמאות התוכן והקוד שבדף הזה כפופות לרישיונות המפורטים בקטע רישיון לתוכן. Java ו-OpenJDK הם סימנים מסחריים או סימנים מסחריים רשומים של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-27 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-27 (שעון UTC)."],[],[],null,["# Package Manager Configuration (deprecated)\n\nThe dexopt implementation in the package manager only applies to Android\n13 and lower. In Android 14, it is replaced by ART\nService, and it will be removed from the package manager in the next version. For information about\nconfiguring ART Service, see\n[ART Service Configuration](/docs/core/runtime/configure/art-service).\n\n\nSince Android 7.0, there's a generic way to specify the level of\ncompilation/verification that happened at various stages.\nThe compilation levels can be configured via system properties\nwith the defaults being:\n\n- `pm.dexopt.install=speed-profile`\n- This is the compilation filter used when installing applications through Google Play or other app stores. We recommend the install filter be set to `speed-profile` in order to enable the use of profiles from the dex metadata files (see [blog](https://android-developers.googleblog.com/2019/04/improving-app-performance-with-art.html)). Note that if a profile isn't provided or if it is empty, `speed-profile` is equivalent to `verify`.\n- `pm.dexopt.bg-dexopt=speed-profile`\n- This is the compilation filter used when the device is idle and charging. Try the `speed-profile` compiler filter to take advantage of profile-guided compilation and save on storage.\n- `pm.dexopt.boot-after-ota=verify`\n- The compilation filter used after an over-the-air update. We **strongly** recommend the `verify` compiler filter for this option to avoid very long boot times.\n- `pm.dexopt.first-boot=verify`\n-\n The compilation filter for the first time the device ever boots. The filter\n used here only affects the boot time after factory. We recommend the filter\n `verify` for it to avoid long times before a user gets to\n use the phone for the very first time. Note that if all applications in\n the system image are already compiled with `verify`, `speed-profile`, or\n `speed` with the right class loader context, the compilation on the first boot will be\n skipped, and `pm.dexopt.first-boot` will have no effect."]]