Simple Android apk package decompilation Method

Source: Internet
Author: User

There are a lot of articles related to the Internet. I just summarized my own decompilation methods and tools.

 

Download the compressed packages of the above three tools

 

 

Apktool_v1.5.1_CHS_By_b-sf.rar dex2jar.zipjd-gui-0.3.5.windows.zip

 

1. decompile xml and other template resource files.

Decompress the apktool package and drag and drop the decompiled apk fileApkModify. batThe file is automatically decompiled. This package automatically inherits some decompilation functions, but it may not work for java files,

I used Lofter Netease to do an experiment, and classes. dex was decompiled into a smali file.

 

 

Ii. decompile java files

Decompress the dex2jar.zip package

Change the extension name of the. apk file to. zip and decompress it to enter the dos command line mode. All the way to the directory of the dex2jar package, execute the doscommand:

 

dex2jar D:apksApktoollofterclasses.dex

 

The following path parameters must be modified to the path of your apk file after decompression.

The classes_dex2jar.jar package file is generated after compilation in a few seconds.


 

3. View and export the java source code

Decompress the jd-gui package, execute the jd-gui.exe program, open the classes_dex2jar.jar file generated in the second part, then you can browse the decompiled source code (of course not the original source code, variable names such as Shenma are replaced by a, B, and c, which is difficult to read)

 

 

Open the file menu of the software, and click save all sources to export all the. java source files.

 

 

Then, overwrite the java source file directory to the directory generated in the first part to completely import it to android studio or other software to generate a new project. This makes it easier to analyze the source code.

 

 

In addition, Android beginners can join my 360 file sharing group: Android,
Open invitation link: http://qun.yunpan.360.cn/38063538, enter invitation code: 1267

All android and java-related materials, tutorials, and software collected by me and other netizens

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.