Decompilation method in Android

Source: Internet
Author: User

Hypothetical testdecompile.apk

Method 1: Use dexdump for decompilation

Tool address: androidsdk/platform-tools/dexdump

Decompress testdecompile.apk first

Get a clip named testdecompile.apk _ files, which contains a classes. Dex file.

It is worth noting that classes. Dex is a Java bytecode file generated after Java source code compilation.

Run the command: dexdump classes. Dex, but this result cannot be viewed. So there are the following methods.

Method 2: Special Tools

Tool 1: dex2jar
Introduction: tools used to decompile Dex files into jar files
Address: http://code.google.com/p/dex2jar/

Tool: jdgui
Introduction: decompiling jar into a Java Tool
Address: https://java.decompiler.free.fr /? Q = jdgui

Decompress the downloaded file.

After dex2jar is decompressed, dex2jar. Sh (in Linux) in the folder converts classes. Dex to A. jar file.

Command:./dex2jar. Sh ../testdecompile.apk _ FILES/classes. Dex

You can get the classes_dex2jar.jar file.

Open the jd-Gui file in the folder after the jdgui is decompressed, and then open classes_dex2jar.jar and you will be OK...

Even though the decompilation of the .apk file is so simple, we need to confuse the Code. In the next article, I will summarize it again...

Reference: http://www.cnblogs.com/feisky/archive/2010/08/05/1793493.html

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.