Awesome
ByNameModding
English | Русский
ByNameModding is a library for modding il2cpp games by classes, methods, field names on Android. This edition is focused on working on Android with il2cpp. It includes everything you need for modding unity games.<br> Requires C++20 minimum.
What you can do with BNM?
- Finding everything by names (classes, methods, fields ane etc.)
- Finding Generic classes and methods.
- Adding your own classes to game that work even with AssetBundles!
- Change game classes by adding fields and methods.
- Use basic C# structs like string (Mono::String), array (Mono::Array), dictionary (Mono::Dictionary) that fully work.
New classes
BNM can add your own class to game, it requires C++20 and above.<br>
If you nest your class from MonoBehaviour (or other class with events) methods like Update
will work.<br>
And it fully computable with AssetBundles!<br>
For bundles need add your class to dlls that listed in ScriptingAssemblies.json.<br>
Basically BNM add classes to Assembly-CSharp.dll
that always in this list.<br>
If you want to use your own dll with bundles, add it to this file, but this will work only if you use BNM internally.<br>
Getting Started
- First clone the repo and add it to your project.
- Set C++ version to 20 or higher
- add the code below depending on what you are using:<br>
Android.mk
CMakeLists.txtBNM_PATH := $(LOCAL_PATH)/path/to/ByNameModding LOCAL_C_INCLUDES += $(BNM_PATH)/include $(BNM_PATH)/external/include LOCAL_STATIC_LIBRARIES += BNM # ... include $(BUILD_SHARED_LIBRARY) # ... include $(CLEAR_VARS) include $(BNM_PATH)/Android.mk
add_subdirectory(path/to/ByNameModding EXCLUDE_FROM_ALL) get_property(BNM_INCLUDE_DIRECTORIES TARGET BNM PROPERTY BNM_INCLUDE_DIRECTORIES) # ... target_include_directories( # Your lib name PUBLIC ${BNM_INCLUDE_DIRECTORIES} # ... ) target_link_libraries( # Your lib name PUBLIC BNM # ... )
- Change
UNITY_VER
, include your string obfuscator and hooking software, uncommentBNM_DOTNET35
if the game uses .NET 3.5 in GlobalSettings.hpp - Done! See examples or add it to your project to understand how to work with BNM.
Supported Unity versions: 5.6.4f1, 2017.x - 6000.0.x
Dependencies
UTF8-CPP used by il2cpp and by BNM too.<br> Open-hierarchy custom RTTI used to optimize memory usage
Android hookinng software for example:
Dobby<br> ShadowHook<br> Substrate with And64InlineHook - do not support unhook