Appium can not handle screen lock-swipe in android emulators

found a hint here:

As mentioned there
“Workaround for API21—Go to settings, set screen lock=none …”
works for all emulators.
But if screen security is set to screen lock - swipe, there is still a problem.
In appium-server log i can see that appium in an indefinite loop tries to unlock the screen and start the app without success:

[ADB] Error: Error occured while starting App. Original error: Error executing adbExec. Original error: Command '/Users/hansjoergkeser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am start -W -n io.appium.unlock/.Unlock -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000' timed out after 20000ms{"stdout":"Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=io.appium.unlock/.Unlock }\r\n","stderr":"","code":null}

Am using (see appium-server log):

  • Appium 1.6.0-beta1
  • Appium Java Client 4.0.0
  • Emulator Nexus 9 Api Level 22
  • MacBook Pro with OS X 10.11.6

appium-server.txt (39.2 KB)

also tried it with android 4 and 6 emulators, same problem if screen lock - slide / swipe is set.
i can see on the emulator display that the screen is unlocked, but then it fails to start the app.

In addition i tried it with real devices, there it works.