Settings_apk-debug.apk and unlock_apk-debug.apk fail to install

I am trying to test an Android app with Appium (version 1.5.3) and the Android emulator, but each time I run my test script, Appium is unable to install either settings_apk-debug.apk or unlock_apk-debug.apk. I have tried using the Android emulator with OS versions 4.4.2 (API level 19), 5.0 (API level 20), 5.0.1 (API level 21) and 5.1.1 (API level 22) - NONE OF THEM WORK. Below, you can see the 2 commands (from Appium logs) which Appium keeps getting stuck at:

[debug] [ADB] Running /Users/ysxb111/Library/Android/sdk/platform-tools/adb with args: ["-P",5037,"-s",“”,“install”,"/Applications/"]

[debug] [ADB] Running /Users/ysxb111/Library/Android/sdk/platform-tools/adb with args: ["-P",5037,"-s",“”,“install”,"/Applications/"]

Please do let me know if there is any way to fix this problem. I have been trying to resolve this for over a week, and would sincerely appreciate your guidance ASAP!

What’s the error reported in the server log? Without that, I can only guess what the problem is.

Try uninstalling the two apps before you run your automation

adb uninstall io.appium.settings
adb uninstall io.appium.unlock

If that fixes the problem, you have a workaround. Failing that, I’ll await the error messages from the server log.

1 Like

Already tried doing that, but it doesn’t fix the problem :frowning: Literally got stuck on the same command again:

[debug] [AndroidDriver] Pushing settings apk to device…

[debug] [ADB] Running /Users/ysxb111/Library/Android/sdk/platform-tools/adb with args: ["-P",5037,"-s",“emulator-5554”,“install”,"/Applications/"]

It gets stuck at the above command so there is no error message after that command in the Appium logs :confused:

What happens when you run the command manually?

/Users/ysxb111/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 install /Applications/

Is there are reason you are using a non-default port for Appium, i.e. 4723?

1 Like

Hi All,

Can someone please help to resolve this error.?

An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: ‘Command ‘/Users/user1/Library/Android/sdk/platform-tools/adb -P 5037 -s RF8M33VNBVK install /Applications/’ exited with code 1’; Stderr: ‘adb: failed to install /Applications/ Failure [INSTALL_FAILED_VERSION_DOWNGRADE]’; Code: ‘1’

You are getting this error because the unlock_api-debbug.apk exist in your capabilities.

How to resolve it? you can change your DesiredCapabilities from before passing them to your driver.

Appium server, through UIautomator2 requires four main caps: platformName, udi, platformVersion, browserName and deviceName.

You really do not need to use “app” capability

There many colors and flavor to set capabilities based on what you are testing (androidwebapplications, ioswebapplications, native android,… etc)

Unless your requirements require you to have app, you are locked down. Otherwise you are flexible to choose.

Alternatively you can use this…

DesiredCapabilities caps = new DesiredCapabilities();

// caps.setCapability(“deviceName”, “Android_GalaxyS7_fcb9cebe”);
// caps.setCapability(“udi”, “fcb9cebe”);
// caps.setCapability(“platformName”, “Android”);
// caps.setCapability(“platformVersion”, “8.0.0”);
// caps.setCapability(“browserName”, “Chrome”);
// caps.setCapability(“noReset”, true);

    caps.setCapability(MobileCapabilityType.PLATFORM_NAME, "Android");
    caps.setCapability(MobileCapabilityType.UDID, "fcb9cebe");
    caps.setCapability(MobileCapabilityType.PLATFORM_VERSION, "8.0.0");
    caps.setCapability(MobileCapabilityType.DEVICE_NAME, "Android_GalaxyS7_fcb9cebe");
    caps.setCapability(MobileCapabilityType.BROWSER_NAME, "Chrome");

    System.setProperty("", "C:\\Users\\   YOUR USER 

\selenium utilities\drivers\chromedriver.exe");

// caps.setCapability(“appPackage”, “”); //for native app
// caps.setCapability(“appPackage”, “”); //for native app

    //Appium as a Server-Client architecture
    //server address that talks to the mobile device.
    WebDriver driver = new RemoteWebDriver(new URL(""), caps);
    driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);


Remember URL throws MalformedURLException