First, use Apktool apk to decompile the source code of the generator and pictures, XML configuration, language resources and other files
Specific steps:
(1) Download the Anti-compilation toolkit: Apktool official can't open
There is a download in http://apktool.shoujifans.com/2014/12/21.html
Need to download two files below
- apktool1.5.2.tar.bz2
- apktool-install-linux-r05-ibot.tar.bz2
(2) Unzip the downloaded two packages into the "Same" folder Apktool. Note that the same
(3) at the command line, navigate to the Apktool folder and enter the following command: Java-jar apktool.jar D android.apk, appears: Explanation of the successful decompile
Java-jar Apktool.jar d [apk file] [output folder], the output folder is optional, if you do not specify the output to which folder, then the default is the current folder.
I was executed./apktool D xxx.apk Successful
D represents decode, in the current directory will generate a directory called XXX, which is the various anti-compiled resource files, where res represents a resource file, Smali represents the source code, but the bytecode, can not be viewed directly.
Second, download APK anti-compilation tool Dex2jar, is to convert the Classes.dex in the apk into a jar file
Specific steps:
(1) Download Dex2jar
Dex2jar:
Http://sourceforge.net/projects/dex2jar/files/?source=navbar
(2) To unzip the apk file to get the Classes.dex, which is the Java file compiled and then packaged with the DX tool
(3) Navigate to the dex2jar-2.0 folder at the command line, run
SH dex2jar.sh ~/apk/classes.dex (Directory of DEX files)
Final Build
Classes_dex2jar.jar,:
dex2jar-2.0 version, extracted from the directory only d2j-dex2jar.sh, no dex2jar.sh. Executed a bit, error.
Download old version, execute success ... Then replaced the 2.0 file with the old version.
Third, use the Jd-eclipse plugin to open the class file
(1) The jar file is now available. Jd-gui can be downloaded. You can also download the plugin jd-eclipse in Eclipse. Open the. class file in the jar file
(2) Refer to post http://my.oschina.net/mynote/blog/85083 installation method
Jd-eclipse's address http://java.decompiler.free.fr/?q=jdeclipse
OSC Address: Http://www.oschina.net/p/jd-gui
Address for online installation http://java.decompiler.free.fr/jd-eclipse/update
Download the image file address: Http://jd.benow.ca/jd-eclipse/downloads/jdeclipse_update_site.zip
(3) The installation of the image file is used.
Installation process:
Help->install new software->add->archive (select Zip file)/fill in url-> Select Install
(4) Configure class default open mode after reboot (class file Editor) but I restarted Eclipse Discovery not configured, configured. In fact, the default open mode is set to the class file Editor.
Window->preferences->general->editors->file associations-> (Select) *.class without source--> (In the associated editors section below) add->class file Editor (select Add)--select new Open with default
Configuration
You can already open the class file in the jar package.
"Original" under Linux decompile Android. apk file using Apktool Dex2jar jd-eclipse