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

后端 未结 3 940
予麋鹿
予麋鹿 2021-02-10 05:55

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 .

3条回答
  •  被撕碎了的回忆
    2021-02-10 06:08

    1) Publish not obfuscated an application .apk, rename it to .zip.

    2) Move from it the file Mono.Android.dll from the folder "assemblies" into the folder YourProjectName\bin\Release.

    3) Create a new .NET Reactor project, set the right settings (uncheck Anti ILDASM, also the obfuscation process renames a fields that is used in reflection or serialization. To avoid crash of app, should set the exclusions for ignore some types or methods.). Save this project file into YourXamarinFolder\YourProjectName\bin\Release.

    4) Create the file obfuscate_android.bat, insert here the code:

     "C:\Program Files (x86)\Eziriz\.NET Reactor\dotNET_Reactor.exe" -project "NET_Reactor_Project_Name.nrproj"
      copy "YourProjectName_Secure\YourProjectName.dll" "YourProjectName.dll"
      DEL "YourProjectName_Secure\*.dll" "YourProjectName_Secure\*.pdb" /q
    

    Move this file into YourProjectName\bin\Release.

    5) Unload your Xamarin project and edit YourProjectName.csproj Find the next block:

    
    
    obfuscate_android.bat 
     
    

    6) Save all and Reload project

    7) Run Publish.

提交回复
热议问题