Can driver.installApp() launch another app that is not defined as part of Capabilities Object?

I am using Appium to perform automation on Android. I am facing an issue while working with driver.installApp() method of Appium. It gives me the following error -

Unable to install [apps/App2.apk] to device with id [null][Error: Command failed: can’t find ‘apps/App2.apk’ to install]

What I am trying to do is, in capabilities I am setting the details of App1 and launching it. Later I am trying to install App2 with the same driver and facing this issue. I tried referring similar issues but did not find any solution to the issue. I am not quite sure if this usecase of launching App1 via capabilities and installing App2 with the same driver is supported by the Appium API.

1 Like

@Sumana_Yellanki No, you can’t install in this way. Use adb command to install new app Runtime.getRuntime().exec(“adb install your-apk-path.apk”);

No, you can install any app using installApp(), no required to launch using adb because installApp() it self internally use this command.
To prove this,here is my logs

e[36minfoe[39m: Welcome to Appium v1.4.16 (REV ceb599aaa1f761fba094ef2016e05047858567bb)
e[36minfoe[39m: Appium REST http interface listener started on 0.0.0.0:6001
e[36minfoe[39m: [debug] Non-default server args: {“port”:6001,“bootstrapPort”:4001,“fullReset”:true,“nativeInstrumentsLib”:true,“tmpDir”:"/Users/priyankp.shah/tmp1"}
e[36minfoe[39m: Console LogLevel: debug
e[36minfoe[39m: e[37m–>e[39m e[37mPOSTe[39m e[37m/wd/hub/sessione[39m e[90m{“desiredCapabilities”:{“automationName”:“Appium”,“autoAcceptAlerts”:true,“platformVersion”:“5.0”,“app”:"/opt/app1_apk/new_apk/en-android.apk",“platformName”:“Android”,“deviceName”:“Android”,“udid”:“ZX1D62B2JM”}}e[39m
e[36minfoe[39m: Client User-Agent string: Apache-HttpClient/4.3.3 (java 1.5)
e[36minfoe[39m: [debug] No appActivity desired capability or server param. Parsing from apk.
e[36minfoe[39m: [debug] No appPackage desired capability or server param. Parsing from apk.
e[36minfoe[39m: [debug] Using local app from desired caps: /opt/app1_apk/new_apk/en-android.apk
e[36minfoe[39m: [debug] Creating new appium session 98b68425-7d95-4de0-8066-67ba996e4769
e[36minfoe[39m: Starting android appium
e[36minfoe[39m: [debug] Getting Java version
e[36minfoe[39m: Java version is: 1.8.0_66
e[36minfoe[39m: [debug] Checking whether adb is present
e[36minfoe[39m: [debug] Using adb from /android-sdk/platform-tools/adb
e[36minfoe[39m: [debug] Parsing package and activity from app manifest
e[36minfoe[39m: [debug] Checking whether aapt is present
e[36minfoe[39m: [debug] Using aapt from /android-sdk/build-tools/23.0.2/aapt
e[36minfoe[39m: [debug] Extracting package and launch activity from manifest.
e[36minfoe[39m: [debug] executing cmd: /android-sdk/build-tools/23.0.2/aapt dump badging /opt/app1_apk/new_apk/en-android.apk
e[36minfoe[39m: [debug] badging package: com.yt.app1.android
e[36minfoe[39m: [debug] badging act: com.yt.app1.android.gui.SplashActivity
e[36minfoe[39m: [debug] Parsed package and activity are: com.yt.app1.android/com.yt.app1.android.gui.SplashActivity
e[36minfoe[39m: [debug] Using fast reset? false
e[36minfoe[39m: [debug] Preparing device for session
e[36minfoe[39m: [debug] Checking whether app is actually present
e[36minfoe[39m: Retrieving device
e[36minfoe[39m: [debug] Trying to find a connected android device
e[36minfoe[39m: [debug] Getting connected devices…
e[36minfoe[39m: [debug] executing cmd: /android-sdk/platform-tools/adb devices
e[36minfoe[39m: [debug] 1 device(s) connected
e[36minfoe[39m: Found device ZX1D62B2JM
e[36minfoe[39m: [debug] Setting device id to ZX1D62B2JM
e[36minfoe[39m: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)
e[36minfoe[39m: [debug] executing cmd: /android-sdk/platform-tools/adb -s ZX1D62B2JM wait-for-device
e[36minfoe[39m: [debug] executing cmd: /android-sdk/platform-tools/adb -s ZX1D62B2JM shell “echo ‘ready’”
e[36minfoe[39m: [debug] Starting logcat capture
e[36minfoe[39m: [debug] Getting device API level
e[36minfoe[39m: [debug] executing cmd: /android-sdk/platform-tools/adb -s ZX1D62B2JM shell “getprop ro.build.version.sdk”
e[36minfoe[39m: [debug] Device is at API Level 21
e[36minfoe[39m: Device API level is: 21
e[36minfoe[39m: [debug] Extracting strings for language: default
e[36minfoe[39m: [debug] executing cmd: /android-sdk/platform-tools/adb -s ZX1D62B2JM shell “getprop persist.sys.language”
e[36minfoe[39m: [debug] Current device persist.sys.language:
e[36minfoe[39m: [debug] java -jar “/Users/priyankp.shah/Java_Projects/Appium/appium/node_modules/appium-adb/jars/appium_apk_tools.jar” “stringsFromApk” “/opt/app1_apk/new_apk/en-android.apk” “/var/folders/9v/_v7kch7d2ml0cg8346v9nbzdzm06b1/T/1151118-2135-129jjqk/com.yt.app1.android”
e[36minfoe[39m: [debug] Reading strings from converted strings.json
e[36minfoe[39m: [debug] Setting language to default
e[36minfoe[39m: [debug] executing cmd: /android-sdk/platform-tools/adb -s ZX1D62B2JM push “/var/folders/9v/_v7kch7d2ml0cg8346v9nbzdzm06b1/T/1151118-2135-129jjqk/com.yt.app1.android/strings.json” /data/local/tmp
e[36minfoe[39m: [debug] Checking whether aapt is present
e[36minfoe[39m: [debug] Using aapt from /android-sdk/build-tools/23.0.2/aapt
e[36minfoe[39m: [debug] Retrieving process from manifest.
e[36minfoe[39m: [debug] executing cmd: /android-sdk/build-tools/23.0.2/aapt dump xmltree /opt/app1_apk/new_apk/en-android.apk AndroidManifest.xml
e[36minfoe[39m: [debug] Set app process to: com.yt.app1.android
e[36minfoe[39m: [debug] Uninstalling com.yt.app1.android
e[36minfoe[39m: [debug] executing cmd: /android-sdk/platform-tools/adb -s ZX1D62B2JM shell “am force-stop com.yt.app1.android”
e[36minfoe[39m: [debug] executing cmd: /android-sdk/platform-tools/adb -s ZX1D62B2JM uninstall com.yt.app1.android
e[36minfoe[39m: [debug] App was not uninstalled, maybe it wasn’t on device?
e[36minfoe[39m: [debug] Checking app cert for /opt/app1_apk/new_apk/en-android.apk.
e[36minfoe[39m: [debug] executing cmd: java -jar /Users/priyankp.shah/Java_Projects/Appium/appium/node_modules/appium-adb/jars/verify.jar /opt/app1_apk/new_apk/en-android.apk
e[36minfoe[39m: [debug] App already signed.
e[36minfoe[39m: [debug] Zip-aligning /opt/app1_apk/new_apk/en-android.apk
e[36minfoe[39m: [debug] Checking whether zipalign is present
e[36minfoe[39m: [debug] Using zipalign from /android-sdk/build-tools/23.0.2/zipalign
e[36minfoe[39m: [debug] Zip-aligning apk.
e[36minfoe[39m: [debug] executing cmd: /android-sdk/build-tools/23.0.2/zipalign -f 4 /opt/app1_apk/new_apk/en-android.apk /var/folders/9v/_v7kch7d2ml0cg8346v9nbzdzm06b1/T/1151118-2135-1l7wpxm/appium.tmp
e[36minfoe[39m: [debug] MD5 for app is e05c8a48fe1fa44846f9532218eee1b3
e[36minfoe[39m: [debug] executing cmd: /android-sdk/platform-tools/adb -s ZX1D62B2JM shell “ls /data/local/tmp/e05c8a48fe1fa44846f9532218eee1b3.apk”
e[36minfoe[39m: [debug] Getting install status for com.yt.app1.android
e[36minfoe[39m: [debug] Getting device API level
e[36minfoe[39m: [debug] executing cmd: /android-sdk/platform-tools/adb -s ZX1D62B2JM shell “getprop ro.build.version.sdk”
e[36minfoe[39m: [debug] Device is at API Level 21
e[36minfoe[39m: [debug] executing cmd: /android-sdk/platform-tools/adb -s ZX1D62B2JM shell “pm list packages -3 com.yt.app1.android”
e[36minfoe[39m: [debug] App is not installed
e[36minfoe[39m: Installing App
e[36minfoe[39m: [debug] executing cmd: /android-sdk/platform-tools/adb -s ZX1D62B2JM shell “mkdir -p /data/local/tmp/”
e[36minfoe[39m: [debug] Removing any old apks
e[36minfoe[39m: [debug] executing cmd: /android-sdk/platform-tools/adb -s ZX1D62B2JM shell “ls /data/local/tmp/*.apk”
e[36minfoe[39m: [debug] Found an apk we want to keep at /data/local/tmp/e05c8a48fe1fa44846f9532218eee1b3.apk
e[36minfoe[39m: [debug] Couldn’t find any apks to remove
e[36minfoe[39m: [debug] Uninstalling com.yt.app1.android
e[36minfoe[39m: [debug] executing cmd: /android-sdk/platform-tools/adb -s ZX1D62B2JM shell “am force-stop com.yt.app1.android”
e[36minfoe[39m: [debug] executing cmd: /android-sdk/platform-tools/adb -s ZX1D62B2JM uninstall com.yt.app1.android
e[36minfoe[39m: [debug] App was not uninstalled, maybe it wasn’t on device?
e[36minfoe[39m: [debug] executing cmd: /android-sdk/platform-tools/adb -s ZX1D62B2JM shell “pm install -r /data/local/tmp/e05c8a48fe1fa44846f9532218eee1b3.apk”
e[36minfoe[39m: [debug] Forwarding system:4001 to device:4724
e[36minfoe[39m: [debug] executing cmd: /android-sdk/platform-tools/adb -s ZX1D62B2JM forward tcp:4001 tcp:4724
e[36minfoe[39m: [debug] Pushing appium bootstrap to device…
e[36minfoe[39m: [debug] executing cmd: /android-sdk/platform-tools/adb -s ZX1D62B2JM push “/Users/priyankp.shah/Java_Projects/Appium/appium/build/android_bootstrap/AppiumBootstrap.jar” /data/local/tmp/
e[36minfoe[39m: [debug] Pushing settings apk to device…
e[36minfoe[39m: [debug] executing cmd: /android-sdk/platform-tools/adb -s ZX1D62B2JM install “/Users/priyankp.shah/Java_Projects/Appium/appium/build/settings_apk/settings_apk-debug.apk”
e[36minfoe[39m: [debug] Pushing unlock helper app to device…
e[36minfoe[39m: [debug] executing cmd: /android-sdk/platform-tools/adb -s ZX1D62B2JM install “/Users/priyankp.shah/Java_Projects/Appium/appium/build/unlock_apk/unlock_apk-debug.apk”
e[36minfoe[39m: Starting App
e[36minfoe[39m: [debug] Attempting to kill all ‘uiautomator’ processes
e[36minfoe[39m: [debug] Getting all processes with ‘uiautomator’
e[36minfoe[39m: [debug] executing cmd: /android-sdk/platform-tools/adb -s ZX1D62B2JM shell “ps ‘uiautomator’”
e[36minfoe[39m: [debug] No matching processes found
e[36minfoe[39m: [debug] Running bootstrap
e[36minfoe[39m: [debug] spawning: /android-sdk/platform-tools/adb -s ZX1D62B2JM shell uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap -e pkg com.yt.app1.android -e disableAndroidWatchers false -e acceptSslCerts false
e[36minfoe[39m: [debug] e[90m[UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1e[39m
e[36minfoe[39m: [debug] e[90m[UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=e[39m
e[36minfoe[39m: [debug] e[90m[UIAUTOMATOR STDOUT] io.appium.android.bootstrap.Bootstrap:e[39m
e[36minfoe[39m: [debug] e[90m[UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunnere[39m
e[36minfoe[39m: [debug] e[90m[UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServere[39m
e[36minfoe[39m: [debug] e[90m[UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrape[39m
e[36minfoe[39m: [debug] e[90m[UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1e[39m
e[36minfoe[39m: [debug] e[90m[UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 1e[39m
e[36minfoe[39m: [debug] [BOOTSTRAP] [debug] Socket opened on port 4724
e[36minfoe[39m: [debug] [BOOTSTRAP] [debug] Appium Socket Server Ready
e[36minfoe[39m: [debug] [BOOTSTRAP] [debug] Loading json…
e[36minfoe[39m: [debug] [BOOTSTRAP] [debug] json loading complete.
e[36minfoe[39m: [debug] [BOOTSTRAP] [debug] Registered crash watchers.
e[36minfoe[39m: [debug] Waking up device if it’s not alive
e[36minfoe[39m: [debug] Pushing command to appium work queue: [“wake”,{}]
e[36minfoe[39m: [debug] [BOOTSTRAP] [debug] Client connected
e[36minfoe[39m: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“wake”,“params”:{}}
e[36minfoe[39m: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
e[36minfoe[39m: [debug] [BOOTSTRAP] [debug] Got command action: wake
e[36minfoe[39m: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:true}
e[36minfoe[39m: [debug] executing cmd: /android-sdk/platform-tools/adb -s ZX1D62B2JM shell “dumpsys window”
e[36minfoe[39m: [debug] Screen already unlocked, continuing.
e[36minfoe[39m: [debug] Pushing command to appium work queue: [“getDataDir”,{}]
e[36minfoe[39m: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“getDataDir”,“params”:{}}
e[36minfoe[39m: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
e[36minfoe[39m: [debug] [BOOTSTRAP] [debug] Got command action: getDataDir
e[36minfoe[39m: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:"/data/local/tmp"}
e[36minfoe[39m: [debug] dataDir set to: /data/local/tmp
e[36minfoe[39m: [debug] Pushing command to appium work queue: [“compressedLayoutHierarchy”,{“compressLayout”:false}]
e[36minfoe[39m: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“compressedLayoutHierarchy”,“params”:{“compressLayout”:false}}
e[36minfoe[39m: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
e[36minfoe[39m: [debug] [BOOTSTRAP] [debug] Got command action: compressedLayoutHierarchy
e[36minfoe[39m: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:false}
e[36minfoe[39m: [debug] Getting device API level
e[36minfoe[39m: [debug] executing cmd: /android-sdk/platform-tools/adb -s ZX1D62B2JM shell “getprop ro.build.version.sdk”
e[36minfoe[39m: [debug] Device is at API Level 21
e[36minfoe[39m: [debug] executing cmd: /android-sdk/platform-tools/adb -s ZX1D62B2JM shell “am start -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000 -n com.yt.app1.android/com.yt.app1.android.gui.SplashActivity”
e[36minfoe[39m: [debug] Waiting for pkg “com.yt.app1.android” and activity “com.yt.app1.android.gui.SplashActivity” to be focused
e[36minfoe[39m: [debug] Getting focused package and activity
e[36minfoe[39m: [debug] executing cmd: /android-sdk/platform-tools/adb -s ZX1D62B2JM shell “dumpsys window windows”
e[36minfoe[39m: [debug] executing cmd: /android-sdk/platform-tools/adb -s ZX1D62B2JM shell “getprop ro.build.version.release”
e[36minfoe[39m: [debug] Device is at release version 5.0.2
e[36minfoe[39m: [debug] Device launched! Ready for commands
e[36minfoe[39m: [debug] Setting command timeout to the default of 60 secs
e[36minfoe[39m: [debug] Appium session started with sessionId 98b68425-7d95-4de0-8066-67ba996e4769
e[36minfoe[39m: e[37m<-- POST /wd/hub/session e[39me[36m303e[39me[90m 32180.896 ms - 74e[39m e[90me[39m
e[36minfoe[39m: e[37m–>e[39m e[37mGETe[39m e[37m/wd/hub/session/98b68425-7d95-4de0-8066-67ba996e4769e[39m e[90m{}e[39m
e[36minfoe[39m: [debug] Responding to client with success: {“status”:0,“value”:{“platform”:“LINUX”,“browserName”:“Android”,“platformVersion”:“5.0.2”,“webStorageEnabled”:false,“takesScreenshot”:true,“javascriptEnabled”:true,“databaseEnabled”:false,“networkConnectionEnabled”:true,“locationContextEnabled”:false,“warnings”:{},“desired”:{“automationName”:“Appium”,“autoAcceptAlerts”:true,“platformVersion”:“5.0”,“app”:"/opt/app1_apk/new_apk/en-android.apk",“platformName”:“Android”,“deviceName”:“Android”,“udid”:“ZX1D62B2JM”},“automationName”:“Appium”,“autoAcceptAlerts”:true,“app”:"/opt/app1_apk/new_apk/en-android.apk",“platformName”:“Android”,“deviceName”:“ZX1D62B2JM”,“udid”:“ZX1D62B2JM”},“sessionId”:“98b68425-7d95-4de0-8066-67ba996e4769”}
e[36minfoe[39m: e[37m<-- GET /wd/hub/session/98b68425-7d95-4de0-8066-67ba996e4769 e[39me[32m200e[39me[90m 6.437 ms - 686e[39m e[90m{“status”:0,“value”:{“platform”:“LINUX”,“browserName”:“Android”,“platformVersion”:“5.0.2”,“webStorageEnabled”:false,“takesScreenshot”:true,“javascriptEnabled”:true,“databaseEnabled”:false,“networkConnectionEnabled”:true,“locationContextEnabled”:false,“warnings”:{},“desired”:{“automationName”:“Appium”,“autoAcceptAlerts”:true,“platformVersion”:“5.0”,“app”:"/opt/app1_apk/new_apk/en-android.apk",“platformName”:“Android”,“deviceName”:“Android”,“udid”:“ZX1D62B2JM”},“automationName”:“Appium”,“autoAcceptAlerts”:true,“app”:"/opt/app1_apk/new_apk/en-android.apk",“platformName”:“Android”,“deviceName”:“ZX1D62B2JM”,“udid”:“ZX1D62B2JM”},“sessionId”:“98b68425-7d95-4de0-8066-67ba996e4769”}e[39m
e[36minfoe[39m: e[37m–>e[39m e[37mPOSTe[39m e[37m/wd/hub/session/98b68425-7d95-4de0-8066-67ba996e4769/appium/device/install_appe[39m e[90m{“appPath”:"/Users/priyankp.shah/Downloads/app2.apk"}e[39m
e[36minfoe[39m: [debug] executing cmd: /android-sdk/platform-tools/adb -s ZX1D62B2JM install -r “/Users/priyankp.shah/Downloads/app2.apk”
e[36minfoe[39m: [debug] Responding to client with success: {“status”:0,“value”:“Successfully unzipped and installed [/Users/priyankp.shah/Downloads/app2.apk] to device with id [ZX1D62B2JM]”,“sessionId”:“98b68425-7d95-4de0-8066-67ba996e4769”}
e[36minfoe[39m: e[37m<-- POST /wd/hub/session/98b68425-7d95-4de0-8066-67ba996e4769/appium/device/install_app e[39me[32m200e[39me[90m 23899.277 ms - 186e[39m e[90m{“status”:0,“value”:“Successfully unzipped and installed [/Users/priyankp.shah/Downloads/app2.apk] to device with id [ZX1D62B2JM]”,“sessionId”:“98b68425-7d95-4de0-8066-67ba996e4769”}e[39m
e[36minfoe[39m: [debug] Didn’t get a new command in 60 secs, shutting down…
e[36minfoe[39m: Shutting down appium session
e[36minfoe[39m: [debug] Removing app from device
e[36minfoe[39m: [debug] Uninstalling com.yt.app1.android
e[36minfoe[39m: [debug] executing cmd: /android-sdk/platform-tools/adb -s ZX1D62B2JM shell “am force-stop com.yt.app1.android”
e[36minfoe[39m: [debug] executing cmd: /android-sdk/platform-tools/adb -s ZX1D62B2JM uninstall com.yt.app1.android
e[36minfoe[39m: [debug] App was uninstalled
e[36minfoe[39m: [debug] Pressing the HOME button
e[36minfoe[39m: [debug] executing cmd: /android-sdk/platform-tools/adb -s ZX1D62B2JM shell “input keyevent 3”
e[36minfoe[39m: [debug] Stopping logcat capture
e[36minfoe[39m: [debug] Logcat terminated with code null, signal SIGTERM
e[36minfoe[39m: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“shutdown”}
e[36minfoe[39m: [debug] [BOOTSTRAP] [debug] Got command of type SHUTDOWN
e[36minfoe[39m: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:“OK, shutting down”}
e[36minfoe[39m: [debug] [BOOTSTRAP] [debug] Closed client connection
e[36minfoe[39m: [debug] Sent shutdown command, waiting for UiAutomator to stop…
e[36minfoe[39m: [debug] e[90m[UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1e[39m
e[36minfoe[39m: [debug] e[90m[UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=.e[39m
e[36minfoe[39m: [debug] e[90m[UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunnere[39m
e[36minfoe[39m: [debug] e[90m[UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServere[39m
e[36minfoe[39m: [debug] e[90m[UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrape[39m
e[36minfoe[39m: [debug] e[90m[UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1e[39m
e[36minfoe[39m: [debug] e[90m[UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 0e[39m
e[36minfoe[39m: [debug] e[90m[UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=e[39m
e[36minfoe[39m: [debug] e[90m[UIAUTOMATOR STDOUT] Test results for WatcherResultPrinter=.e[39m
e[36minfoe[39m: [debug] e[90m[UIAUTOMATOR STDOUT] Time: 64.62e[39m
e[36minfoe[39m: [debug] e[90m[UIAUTOMATOR STDOUT] OK (1 test)e[39m
e[36minfoe[39m: [debug] e[90m[UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: -1e[39m
e[36minfoe[39m: [debug] UiAutomator shut down normally
e[36minfoe[39m: [debug] Cleaning up android objects
e[36minfoe[39m: [debug] Cleaning up appium session
e[36minfoe[39m: [debug] We shut down because no new commands came in

Hey all around I see that you are trying to install and remove the same apk. Can you please share your code for better understanding of your capabilities and the app you are trying to install via this method.

No , i am not using same app. It was two different applications.

@Priyank_Shah @Sumana_Yellanki I also tried driver.installApp(“new-app”) . And it worked for two different app.

Below is the appium console log :

> 2015-12-22 12:42:30:200 - info: --> POST /wd/hub/session/b0a86e43-8cb5-4b4d-810e-d1af9970154c/appium/device/install_app {"appPath":"D:/Projects/QRCode Generator.apk"}
> 2015-12-22 12:42:30:200 - info: [debug] executing cmd: D:\Android\sdk\platform-tools\adb.exe -s 81HEBM6245N7 install "D:/Projects/QRCode Generator.apk"
> 2015-12-22 12:42:32:565 - info: [debug] Responding to client with success: {"status":0,"value":"Successfully unzipped and installed [D:/Projects/QRCode Generator.apk] to device with id [81HEBM6245N7]","sessionId":"b0a86e43-8cb5-4b4d-810e-d1af9970154c"}
> 2015-12-22 12:42:32:565 - info: <-- POST /wd/hub/session/b0a86e43-8cb5-4b4d-810e-d1af9970154c/appium/device/install_app 200 2368.347 ms - 202 {"status":0,"value":"Successfully unzipped and installed [D:/Projects/QRCode Generator.apk] to device with id [81HEBM6245N7]","sessionId":"b0a86e43-8cb5-4b4d-810e-d1af9970154c"}

> 2015-12-22 12:43:22:578 - info: --> POST /wd/hub/session/b0a86e43-8cb5-4b4d-810e-d1af9970154c/appium/device/install_app {"appPath":"D:/Projects/Android/mobile-phone-local-advance-paid-engine-release.apk"}
> 2015-12-22 12:43:22:578 - info: [debug] executing cmd: D:\Android\sdk\platform-tools\adb.exe -s 81HEBM6245N7 install "D:/Projects/Android/mobile-phone-local-advance-paid-engine-release.apk"
> 2015-12-22 12:43:42:808 - info: [debug] Responding to client with success: {"status":0,"value":"Successfully unzipped and installed [D:/Projects/Android/mobile-phone-local-advance-paid-engine-release.apk] to device with id [81HEBM6245N7]","sessionId":"b0a86e43-8cb5-4b4d-810e-d1af9970154c"}
> 2015-12-22 12:43:42:818 - info: <-- POST /wd/hub/session/b0a86e43-8cb5-4b4d-810e-d1af9970154c/appium/device/install_app 200 20238.563 ms - 238 {"status":0,"value":"Successfully unzipped and installed [D:/Projects/Android/mobile-phone-local-advance-paid-engine-release.apk] to device with id [81HEBM6245N7]","sessionId":"b0a86e43-8cb5-4b4d-810e-d1af9970154c"}

Thanks @Priyank_Shah :smile: