Last active
September 13, 2015 20:31
-
-
Save Kagee/b99738b072ae5dcccc6c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
./adb -d shell input tap 680 270 | |
./adb -d shell input tap 362 1086 | |
sleep 5 | |
AWT_VIDEO=$(./adb -d shell dumpsys window windows | grep -o -P 'mFocusedApp=AppWindowToken{[^ ]*') | |
AWT_POST="$AWT_VIDEO" | |
echo "shoul be equal: x${AWT_POST} = x${AWT_VIDEO}"; | |
while [ "${AWT_POST}x" = "${AWT_VIDEO}x" ] ; do | |
sleep 5; | |
./adb -d shell input keyevent 4 | |
echo "should be equal 2: x${AWT_POST} = x${AWT_VIDEO}"; | |
AWT_POST=$(./adb -d shell dumpsys window windows | grep -o -P 'mFocusedApp=AppWindowToken{[^ ]*'); | |
done | |
echo "not equal, pressing back x${AWT_POST} = x${AWT_VIDEO}"; | |
sleep 2 | |
./adb -d shell input tap 536 1114 | |
sleep 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment