Skip to content
/ Android-Native-Mod Public template

A minimal native only template for Android modding.

Notifications You must be signed in to change notification settings

BryanGIG/Android-Native-Mod

Repository files navigation

Android Native Mod Template

A minimal native only template for Android modding.

Background

Recently i wanted to begin doing again some Android modding, but i didn't want to use any of the existing frameworks, since it messy and i don't like it.
So i created this template to make it easier for me to start a new project.

How To Use

  1. Clone the repo
  2. Open the project in Android Studio / Visual Studio Code
  3. Change the package name in app/build.gradle and library name in app/src/main/cpp/CMakeLists.txt
  4. Start coding
  5. Build the project
  6. Copy the generated .so from app/build/outputs/native/{debug/release}/lib{template}.so
  7. Load the library in your modded app
    You can use many various methods to load the library, see Injecting the library

Injecting the library

This project is merely a template, so you can use any method you want to load the library.
Here are some examples:

Note: Modify "template" to your library name

./Injector -p "com.target.package" -l "template"
const-string v0, "template"

invoke-static {v0}, Ljava/lang/System;->loadLibrary(Ljava/lang/String;)V
void* handle = xdl_open("template", RTLD_NOW);
  • Other methods

As long as you can load the library into the target process, you can use any method you want.

To-Do

  • Polymorphism design pattern
  • Unity API (Vector2, Vector3, Quaternion, etc)
  • Doc: How to use
  • Doc: What need to be changed
  • Doc: What each file does
  • Doc: How to add new functions
  • Doc: How to add new classes

Credit

  • Dobby - Hooking library
  • KittyMemory - Android, IOS runtime code patching library

About

A minimal native only template for Android modding.

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages