Android projects are not obfuscated for a long time, because even obfuscation cannot confuse activity, service, and broadcastreceiver classes, so they can be analyzed by decompilation. And your ownCodeThere is no reason for confusion. However, the more Android is studied recently, the more decompilation, and the confusion is found in most applications. when analyzing the source code, it also has a certain value, so I tried obfuscation.
My ADT version is 10, so obfuscation is there. I don't know which version of ADT has proguard, therefore, make sure that your "SDK directory \ tools \" contains the proguard folder.
Now we create a new project in eclipse, and the file proguard. cfg will usually appear. This file is our obfuscation script file. Fortunately, ADT provides a lazy solution. Therefore, in most cases, we do not need to change this obfuscation script file. Of course, if you want to know more about proguard and obfuscation scripts, you can visit the installed SDK documentation:
Your SDK installation directory \ docs \ guide \ developing \ tools \ proguard.html
Here I use the notepad example in Samples
You may have noticed that there is no obfuscation script file proguard. cfg. It doesn't matter. We copied one from other projects.
Then, we add a code in the default. properties file, so that the compiler will automatically run proguard to call the proguard. cfg script during release for obfuscation.
Because it is impossible for someone to confuse the code in debug, this is only valid in release.
Next, export the unsigned APK of this project.
Then, we use dex2jar to convert the dex in the current APK into a jar, and then use JD-Gui for decompilation. Next we can find that our APK has been confused, Hoho ~~~
Have fun!