#StackBounty: #android #obfuscation #android-proguard How to not obfuscate interface methods & it's parameters using Progaurd i…

Bounty: 100

I have the following code

  public class MyClass {
        public void method1(Integer marks) {

        }

        private String method3(String name){

        }
        public interface interface1 {
               void method4(Integer ID);
               void method5(Integer rate, boolean status);
        }
  }

I have used progaurd-rules.pro

-keepattributes Exceptions,InnerClasses,Signature,Deprecated,SourceFile,LineNumberTable,*Annotation*,EnclosingMethod

-keepparameternames

-keep public class *
-keepclassmembers public class *{
   public *;
 }
-keep public interface packageName.MyClass$interface1 { *; }

Obfuscated code as below:

public class MyClass {
        public void method1(Integer marks) {

        }

        private String a(String var1){

        }
        public interface interface1 {
               void method4(Integer var1);
               void method5(Integer var1, boolean var2);
        }
  }

I want the interface methods variables (ID, rate & status) not to obfuscate. i.e as below

       public interface interface1 {
               void method4(Integer ID);
               void method5(Integer rate, boolean status);
        } 

Can anyone suggest how can it be possible?


Get this bounty!!!

Leave a Reply