Android Online Game Bot !?!Help!?!

Started by
10 comments, last by DejayHextrix 6 years, 5 months ago

Hi, New here. 

I need some help. My fiance and I like to play this mobile game online that goes by real time. Her and I are always working but when we have free time we like to play this game. We don't always got time throughout the day to Queue Buildings, troops, Upgrades....etc.... 

I was told to look into DLL Injection and OpenGL/DirectX Hooking. Is this true? Is this what I need to learn? 

How do I read the Android files, or modify the files, or get the in-game tags/variables for the game I want? 

Any assistance on this would be most appreciated. I been everywhere and seems no one knows or is to lazy to help me out. It would be nice to have assistance for once. I don't know what I need to learn. 

So links of topics I need to learn within the comment section would be SOOOOO.....Helpful. Anything to just get me started. 

Thanks, 

Dejay Hextrix 

Advertisement
1 hour ago, DejayHextrix said:

I was told to look into DLL Injection and OpenGL/DirectX Hooking. Is this true? Is this what I need to learn? 

 

Not for Android, no.  DLL Injection is strictly for Windows programs.

I don't know how feasible it is for you, but you can probably get the APK off your device using adb (not sure about this).  APK files are just zip files, so extract it.  Then it will depend on how the program was written.  If it's C++, you'll have to get good reading assembly.  If it's Java, you can use a Java decompiler on it.  If it's C# then you can use a C# decompiler on it.  I do this at work to analyze the APKs we create before we publish them to make sure we're not wasting space on anything stupid.

After that, it's pretty much up to you to figure out how to find what you want to automate and put it back together into a working APK.  I've never done that.  It's also unlikely that a decompiler will give you something that you can actually compile again.  You also will not be able to sign the APK using the original signature, but you will probably be able to sign it yourself as long as nothing bothers to validate the signature.

If that fails, your next option (if it's a properly constructed client/server game) is to intercept the network traffic and automate the request/responses using a standalone program that you create from scratch.  This will only work if the game and server are not using SSL in a way that prevents proxy interception (and I know from experience that a lot of games do not bother).

4 minutes ago, Nypyren said:

 

Not for Android, no.  DLL Injection is strictly for Windows programs.

Even if the Android game is ran through an emulator on windows? 

Btw, Thank you. At least someone who can help me instead of complaining about my "Low-Level Effort" in my post. All I'm trying to do is get started. 

for Android game bot, you might want to take a look at 123Autoit-nonroot, do you youtube search on the name 123Autoit, and you should be able to see some demo on the result.

can you provide what game you want to automate?

12 hours ago, DejayHextrix said:

Even if the Android game is ran through an emulator on windows?

Possibly.  It's possible you could inject a DLL into the emulator, but my gut feeling is that it would be even harder to find what you're interested in.  If you have an emulator you could possibly automate what you want at the UI level (i.e. make a program that simulates clicking on the emulator's screen at the right places).  It sounds like Kevin is talking about a similar tool that will run on the Android device itself, but I can't read Chinese so I'm not sure what any of those youtube tutorials say.

Is there an alternative way to create the bot to use the UI Variables for more interaction? Because you're almost describing a macro recorder(Mouse Recorder, with UI Coordinates of each function to click) I wouldn't mind having a bot that can interact on it own and find certain variables on its own without UI interface Coordinates. If that makes sense?

13 hours ago, kevin yiu said:

for Android game bot, you might want to take a look at 123Autoit-nonroot, do you youtube search on the name 123Autoit, and you should be able to see some demo on the result.

can you provide what game you want to automate?

War and Order Android Game. 

Thank you guys so much for taking the effort to help me out. I really appreciate it, help finding a solution to my project.  

6 hours ago, Nypyren said:

Possibly.  It's possible you could inject a DLL into the emulator, but my gut feeling is that it would be even harder to find what you're interested in.  If you have an emulator you could possibly automate what you want at the UI level (i.e. make a program that simulates clicking on the emulator's screen at the right places).  It sounds like Kevin is talking about a similar tool that will run on the Android device itself, but I can't read Chinese so I'm not sure what any of those youtube tutorials say.

 there are English subtitle provided within the video. anyway,  as you are saying if automation is your what you are intended  you could use tools like autoit or sikuli, i think they are all free and easy to learn, however then your computer will be taken over, which i don't think this is what you really wanted

I need more then just Automation. I need the bot to interactive with the world to know where resource tiles, monsters and whatever else I need the bot to find within the world. So it needs to be interactive not just automation. Like I said a macro(mouse) recorder is not what I am looking for. 

Typically when cheating in a Windows game (ex: CheatEngine), the way to go about it is to attach to the process with a debugger (or any other tool that can read memory from the process), look at an integer value on the UI and search for that value in the process memory.  You'll find potentially thousands of memory locations due to the value probably not being very unique, and a lot of memory available.  Then you perform an action in the game that you know can change that value, and search again.  If the memory has not been re-allocated in the meantime you will likely narrow down the memory address for the variable you're interested in.  That's usually fairly easy for integer values or strings.  It's harder (and slower) for floating point values, or values that you aren't sure of their representation in memory.  This also fails for Java and C# if they are using a relocating garbage collector (some mobile GC implementations disable relocation for performance, some keep it on to minimize fragmentation problems); it will depend on how the game was made.

Depending on how the game developers implement resource tiles, map tiles could be an array of tile data, an array of REFERENCES to tile data, or even just a slipshod list of game objects and components in Unity that has no simple and easy-to-manipulate representation in RAM.  At this point it starts heavily depending on how the game is implemented; what language or engine they used, etc.  If they used Unity, their code is in C# and you can probably decompile it from the Assembly-CSharp.dll inside the APK, unless they obfuscated it (in C#'s case that would mean renaming all classes and variables to meaningless things like "A" instead of "TileMap".  If it's written in Java, it's about the same effort and results.  If it's C++ or Unity with IL2CPP then you will have to learn how to be a professional assembly-level reverse engineer to get anything useful out of it.  If you aren't already, we're talking about multiple years worth of effort trying to learn how to do it.

If you luck out and it's unobfuscated C# or Java, your best bet is to modify that code directly to do what you need.  For Unity APKs which do not use IL2CPP, the .Net DLLs will be present and you should be able to edit them to a certain extent using dnSpy.  Unity does make some tweaks to these DLLs itself in order for prefab->script references to find and instantiate the proper classes (and other things like that), so there's a risk that you can break the game completely if you attempt this; I've only modified XNA games for Windows this way, personally.

For Java, I only know of jdGUI for decompiling code; I haven't found anything like dnSpy for Java yet.

For native code (compiled from C++ or IL2CPP) you will need a professional grade disassembler/decompiler such as IDA Pro.  IDA Pro has a free version of their disassembler that will work on the x86 binaries that should be present in Android APKs (Android native code should normally include both ARMv7 and x86 native code since some Androids use x86.  Most use ARM, which I don't believe is freely available in IDA's free version.  Their decompiler is not free and will likely be far outside of your budget.  Remember that if you modify the x86 binary you will have to run the modified version on an x86 processor, which likely means using the emulator since the vast majority of Android devices use ARM.

After that you have to figure out how to reconstruct an APK from your modified files and install it on your device.  If the game has any security measures which try to validate its signature, you will have to find and defeat those during the modification step.  I haven't done this myself so I'm not sure of what you might encounter.

good luck for what you are looking for, but this kind of bot as if it is available, it probably going to cost you.

This topic is closed to new replies.

Advertisement