2025 年 3 月 27 日より、AOSP のビルドとコントリビューションには aosp-main
ではなく android-latest-release
を使用することをおすすめします。詳細については、AOSP の変更をご覧ください。
パッケージ管理システムの設定(非推奨)
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
パッケージ マネージャーの dexopt 実装は Android 13 以前にのみ適用されます。Android 14 では、ART サービスで置き換えられています。また、次のバージョンではパッケージ マネージャーから削除される予定です。ART サービスの構成について詳しくは、ART サービスの構成をご覧ください。
Android 7.0 以降では、さまざまな段階で発生したコンパイル / 検証のレベルを指定する汎用的な方法があります。
コンパイル レベルは、次のデフォルト値を持つシステム プロパティで構成できます。
pm.dexopt.install=speed-profile
Google Play または他のアプリストアからアプリをインストールする際に使用されるコンパイル フィルタです。dex メタデータ ファイルで指定されたプロファイルを使用できるようにするには、インストール フィルタを speed-profile
に設定することをおすすめします(ブログを参照)。プロファイルが指定されていない場合や空の場合は、speed-profile
は verify
と同じになります。
pm.dexopt.bg-dexopt=speed-profile
デバイスがアイドル状態で充電中の場合に使用されるコンパイル フィルタです。プロファイル ガイド付きコンパイルを利用してストレージの容量を節約するには、speed-profile
コンパイラ フィルタをお試しください。
pm.dexopt.boot-after-ota=verify
無線(OTA)アップデート後に使用されるコンパイル フィルタ。起動に非常に長い時間がかかる事態を避けるため、このオプションで verify
コンパイラ フィルタを指定することを強くおすすめします。
pm.dexopt.first-boot=verify
-
デバイスの初回起動時に使用されるコンパイル フィルタ。
ここで使用されるフィルタは、工場出荷後の初回の起動時間にのみ影響します。ユーザーが初めてスマートフォンを使用する際の起動時間が長くなるのを避けるには、verify
フィルタの指定をおすすめします。なお、システム イメージ内のすべてのアプリが、適切なクラスローダーのコンテキストで verify
、speed-profile
、または speed
ですでにコンパイルされている場合、初回起動時のコンパイルはスキップされて、pm.dexopt.first-boot
は何も影響を与えません。
このページのコンテンツやコードサンプルは、コンテンツ ライセンスに記載のライセンスに従います。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,["# 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."]]