2

I am trying to obfuscate my Xamarin / Android project with tool Crypto Obfuscator For .Net v2015 in Visual Studio. When I obfuscate my .dll file what should I do to build my .APK with that crypted .dll?

The problem that exists now is that compiler is replacing older .dll in each build.

boski
  • 1,106
  • 3
  • 21
  • 44

2 Answers2

2

You need to add a build action which will, after build has completed, call your obfuscator through command line and replace the regular dll with the obfuscated one and then the flow will continue to packaging. This process is quite tricky but the key is to figure out the flow of dll's between the projects (in case you have more than one) until they reach the main project and there the flow between the bin and obj directories. Go through your build log to get a better understanding of this.

In your case because you use VS you can consult this entry, while I'd still recommend understanding the whole procedure to leave nothing to chance.

Alex.F
  • 5,648
  • 3
  • 39
  • 63
1

Look at the the answer by the link. There is the same situation, only there use .Net Reactor. The difference will be only in 1 row of code of "obfuscate-android.bat" file. There you should to use, like this:

"C:\Program Files\Crypto Obfuscator For .NET 2013 R2\co.exe" projectfile=PATH_TO_YOUR_CRYPTO_OBFUSCATOR_PROJECTFILE
Community
  • 1
  • 1
Polyariz
  • 534
  • 1
  • 7
  • 17