New 0.11 issue - Lock screen no longer unlocks on Android device

507 views
Skip to first unread message

Michael R

unread,
Oct 24, 2013, 11:04:15 AM10/24/13
to appium-...@googlegroups.com
I just updated to 0.11 and I have an issue with running tests on Android devices.  Appium no longer unlocks the lock screen on the device.  Related info:
1. Tested on Motorola Xoom and Samsung Galaxy Nexus
2. It doesn't matter whether the screen was off or on when the test starts
3. I re-downloaded the Android SDK in case my version of adb was out of date

Is anyone else seeing this problem?

Thanks,

Michael

Michael R

unread,
Oct 24, 2013, 11:09:45 AM10/24/13
to appium-...@googlegroups.com
Forgot to mention - running the tests on OSX 10.8.

Jonathan Lipps

unread,
Oct 24, 2013, 11:18:56 AM10/24/13
to Michael R, appium-...@googlegroups.com
What do appium logs say?

--
http://appium.io
---
You received this message because you are subscribed to the Google Groups "Appium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to appium-discus...@googlegroups.com.
Visit this group at http://groups.google.com/group/appium-discuss.
For more options, visit https://groups.google.com/groups/opt_out.

Michael R

unread,
Oct 24, 2013, 12:17:48 PM10/24/13
to appium-...@googlegroups.com, Michael R
The logs (http://pastie.org/8427222) mention:

debug: Pushing appium bootstrap to device...
debug: executing: "/Users/michael/Development/Android/sdk/platform-tools/adb" -s 161c110141401117 push "/usr/local/lib/node_modules/appium/build/android_bootstrap/AppiumBootstrap.jar" /data/local/tmp/
debug: Pushing unlock helper app to device...
debug: executing: "/Users/michael/Development/Android/sdk/platform-tools/adb" -s 161c110141401117 install /usr/local/lib/node_modules/appium/build/unlock_apk/unlock_apk-debug.apk
info: Running bootstrap
debug: spawning: /Users/michael/Development/Android/sdk/platform-tools/adb -s 161c110141401117 shell uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap

...but the screen doesn't actually unlock.  The app is on the device afterward and can be run.  Unlocking did work in previously used versions 0.8.2 and 0.10.4.

So this is what I'm seeing on the device:
1. The wake command does work properly
2. The unlock apk makes it onto the device
3. The unlock apk is told to run (though I don't see output from whether that command thinks it executed successfully)
4. Bootstrapping continues from there (with the screen awake but still locked)

Is there a way to pull more information out of appium to see what's going on?

Jonathan Lipps

unread,
Oct 24, 2013, 12:38:45 PM10/24/13
to Michael R, appium-...@googlegroups.com
Can you pass in the whole log? That's not the part where the unlock code is actually run

bootstrap online

unread,
Oct 24, 2013, 12:44:29 PM10/24/13
to Jonathan Lipps, Michael R, appium-...@googlegroups.com
I'm also seeing issues with unlock again on the emulator.

Michael R

unread,
Oct 24, 2013, 1:42:24 PM10/24/13
to appium-...@googlegroups.com, Michael R
The pastie link has the whole log.  There is one more reference of unlock there:
debug: Screen already unlocked, continuing.

Sad I missed that the first time around.  That appears to be the problem - appium thinks that the screen is already unlocked.

Jonathan Lipps

unread,
Oct 24, 2013, 1:48:45 PM10/24/13
to bootstrap online, Michael R, appium-...@googlegroups.com
I just pushed a fix to master that might resolve this.

Jonathan Lipps

unread,
Oct 24, 2013, 2:07:57 PM10/24/13
to Michael R, appium-...@googlegroups.com
Ah, OK my fix won't resolve this. We'll need to figure out what the right regex is for dumpsys for your device. Fil, can you take a look at this?

It'd be great for you to link to a paste of the output of `adb dumpsys window` when your device screen is locked.

Michael R

unread,
Oct 24, 2013, 2:40:38 PM10/24/13
to appium-...@googlegroups.com, Michael R
The output of `adb shell dumpsys window` is here: http://pastie.org/8427561

That includes the output from the command on the Xoom and the Galaxy Nexus, neither of which unlock anymore.

Jonathan Lipps

unread,
Oct 24, 2013, 2:56:41 PM10/24/13
to Michael R, appium-...@googlegroups.com
I just changed a few things and pushed. Please try again.

Michael R

unread,
Oct 24, 2013, 3:15:35 PM10/24/13
to appium-...@googlegroups.com, Michael R
This change did the trick.
Reply all
Reply to author
Forward
0 new messages