I have PhoneGap app in Android. Now I am ready to publish it, but I would like to protect the app from eyes of script-kiddies. I first thought that it is impossible, than I have discovered "Copy protection" feature when publishing the app on the market. So I was excited, but when I turned it ON, it didn't actually does nothing.
I can install the app on the rooted phone with no problem, I can copy it on SD card and see all the sources. I thought that this "Copy protection" feature will not allow people with rooted phones to install the app. Or am I missing something ?
Is there ANY way how to make it at least difficult, if not disable it at all, for people to see all my HTML and JS sources in my app ?
The copy protection feature has been deprecated by Google. Do not use it.
Use ProGuard to obfuscate your code.
Encrypt your assets and decrypt them as you read them.
Use the Licensing mechanism if you have a paid app.
The best combination I've found is the DojoToolkit and the Closure Compiler in Advanced Mode.
Closure in Advanced Mode makes JavaScript code almost impossible to reverse-engineer, even after passing through a beautifier. Once your JavaScript code is obfuscated beyond any recognition and any possibility to reverse-engineer, your HTML won't disclose much of your secrets.
This link for using the Dojo Toolkit with the Closure Compiler in Advanced Mode for mobile applications:
http://dojo-toolkit.33424.n3.nabble.com/file/n2636749/Using_the_Dojo_Toolkit_with_the_Closure_Compiler.pdf?by-user=t
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With