231

Recently Google brought up a new feature app bundle which is a pretty similar concept to APK except its flexibility and architectural differences.

I have read out lots of blog/articles to understand how app bundle works in devices in comparison with APK file.

What is the actual internal working process of app bundle and how it works on Android devices starting from Google Play Store?

JorgeAmVF
  • 1,660
  • 3
  • 21
  • 32
0xAliHn
  • 18,390
  • 23
  • 91
  • 111
  • 5
    See https://developer.android.com/guide/app-bundle/ – IntelliJ Amiya Aug 28 '18 at 13:42
  • 3
    saw that. But from google play to android device working process is pretty unclear. – 0xAliHn Aug 28 '18 at 13:43
  • 1
    WHat is unclear about it? google takes your apk with your signature your provide them splits it up into separate apk's for different resolutions and such and when a device downloads it, google play provides the correct apk for that device type – tyczj Aug 28 '18 at 13:52
  • 8
    An aab is still sort of an apk, they just throw out irrelevant pieces depending on the device that downloads the app in the end. The process happening between you uploading an aab and a device downloading an apk is essentially [bundletool](https://developer.android.com/guide/app-bundle/test) running on google's play store servers. – zapl Aug 31 '18 at 17:08
  • https://codelabs.developers.google.com/codelabs/your-first-dynamic-app/index.html#0 – Anoop M Maddasseri Nov 26 '19 at 09:23

3 Answers3

233

App Bundles are a publishing format, whereas APK (Android application PacKage) is the packaging format which eventually will be installed on device.

App Bundles use bundletool to create a set of APK. (.apks) This can be extracted and the base and configuration splits as well as potential dynamic feature modules can be deployed to a device.

The dependencies can look something like this: Bundletool modules

The contents of an App Bundle look kind of like this: Bundletool contents

More information on App Bundles is available here.

Ben Weiss
  • 17,182
  • 6
  • 67
  • 87
103

App bundles are publishing format, whereas APK (Android application Package) is the packaging format which eventually will be installed on device.

Google uses app bundle to generate and serve optimized APKs for each user’s device configuration, so they download only the code and resources they need to run your app. Therefore, users can get smaller and more optimized downloads.

enter image description here

Ayoub Boumzebra
  • 3,885
  • 3
  • 21
  • 37
  • So Google haven't decided to deprecate APK format and I will be able to install any APK in future Android verstion, right? I have an open source android APP written by myself and I haven't released It on Play Store. – Akhmedzianov Danilian Jul 18 '21 at 09:18
  • 1
    You better start using AAB, Googla said: Google Play will start requiring new apps to be published with the Android App Bundle starting August 2021 – Ayoub Boumzebra Jul 18 '21 at 10:58
  • 4
    My app is open source software without payments. I do not want to distribute my app with Google play store because I don't want to pay Google. The price isn't that big, but why should I? I asked about Google's plans about dropping APK format support. – Akhmedzianov Danilian Jul 19 '21 at 19:07
  • 1
    this is simple and nice explanation. :) – Sumit Oct 14 '21 at 09:44
31

Following are benefits of Android App Bundle over APK on PlayStore:

  1. Smaller Download Size
  2. On Demand App features
  3. Asset-only modules
Ananth
  • 2,597
  • 1
  • 29
  • 39