on xenial help sign in
Support new adbd when unlocking
commit8b47aadbab308b78d4a2d3dcb901364a46749c17 authorMichael Terry <michael.terry@canonical.com> dateFri 29 Aug 2014, 11:55 (12 years ago) parentf9648cc
1 file changed+3−4
tools/unlock-device+3−4
tools/unlock-device+3−4
@@ -21,11 +21,10 @@ eval "$WAIT_COMMAND"
2121
2222# Force a sleep of twenty no matter what, since we may need to wait for unity8
2323# to finish coming up (it's hard to tell when the greeter is actually rendered)
24−sleep 20
24+sleep 30
2525
26−GDBUS_CMD="gdbus call --session --dest com.canonical.UnityGreeter --object-path / --method com.canonical.UnityGreeter.HideGreeter && echo Greeter unlocked"
27−
28−UNLOCK_OUTPUT=$(adb shell "if [ \"\$(id -u)\" = 0 ]; then sudo -u phablet -i $GDBUS_CMD; else $GDBUS_CMD; fi" 2>&1)
26+# We need to go through sudo to get a proper environment for dbus set up
27+UNLOCK_OUTPUT=$(adb shell "sudo -u phablet -i gdbus call --session --dest com.canonical.UnityGreeter --object-path / --method com.canonical.UnityGreeter.HideGreeter && echo Greeter unlocked" 2>&1)
2928if echo "$UNLOCK_OUTPUT" | grep 'Greeter unlocked' >/dev/null; then
3029 echo "I: Unlock passed"
3130 exit 0