Package Manager Configuration (deprecated)

The dexopt implementation in the package manager only applies to Android 13 and lower. In Android 14, it is replaced by ART Service, and it will be removed from the package manager in the next version. For information about configuring ART Service, see ART Service Configuration.

Since Android 7.0, there's a generic way to specify the level of compilation/verification that happened at various stages. The compilation levels can be configured via system properties with the defaults being:

  • pm.dexopt.install=speed-profile
  • 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). Note that if a profile isn't provided or if it is empty, speed-profile is equivalent to verify.

  • 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.

  • pm.dexopt.boot-after-ota=verify
  • 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.

  • pm.dexopt.first-boot=verify
  • The compilation filter for the first time the device ever boots. The filter used here only affects the boot time after factory. We recommend the filter verify for it to avoid long times before a user gets to use the phone for the very first time. Note that if all applications in the system image are already compiled with verify, speed-profile, or speed with the right class loader context, the compilation on the first boot will be skipped, and pm.dexopt.first-boot will have no effect.