How to change packagename and install with appium

I write an appium test to check an integration between app A that opens app B as an SDK app.

meaning app B has a whitelist of apps’ package names that can trigger it to open a specific activity.

app A can be one of 3 apps with different package names.

So i created 3 apks with different package names.

Here is app A manifest

I wanted change the package in the manifest, but it fails the apk build.

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android=""
    package="com.example.eliran.myapplication" >

        android:theme="@style/AppTheme" >
            android:label="@string/app_name" >
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />


so i read this post in SOF and changed the applicaitonId instead (

android {
    compileSdkVersion 22
    buildToolsVersion "22.0.1"

    defaultConfig {
        applicationId "com.partner1"
        minSdkVersion 15
        targetSdkVersion 22

I created an apk

but now appium fails to install that apk

with this desired capabilities:


org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Error occured while starting App. Original error: Activity used to start app doesn't exist or cannot be launched! Make sure it exists and is a launchable activity (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 21.63 seconds

Put 2 capabilities

  1. appWaitActivity for rest two activity