2015-01-16 2 views
0

.apk 파일을 .zip으로 변경하고 WinRAR에서 엽니 다. 문제는 폴더가 표시되어 JS 및 HTML 파일이 표시됩니다. 내 응용 프로그램을 개발하는 데 Cordova를 사용하고 있습니다.코르도바 - .apk에서 자산 폴더를 숨기는 방법?

.apk에서 자산을 어떻게 숨길 수 있습니까?

+0

당신은 클라이언트가 내가 이온 프레임 워크에 대한이 튜토리얼을 썼다 자산 – SLaks

+0

를 참조 말도없이 클라이언트에 자산을 제공 할 수 있지만, 그것은뿐만 아니라 폰갭에 적용 할 수 있습니다. http://ionicframework.com/blog/minifying-your-source-code/ –

답변

0

.apk에 애셋을 갖고 있지 않다면 앱을 설치할 때 어떻게 기기에있을 수 있습니까? 코르도바 응용 프로그램이 HTML과 자바 스크립트 자산에서 내장되어 있기 때문에 소스 코드가

안전하다고 가정하지 마십시오

: 물론 그 사용할 수 있어야하고 그것은 코르도바의 security guide 이미 말한대로 네이티브 컨테이너에 패키지화 된 경우 코드를 안전하다고 생각해서는 안됩니다. Cordova 응용 프로그램을 리버스 엔지니어링 할 수 있습니다.

는 장치에 응용 프로그램을 설치 한 후 온라인에서 자산을 다운로드하고 심지어 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"; 
관련 문제