Modding Native Game (with IDA) Basic Tutorial

Modding Easy Native Lib Games

Modding Easy Native Lib Games

Hello everyone,

In this tutorial, we will cover the basics of modding easy native lib games, which are games that do not use .dll or il2cpp files. These games can be challenging for beginners, as the simpler ones are not intuitive, and the difficult ones can be extremely hard to modify.

Like my other modding tutorials, basic tasks such as decompiling/recompiling the APK or editing the lib are not included, as they are not the focus here.

Note: The example game used in this tutorial has been discontinued, but you can trust that the methods demonstrated here used to work.

Important: The game used in this example has been shut down. You can still follow along by downloading the original APK from the following links: APK Admin or Sharemods.

Requirements

  • The original APK (available from the links above).
  • IDA (any version above 7.0 is recommended).
  • HxD (a hex editor).
  • (Optional) The main lib's database to save time. Download it from APK Admin or Sharemods.

Process

  1. Decompile the APK and copy the main lib "libgame.so" from .apk/lib/armeabi-v7a into a different folder (your workspace).
  2. Open "libgame.so" with 32-bit IDA.
  3. A window will appear asking for options. Ensure the options are set to "Processor type: ARM Little-endian, and ELF for ARM (shared object)".
  4. IDA Options
  5. Click "OK" and let the lib load completely. This process can take several hours. The button below "Options" will be yellow with an hourglass while loading.
  6. IDA Loading
  7. Once loaded, the button will turn green.
  8. IDA Loaded
  9. Open the "Exports" subwindow and press Ctrl+F to search for keywords.
  10. Exports Search
  11. Locate the function of interest, copy its address, and search for it in HxD.
  12. Replace the existing hex values in HxD with the desired patch (e.g., "4F F0 00 00 70 47" for mov r0, #0; bx lr in thumb mode).
  13. Test the patch to verify its effect. For massive damage, use "4F F4 70 00 70 47".

And that's it! You should now have a massive damage feature implemented. I hope this tutorial has been helpful for those of you interested in learning how to mod.

FAQ

Q: How do I know if it's Big Endian or Little Endian?

A: Trust IDA's decision or decide based on whether the assembly instructions make more sense in little or big endian.

Q: How do I know if the lib is in thumb or ARM mode?

A: IDA will usually detect the mode. Compare the instructions with the hex codes to determine the mode.

Q: Why can't I find any keyword?

A: Your keyword list might be too small, or the game may not have any names because they were removed, or the lib was modified to make it harder to analyze.

Q: What can I do if the lib has removed the names or is modified to make it harder to analyze?

A: This requires experience to figure out. You will need to experiment and learn from it.

Post a Comment

0 Comments