question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

install multiple apks with install-multiple argument (not apks by aab case)

See original GitHub issue

The problem

our app is using dynamic feature delivery (https://developer.android.com/guide/app-bundle/dynamic-delivery) - meaning, the app consists of multiple APKs (base + dynamic feature modules)

The adb command supports the install-multiple command for this use-case. It takes a list of APKs to install:

       adb install-multiple [-lrtsdpg] file...
         Push this package file to the device and install it.

       · -l: Forward lock application.

       · -r: Replace existing application.

       · -t: Allow test packages.

       · -s: Install application on sdcard.

       · -d: Allow version code downgrade (debuggable packages only).

       · -p: Partial application install.

       · -g: Grant all runtime permissions.

Appium, however, seems to support only one APK (http://appium.io/docs/en/commands/device/app/install-app/). Could the driver.installApp command be changed to take a list of strings?

Thanks.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
KazuCocoacommented, Oct 20, 2020

If you provide the app under test as .apks, appium will use install-multiple to install it. http://appium.io/docs/en/writing-running-appium/android/android-appbundle/ (install-app command as well)

1reaction
KazuCocoacommented, Feb 9, 2021

ah, so you just want to call only the below command install-multiple directly without Appium’s logic to handle .apks by bundletool.jar from .aab in https://github.com/appium/appium-adb/blob/6153bb547a473a477dc10a27affa8acc2cc51c97/lib/tools/apks-utils.js#L159-L197

const output = await this.adbExec(['install-multiple', ...installArgs, ...apkPathsToInstall], {
      timeout: options.timeout,
      timeoutCapName: options.timeoutCapName,
    });

The interface may be like:

# local
execute_script('mobile:installMultipleApks', {apks: ['/path/to/apk1.apk', '/path/to/apk2.apk'], options: '-r'})
# over the internet
execute_script('mobile:installMultipleApks', {apks: ['https://appium-host/path/to/apk1.apk', 'https://appium-host/path/to/apk1.apk/path/to/apk2.apk'], options: '-r'})

Is this intentional for you?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to install multiple android applications ( from apk files ...
In Windows, you can using this command line: for %f in (C:\your_app_path\*.apk) do adb install "%f".
Read more >
Batch install apks from computer to Android without actually ...
I tried this and I am getting this C:\Users\AndroidApps>adb install "C:\Users\username\Downloads\AosApp\AppName.apk" 'adb' is not recognized as ...
Read more >
How to install an app on BlueStacks 5
How can I install apps from the Google Play Store? 1. Launch BlueStacks 5 and click on the "Play Store" icon. 7.png. 2....
Read more >
How to sideload and install apps on Android as APKs or App ...
Open the App Bundle Installer and select the right app bundle format from the bottom bar. You can pick from AAB, APKS, XAPK,...
Read more >
Android TV - How to install an app with ADB and Command Line
There are 2 options to install on your Android TV & Amazon Fire TV devices; ... (If a non-technical user is trying to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found