How can I do this using Proguard rules?

Hello Everyone, I need help with proguard rules..

I've some java projects which is for making extensions.
But I want to protect my code from decompiler.
Also I want to change classes name like this except main class.
I've did this manually but I want to learn that, how can I do this with proguard automatically.

If anyone know about this proguard rules, please help me?

(Thanks for your valuable time)

Try using this..

-verbose
-dontnote **
-optimizationpasses 3
-allowaccessmodification
-dontskipnonpubliclibraryclasses
-mergeinterfacesaggressively
-overloadaggressively
-useuniqueclassmembernames
-repackageclasses ''

-keep public class * {
public protected *;
}

I'm already using this rules which rules you wrote here, it's not working with public classes which are not main class but related with package name.

That's why I've create this topic get any solution. By the way thanks for your time. :+1:

3 Likes

So, I tried and found this diving my java file in parts, try this once

-verbose
-dontnote **
-optimizationpasses 3
-allowaccessmodification
-dontskipnonpubliclibraryclasses
-mergeinterfacesaggressively
-keep class com.facebook.ads.** { *; }
-overloadaggressively
-useuniqueclassmembernames
-repackageclasses ''

-keep public class * {
public protected ;
}
-keepattributes InnerClasses
-dontshrink
-dontoptimize
-keep class com.yourpackagename.
* { *; }

This is how I do it.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.