Monthly Archives: November 2014

Repetitive Gameplay, Meet my ADB foo

Posted on by 0 comment

So I was playing an android game recently and one of the things you can do is spend the ingame currency to spin a wheel and hopefully win a prize. I made a few spins and it wasn’t very fruitful. I had a look around for some app to do virtual tapping. There was nothing in the PlayStore. After a bit of reading I came across a thread mentioning you can do this with tasker, using a shell action with an

input tap x y

so I played around with tasker; I don’t really like tasker but the concept was there, if I’m running a shell command there must be an input binary for virtualizing input. So I opened my terminal and typed input and woo we have a binary. So from there my next thought was ADB. Can I call input tap over my dev bridge. I had a look around and there’s actually a UIautomator tool provided by google for debugging but this is really most useful when writing test cases for your own apps.

I’m using wireless ADB because I’m lazy but here’s what I had working.

adb connect
adb shell input tap 100 100

Then I created a batch file to do this over and over in the spots where I need to tap

FOR /L %%A IN (1,1,800) DO (
adb shell input tap 1270 450
adb shell input tap 1850 955
adb shell input tap 1850 955)

Now all I do is run the batch file and sleep while my character prospers.

I found a couple of touch recording apps in the playstore but I found this method works better

Category: Uncategorized