Skip to content

Instantly share code, notes, and snippets.

@samuelbezerrab
Created July 1, 2022 17:46
Show Gist options
  • Select an option

  • Save samuelbezerrab/ba2fd3011b18788adef4f03a3cf5332e to your computer and use it in GitHub Desktop.

Select an option

Save samuelbezerrab/ba2fd3011b18788adef4f03a3cf5332e to your computer and use it in GitHub Desktop.
Get APKs from AAB file
# install bundletool, read more at https://developer.android.com/studio/command-line/bundletool
brew install bundletool
# extract apks file from aab. If bundle is signed, specify the keystore attributes as well. If the bundle is not signed, you can add universal model, change the output to .zip, & use universal.apk
bundletool build-apks --bundle=bundle.aab --output=output.apks --ks=key.jks --ks-pass=pass:password --ks-key-alias=password --key-pass=pass:password
# install the apks file to your device
bundletool install-apks —apks=output.apks
# extract the path of your package name
adb shell pm path package-name
# extract out the apk from the above path to your system
adb pull package-address /Users/{User}/Downloads/test.apk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment