0

im using -keep class and -keepclassmembers but these seems to only preserve method names and fields in a class , and i want to tell progaurd not to touch anything inside a specific method , even "for" loops or "if" statements and even variable names! , i want to see a method looks like exactly same as the original version after decompilation , like when you decompile a program in debug mode ! , but only one method not all other methods .

is there any way to do this using proguard ?
Thanks :)

Behzad
  • 207
  • 2
  • 3

1 Answers1

0

You could always create a new dummy class and have the method in it and then exclude that entire class. Just make sure that it does not trim the class away by referencing the class somewhere (like SomeClass.somevar = 3;).

As far as I know it is not possible to exclude just one method, but it might if you modify ProGuard's souce... which is an entirely different subject and probably more effort than it's worth.

Stephan Bijzitter
  • 4,425
  • 5
  • 24
  • 44
  • thanks for your answer , but how to exclude antire class ? using "-keep class" and "-keepclassmembers" only keeps class and member names and make obfuscation inside the method too ! – Behzad Feb 03 '15 at 16:06
  • :-) http://stackoverflow.com/questions/15476315/how-keep-my-class-from-obfuscate-by-proguard – Stephan Bijzitter Feb 04 '15 at 07:59