C. Scott Brown / Android Authority
TL;DR
- Android 15’s new app archiving feature works with apps distributed as both APKs and Android App Bundles.
- In contrast, the Google Play Store’s app archiving feature only works with apps distributed as Android App Bundles.
- The reason for this difference is that Google had to employ a clever trick to make the Play Store’s app archiving feature work on older versions of Android.
Google finally rolled out the Android 15 update to Pixel devices today, ending the nearly month-and-a-half-long wait since it released the operating system’s source code. One particularly cool trick in Android 15 is app archiving. This feature frees up storage space by removing an app’s installation and temporary files, but it doesn’t remove its data, saving you from having to set it up again in the future. App archiving isn’t exclusive to Android 15, as Google’s app store already supports it, but the feature is less restrictive in Android 15 and works with all app distribution formats — not just app bundles.
Last year, the Google Play Store rolled out an “auto-archiving” feature that automatically archives apps you don’t often use. Google Play’s auto-archiving feature achieves a similar result as Android 15’s app archiving feature, but the way it works is completely different under the hood. See, in order to make Google Play auto-archiving work without OS-level support, Google had to employ a clever trick: The company made use of the compartmentalized nature of the Android App Bundle format that many developers use to distribute Android apps on the Google Play Store.
When developers upload an Android App Bundle for distribution on Google Play, the Play Console automatically generates the base APK, split APKs, and multi-APKs needed for all configurations the app supports, but it also generates an additional “archived APK.” An archived APK is essentially a trimmed-down version of the base APK that’s installed on devices when you download many apps from Google Play. When the Google Play Store goes to archive an app, it installs the archived APK on top of the base APK file, which is possible because the archived APK has the exact same signature as the base APK.
Since the archived APK is almost empty, save for the app’s original icon (with a cloud-download logo overlaid on top) and some tiny amount of code to send the command to restore the app when the icon is tapped, it takes up much less space. Plus, since only the base APK was overwritten, the app’s data is kept intact, and all the Play Store has to do to restore the app back to normal is redownload the base APK (and any other necessary splits).
To simplify things for developers, Google decided to make the Play Store’s auto-archiving feature only work with Android apps distributed in the Android App Bundle format, because with the way bundles are typically generated and signed, developers don’t have to do any additional legwork to support the feature. One of the main reasons why Google wanted to bake app archiving support into the OS is so third-party app stores can support the feature. Most third-party app stores don’t use app bundles, though, which is why Google decided to make app archiving in Android 15 work with apps distributed as APKs, too.
The fact that Android 15’s app archiving feature works with regular APKs isn’t mentioned in Google’s documentation, but it’s easy to verify. Instagram and Threads, two popular Android apps distributed in the APK format, can both be archived in Android 15, for example. When Android 15 archives an app like this, it doesn’t install an “archived APK” on top of it. Instead, it completely deletes the app installation files but still treats the app like it’s installed, so it appears in the home screen and in Settings. Android also stores a copy of the app’s original icon in a private data directory which it then applies a filter over and adds an overlay to make it clear the app is archived.
The fact that app archiving in Android 15 works with all Android apps is great news, and it’ll hopefully spur third-party app stores to add support for the feature, just as Google intended. If you’re wondering how to use the new app archiving feature in Android 15, follow that link where my colleague Rita El Khoury explains everything.