How to protect phonegap application source code?

2020-05-10 11:49发布

I want to know whether when I upload my phonegap application on play store then anyone can view source code after they install my application or not.
If the source code is viewable, what steps can I take to protect it?

2条回答
Ridiculous、
2楼-- · 2020-05-10 12:20

As you may know, an apk file is actually just a zip archive, so you can try to rename (or simply force your decompressing tool to open the apk file) the file to appname.apk.zip and extract it with any zip utility.

You can however encryption your source code checkout here https://ourcodeworld.com/articles/read/386/how-to-encrypt-protect-the-source-code-of-an-android-cordova-app

查看更多
ゆ 、 Hurt°
3楼-- · 2020-05-10 12:34

Basically a PhoneGap application is html/css and javascript codes wrapped in a native Android WebView. So in order to protect your source code from others, you can encode it using techniques like uglify. To a normal user, this would be enough. It is similar to what Proguard does for native Android apk. However if you want total secrecy of some part of your code logic, keep it at the server end itself. Any client facing application is readable (eg- Webpages, executable files etc).

查看更多
登录 后发表回答