Created
February 14, 2016 22:17
-
-
Save codlab/5d3b4625f6b0e57c1b85 to your computer and use it in GitHub Desktop.
star wars no unlog
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
ADB="adb $@ shell" | |
let x1=200 | |
let y1=200 | |
let x2=220 | |
let y2=220 | |
package="com.lucasarts.starts_goo" | |
while [ 1 -ne 2 ] | |
do | |
package=`$ADB dumpsys window windows | grep mCurrentFocus | cut -d'/' -f1 | rev | cut -d' ' -f1 | rev` | |
if [ "$package" == "com.lucasarts.starts_goo" ] | |
then | |
echo -ne "swipe 1\r" | |
$ADB input touchscreen swipe $x1 $y1 $x2 $y2 100 | |
sleep 120 | |
echo -ne "swipe 2\r" | |
$ADB input touchscreen swipe $x1 $y1 $x2 $y2 100 | |
sleep 120 | |
else | |
echo -e "waiting for star wars ... retrying in few seconds\r" | |
sleep 20 | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment