Appium Python Client Does not Install an exact Apk but a wrapped APK package

486 views Asked by At

When I run a python script with the following code structure.

from appium import webdriver

desired_capabilities = {
  "appium:deviceName": "Android Emulator",
  "platformName": "Android",
  "appium:appPackage": "za.co.app",
  "appium:appWaitPackage": "za.co.app",
  "appium:appWaitActivity": "za.co.app.SplashActivity",
  "appium:appActivity": "za.co.app.SplashActivity",
  "appium:app": "C:\\Development\\AppiumDev\\myapp.apk"
}

driver = webdriver.Remote("http://localhost:4723/wd/hub", desired_capabilities)

What happens is that Appium wraps the myapp.apk and installs a wrapped version on my device.

Is there a way to prevent appium from wrapping the apk to just installing the actual myapp.apk? Similar to TestProject, when running tests,TestProject works on the actual apk & does not wrap the APK to install a wrapped version of the APK.

Thanks!

1

There are 1 answers

0
Max Daroshchanka On

Disable App Signing

For the latest Appium version (1.22), UIAutomator2 used for Android if automationName capability was not specified.

By default, all apps are always signed with the default Appium debug signature if they don't have any.

To cancel all the signing checks and make the driver to use the application package as is set appium:noSign=true:

desired_capabilities = {
  "appium:noSign": True,
  ...

One more option here:

Disable Appium App Install

Appium is able to work with already pre-installed apps.

Just remove appium:app capability, and install the app before tests yourself, e.g. with adb.

adb -s <DEVICE ID> install <PATH TO APK>

References