Difference between apk (.apk) and app bundle (.aab)

AndroidApkAndroid App-Bundle

Android Problem Overview


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?

Android Solutions


Solution 1 - Android

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.

Solution 2 - Android

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

Solution 3 - Android

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

  1. Smaller Download Size
  2. On Demand App features
  3. Asset-only modules

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Question0xAliHnView Question on Stackoverflow
Solution 1 - AndroidkeyboardsurferView Answer on Stackoverflow
Solution 2 - AndroidAyoub BoumzebraView Answer on Stackoverflow
Solution 3 - AndroidDr. Parag C ShuklaView Answer on Stackoverflow