Monday, May 23, 2011
Android Shell Commands
Sunday, May 22, 2011
Combine two images in android java
Sunday, May 15, 2011
Scrollable Text View in andriod -2
Scrollable Text View in andriod
Thursday, May 12, 2011
How to Obfuscated Android Code
1) Setup the obfuscated environment Download the follwing file before you starts
ProGuard
ProGuard is a free Java class file shrinker, optimizer, obfuscator, and preverifier. It detects and removes unused classes, fields, methods, and attributes. It optimizes bytecode and removes unused instructions. It renames the remaining classes, fields, and methods using short meaningless names. Finally, it preverifies the processed code for Java 6 or for Java Micro Edition.
Download From Sourceforge : http://sourceforge.net/
Reference : http://proguard.sourceforge.
Download files from internet
- add-proguard-release.xml
- procfg.txt
1) To update an existing Android project, open a command-line and navigate to the tools/ directory of your SDK. Now run:
android update project --name
2) So, now you have a signed build from the command line, but still no obfuscated build.
To make things easy, you’re going to want to get two helper files:
add-proguard-release.xml and procfg.txt
Copy these files into your root directory (where the build.xml file found).
3) To add Proguard to your build, you first need to edit your local properties file to add the location of the directory that Proguard is installed in:
proguard.dir=/Directory/
3) Finally... you need to add our script to your build file and have it override a few targets. To do this, we use the XML “entity” construct. At the top of your build.xml file, add an entity that references our script file:
]
>
4) By default ADT creates a proguard.cfg file with every new project, so if you have an existing project just copy it over from a new dummy project. The next step is to enable ProGuard, you do this by adding the following to your default.properties file:
proguard.config=proguard.cfg
(assuming proguard.cfg is the ProGuard configuration file created for you, or copied from a new project, into the project root folder.)