Skip to content

SlyrithDevelopment/Android-Native-Mod-Template

Repository files navigation

Android Native Mod Template

Not everything requires a mod menu - which is why I created this mod template (but, it was also a fun project to do)! It supports hooking, patching, pattern-scanning, uses cmake to build, and much more! In short, it includes everything you need to make your own mods. In case you're wondering, for the NDK, I use the latest LTS version - which can be downloaded here.

Version 1.2027 of Forward Assault has been used as an example in the source of this template.

Implementation

Implementing your mod into an application is very easy!

  1. Once you build the apk, open it using an archiver (such as 7-Zip, WinRAR, etc), and find the 'lib' directory.

image

From there, you will be presented with two additional folders. Choose the folder that resembles the cpu architecture you want to use (whether it be armeabi-v7a, or arm64-v8a).

image

  1. Move the 'libnativemod.so' library to the target applications lib/chosen-cpu-architecture/ folder.

image

  1. Then, find your applications launch activity, and place the following code under the 'onCreate' method in that launch activity.
const-string v0, "nativemod"

invoke-static {v0}, Ljava/lang/System;->loadLibrary(Ljava/lang/String;)V

image

  1. Compile it, and you're done!

Credits

About

A native mod template for Android.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published