Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Proguard, removing all Log statements and merging packages

Tags:

  1. I have about 5 packages in my project, is it possible to merge all the packages into one large package, I want to do this to make hacking more difficult.

  2. How do I remove all references to Log.e Log.d etc. in my source code using proguard. (I have the eclipse ADT with proguard integrated already).

Update: Looks like part 2 can be done like this

-assumenosideeffects class android.util.Log {
    public static *** d(...);
    public static *** v(...);
}
like image 642
jax Avatar asked Dec 14 '10 04:12

jax


1 Answers

The option -repackageclasses moves obfuscated classes into a single given package:

http://proguard.sourceforge.net/manual/usage.html#repackageclasses

You can optionally combine it with -allowaccessmodification for better results.

like image 99
Eric Lafortune Avatar answered Oct 02 '22 17:10

Eric Lafortune