[Android] Setup failed when using avd capabilities
See original GitHub issueThe problem
I’m using capability avd and uiautomator2 for launching emulator from my local windows desktop and getting error : Error: Appium Settings app is not running after 5000ms. I saw the log and notice this command :
[debug] [ADB] Running 'C:\Users\root\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell am start -n io.appium.settings/.Settings -a android.intent.action.MAIN -c android.intent.category.LAUNCHER'
[debug] [ADB] Getting IDs of all 'io.appium.settings' processes
[debug] [ADB] Running 'C:\Users\root\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pgrep -f io\\.appium\\.settings'
Later i try to run this command manually and getting no results. However using the same capabilities for pre launched android emulator this command showing result. Seems there are problems when launching the io.appium.setting activity.
adb -P 5037 -s emulator-5554 shell pgrep -f io\\.appium\\.settings
Environment
Appium version -v1.17.1 Node.js version -v12.13.1 Npm or Yarn package manager: 6.14.2 Mobile platform/version under test: Android API 28 Real device or emulator/simulator: Android emulator Appium CLI or Appium.app|exe: appium cli
Details
Launch with uiautomator2
Link to Appium logs-https://gist.github.com/zethyscythe/f74dd3d729117a939bb58a1f8fb9476e
Issue Analytics
- State:
- Created 3 years ago
- Comments:17
Top GitHub Comments
This makes sense. I’ll add a patch. Thanks for the update @Enrico204
I just found this issue in the Google Android Emulator issue tracking: https://issuetracker.google.com/issues/142533355
In short: comment 4 from a Google employee says that the
delay-adb
flag should be used only on API 28 and later (API <= 27 images don’t send the “boot completed” signal required).So the correct implementation is to enable this flag only on Android versions >= 9