on xenial help sign in
Add -w argument to specify settle command
commit0acff0163462329f5dd162ba50c3de75bb294263 authorMichael Terry <michael.terry@canonical.com> dateTue 1 Apr 2014, 10:09 (13 years ago) parent6840d4f
1 file changed+7−2
tools/unlock-device+7−2
tools/unlock-device+7−2
@@ -4,11 +4,16 @@
44# Our goal here is to get an Ubuntu Touch device into a testable unlocked state.
55# This will include a reboot.
66
7−while getopts s: opt; do
7+WAIT_COMMAND="sleep 20"
8+
9+while getopts s:w: opt; do
810 case $opt in
911 s)
1012 export ANDROID_SERIAL=$OPTARG
1113 ;;
14+ w)
15+ WAIT_COMMAND=$OPTARG
16+ ;;
1217 esac
1318done
1419
@@ -26,7 +31,7 @@ helpers.unlock_unity()
2631adb reboot
2732sleep 5
2833adb "wait-for-device"
29−sleep 20
34+eval "$WAIT_COMMAND"
3035UNLOCK_OUTPUT=$(adb shell "sudo -u phablet -i python3 -c '$UNLOCK_SCRIPT'" 2>&1)
3136if echo "$UNLOCK_OUTPUT" | grep 'Greeter unlocked' >/dev/null; then
3237 echo "I: Unlock passed"