Websites · Compared

AAB vs APK: Android App Bundle or package file

An APK is the Android package file a phone actually installs. An AAB, an Android App Bundle, is a publishing format you upload to Google Play, which then builds optimised APKs for each device. Since August 2021 new apps on Google Play must be published as App Bundles, while APKs remain the way to install test builds directly.

You upload an AAB to the store and send an APK to a tester. Both come from the same code; they serve different steps on the way to people's phones.

· Co-founder

4 min read · Published

AAB and APK compared
QuestionAAB (Android App Bundle)APK (Android package)
What it isA publishing format with all code and resourcesAn installable package
Who installs itNobody directly; Google Play turns it into APKsPhones, directly or from a store
Required forNew apps on Google Play since August 2021Direct installs and many other stores
Download size for usersSmaller; each device gets only what it needsIncludes resources for every device
SigningYou sign with an upload key; Play signs the APKs it deliversSigned by whoever builds it
Good forStore releases and Play testing tracksSharing a test build by link or QR code

What each one is

An APK, Android Package Kit, is a zip archive containing compiled code, resources, the manifest and a signature, and it is what Android installs. An App Bundle, file extension .aab, contains the same compiled code and resources organised by device configuration, such as screen density, CPU architecture and language. Google's documentation states that from August 2021 new apps must publish with the App Bundle on Google Play. Google Play uses the bundle to generate split APKs tailored to each device that downloads the app.

How they are signed and delivered

With an App Bundle, you sign the upload with your upload key, and Google Play App Signing holds the app signing key that signs the APKs it delivers to phones. If the upload key is lost, it can be reset through Google, which is safer than the old model where losing the only key meant never updating the app again. An APK built for direct installation is signed by the builder and installs as long as the phone allows installs from that source. Expo's build service produces an APK when a profile sets distribution to internal or the Android build type to apk, and an App Bundle for store builds by default.

When each matters

Use an App Bundle for anything going to Google Play, including internal, closed and open testing tracks. Use an APK when a tester or staff member needs to install the app directly, such as a QR code on a test build, or for stores that do not accept bundles. A business sharing a pilot app with its own staff often starts with APKs and moves to the store once the app is ready for customers.

Common mistakes

Sending an .aab file to someone to install; phones cannot install it. Uploading an APK to a new Google Play app. Losing the upload key and not knowing Play App Signing can reset it. Changing the package name between a test APK and the store bundle, which makes them different apps on the phone. Forgetting to raise the version code, so Google Play refuses the upload. And asking customers to sideload an APK, which trains them to turn off a security protection.

Where it shows up in OneCraft

OneCraft runs Android and iPhone builds through Expo on paid plans, at 5 credits each: a test build, which on Android installs from a QR code, or a store build for submission. Builds run on OneCraft's Expo organisation unless the owner connects their own token. The owner submits to Google Play from their own account with eas submit; Google charges 25 USD once, and a new personal Play account must test with 12 people for 14 days before release. OneCraft does not submit apps to the stores.

Questions people ask

Can I install an AAB file on my phone?

Not directly. Phones install APKs. Tools such as Google's bundletool can turn a bundle into a set of APKs for a connected device, which developers use for testing, but for ordinary testers, share an APK build or invite them to a Play testing track.

Does Google Play still accept APKs?

Not for new apps, which must be published as App Bundles. Some older apps created before the change could keep uploading APKs for a time, and other app stores may still accept them. Check Play Console's requirements for your app before relying on an APK upload.

Why is my AAB bigger than my APK?

An App Bundle contains resources and code for every device configuration, so the file you upload can be larger. What users download is smaller, because Google Play delivers only the parts their device needs. Compare download sizes in Play Console rather than the size of the uploaded file.

Is an APK from outside the store safe to install?

Only if you trust the source and the file has not been changed. Android warns before installing apps from unknown sources for this reason. For staff or testers, share APKs from your own build service links rather than through file sharing sites, and remove old test versions.

Do I need different code for AAB and APK?

No. Both are built from the same project. The build settings decide the output format and signing. In Expo, the build profile chooses: internal distribution produces an APK, and the default production profile produces an App Bundle for Google Play.

Make one with websites

The button opens the generator with this use case already described. Change the wording to match your own.

Create a website with OneCraft

Related questions

Sources

Written and checked by the OneCraft team. Last checked .