androidappium

Original error: Error executing adbExec. error while starting app on phone through appium


I use:

If I try to start app through Appium on phone-got error:

An unknown server-side error occurred while processing the command. Original error: Cannot start the 'name' application. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting. Original error: Error executing adbExec. Original error: 'Command 'C:\pathtoadb\platform-tools\adb.exe -P 5037 -s 45678888 shell am start -W -n appname -S' timed out after 20000ms'. Try to increase the 20000ms adb execution timeout represented by 'adbExecTimeout' capability


Solution

  • I have a bare working configuration for real Pixel Android Device

    {
      "automationName": "UiAutomator2",
      "platformName": "Android",
      "platformVersion": "8.1",
      "deviceName": "Pixel",
      "appPackage": "com.disney.wdw.android.debug",
      "appActivity": "com.disney.wdpro.park.activities.LoaderActivity",
      "udid": "<unique_identifier>
    }
    

    Notes:

    1. Your UDID can be located when you access adb devices on your terminal/cmd.
    2. You can replace appPackage and appActivity with app capability where you indicate the path where your apk resides.
    3. deviceName is required but I believe Appium ignores it for real devices.
    4. I suggest you use latest version of Appium Desktop or CLI.
    5. You can use default Appium for automationName as your automation engine, mine I use UIAutomator2, adjust it to your preference.

    Refer to Appium main site for full documentation of capability usage. http://appium.io/docs/en/writing-running-appium/caps/