Last year about this time I wrote a php script that would play Defeneder II for me on my Kindle Fire. Now I have a new phone (HTC One X) and a new Game (Hill Climb Racing).
I really want to drive the upgraded tank through the forest and just smash all the trees, but I’ve been playing a lot, and it takes a lot of time to get that many coins….
So I revived my old code, EXCEPT! Now you don’t need to do all the send event stuff, there is a new adb shell command called input. input lets you easily simulate taps.
You don’t even need php, “Hill Climb Racing” is such a simple game, that just a repeated swipe (a tap is too fast to keep the gas pedal down, so instead a swipe pushes the pedal down for a hundred milliseconds?? Which is enough for the car to creep across the levels) keeps the game playing, over and over and over again.
On my HTC One X, the command that works is:
adb shell input swipe 1100 500 1100 550
I’m on windows, so a simple shell script to repeat this over and over for hours on end is all that I need.
for /L %%a in (1,1,10000) do adb shell input swipe 1100 500 1100 550
Yay! Fully Loaded Tank Here I Come!
Now to play with Screen Cap and see if I can make something that will play a game intelligently.