on xenial help sign in
No need to sudo to get the right environment over adb shell
f621663Michał Sawicz
tools/unlock-device+1−1
@@ -24,7 +24,7 @@ eval "$WAIT_COMMAND"
24sleep 30
24sleep 30
25
25
26# We need to go through sudo to get a proper environment for dbus set up
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)
27+UNLOCK_OUTPUT=$(adb shell "gdbus call --session --dest com.canonical.UnityGreeter --object-path / --method com.canonical.UnityGreeter.HideGreeter && echo Greeter unlocked" 2>&1)
28if echo "$UNLOCK_OUTPUT" | grep 'Greeter unlocked' >/dev/null; then
28if echo "$UNLOCK_OUTPUT" | grep 'Greeter unlocked' >/dev/null; then
29 echo "I: Unlock passed"
29 echo "I: Unlock passed"
30 exit 0
30 exit 0