How can we listen for and record in-app events? I've been searching the net for some time without the slightest hint. Bellow are my case specific details for clarity, (though maybe I should be ashamed).

The reason I ask is because I want to create a macro bot that would play a complicated mobile game or at least automate it further. (I am new to scripting with basic knowledge of Java.)

This mmorpg is very much automated. However too much choice is in the hands of the player in order to use user prompts (like touches, swipes and time intervals) for triggers. The conditional clauses must depend on the dynamic state of the game server if the script is to be "smart."

So the question is how to listen for in-app events? How do we pick up the important triggers (timers, health bars, presence of NPC or player) from the noise in order to model the gameplay?

(This should be possible since people sell successful bots, nicely packaged, linked to a license server and with an intuitive front end.)


There are some possibilities, however both a far beyond scripting and falls more into the development section:

  1. Check the network traffic. If it is an online game it has to receive and send data to the server. If you can sniff that data you know in what state the game is

  2. An app with root permission can get access to the memory of another app. If you know where to look you can find all the data the app contains in it's memory and therefore get info on the game state.

  • Thanks, I was afraid this is the case. And if I manage to sniff the data, I need to categorize it through itterative playing, right? Jan 16 '19 at 11:40
  • You need to reverse engineer the data until you understand which bytes what meaning have.
    – Robert
    Jan 16 '19 at 14:36

Not the answer you're looking for? Browse other questions tagged or ask your own question.