22
from unity8 import process_helpers as helpers;
23
logging.basicConfig(level=logging.INFO);
24
bus = dbus.SystemBus().get_object("com.canonical.powerd", "/com/canonical/powerd");
25
cookie = bus.requestSysState("unlock-device-hold", 1, dbus_interface="com.canonical.powerd");
26
helpers.restart_unity_with_testability();
27
bus.clearSysState(cookie, dbus_interface="com.canonical.powerd");
28
helpers.unlock_unity()
22
autologin-in-background=false
24
LIGHTDM_CONFIG_FILE="/etc/lightdm/lightdm.conf.d/99-unity8-greeter-unlock.conf"
26
adb shell "echo '$LIGHTDM_CONFIG' > $LIGHTDM_CONFIG_FILE"
31
28
eval "$WAIT_COMMAND"
33
UNLOCK_OUTPUT=$(adb shell "sudo -u phablet -i python3 -c '$UNLOCK_SCRIPT'" 2>&1)
34
if echo "$UNLOCK_OUTPUT" | grep 'Greeter unlocked' >/dev/null; then
35
echo "I: Unlock passed"
38
echo "I: Unlock failed, script output: '$UNLOCK_OUTPUT'"
30
adb shell "rm -f $LIGHTDM_CONFIG_FILE"