Many developers now are protecting their unity games from being dumped, you must have encountered a game which throws an error when you try to dump it.
Many times when you try to dump a protected game, you will get an error like this saying: ERROR: Metadata file supplied is not valid metadata file.
Protecting the global-metadata file in Unity is essential to protect sensitive information and prevent unauthorized access. The global-metadata file contains metadata about assemblies in the Unity project and might include some important information about the game.
In today’s tutorial I will show you how you can easily dump a protected il2cpp game in order to view its classes and methods, you will get a dump.cs from which you will get all the information. The process is very easy and works for many games, however some high-end games will not work since they have more budget to prevent this from happening, they may include integrity checks, tamper detections, and other checks. So you may want to check out for that before dumping.
Requirements:
1) Android Device or PC
2) APK Tool Kit or any other decompiler.
Let’s begin:
1) For this tutorial, we will try to DUMP a protected game called Whispers Interactive Story – Download it from here the APK File
2) Decompile the APK file
3) Download the Auto Dumper ZIP file
4) Now extract the files from Auto Dumper and place it in your desired location
5) Now we need to find the game’s main activity, if you are dumping using APK TOOL KIT, it will usually tell you the location of the game’s main activity, otherwise you have to find it from AndroidManifest.xml
The main activity path is given in APK TOOL KIT, which is com.google.firebase.MessagingUnityPlayerActivity
Otherwise, look for it inside AndroidManifest file
6) Place the lib file from the AUTO DUMPER to the lib folder of the game, make sure the ABIs are matching with the game’s Architecture, if it’s arm64-v8a then you place that one, and armeabi-v7a if it’s armeabi-v7a game.
In my case, the game was arm64-v8a, so I placed that file.
7) Now navigate to the game’s main activity that we found in the steps above in my case it was com.google.firebase.MessagingUnityPlayerActivity so it will be com/google/firebase/MessagingUnityPlayerActivity.smali
8) Find the oncreate method inside the smali class and add this under .locals 1
const-string v0, "il2cppdumper" invoke-static {v0}, Ljava/lang/System;->loadLibrary(Ljava/lang/String;)V
9) Save the file and compile the APK file again
10) Run the game and wait few seconds, you will have a DUMP.CS file under android/data/(game package name)
Move the DUMP file to PC and open it using notepad++
That’s it!
If the game crashes when you launch then there is a chance that the game has signature check, or integrity check, or tamper detection which you will have to bypass. You can see our tutorial on how to bypass signature check or how to bypass pairip protection.
Verify also if the game has pairip protection by checking the AndroidManifest.xml file, to see whether it’s referring to any class called pairip inside.
If you have any questions, let me know in the comments section.