Reputation: 9429
I use proguard for obfuscation. How can I keep only function names while obfuscation. class names must be obfuscated but function names.
if I use,
-keep class * {
void somefunction();
}
and it keeps function of somefunction, but it doesnt change classes names.
But, I want to change classes names but somefunction
Upvotes: 6
Views: 6781
Reputation: 51
With Proguard, you can use -keepclassmembernames
In JNI, the class name is part of name of the function name in the native environment.
If you rename the class, you will get the java.lang.UnsatisfiedLinkError
.
You must keep both the class name and the member function name.
Upvotes: 0
Reputation: 45676
You can use -keepclassmembers
or -keepclassmembernames
.
Cfr. ProGuard manual > Usage > Overview of Keep Options
Upvotes: 10