apks file produced with bundletool's --local-testing flag is not installed properly
See original GitHub issueThe problem
An apks
file produced with bundletool
’s --local-testing
flag is not installed properly.
Environment
- Appium 1.21
Details
The official way to install an aab
file with Appium is to transform it into an apks
archive. If the original aab
file uses dynamically loaded assets, the apks
file should be created with bundletool
’s --local-testing
flag as per documentation.
If I understand correctly, Appium “only installs the minimum set of resources, following the behavior of the appbundle feature”. In practice it means that additional assets aren’t installed and cannot be loaded.
Android docs suggest installing apks by running bundletool install-apks
, and in this case all necessary files are installed.
Thus, I wanted to:
- Ask whether there is a simple workaround to install the missing apks;
- Propose to install
apks
withbundletool
rathen than withadb
.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6
Top Results From Across the Web
bundletool - Android Developers
Note: If you're using the --local-testing flag with the build-apks command, use install-apks to install your APKs to ensure that local testing ......
Read more >Cannot install unsigned APK from debug AAB #153 - GitHub
The problem is that in order to generate the APKS and install the result, the bundletool force me to provide the --ks parameter....
Read more >Unable to convert app bundle to APK in android - Stack Overflow
Step 1 --> Open Android Studio and Select Build. Step 2 --> Select Build Bundle/ APK Then you can see 2 Options Build...
Read more >How To Test Android App Bundle - Appium
Since Appium 1.9.2, you can Appium tests against an .apks file using UiAutomator2 driver. ... Appium looks for bundletool.jar in your local environemnt....
Read more >Android: Aab Bundles, install on Devices | by Leo N - Medium
Note: If you're using the --local-testing flag with the build-apks command, for local testing to work correctly, you need to use install-apks to ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
At the time we were working on this feature the functionality of bundletool was quite limited. So we had to basically mimic some of its behaviours in order to still provide features we have for vanilla .apk files. Basically, to support these dynamic resources we just need to push them to a special place, where the system could find them later (e.g. mimic the original bundle tool behaviour): https://github.com/google/bundletool/blob/a7bcb5392a2fc074fd11551b7663643d1dbb0f1d/src/main/java/com/android/tools/build/bundletool/commands/InstallApksCommand.java#L194 The list of such dynamic resources could be retrieved from the special
toc
file, which is also included into the apks: https://github.com/google/bundletool/blob/06296d8ec009af6ec7d09f6da2cf54994fa3a89b/src/test/java/com/android/tools/build/bundletool/testing/ApkSetUtils.java#L45Another option would be to use bundletool as is. I assume it’s already at the stage, where we have the necessary functionality there that we previously had using vanilla adb commands.
Marking as a feature request for now. Feel free to start working on it @rg-software
The patch has been merged and published to appium@beta