Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install Android App Bundle on device

People also ask

How do I install an Android App Bundle?

Currently, APKMirror lets you install app bundles using its own installer called APKMirror installer. You can install it directly from their website by clicking here or download it from the Google Play Store.

Can we install aab file in Android device?

aab files are directly uploaded to Google Play, and you can't directly install it using the native package installer, you won't easily find . aab files of your favorite apps on the internet. If you are a developer, you can use Google's bundletool for generating APKs from an Android App Bundle.

How do I download an APK bundle?

To download the Android app bundle file using the APKMirror installer, you need to search for the app. Then click on the “Install Package” button. It will begin downloading the . AAB file and install that file on your Android phone using the installer.


Short answer:

Not directly.

Longer answer:

Android App Bundles is the default publishing format for apps on the Google Play Store. But Android devices require .apk files to install applications.

The Play Store or any other source that you're installing from will extract apks from the bundle, sign each one and then install them specific to the target device.

The conversion from .aab to .apk is done via bundletool.

You can use Internal App Sharing to upload a debuggable build of your app to the Play Store and share it with testers.


Installing the aab directly from the device, I couldn't find a way for that.

But there is a way to install it through your command line using the following documentation You can install apk to a device through BundleTool

According to "@Albert Vila Calvo" comment he noted that to install bundletools using HomeBrew use brew install bundletool

You can now install extract apks from aab file and install it to a device

Extracting apk files from through the next command

java -jar bundletool-all-0.3.3.jar build-apks --bundle=bundle.aab --output=app.apks --ks=my-release-key.keystore --ks-key-alias=alias --ks-pass=pass:password

Arguments:

  • --bundle -> Android Bundle .aab file
  • --output -> Destination and file name for the generated apk file
  • --ks -> Keystore file used to generate the Android Bundle
  • --ks-key-alias -> Alias for keystore file
  • --ks-pass -> Password for Alias file (Please note the 'pass' prefix before password value)

Then you will have a file with extension .apks So now you need to install it to a device

java -jar bundletool-all-0.6.0.jar install-apks --adb=/android-sdk/platform-tools/adb --apks=app.apks

Arguments:

  • --adb -> Path to adb file
  • --apks -> Apks file need to be installed

For MAC:

brew install bundletool
bundletool build-apks --bundle=./app.aab --output=./app.apks
bundletool install-apks --apks=app.apks

You cannot install app bundle [NAME].aab directly to android device because it is publishing format, but there is way to extract the required apk from bundle and install it to you device, the process is as follow

  1. Download bundletool from here
  2. run this in your terminal,
java -jar bundletool.jar build-apks --bundle=bundleapp.aab --output=out_bundle_archive_set.apks
  1. Last step will generate a file named as out_bundle_archive_set.apks, just rename it to out_bundle_archive_set.zip and extract the zip file, jump into the folder out_bundle_archive_set > standalones, where you will seee a list of all the apks

There goes the reference from android developers for bundle tools link

android developer reference


If you want to install apk from your aab to your device for testing purpose then you need to edit the configuration before running it on the connected device.

  1. Go to Edit Configurations
    enter image description here
  2. Select the Deploy dropdown and change it from "Default apk" to "APK from app bundle".enter image description here
  3. Apply the changes and then run it on the device connected. Build time will increase after making this change.

This will install an apk directly on the device connected from the aab.