Wednesday, October 8, 2014

Protect your java codes from decompilers


Protect your java codes from de-compilers. This method cannot save the java codes from getting decompiled but yes the cracker will find it really difficult to understand much part of your codes after decompilation.

ProGuard:
This is opensource software which makes programs and libraries harder to reverse-engineer.
The best thing is it comes up with a GUI which makes it easy to work with.

You can download the ProGuard from http://sourceforge.net/projects/proguard/files/

Follow the below steps to use this tool:

  • Extract the zip after download.
  • Open it and go to bin folder and then double click on proguardgui.bat, this will open a GUI.
  • Go to Input/Output.
  • Click on Add Input and select the input jar file to protect.
         

  • Click on Add Output to create a new protected version of the input file. Later you will use this copy for distribution purpose.




  • If you have any dependency jar files on which your input jar is dependent then add them up in Library jar section by clicking on Add button.



  •  Finally click on Process button on left side.
  •  Now click on Process! , It will save the Shrinked/Obfuscated/Optimized archive to the selected output location (2nd bullet).
            See the processing status:
                 

  • Additional you can play with the options under Shrinking/Obfuscation/Optimization tabs.
    Options available for Shrinking (I have explained descriptions of some options; you can see the description on moving the mouse over the options):



    Options available for Obfuscation (I have explained descriptions of some options; you can see the description on moving the mouse over the options):


    Options available for Optimization (I have explained descriptions of some options; you can see the description on moving the mouse over the options):