@@ -4,7 +4,7 @@
44# Our goal here is to get an Ubuntu Touch device into a testable unlocked state.
55# This will include a reboot.
66
7−WAIT_COMMAND="sleep 20"
7+WAIT_COMMAND="adb reboot; sleep 5; adb wait-for-device; sleep 20"
88
99while getopts s:w: opt; do
1010 case $opt in
@@ -28,10 +28,8 @@ bus.clearSysState(cookie, dbus_interface="com.canonical.powerd");
2828helpers.unlock_unity()
2929'
3030
31−adb reboot
32−sleep 5
33−adb "wait-for-device"
3431eval "$WAIT_COMMAND"
32+
3533UNLOCK_OUTPUT=$(adb shell "sudo -u phablet -i python3 -c '$UNLOCK_SCRIPT'" 2>&1)
3634if echo "$UNLOCK_OUTPUT" | grep 'Greeter unlocked' >/dev/null; then
3735 echo "I: Unlock passed"