• If this is your first visit You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Sign up today to get the latest PS4 GameSaves, Game Mods and much more!
  • If you've previously logged in via Google or Discord and are now unable to do so you'll need to request a password reset which will be emailed to you via the link here: Lost password

Android Python Scripts for Patching Unity Games and NDK-Based Game Libraries

SyrenRemix

Reverse Engineer
STAFF
JIMZO-F
October 25, 2020
405
2,924
3,251
7CRUfXr.jpeg

An accomplished developer from Ireland, has created a python-based tool that streamlines the patching process for arm64 and arm32 architectures. This tool offers a straightforward solution by handling all essential value settings seamlessly. It facilitates modifications of specified offsets within the binary, allowing the retrieval of desired values like boolean true/false, integer zero/max, long zero/64-bit, float/double zero, and void with nop. The tool leverages the powerful radare2 framework and the r2pipe module for efficient binary patching. For installing radare2, refer to the accompanying installation guide. Additionally, the tool includes extensive documentation for every function, ensuring a comprehensive understanding of the codebase and enabling users to explore its capabilities thoroughly.

Moreover,the Unity Script addresses potential errors proactively, offering fixes for eight common issues:

  1. Detection of missing radare2 installation.
  2. Detection of missing r2pipe installation.
  3. Check for an active internet connection.
  4. Validation of an empty file path.
  5. Validation of an incorrect file path.
  6. Verification of the file's executability.
  7. Validation of an unsupported architecture.
  8. Verification of invalid offset formats.

Advantages:


    • User-friendly experience: the lib patcher boasts an intuitive interface, presenting a simple 3-step process that accommodates users of all programming proficiency levels.
    • Automatic architecture detection: lib patcher intelligently detects the target binary's architecture, eliminating the need for manual intervention. This ensures the accurate application of patches based on the detected architecture.
    • Simultaneous patching of multiple offsets: lib patcher enables patching of multiple offsets in a single operation. This feature streamlines the process and saves valuable time.

How you can use the script:


    • Extract the executable library into your directory.
    • Run the script using the command 'python Unity.py
Sophisticated Python Script
Python Script Unity

The 'offsets' variable contains different data types and their corresponding offsets in the library. You can customize the patches by adding or removing offsets as needed. The script supports various data types such as boolean values, integers, longs, floats, and void (with a NOP instruction). It's important to note that this script requires a certain level of technical knowledge and expertise to use properly. It is recommended for professional modders who are comfortable working with reverse engineering tools and making changes to executable libraries. Feel free to modify and customize the script based on your specific needs without removing credits that's all I ask. Il2CppDumperGUI is a graphical user interface tool that works in conjunction with the Il2CppDumper script. It helps with the analysis and extraction of metadata and code from IL2CPP (Intermediate Language to C++)-based applications, which are commonly found in Unity-based games and apps.

Here's an explanation of what Il2CppDumperGUI does and how it can be used:



      • Analysis of IL2CPP files:
      • - IL2CPP is a Unity-developed technology that converts C# and other managed code into C++ for performance optimization.
      • - Il2CppDumperGUI analyzes IL2CPP files (usually found in Android or iOS apps) to extract information about the classes, methods, properties, and other metadata present in the application.

      • Extraction of code and metadata:
      • - The tool helps extract the IL2CPP binary code and metadata from the target application, allowing you to access and analyze the internal workings of the app.
      • - It can identify the memory offsets where the code and metadata are stored within the application's executable or shared library file.

      • Dumping the code for analysis:
      • - Il2CppDumperGUI facilitates the dumping of the IL2CPP code, which converts the IL2CPP binary into a more human-readable format, typically C# or C++ code.
      • - The dumped code can then be analyzed and studied to understand the application's logic, reverse engineer certain functionalities, or create mods.

      • Handling obfuscation and anti-tampering techniques:
      • - Il2CppDumperGUI is designed to handle various obfuscation and anti-tampering techniques commonly employed in Unity-based applications.
      • - It helps identify and navigate through obfuscated or encrypted code, making it easier to analyze and understand the application's structure.

      • Providing a user-friendly interface:
      • - The GUI interface of Il2CppDumperGUI simplifies the process of using the Il2CppDumper script.
      • - It allows you to select the IL2CPP executable file, configure extraction options, and initiate the analysis and dumping process using intuitive buttons and menus.
