Pascal
Pascal

Reputation: 16631

Proguard 6 new "-android" option

Proguard 6 is out since February and provides some new features, among which the -android option

"A new option -android, to tune the optimizations for Android"

I would like to know more about this option, to understand what it really does in terms of optimization (& possibly obfuscation).

I search on guardsquare.com and Googled for it: I could only find a dead link about android on this page. Here is the link:

> android <- dead link
Target the processed class files at Android.

Where can I find clear and detailed explanations about this new option?

Thanks

Upvotes: 0

Views: 189

Answers (1)

user1643723
user1643723

Reputation: 4222

I search on guardsquare.com and Googled for it: I could only find a dead link

We can always look at source code!

First, I downloaded a snapshot 6.3.3 sources from Sourceforge repository page.

After unpacking:

grep -R android core/src/ | wc -l
27

Only 27 mentions of 'android'. Let's go over the list:

  1. maximum.inlined.code.length is set to 32 for Android — 4 times as much as JVM default
  2. Additional inlining during some optimization stages (previously didn't work on Android, because it does not use preverification)
  3. Replacing references to FloatMath with Math (not really that important of optimization...)
  4. Resource charset set to UTF-8 (instead of system default charset)
  5. Some legacy code for compatibility with Android Gradle plugin
  6. ConfigurationLogger — as explained in documentation, "This class can be injected in applications to log information about reflection being used in the application code". The class supports Android-specific logging framework (aka android.util.Log)

5 and 6 aren't even related to the command-line -android option, — just some extra code, relevant for Android users.

Upvotes: 3

Related Questions