Reputation: 4467
I am currently able to install the release apk from app bundle to a connected device using the BundleTool. Is there a way to extract the apks from the .apks zip so that I can share it with someone to run on its device. I also tried to get apk from a json configuration file as mentioned in the Bundletool utility but I am getting one base apk and few other apks so how should I go for installing it on a remote device. I tried installing base apk and the app crashed when I launched the app.
So basically I need to know how can I extract an apk from an app bundle without having to connect the device.
Upvotes: 0
Views: 1243
Reputation: 4467
I found the answer but was late to post it. So its a small addition to the answer mentioned by @Emad.
--mode=universal
This will general a universal APK with all the modules included, the size of the build will be high but now the build can be shared without having the device being connected.
Upvotes: 1
Reputation: 618
You can check bundle tool click here
For Debug apk command,
bundletool build-apks --bundle=/MyApp/my_app.aab --output=/MyApp/my_app.apks
For Release apk command,
bundletool build-apks --bundle=/MyApp/my_app.aab --output=/MyApp/my_app.apks
--ks=/MyApp/keystore.jks
--ks-pass=file:/MyApp/keystore.pwd
--ks-key-alias=MyKeyAlias
--key-pass=file:/MyApp/key.pwd
Upvotes: 1