Creates the scripts.
This commit is contained in:
11
android-watch-lock
Executable file
11
android-watch-lock
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user