3

Are scirpts used in an Andriod .apk file that has been compiled with Unity considered secure?

What I have been trying to work out is if I compile the .apk file can anyone decompile it again to read the scripts that I have writen with c#, even if it is only as machine code I wouldn't deem it secure.

derHugo
  • 83,094
  • 9
  • 75
  • 115
TrevorLee
  • 231
  • 2
  • 13
  • It‘s never secure, but if you use IL2CPP instead of Mono, it can‘t be decompiled to C# as easily. – JeanLuc Nov 26 '18 at 20:35

1 Answers1

2

Is it possible to read an apk files scripts after being compiled with Unity?

Yes, it is possible and really easy to do. You can make it harder to read the scripts by changing the "Scripting Backend" to IL2CPP. You can also use Gradle. This post shows how to use a custom Gradle in Unity. You can find how to enable minify on Gradle with Proguard here. That shows you what the Gradle should look like.

Note that these will not prevent people from reading or changing your code. It will only make it harder to do so..

Programmer
  • 121,791
  • 22
  • 236
  • 328