This is the AMP version of this page.
If you want to load the real page instead, click this text.

Help! Injecting mod menu, methods of single dex exceed 65536

I have been trying to inject a my mod apk into the game's MainActivity smali, when adding "invoke-static {p0}, Lcom/android/support/Main;->Start(Landroid/content/Context;)V" below the OnCreate method, but I get an error saying that methods the number of methods of the dex exceed 65536. The game has many (8) classes.dex files. So I can't add my mod menu.

Welp!
 

Attachments

  • Screenshot_20250117_151210_bin.mt.plus.jpg
    65.3 KB · Views: 21
  • Screenshot_20250117_151225_bin.mt.plus.jpg
    105.9 KB · Views: 20
You have put your dex menu files to a location that has succeeded the limit of size. Meaning, you need to put your dex file in a location that's not fully sized. Put it in the last smali files so you can rebuild and finally compile it.
 
You have put your dex menu files to a location that has succeeded the limit of size. Meaning, you need to put your dex file in a location that's not fully sized. Put it in the last smali files so you can rebuild and finally compile it.
My menu dex file is actually 'classes9.dex' which I have just copied to the same directory as the decompiled apk's classes.dex files.
I only get this error when I try to recomile the 'classes2.dex', in this case after adding the line:
Lcom/android/support/Main;->Start(Landroid/content/Context;)V below the OnCreate method found in the game's MainActivity smali.

And another thing is that the last smali file does not constan the game's MainActivity.smali file (So I can't inject Lcom/android/support/Main;->Start(Landroid/content/Context;)V ). Hopefully i'm clear on that, if im still lost can you please explain in more detail what do you mean by that.

Anyways thanks for the tip, im gonna try it just now.
 
If you can't find the games smali files, then it's most likely using their own implementation of smali files. You will need to easily find it in AndroidManifest.xml OR find it in APKEasyTool