Decompile Android APK in Ubuntu

Source: Internet
Author: User

Reprinted please indicate the source: http://blog.csdn.net/awebkit


1. decompress the APK

First download dex2jar

Http://code.google.com/p/dex2jar/

There is a dex2jar. Sh file under the extract directory of dex2jar.

lijiangwei@lijiangwei-laptop:~/Downloads/tools/dex2jar-0.0.7.11-SNAPSHOT$ ./dex2jar.sh 20110712162837687-445218608.apk 1 [main] INFO com.googlecode.dex2jar.v3.Main - version:0.0.7.11-SNAPSHOT7 [main] INFO com.googlecode.dex2jar.v3.Main - dex2jar 20110712162837687-445218608.apk -> 20110712162837687-445218608_dex2jar.jar1077 [main] INFO com.googlecode.dex2jar.v3.Main - Done.


2. decompress the (unzip) jar package.

unzip 20110712162837687-445218608_dex2jar.jar


3. view the class file.

There are two methods.

3.1 Use jdgui

Download JD-Gui

Http://java.decompiler.free.fr /? Q = jdgui

./JD-Gui

If you view the class file in this way, the error "Index out of bounds" may be reported ".

3.2 use jadeclipse

Download and install:

Http://jadclipse.sourceforge.net/wiki/index.php/Main_Page

Import file: Build path ==> configure build path ==> libraries, click Add class folder ==> creat new folder

Put the. Class file under the newly created directory.

In this way, you can use eclipse to view the. Class file.

If you do not follow the steps described in this document, you can use the eclipse decompilation plug-in to throw an exception.

Cocould not open the editor: the class File Viewer cannot handle the given input ('org. Eclipse. UI. Ide. filestoreeditorinput ').

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.