Guide #58 · Physical-Device QA & Android Vitals · 7 min read · 1282 words · Verified 2026-11-26

Installing and Testing an Android App Bundle (.aab) Locally on Real Phones Using bundletool (Why Renaming to .apk Fails)

Use Google's official bundletool CLI to slice, sign, and deploy split APKs from your release .aab directly onto USB-connected ARM64 phones before uploading to Google Play Closed Testing.

By GOOtester Android Release Engineering (Android Build Systems & Physical-Device QA)

Developer terminal executing bundletool build-apks and install-apks against a physical ARM64 Android smartphone over USB
Reproducing Google Play Dynamic Delivery locally catches R8, ABI split, and resource-shrinking crashes before Day 1 of Closed Testing.

Executive Summary & Citation-Ready Key Takeaways (TL;DR)

  • An Android App Bundle (.aab) is a Google Play publishing archive whose manifests and resource tables are encoded in Protocol Buffers (.pb), meaning renaming it to .apk always fails; developers must run Google's bundletool CLI to slice and install signed split APKs locally.
  • Testing only `assembleDebug` in Android Studio misses production-only crashes caused by R8 code shrinking, missing ProGuard keep rules, stripped native `.so` libraries, and dynamic locale splits.
  • Passing `--connected-device` to `bundletool build-apks` extracts the attached phone's exact ABI, screen density, and language specs, mirroring Play Store Dynamic Delivery faithfully.
  • Avoid testing exclusively with `--mode=universal`, because fat universal APKs mask missing split-resource lookup bugs (`Resources$NotFoundException`) that crash real Play Store installs.
  • Pairing local `bundletool` preflight checks with GOOtester's standalone physical-device ARM64 ADB QA ($12 Standard / $20 Premium) keeps your 14-day human Closed Testing track crash-free.

1. Why Renaming app-release.aab to .apk Always Fails on Android

Every developer shipping their first Google AI Studio, Flutter, React Native, or Kotlin app hits the same surprise: `./gradlew bundleRelease` outputs `app-release.aab`, and copying that file to a phone—or renaming its extension to `.apk`—immediately fails with `There was a problem parsing the package` (`INSTALL_PARSE_FAILED_NOT_APK`).

Although both `.apk` and `.aab` files use ZIP compression under the hood, an `.aab` is an intermediate **publishing archive** meant for Google Play's servers rather than Android's on-device `PackageManager`. Inside an `.aab`, `AndroidManifest.xml` and `resources.pb` are serialized in Google Protocol Buffers instead of compiled Android binary XML (`AXML`) and `resources.arsc`. Google's open-source `bundletool` is the exact engine Play Store servers run to transform that `.aab` into installable split `.apks`.

Archive Format Comparison: Raw .aab vs. Universal .apk vs. Split .apks
Artifact FormatManifest & Resource EncodingDirect Phone Install?Mirrors Play Store Delivery?
app-release.aabProtocol Buffers (resources.pb)No — parse errorUpload artifact only
app-universal.apks (--mode=universal)Compiled AXML + all ABIs/densitiesYes (extracted single APK)No — hides split-APK bugs
app-device.apks (--connected-device)Compiled AXML + exact device splitsYes (via install-apks)Yes — faithful Play parity
Play Internal App Sharing linkCloud-signed Play Store splitsYes (via Play Store app)Yes — includes Play App Signing

2. Running bundletool build-apks & install-apks on a Connected Phone

Install `bundletool` in seconds via Homebrew on macOS (`brew install bundletool`) or download the standalone `bundletool-all.jar` release from Google's GitHub repository. Enable **USB debugging** on a real ARM64 phone, verify `adb devices` lists the handset in `device` state, and generate an `.apks` archive signed with your upload keystore.

Notice the `--connected-device` flag below: `bundletool` queries your attached phone over ADB for `arm64-v8a`, `xxxhdpi`, SDK version, and active locales, compiling and installing *only* the exact split APKs Google Play will deliver to a tester owning that handset.

If your automated CI runner needs to reproduce a crash reported on a specific handset model you do not physically own—for example, a 320dpi budget tablet set to Spanish (`es-ES`)—you can alternatively run `bundletool get-device-spec --output=device-spec.json` or craft a JSON device specification file (`supportedAbis`, `supportedLocales`, `screenDensity`, `sdkVersion`) and pass `--device-spec=device-spec.json` to inspect the exact generated APK slices offline.

# 1. Slice and sign split APKs tailored to your USB-connected Android phone
bundletool build-apks \
  --bundle=app/build/outputs/bundle/release/app-release.aab \
  --output=/tmp/release-device.apks \
  --connected-device \
  --ks=keystore/upload-keystore.jks \
  --ks-key-alias=upload \
  --ks-pass=env:UPLOAD_STORE_PASSWORD \
  --key-pass=env:UPLOAD_KEY_PASSWORD \
  --overwrite

