IntelliJ Java IDE
The moose likes Android and the fly likes Proguard - When should you use it - alternatives? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Mobile » Android
Reply Bookmark "Proguard - When should you use it - alternatives?" Watch "Proguard - When should you use it - alternatives?" New topic
Author

Proguard - When should you use it - alternatives?

Johan Pelgrim
Ranch Hand

Joined: Jul 07, 2003
Posts: 100

Hi Satya / Dave,

Does the book cover the use of Proguard? I've heard good and bad stories on the use of Proguard. Is it workable in your opinion? When do you suggest using it. I mean, it might not matter that much for open source project, but do you recommend using Proguard in any commercial app? Are there any good alternatives to Proguard?

Thanks in advance for the answer!

Cheers,

Johan


Johan Pelgrim, The Netherlands
SCJP 1.4, SCWCD 1.4, SCBCD 5.0
Joachim Rohde
Ranch Hand

Joined: Nov 27, 2006
Posts: 419

ProGuard can be still useful in OS-projects because:
http://proguard.sourceforge.net/index.html#/FAQ.html wrote:By preprocessing the original jar files, ProGuard can significantly reduce the file sizes and boost the run-time performance of the code.


You can also find a list of alternatives to ProGuard on their official site: http://proguard.sourceforge.net/index.html#/alternatives.html
Johan Pelgrim
Ranch Hand

Joined: Jul 07, 2003
Posts: 100

Thanks Joachim!
Dave MacLean
author
Ranch Hand

Joined: May 10, 2011
Posts: 46

Unfortunately, Proguard was not a feature we covered in the book. We wanted to but just couldn't fit it in. We mention it briefly but don't get into the details.

I know what you mean about the good and the bad. The tool does a decent job of obfuscating but sometimes can go too far, which is where it gets difficult to use. You have to go in and tweak the settings so it won't muck up stuff that you need left alone. But it can help you fight piracy of your app. Sometimes the reason for this is that users want to buy your app but they can't get it from their country's Google Android Market. So they look for some other way to get it. This is one reason why you should always consider alternate means of distributing your apps. You can sell through Android Market and also through other sites. We discuss the legalities of Android Market in chapter 28 and this is definitely okay. That way you could make it easier for users to find it so there's less reason for piracy.

- dave

Dave MacLean our book (Pro Android 3)
Johan Pelgrim
Ranch Hand

Joined: Jul 07, 2003
Posts: 100

Thanks Dave!
 
 
subject: Proguard - When should you use it - alternatives?
 
Threads others viewed
Java Obfuscator help
How to decrease JAR file size ?
SOS! How to obfiscate game jars for nokia?
How to jar the application ???
Code Obfuscation?
IntelliJ Java IDE