i am trying to obfuscate my android application with proguard. But the problem is when i decompiled the apk it only shows the changed variable names but class names are sam
I don't know what exactly problem in your case but i had solved my problem by below proguard rules
and their are various rules which help you to protect your application
-dontskipnonpubliclibraryclassmembers
-dontshrink
-dontoptimize
-printmapping build/libs/output/obfuscation.map
-keepattributes
-adaptclassstrings
-dontnote
-dontwarn
# Keep Android classes
-keep class ** extends android.** {
;
;
}
# Keep serializable classes & fields
-keep class ** extends java.io.Serializable {
;
}
# Keep - Applications. Keep all application classes, along with their 'main'
# methods.
-keepclasseswithmembers public class * {
public static void main(java.lang.String[]);
}
# Also keep - Enumerations. Keep the special static methods that are required in
# enumeration classes.
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-assumenosideeffects class android.util.Log {
public static *** d(...);
public static *** e(...);
public static *** w(...);
}
For More Information you can visit Proguard official site