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 ').