2# -*- Mode: sh; indent-tabs-mode: nil; tab-width: 4 -*-
5# Copyright (C) 2017 Canonical Ltd
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU General Public License version 3 as
9# published by the Free Software Foundation.
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
16# You should have received a copy of the GNU General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
20# Our goal here is to get an Ubuntu Touch device into a testable unlocked state.
21# This will include a reboot.
23WAIT_COMMAND="adb reboot; sleep 5; adb wait-for-device; sleep 20"
25while getopts s:w: opt; do
28 export ANDROID_SERIAL=$OPTARG
39 # We need to go through sudo to get a proper environment for dbus set up
40 UNLOCK_OUTPUT=$(adb shell "gdbus call --session --dest com.canonical.UnityGreeter --object-path / --method com.canonical.UnityGreeter.HideGreeter && echo Greeter unlocked" 2>&1)
41 if echo "$UNLOCK_OUTPUT" | grep 'Greeter unlocked' >/dev/null; then
42 echo "I: Unlock passed"
45 echo "I: Unlock attempt $i failed, script output: '$UNLOCK_OUTPUT'"
50echo "I: Too many unlock failures, giving up"
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list