"Go" Android apk anti-compilation Just so simple detailed (drawings)

Source: Internet
Author: User

Reprint Address: http://blog.csdn.net/vipzjyno1/article/details/21039349

In learning the process of Android development you, you tend to learn how other people's application is developed, those beautiful animations and exquisite layout may let you put it down, as a developer, you may want to know how these effects interface is to achieve, at this time, You can then reverse-compile the app's apk. Here is a brief tutorial on some of the articles I've consulted.

(Note: Anti-compilation is not to let developers go to an application to solve the heavy load of what, the main purpose is to promote the developers to learn, learn from good code, improve the level of self-development. )


Test environment:

Win 7


Using tools:

On CSDN:

Apktool (resource file acquisition ) Download

Dex2jar (source file acquisition) download

Jd-gui (source view) download

android anti-compile Integration Toolkit (latest) download

Official Latest Version:

apktool (google code)

dex2jar(google code)

Jd-gui (Google Code) the latest version, see the official


Tool Description:

Apktool

Function: Resource file gets, can extract picture file and layout file for use view

Dex2jar

Role: Decompile the apk into Java source code (Classes.dex into a jar file)

Jd-gui

Role: View the apk in the Classes.dex converted into a jar file, namely the source file


Anti-compilation process:

First,apk anti-compilation to get The program's source code, pictures, XML configuration, language resources and other files

download Apktool in the above tool, extract 3 files: aapt.exeapktool.batapktool.jar, Place the APK file you want to decompile into the directory,

Open Command Line interface (run-cmd) , navigate to the Apktool folder, and enter the following command:apktool.bat d-f test.apk test


(test.apk in the command refers to the full name of the APK file to be deserialized, and test is the directory name that is stored in the post-compilation resource file, i.e. : Apktool.bat d-f [apk file] [output folder])

Note the success, and then found under the folder more than a test file, Click to view all the resource files for the app.

If you want to : Input Apktool.bat   B    test


After that, You can find 2 more folders under the previous test file:

Build

Dist (contains the packaged apk file)


APK anti-compilation get Java source code

download jd-gui  , extract

The apk suffix to be deserialized will be changed to. rar or. zip, and unzip to get the amount of classes.dex file (), will get to the classes.dexdex2jar-0.0.9.15  folder,

under command line, navigate to dex2jar.bat In the directory, enter dex2jar.bat   classes.dex,

the directory will generate a classes_dex2jar.jar file, then open the tool Jd-gui folder Jd-gui.exe, and then use the tool to open the previously generated Classes_ Dex2jar.jar file, you can see the source code, the effect is as follows:

(The name of the class file and the name of the method inside will be a,b,c ...). Style name):



Three, graphical anti-compilation apk (I have not used)

Step one or two above describes the command-line anti-compilation apk, which now provides a graphical anti-compilation tool:androidfby

First, download the Anti-compilation toolkit above, open the androidfby directory, double-click the Android Anti-compilation tool,. exe, you can browse to open the apk you want to decompile


With the anti-compilation, you can learn what the application uses for the 3rd-party library file, how its code is written, and so on.

However, if the APK is obfuscated, then the name of the class file you see and the name of the method inside will be a,b,c .... Style naming, so you can find that you want to know the interface code may be very laborious, found the code may seem to be very laborious, but a general idea will be obtained, with this idea, you can try it yourself.

I once wanted to write a similar to sing the celebrity interface layout, but the first contact did not know how to write, into the anti-compilation, even if his code is confused, I also see that he is through the ListView type set different item layout implementation. There may be a lot of references to use rewrite view to achieve the effect, you can get his general ideas for your development benefit harmless.


There is also a developer who has worked hard to develop their own applications to be one of the other anti-compilation becomes his own things, so to be confused:

Here are some of the confusing tutorials I reproduced: http://blog.csdn.net/vipzjyno1/article/details/21042823


"Go" Android apk anti-compilation Just so simple detailed (drawings)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.