What exactly is happening when apps are being optimised on Android?


Like of you upgrade to a newer version of Android; one of the last steps in the process is app optimization. What exactly is being done to the apps to make them “optimised”?

In: 13


Android does some magic to installed apps that makes them load faster. This magic only works for a single version of the OS, so after an upgrade, it needs to happen again.

The longer answer involves package formats, and inner workings of the operating system. If you’re curious, this is pretty well document in the Android OS docs, but they’re dense.

The slightly longer version is that Android apps are distributed as .apk files. These .apk files are not actually executable, they’re a compressed format that’s easier to download. To actually run on your device, they are converted to a .odex file. This caches some parts of the app so that it is quicker to load after a reboot or being closed. The “optimizing apps” message is saying that these .odex files are being recreated.