0

Originally I use build variants to build two apks: myapp-armv7.apk and myapp-arm64.apk, for the 32bit and 64bit architectures, respectively. For example, the 32bit apk only contains native .so files for 32bit, while the 64bit apk only contains those for 64bit.

However, now I not only want these two apk files, but also want a myapp.aab bundle. The question is, how to build the 32bit and 64bit apk from this aab bundle?

I have tried Generate Apk file from aab file (android app bundle) . However, if I use --mode=universal, though I get an installable apk file, it contains both 32bit and 64bit .so files inside it, so it is really huge and we should not use it. If I do not use that flag, I get a bunch of apk files (i.e. an .apks file), but of course a user should only download one .apk file and click "install", so that is also not feasible.

ch271828n
  • 15,854
  • 5
  • 53
  • 88

1 Answers1

0

AFAIK, this is not workable. Universal mode + unzip is a trick to extract what we are familiar with - the .apk. However, other use cases of BundleTool produce .apks only, which is our only choice to install for per device. Therefore, I think your question is about how to deploy those .apks to test devices easily.

  • For local install / CI&CD, use bundletool install-apks CLI just like what you did with adb install.
  • For manual staging testing by QA, deploy the .aab to PlayStore internal testing channel, AppCenter testing channel, etc.
2BAB
  • 1,215
  • 10
  • 18
  • No, my question is not about deploying `apks` file. I really need `.apk` file. – ch271828n Dec 31 '21 at 09:18
  • Well...unfortunately no such existing tool to make it from aab to split apk. I also wonder if there is something can provide this feature. @ch271828n – 2BAB Dec 31 '21 at 09:24