Reputation: 7937
I downloaded proguard encapsulated in a zip file and unpacked it onto my hard disk. I did not install it in any way (because I didn't know how). I then added proguard.config=proguard.cfg
to my project.properties file. I then did an "export android application" fully expecting eclipse to complain that it didn't know where my proguard installation was, but there was no complaint. Indeed a new apk file appeared in my keystore, and a set of files (dump.txt etc) appeared in my app's proguard subdirectory. The mapping.txt looks like a nice list of mappings from my long variable names to one and two letter variables. This should all be strong evidence that proguard has somehow worked - my only concern is that the apk is scarcely any smaller than it was before. Is there any way to check that the apk includes proguard's obfuscations?
Upvotes: 25
Views: 13594
Reputation: 35661
Normally the size will indicate whether ProGuard has worked but you can :-
Upvotes: 46
Reputation: 4374
An alternative to @Kuffs method would be to compare your new APK with an old one. Open them both up (with 7zip or your preferred tool) and compare the size of the classes.dex files in each of them.
A few straightforward reasons you might not be seeing much of a size saving:
Upvotes: 1