Skip to content

fourcels/Android-Mod-Menu-BNM

Repository files navigation

Introduction

Floating mod menu for il2cpp base on ByNameModding

preview.gif

Getting Start

Edit and Build Android-Mod-Menu-BNM with Android Studio

  1. edit app/com/android/support/Menu.kt

    const val TITLE = "Modded by (YourName)"
    const val SUB_TITLE = "whatever here"
    const val START_ICON = "data:image/png;base64,..."
  2. edit app/cpp/native-lib.cpp

    // feature list
    getFeatureList() {}
    
    // value change
    valueChange() {}
    
    // hook methods
    OnLoaded() {}
  3. build app-debug.apk

    Build > Generate App Bundles or APKs > Generate APKs
    

Decoding app-debug.apk with apktool

apktool d -f app-debug.apk

Decoding game.apk with apktool

apktool d -f game.apk

Copy app-debug files to game fold

cp app-debug/lib/${ARCH_ABI}/libModBNM.so game/lib/${ARCH_ABI}/libModBNM.so
cp -r app-debug/smali_classes* game/

Update game's main activity

  1. find main activity in game/AndroidManifest.xml

     <activity android:name="com.unity3d.player.UnityPlayerActivity">
         <intent-filter>
             <category android:name="android.intent.category.LAUNCHER"/>
             <action android:name="android.intent.action.MAIN"/>
         </intent-filter>
         <intent-filter>
             <category android:name="android.intent.category.DEFAULT"/>
             <category android:name="android.intent.category.BROWSABLE"/>
             <data android:host="callback" android:path="/param" android:scheme="com.greent.hornymerge"/>
             <action android:name="android.intent.action.VIEW"/>
         </intent-filter>
         <meta-data android:name="unityplayer.UnityActivity" android:value="true"/>
     </activity>
  2. edit onCreate method in game/smali/com/unity3d/player/UnityPlayerActivity.smali

    .method protected onCreate(Landroid/os/Bundle;)V
        # invoke Main.start(context)
        invoke-static {p0}, Lcom/android/support/Main;->start(Landroid/content/Context;)V
        ...
    .end method

Rebuilding game with apktool

apktool b -f game

Sign game/dist/game.apk with AndroidToolKit or apksigner

sign.png

Credits

  • Android-Mod-Menu Floating mod menu for il2cpp and other native android games.
  • ByNameModding Modding il2cpp games by classes, methods, fields names on Android.
  • Dobby a lightweight, multi-platform, multi-architecture hook framework.

About

Floating mod menu for il2cpp base on ByNameModding

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages