Subscribe to our newsletter
February 23, 2017 - 7:46am, 1602 views
I want to use an obfuscator for my BGS5 Midlet project. I didn't use one previously. Which obfuscator do you recommend? I saw only Proguard mentioned in a few topic on this forum.
Proguard is open source and it integrates well with Eclipse. So I think that it is a good choice.
But any other will probably also do the job if you prefer.
I will try it with eclipse. Could you please help about configuration.
I attached the Eclipse obfuscation configuration window.
Do I need to do something on this window for configuration? Adding something, using specified arguments etc?
You don't need to do anything here. The minimum that is needed is already there.
You may add your arguments or keep expressions here or for the particular project in Project properties/Java ME/Obfuscation as you may have found on this forum.
The minimum you need to do is to download the Proguard and specify the Proguard Root Directory in Preferences/Java ME.
Then you can check the box "Obfuscate the code" while you are exporting the MIDlet package.
I downloaded the Proguard and set its path on Eclipse, Java ME, Proguard Root Directory.
And I created the package while "Obfuscate the code" check box was selected.
I didn't use any argument and keep expression. Configuration is as above, default configuration.
Are there any arguments, expressions recommended which could be useful for some purposes?
So I assume that it is already working and you can see that the jar file size has decreased and if you decompile the classes you should also see that the names of the classes, variables, methods are changed.
I'm also not a Proguard expert, you can find some parameters here: https://developer.gemalto.com/tutorial/optimising-j2me-applications
Definitely you have to keep the MIDlet maim class from being obfuscated (as it is already configured) because if you didn't the MIDlet would not start.
For more information I must redirect you to the Proguard page.
Yes, it is working. Jar file size decreased and names of classes, variables, methods are changed.
I have just wanted to learn if there are a few arguments and/or keep expressions of proguard that are seen as "must" or "should" for an j2me application. I will use it with default parameters and it seems enough for now.
Thanks for the answers and support.
© 2013-2020 THALES DIS AIS Deutschland GmbH