Why decompile:
As a personal development, sometimes to see the beautiful UI effect, fun features, is not to have to refer to the impulse to learn. Anti-compiling Android apk, is the source code from the APK to the resources (slices, music, layout files, etc.).
Recommended reading:
For the anti-compilation apk, please read the article << decompile Android app >>,<<android apk anti-compilation is so simple to explain (drawings) >> look, watch yourself download a few apk try, There should be a bottom to the anti-compilation apk.
My notes: (1). Related software:
Dex2jar------to decompile the APK into Java source code (qq.apk converted to Qq_dex2jar.jar file)
Jd-gui--------is a standalone graphical tool for displaying Java source code for *.class files
Apktool------Resource files Get, can extract pictures, music and layout files for use view, decompile can also recompile back
(2) Simple description of the use of the software:
Take qq.apk as an example, we want to see APK source code:
First use Dex2jar to convert qq.apk to Qq_dex2jar.jar file, and then use Jd-gui to view the source code. Related cmd command:
1.dex2jar-------Qq_dex2jar.jar File
CD/D E:\BaiduYunDownload\0002_ anti-compilation Android app \ Related software \dex2jar-0.0.9.15\dex2jar-0.0.9.15
Dex2jar qq.apk
2.jd-gui-0.3.6.windows.zip-----View the source code from the jar
Drag the Qq_dex2jar.jar file into the Jd-gui to view the source code
Take qq.apk, for example, to view the APK resource file:
Method One: If we just want to simply view a piece of music, we can directly rename the qq.apk to Qq.rar, and then extract the resources can be extracted, but this method gets the resource XML file is garbled, and point 9 image will be distorted. Therefore, we will generally use the Apktool tool to decompile the APK, to get the full resources.
Method Two: Apktool extract apk resource directly, related CMD command:
CD/D E:\BaiduYunDownload\0002_ anti-compilation Android app \ Related software
Apktool D androiddemo.apk
Apktool d-f androiddemo.apk
Apktool d-m androiddemo.apk
Apktool D-androiddemo.apk
Apktool d-f-m-s androiddemo.apk
If you want to repackage the anti-compiled files into an apk, you can: Enter apktool b androiddemo.apk
3. Still have a degree Niang
The first two methods, may have to rely on what the wall can be downloaded to the software, there are some commands, but we do not forget the degree of Niang Oh, we can download to others after the software, more powerful, more convenient to use.
Practical results:
Finally, I used 3 apk (qq_220.apk,mms.apk,contacts.apk) to test the reverse compilation of this method (Dex2jar,jd-gui,apktool), the final result is: 3 apk can generate JAR file, And can view Java source code, but only mms.apk can decompile the resource file, the other two can not.
This fact, also tells us, anti-editing apk, also may be a quite test of the character of the matter. So, what we can do is to adopt several methods, use several software more, try more, perhaps, the miracle is at the next moment.
Resources:
1. Anti-compilation Android app
http://blog.csdn.net/android_cai_niao/article/details/43151831
2.Android APK anti-compilation is so simple to explain (drawings)
http://blog.csdn.net/vipzjyno1/article/details/21039349
Android Anti-compilation apk (i)