My android application requires installing a project template in the client side so once the user click in generate an APK , it modify that template and create an android application, the APK is generated using ANT , my concern is that i don't want the client to be able to browse the project and see the code, i need a way to make that template encrypted at least the SRC folder that has the classes and once the user click to generate the APK it will be decrypted at run time till the APK generated , then it will be encrypted again , is there is a way to achieve this ?
Note :it will be installed in windows OS
Enable ProGuard is release mode
To enable ProGuard so that it runs as part of an Ant or Eclipse build, set the proguard.config property in the /project.properties file . The path can be an absolute path or a path relative to the project's root.
The ProGuard tool shrinks, optimizes, and obfuscates your code by removing unused code and renaming classes, fields, and methods with semantically obscure names. The result is a smaller sized .apk file that is more difficult to reverse engineer . Because ProGuard makes your application harder to reverse engineer, it is important that you use it when your application utilizes features that are sensitive to security like when you are Licensing Your Applications.
Check the link below under the topic Enabling Proguard
http://developer.android.com/tools/help/proguard.html
Some useful links
http://proguard.sourceforge.net/index.html#manual/examples.html
You simply should enable proguard: http://developer.android.com/tools/help/proguard.html
Here is an example with ant: ANT build for Android Proguard obfuscation
Here is a good tut: http://www.androidengineer.com/2010/07/optimizing-obfuscating-and-shrinking.html
Hope this helps.
You can't actually encrypt it because it means to change apk file in runtime to decrypt it. And Google can block your application. One thing you can do it obfuscate your code to make it more difficult to reverse.
ProGuard cannot encrypt APKs, but DexGuard can.
It also obfuscates APKs more thoroughly. You can find an overview of the differences between ProGuard and DexGuard here : .
(Full disclosure: I am working at GuardSquare, the company that develops ProGuard and DexGuard.)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.