The Android App Bundles Effect

Jatin Dhall
ADGVIT
Published in
4 min readJan 27, 2022

.apk files have been used since 2008 when the android operating system first came into existence. These files have played a significant role in converting code written by the developers into fully functioning android applications. From Google Play Store to Third-Party App Stores, Apks have been extensively used to distribute and install android applications.

In Google IO Summit May 2018, we were introduced to a new type of file format called Android App Bundles(.aab), which is now being used by over 1 million apps currently, including major apps like Netflix, Twitter and Adobe.

But why switch?

For that we need to understand .apk and .aab files a little more.

Android Package Kit Files(.apk files)

Android Package Kit or Android application package, is a file format used by the Android OS for the distribution and installation of android applications. APK files are generated by compiling code, written in several languages specifically for android, which is then packaged into one APK file.

Overview of the contents of an apk file

An APK file is an archive, that contains directories such as META-INF, res, lib, AndroidManifest.xml, classes.dex, resources.arsc

Some of the main directories/files in an APK File are :

  • AndroidManifest.xml: Contains information of your package, including components of the application, permissions and version details.
  • res: Contains all non-code resources, such as XML layouts and media files, divided into corresponding sub-directories.
  • classes.dex: Contains the code of the given application compiled into a class file which is cross-compiled to Dalvik VM format.

Android App Bundles(.aab)

An Android App Bundle is a publishing format that contains your app’s compiled code and resources and defers APK generation. .aab files serve as optimized versions of APK’s particularly containing files for the specific device’s configuration, rather than compiling the files for all sorts of devices in a single APK file. This means that only the code and resources that are needed for the specific device are downloaded to run your app, which causes the user to get smaller and more-optimized downloads(on average, 15% smaller than a universal APK).

Overview of the working of Android App Bundles

From observing the image above, we can understand that .aab files include all the components to make an APK. When we download an Android App Bundle from the Play Store or a Third-Party App Store, it builds the APK targeted to your specific device, hence making it a smaller and more optimized download.

Dynamic Feature Delivery using AAB’s

Advantages of AAB’s over APK’s

  • Smaller download size & disc allocation: Users will only get the codes and resources that are required for the particular device. This results in smaller download sizes of about 15% as compared to regular apk downloads.
  • Play Feature Delivery: Play Feature Delivery uses advanced capabilities of app bundles, allowing certain features of your app to be delivered conditionally or downloaded on demand. Other Dynamic features can allow us to defer installation in the background.
  • Play Asset Delivery: Play Asset Delivery (PAD) brings the benefits of app bundles to games. Play Asset Delivery uses asset packs, which are composed of assets (such as textures, shaders, and sounds), but no executable code. The user can download Through Dynamic Delivery, you can customize how and when each asset pack is downloaded onto a device according to three delivery modes: install-time, fast-follow, and on-demand.

Disadvantages of AAB’s over APK’s

While AAB’s are generally an asset to most users, it can be a bit of a headache for developers and some users.

  • AAB’s make it difficult for developers to distribute their apps on app stores other than Google Play Store.
  • As the App Bundle system centres on the dynamic in-cloud generation of signed APKs, developers need to hand their app signing keys over to Google. Instead of developers signing app updates in their build infrastructure, Google will take an App Bundle and convert it to signed APK’s itself.
  • Since the developers have to hand the signing keys over, Google has even more control of Android app distribution. Moreover, Google would have the power to publish app updates itself, if compelled to.

Conclusion

In conclusion, the switch from .apk to .aab is a beneficial one for the users, since it reduces the download size, and provides a lot more features, making it much more efficient to download apps, especially on low-end devices. On the other hand, it can be a bit of a headache for the developers, since it means that developers won’t be allowed to distribute their apps on other app stores, and will have to hand over the signing keys to Google, putting all of the power in Google’s hands.

Hope this blog was helpful, feel free to connect with us

--

--