Appium Android is_app_installed returns incorrect status

Hi,

Appium version = 1.3.5
Appium python client
Platform = Android API level 19
Device = Samsung Galaxy S4
Server logs included below

I noticed that Appium is_app_installed returns incorrect status even if the app is already installed but this method returns false. I checked the package status with adb command and it does return two values, I guess that’s where the method fails to handle the result.

$ adb shell pm list packages | grep com.myapp.stg
package:com.myapp.stg
package:com.myapp.stg.test

I don’t know if Appium installs this com.myapp.stg.test.

Server Logs
info: [debug] Getting install status for com.myapp.stg
info: [debug] Getting device API level
info: [debug] executing cmd: /Users/qa/Library/Android/sdk/platform-tools/adb shell “getprop ro.build.version.sdk”
info: [debug] Device is at API Level * daemon not running. starting it now on port 5037 *

  • daemon started successfully *
    19
    info: [debug] executing cmd: /Users/qa/Library/Android/sdk/platform-tools/adb shell “pm list packages com.myapp.stg”
    info: [debug] App is not installed
    info: [debug] Responding to client with success: {“status”:0,“value”:false,“sessionId”:“14c30364-7a17-47b5-868a-8341fb66b25d”}
    info: <-- POST /wd/hub/session/14c30364-7a17-47b5-868a-8341fb66b25d/appium/device/app_installed 200 4061.856 ms - 77 {“status”:0,“value”:false,“sessionId”:“14c30364-7a17-47b5-868a-8341fb66b25d”}
    info: --> POST /wd/hub/session/14c30364-7a17-47b5-868a-8341fb66b25d/appium/device/app_installed {“sessionId”:“14c30364-7a17-47b5-868a-8341fb66b25d”,“bundleId”:“com.myapp.stg”}
    info: [debug] Getting install status for com.myapp.stg
    info: [debug] Getting device API level
    info: [debug] executing cmd: /Users/qa/Library/Android/sdk/platform-tools/adb shell “getprop ro.build.version.sdk”
    info: [debug] Device is at API Level 19
    info: [debug] executing cmd: /Users/qa/Library/Android/sdk/platform-tools/adb shell “pm list packages -3 com.myapp.stg”

Can you file this on GitHub? Thanks!

Now created issue on Github #4608.