0

I am working on Xamarin Project where I want my android app to be protected from getting reverse Engineered. i have custom renderer in my projects and external libraries. i have tried dotfuscator but it changes some method and does no affect in XAML due to which some functionality don't work as well as custom renderer don't work can any one suggest me a better option i am using visual studio 2017 professional. suggest me some free or cheaper solution with minimal costing.

Jay Bhatia
  • 98
  • 12
  • Maybe this is helpfull: https://stackoverflow.com/questions/36423030/obfuscation-in-xamarin-projects – Volkmar Rigo Mar 28 '19 at 07:02
  • Thanks for your answer @VolkmarRigo I wish it could help me but i am out of budget and the AOT feature is only available in Enterprise Edition of Visual Studio there is one more alternative option named "Embed assemblies to native code" but that is also available for Enterprise Edition only. if you find a cheaper solution do post back – Jay Bhatia Mar 28 '19 at 07:12
  • Babel claims to support http://www.babelfor.net/products/obfuscator XAML and BAML obfuscation. But I have no personal experience with it. Maybe you can give it a try. It's not free but certainly cheaper then Visual Studio Enterprise... – Volkmar Rigo Mar 28 '19 at 08:47
  • Thanks @VolkmarRigo for your response you are correct so i can try that i will post if it works but before that i need to contact there support to know if they support the app which has Custom renderer as they have not mentioned anything about custom renderer and in dotfuscator i was facing some problems in renderer after obfuscation . – Jay Bhatia Mar 28 '19 at 09:45
  • Progaurd does not work for this?? :/ – FreakyAli Mar 28 '19 at 09:49
  • 1
    Thanks for your Responce @G.hakim No in Xamarin Progaurd don't obfuscate code i already tried it. i am trying to work with Babel as Volkmar Rigo said. if it works in trial then will think of going for professional but it seems not to be working as it obfuscates the code but the APK don't get install on any device – Jay Bhatia Mar 28 '19 at 12:34

1 Answers1

0

You can use AOT in the community edition of Visual Studio. Just add the following lines manually to the csproj file for your release configuration:

<BundleAssemblies>True</BundleAssemblies>
<EmbedAssembliesIntoApk>True</EmbedAssembliesIntoApk>
<AotAssemblies>True</AotAssemblies>
<AndroidAotAdditionalArguments>no-write-symbols,nodebug</AndroidAotAdditionalArguments>

It is also recommended by many to use LLVM:

<EnableLLVM>True</EnableLLVM>

Adding all these removes the easily decompiled dll files that are normally present in the apk package.

Shared object files are created instead (.dll.so). These, as far as I can see, can not be used to reproduce the source code. However I am not an expert and this statement should be verified by somebody with more knowledge.

The shared object files can also be unzipped, but I cannot see any easily accessible code in them. I'm unfamiliar with the layout/content of these files. Hopefully someone can add some more information about them someday.

Be careful using the Android Options settings of your project within Visual Studio as they may alter the options you have entered manually. Personally I don't touch these options in Visual Studio and do all the project settings manually in a text editor instead.

Aidan
  • 5,346
  • 2
  • 19
  • 18