Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use .Net Reactor obfuscated dll of Xamarin Android APK

I am new to Xamarin Android. I have created an App using Visual Studio 2015 Community Edition. I have set the Solution Configuration to Release.

For obfuscation I used .Net Reactor.

This is how I tried to obfuscate

1: Once I build the App, I will go to Bin\Release folder

2: Obfuscate the App.dll

3: Replace the original dll with obfuscated dll in Bin\Release, Obj\Release and Obj\Release\assemblies

4: Go to Tools->Android->Publish

However when I tried to publish the obfuscated dll will be replaced by original dll.

So what I am doing wrong ? Do I have to manually pack the apk file. If that is the case how can I do that?

like image 659
Ajit Hegde Avatar asked Oct 19 '22 07:10

Ajit Hegde


1 Answers

It has come extremely easy to use .net reactor with xamarin today:

  1. from reactor ide install extension for your visual studio appropriate version (menu Visual Studio)

  2. in reactor ide create a project for your xamarin solution. You can use menu "Protection Themes->Xamarin" or play with you own settings. Do not forget to add additional files (your Forms shared project and others needed). save project, note its path.

  3. in Visual Studio ide menu Tools->Reactor Automation set:

  • project file path to your Xamarin Android (or other needed) platform project, check Enabled.
  • configuration to Release,
  • Net Reactor Project file to the one that you created in step 2.

Click ok, that's it.

The build process would be MSBuild compiling, then reactor would apply its processing, then VS would pack/aot whatever was set for platform deployment/distribution.

like image 138
Nick Kovalsky Avatar answered Nov 09 '22 12:11

Nick Kovalsky