I’m almost ready to release my new game for iOS and Android. I want to protect some parts of the code, so it’s harder to decompile. But before buy some obfuscator from asset store, I would like to know how code is seen when someone decompiles it.
I see that people uses il2spy to see the code inside dlls. But, for an Android apk, where can I find these dll files? I used apktool to extract files, but I cannot find them.
So, questions are:
Do I need an obfuscator because it’s relatively easy to decompile and see code?
If answer to previous question is “yes”: how can I see it?
You can extract .apk files like archive files and see the content, just go to assets/bin/ and here you go, there are the binaries and DLLs, use IL2Spy to see the code.
Yes, you need obfuscator, because it is really easy to decompile code.
Since APK’s are just JAR files, and JAR files are just ZIP files with an extra manifest file included, you can open APK’s in WinZip, winrar, or whatever your favorite archive application is. Windows even has built in ZIP support, but you might have to rename the file extension to .zip first.
Thanks for your answer. I used ilspy to see my code in assets/bin/Data/Managed/Assembly-CSharp.dll. I can see it exactly as I wrote it! I think Unity should obfuscate the code…
Fatal error in Unity CIL Linker
System.NullReferenceException: Object reference not set to an instance of an object
at UnityLinker.AddUnresolvedStubsStep.GetTypeModule (Mono.Cecil.TypeReference type, Mono.Cecil.AssemblyDefinition[] assemblies) [0x00001] in <81b71c29c35449f8a666455c78a2dcfb>:0
at UnityLinker.AddUnresolvedStubsStep.GetTypeModule (Mono.Cecil.TypeReference type) [0x00001] in <81b71c29c35449f8a666455c78a2dcfb>:0
at UnityLinker.AddUnresolvedStubsStep.Process () [0x000b5] in <81b71c29c35449f8a666455c78a2dcfb>:0
at Mono.Linker.Steps.BaseStep.Process (Mono.Linker.LinkContext context) [0x00018] in <09bca01fd71241c7a07af8c71eb6ae1a>:0
at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x00020] in <09bca01fd71241c7a07af8c71eb6ae1a>:0
at UnityLinker.UnityDriver.Run () [0x00086] in <81b71c29c35449f8a666455c78a2dcfb>:0
at UnityLinker.UnityDriver.RunDriverWithoutErrorHandling () [0x00001] in <81b71c29c35449f8a666455c78a2dcfb>:0
at UnityLinker.UnityDriver.RunDriver () [0x00002] in <81b71c29c35449f8a666455c78a2dcfb>:0
Should I open a new thread or can I revive this one ?
Is there a good option for obfuscation ? I tried obfuscator but it breaks a lot of things by default