12 lines
357 B
Bash
Executable File
12 lines
357 B
Bash
Executable File
#!/bin/bash
|
|
# ADB watch for login and unlock a phone
|
|
|
|
dbus-monitor --session "type=signal,interface=org.freedesktop.ScreenSaver" | while read MSG; do
|
|
LOCK_STAT=`echo $MSG | grep boolean | awk '{print $2}'`
|
|
if [[ "$LOCK_STAT" == "true" ]]; then
|
|
android-lock -l
|
|
elif [[ "$LOCK_STAT" == "false" ]]; then
|
|
android-lock -u
|
|
fi
|
|
done
|