Reputation: 10472
I am primarily interested in obfuscation capability. I see obfuscation only is possible: stackoverflow.com/questions/6633411/android-proguard-only-obfuscation
Is this less obfuscated than when using in combination with shrinking and optimizing, and if so how much less secure.
Also will removing the shrinking and optimizing make the application more likely to pass its test set, and less likely to have anomalies? What is the + and - of including these steps?
Upvotes: 1
Views: 1527
Reputation: 23873
Shrinking certainly can affect the correctness of your code. If for example you set a clickhandler in an xml layout with a line like:
android:onClick="myClickHandler"
then unless you explicitly tell Proguard to keep that code, it will remove it when shrinking is enabled. This error won't manifest itself until runtime when that widget is clicked/touched.
Upvotes: 7
Reputation: 198391
Shrinking and optimizing won't affect correctness at all; your program will work perfectly correctly. Realistically, the only way Proguard can introduce errors is to mess with certain aspects of reflection, and that'll be due to obfuscation, not shrinking or optimizing.
If you're asking how much shrinking and optimizing changes the size of the jars, check out http://proguard.sourceforge.net/#results.html for sample statistics.
Upvotes: 2