keep only function names when obfuscation for proguard

Viewed 6139

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

2 Answers

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.

Related