Android program decoding and XML file Decoding

Source: Internet
Author: User

First, write this log with great excitement .....

Googles is really awesome... let me have the honor to see the internal source code of the ANDROID application ....

Let's get down to the truth:

ANDROID applications are composed of two parts.

1. *. class File

2. * different tools are required for decoding xml files...

The following describes *. class (class file decoding)

Required tools:

Dex2jar and JD-GUI

Dex2jar: http://laichao.googlecode.com/files/dex2jar-0.0.7-SNAPSHOT.zip

JD-GUI:
Windows JD-GUI: http://laichao.googlecode.com/files/jdgui.zip
Linux JD-GUI: http://laichao.googlecode.com/files/jd-gui-0.3.2.linux.i686.tar.gz

 

A: Change the suffix of the *. apk file to *. zip and decompress the file. A file named "classes. dex" is found in the folder.

B: Decompress dex2jar and put it in the C root directory. Then, put classe. dex in this folder.

Then, Enter CMD at the start of running,

Locate the path to the folder where dex2jar. bat is located (dex2jar. bat is a *. BAT file in the folder after dex2jar is decompressed)

Enter dex2jar. bat classes. dex.

(An error may be reported here. If an error is reported, check what the JAVA environment variable is and whether the configuration is correct)

C: if everything is normal, A *. jar file will be decoded.

D: Use the JD-GUI mentioned above to decode *. jar file (windows environment can be dragged directly)

E: the source code developed by many companies is to modify the class name and method name-this is disgusting and there is no good way to do it. I have to look carefully at it ....

 

Below is the decoding of the *. xml file

Required tools:

Apktool1.4.1.tar.bz2

Apktool-install-windows-r04-brut1.tar.bz2

These two tools can be available at the URL officially provided by Google: http://code.google.com/p/android-apktool/

Download

Decompress the package,

A: All files in the two packages must be stored in the same path. I still put the C root directory.

B: Put the *. apk file to be decoded in the same path as the file decompressed in step A (I still put the C root directory)

C: Start ---> Run and Enter CMD, then locate drive C, and enter apktool d C: \ *. apk C: \ *** in the command prompt box :\***

(*. Apk is the application to be decoded, and *** is the folder name)

D: After decoding, you can clearly see all the. XML files used in the program... Including layout files and AndroidManifest. xml files.

Related Article

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.