Reputation: 547
I have a self build APK distribution infrastructure where I place my multiple APK's based on OEM's and then specifc APK is downloaded to specific OEM device. Now since the introduction of app bundles in android, I wonder if I can provide a specific apk to specifc devices by generating them from my app bundle on the fly? I have the bundle but I do not know how can I generate APK from it on my server. I also cant see any service provided by Google for this.
Upvotes: 1
Views: 300
Reputation: 647
You can use the bundletool via command line to generate the apk from your server, and then serve the output files to the OEMs, as almost every backend techonologies offers command line interfaces.
https://github.com/google/bundletool
Note that they provide a .jar file, so you may have to have java installed in your server's machine.
You may call the bundletool .jar like bellow
java -jar ~/Downloads/bundletool-all-0.3.3.jar build-apks
--bundle=your_bundle_path
--output=out_bundle_archive_set.apks
source: https://medium.com/mindorks/android-app-bundle-part-2-bundletool-6705b50bea4c
Official documentation link (As Pierre suggested): https://developer.android.com/studio/command-line/bundletool
Upvotes: 2