# 2. Deploy the multi-APK split session via ADB and estimate Play download size
bundletool install-apks --apks=/tmp/release-device.apks
bundletool get-size total --apks=/tmp/release-device.apks
Architecture pipeline showing Protocol Buffer AAB conversion through bundletool into device-targeted base, ABI, density, and locale split APKs
Why Android PackageManager rejects raw .aab archives and requires compiled binary-XML split APKs.

3. 4 Release-Only Bugs You Catch Locally Before Uploading to Play Console

Uploading an untested `.aab` directly to your Closed Testing track wastes 24 to 72 hours in Play Console review if the release crashes on launch—and spikes your user-perceived crash rate above Google's 1.09% Android Vitals bad-behavior threshold once human testers open it.

Execute this four-point verification sequence on your local `bundletool` install before every Closed Testing release upload.

  1. Verify Cold-Start Under Full R8 Minification: Launch the installed split APK from a cold process kill while streaming `adb logcat *:E` to catch stripped Gson, Kotlinx Serialization, or JNI reflection classes.
  2. Test Play Asset & Feature Delivery with --local-testing: Append `--local-testing` to `build-apks` when testing on-demand feature modules or Play Asset Delivery packs offline without uploading to Play Console.
  3. Audit Dynamic Language & Drawable Density Splits: Switch the phone's system language in Android Settings to ensure runtime locale pickers use Play Core SplitInstallManager rather than crashing on missing strings.
  4. Inspect Download Footprint & 16 KB ELF Alignment: Run `bundletool get-size total` (without `--connected-device` on a full `.apks` set) and verify `arm64-v8a` native `.so` libraries load cleanly on Android 15/16.

4. From Local Desk Testing to Multi-OEM Closed Testing Validation

Validating your `.aab` on the single Pixel or Samsung phone sitting on your desk eliminates 80% of packaging defects, yet OEM-specific GPU drivers, Samsung One UI / Xiaomi HyperOS background restrictions, and Play App Signing certificate swaps (remember: Play Store re-signs your upload key with Google's App Signing key!) still require cloud-delivered validation.

Run one quick Play Console **Internal Testing** install to confirm production Play App Signing SHA-1 fingerprints, then promote that verified `.aab` to Closed Testing with `testers@gootester.com`. Choosing GOOtester's Standard ($12: 15 human testers / 16 days) or Premium ($20: 25 human testers / 24 days) plan adds standalone physical-device ARM64 ADB QA diagnostics—tracked strictly separately from human opt-ins—so every release enters Production review with clean Vitals.

  • Never hardcode keystore passwords in shell history; pass `env:VAR_NAME` to `bundletool`.
  • Archive `app/build/outputs/mapping/release/mapping.txt` alongside every `.aab` build.
  • Verify Google Sign-In and Firebase Auth on Internal Testing after Play App Signing re-signs the bundle.
  • Wait for Closed Testing track approval before your GOOtester 14-day clock starts.

Actionable Pre-Submission Verification Checklist

  • Build your release artifact with `./gradlew bundleRelease` (or `flutter build appbundle` / `eas build`).
  • Install `bundletool` locally and never attempt to rename `.aab` files to `.apk`.
  • Run `bundletool build-apks --connected-device` signed with your keystore using `env:` password flags.
  • Install split APKs via `bundletool install-apks` and monitor `adb logcat` across cold launch and core flows.
  • Use `--local-testing` to verify Play Asset Delivery or dynamic feature modules offline.
  • Validate Play App Signing SHA-1 behavior on Internal Testing before promoting to Closed Testing.

Frequently Asked Questions

Why did my app work in Android Studio Run but crash when installed from the release .aab?

Android Studio's default Run builds an unminified debug APK. Release .aab builds enable R8 code shrinking, resource shrinking, and split-APK packaging, which strip unreferenced reflection classes unless kept in proguard-rules.pro.

Can I send the .apks file generated by bundletool to non-technical beta testers?

No. An .apks archive still requires `bundletool install-apks` over ADB and does not count toward Google Play's 12-tester Closed Testing rule. Non-technical testers must install via your Play Console Closed Testing web opt-in link.

Does bundletool sign my app with Google Play's final App Signing key?

Locally, bundletool signs split APKs with whatever local keystore you pass (typically your upload key). To test behavior under Google's cloud App Signing certificate (for OAuth SHA-1 checks), use Play Console Internal Testing.

How does GOOtester's physical-device ADB QA relate to my 12 human testers?

They are 100% separate. GOOtester's human testers opt in via testers@gootester.com on their own phones, while our standalone ARM64 ADB QA diagnostics test binary stability without touching Play Console opt-in counts.

Need 12 to 25 Real Consented Human Testers for 14 Consecutive Days?

One-time per-app pricing ($6 Basic · $12 Standard · $20 Premium). Service clock starts only after Play Console Google Group (testers@gootester.com) setup verification.

Related Google Play Engineering Guides