Download Il2CppDumperGUI
Il2CppDumperGUI_2.0.1
Il2CppDumperGUI is a valuable tool for those interested in modding or understanding the inner workings of IL2CPP-based applications. However, it's worth noting that working with IL2CPP requires a certain level of technical knowledge, including familiarity with programming languages like C# or C++, and reverse engineering concepts.

I hope this explanation gives you a good understanding of what the Python Script & Il2CppDumperGUI does. If you want me to make a video on how to use the script I will.

Summary of `libgame.so`

The `libgame.so` file in Android applications is a shared library, typically containing compiled code written in C or C++. It handles performancecritical tasks, gamespecific logic, hardware feature access, and integration with native APIs to enhance performance and functionality. This makes it a vital component in many Android games for efficient and highperformance operations.


Summary of the Script

This Python script automates the patching of Android game binaries (such as `libgame.so`) by modifying specified offsets. It uses radare2 and r2pipe to apply patches that can alter game behavior, unlock features, or bypass restrictions. The script ensures the necessary tools are installed, verifies file architecture, and prompts the user for offset and hex value inputs. This facilitates a streamlined and automated binary modification process.

Python Script Lib

Screenshot_20240708_000111.jpg
 
Last edited:
Re: New Python Script designed to patch executable libraries

LiThdg6.jpg


This python-based tool was created by myself SyrenRemix, an accomplished developer from Ireland, aims to streamline the patching process for arm64 and arm32 architectures. It offers a straightforward solution by handling all essential value settings seamlessly. This tool facilitates modifications of specified offsets within the binary, enabling the retrieval of desired values like boolean true/false, integer zero/max, long zero/64-bit, float/double zero, and void with nop. Leveraging the powerful radare2 framework and the r2pipe module, lib patcher accomplishes efficient binary patching. To install radare2, please consult the accompanying installation guide. The tool comes with extensive documentation for every function, ensuring a comprehensive understanding of the codebase, and enabling users to delve deeply into its capabilities.

The 'offsets' variable contains different data types and their corresponding offsets in the library. You can customize the patches by adding or removing offsets as needed. The script supports various data types such as boolean values, integers, longs, floats, and void (with a NOP instruction). It's important to note that this script requires a certain level of technical knowledge and expertise to use properly. It is recommended for professional modders who are comfortable working with reverse engineering tools and making changes to executable libraries. Feel free to modify and customize the script based on your specific needs without removing credits that's all I ask. Il2CppDumperGUI is a graphical user interface tool that works in conjunction with the Il2CppDumper script. It helps with the analysis and extraction of metadata and code from IL2CPP (Intermediate Language to C++)-based applications, which are commonly found in Unity-based games and apps.

Il2CppDumperGUI is a valuable tool for those interested in modding or understanding the inner workings of IL2CPP-based applications. However, it's worth noting that working with IL2CPP requires a certain level of technical knowledge, including familiarity with programming languages like C# or C++, and reverse engineering concepts.

I hope this explanation gives you a good understanding of what the Python Script & Il2CppDumperGUI does. If you want me to make a video on how to use the script I will.

Minor Update
x86_64 & x86 No longer supported
Reduced offset change from 4secs to 2secs
 
Last edited:
I have added an additional Python script I created earlier. The first Python script is specifically designed for Unity games. However, there are other Android applications that are NDK-based games, which utilize shared libraries. The second Python script is designed to cover these NDK-based games.