locked
Opensource Obfuscar software for xamarin RRS feed

  • Question

  • User72170 posted

    What i want is an open source Obfuscar software like the title says.

    Something like Phoenix Protector would be very good

    The problem with Phoenix Protector is that its not really working with xamarin and android.

    Dotfuscator is the best i found until now that work with xamarin, but the free version lack the command line and i want to use it via command line so i could build a UserTask with visual studio 2019

    Is there a free opensource that work with xamarin android, and also able to obscrate via command line?

    Im a free user and i really dont want to buy a license, so please tell me your opinion.

    This is an example of how i used Phoenix Protector and the dll get obscrate but the app crash

      var args = $"-p \"{settingsPath}\" \"{dllDirNew}\" {(StayOpen ? "/K" : "")}";
    
                var process = new Process
                {
                    StartInfo = new ProcessStartInfo()
                    {
                        Arguments = args,
                        FileName = name,// Phoenix Protector
                        WorkingDirectory = applicationPath, // Phoenix Protector directory
                        WindowStyle = Hidden ? ProcessWindowStyle.Hidden : ProcessWindowStyle.Normal
                    }
                };
    

    I also used Skater .NET Obfuscator but its not really as good as Phoenix Protector and also i cant use Progaurd which i really would need to.

    The program need to be

    1- Able to hide or encrypt all `strings` this is a very importend requirement for me.
    
    2- support a command line.
    
    3- only generate a single dll
    
    Tuesday, August 6, 2019 9:49 PM

All replies

  • User1773 posted

    I'd recommend Babel. It is not open source, but only a modest fee for a very good product, which also has great support. I've been using it since early 2016.

    Thursday, August 8, 2019 11:47 PM
  • User176749 posted

    What for you need it ? Proguard or r8 does it mostly. You can also use bundle into native assemblies option. So you are good to go.

    Monday, August 12, 2019 12:43 AM
  • User1773 posted

    Proguard doesn't obfuscate .Net code (the majority of your code in any Xamarin app and plainly visible inside the assemblies folder of an apk). Proguard with Xamarin doesn't even obfuscate java code.

    Add the following at the top of your proguard.cfg file and then note the output after r8 runs in your configyourproject_name.txt.

    -printconfiguration configyourproject_name.txt -printseeds seeds.txt -printusage usage.txt

    # This is Xamarin-specific (and enhanced) configuration. -dontobfuscate

    Proguard only shrinks Java code when used with Xamarin.

    <BundleAssemblies>true</BundleAssemblies> is a good option because it removes the .net dlls from the assemblies folder, but I don't believe the code inside the .so files is obfuscated, so you still need to obfuscate.

    Monday, August 12, 2019 11:35 PM