2015-01-16 30 views
0

我將我的.apk文件更改爲.zip並在WinRAR上將其打開。問題是資產文件夾顯示,所以我的JS和HTML文件顯示。我正在使用Cordova來開發我的應用程序。Cordova - 如何隱藏.apk資產文件夾?

如何隱藏.apk的資產?

+0

不能起到資產到客戶端沒有讓客戶看到我寫這篇教程離子框架資產 – SLaks

+0

,但它可以被應用到PhoneGap的爲好。 http://ionicframework.com/blog/minifying-your-source-code/ –

回答

0

如果您沒有.apk上的資產,安裝該應用程序時它們如何在設備中?當然,那些需要可用,並且因爲它已經表示,在科爾多瓦的security guide

不要假設你的源代碼是安全

由於科爾多瓦應用程序從HTML和JavaScript資產建在本地容器中打包,你不應該認爲你的代碼是安全的。可以對科爾多瓦應用程序進行反向工程。

在設備上安裝應用程序後,你當然允許從網上下載的資產,甚至將它們存儲的東西,如File plugin離線使用的,但是這是完全不同的情況下,也許你不希望甚至什麼去做。

0
Cordova - How to hide asset folder in .apk 

1)Encrypted all Cordova assets files. 
2)Decrypt the files and move to the internal storage during runtime. 
3)Access your assets files from internal storage(this.getFilesDir().getAbsolutePath()). 
Following these things will keep your file and method calling safe as they are accessible only 
to internal storage. 

Replace launchUrl "android_asset" to "data/data/io.cordova.hellocordova/files/" 

Example: modify the dev source. 
1) "file:///android_asset/www/index.html"; to Replace  
    "file:///data/data/io.cordova.hellocordova/files/www/index.html"; 

2) "file:///android_asset/www/index.html"; to Replace 
    "file:///data/data/io.cordova.hellocordova/files/www/index.html";