We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Before I jump in this deep end I just wanted to check if anyone has any experience and/or guidance to share about obfuscating with ProGuard (or any other tool).
I did a quick test run and it seems to need the jar files in specific places to process them. Still teasing it out...
Thanks in advance for any help you can provide.
Have you tried https://www.google.com/search?as_sitesearch=processing.org&as_q=proguard ?
Touché - thank you ;)
Really nothing useable in search results I'm afraid. Through a lot of trial and error and pouring over non-Processing examples I got ProGuard working except for ControlP5 controls. They render but don't execute their attached code. Still trying to figure out how to exclude them or find another remedy fir this.
Beware, Processing and some other libraries like to use reflection to define callbacks. An example is selectInput() now taking a function name as parameter!
So, if ProGuard obfuscates the function name, Java will not be able to find it back by its name...
For those who later read this and have the same question, I got ProGuard obfuscation to work for my exported application, switching Shrinking and Optimization OFF and using the following parameters in the Obfuscation screen: Please note that these settings are specific to my application. If it doesn't work for you try the following suggestion:
If it helps, in ProGuard you can intentionally omit JARs which provokes an error listing the missing class calls. Doing this one at a time you can then scan the class calls to see which ones could be candidates to be omitted from obfuscation to address the bug in your obfuscated JAR.
Hope this helps.
Thanks for sharing your findings, it will be surely be useful to others in the future.
hi there hondaman... i'm trying to use proguard for the first time... i'm trying out this with simple processing sketches... but i just get many warnings... how are the settings done? Inputs and OUtput should be something especial? please HELP
If you use the settings shown above and then follow a standard ProGuard guide it should work for you. However, I've tried using it on other projects and have run into issues with libraries that needs to be isolated from the obfuscation but that get messed up in the process. It's far from a perfect solution for protecting your Processing code.
thanks hondaman, i think the same as using proguard is a bit complicated and it's not flawless... anyway i'm still looking for a good way to protect my code... thanks again anyway...
Back then out of frustration with ProGuard I started to write a "poor-mans" obfuscator, simply reading in the code textfile, recording the used names in an array, creating a randomized string to replace each one, and then search-and-replace throughout the code. That should result in code that, while still accessible to a decompiler, wouldn't be readable to another programmer and would therefore put a big obstacle in the way of someone trying to "steal" your code. I figured that was at least 80% of what I wanted to achieve with that project back then. Unfortunately I moved on and never completed the "poor-man's obfuscator" :) In the end ProGuard caused so many problems and additional work that I left it be and haven't used it since.
Best of luck with your project.
thanks hondaman! it's a really good way!! i may give it a try too ;-)