Skip to content

Instantly share code, notes, and snippets.

@codlab
Created February 14, 2016 22:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codlab/5d3b4625f6b0e57c1b85 to your computer and use it in GitHub Desktop.
Save codlab/5d3b4625f6b0e57c1b85 to your computer and use it in GitHub Desktop.
star wars no unlog
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