標籤:android blog http io os ar 使用 java for
1. jad
http://varaneckas.com/jad/jad158e.linux.intel.zip 下載jad,
給jad運行許可權 ,運行
chmod a+x ./jad./jad
缺點:不能反編譯混淆過的,有很多檔案反編譯不成功
2. ded
http://siis.cse.psu.edu/ded/installation.html
3. jd-gui
都知道這個,直接反編譯成java檔案,但是沒有命令列
4. jd-cmd
https://github.com/kwart/jd-cmd
其中需要安裝maven:http://maven.apache.org/download.cgi
linux安裝maven:
Extract the distribution archive, i.e. apache-maven-3.2.3-bin.tar.gz to the directory you wish to install Maven 3.2.3. These instructions assume you chose /usr/local/apache-maven. The subdirectory apache-maven-3.2.3 will be created from the archive.In a command terminal, add the M2_HOME environment variable, e.g. export M2_HOME=/usr/local/apache-maven/apache-maven-3.2.3.Add the M2 environment variable, e.g. export M2=$M2_HOME/bin.Optional: Add the MAVEN_OPTS environment variable to specify JVM properties, e.g. export MAVEN_OPTS="-Xms256m -Xmx512m". This environment variable can be used to supply extra options to Maven.Add M2 environment variable to your path, e.g. export PATH=$M2:$PATH.Make sure that JAVA_HOME is set to the location of your JDK, e.g. export JAVA_HOME=/usr/java/jdk1.7.0_51 and that $JAVA_HOME/bin is in your PATH environment variable.Run mvn --version to verify that it is correctly installed.
jd-cmd的使用:
程式本身給了3個例子:
Examples:$ java -jar jd-cli.jar HelloWorld.classShows decompiled class on a screen$ java -jar jd-cli.jar --skipResources -n -g ALL app.jarDecompiles app.jar to app.src.jar; It doesn‘t copy resources to the output jar,the decompiled classes contain line numbers as comments and the jd-cli printsthe most verbose debug information about decompilation$ java -jar jd-cli.jar myapp.jar -od decompiled -ocDecompiles content of myapp.jar to directory named ‘decompiled‘ and also on ascreen
但是我執行第三個總是提示
19:47:27.494 WARN jd.core.output.DirOutput - Class name or java source is null
所以如果要反編譯class檔案,用第一個,要反編譯jar中的所有檔案,用第二個
5. jeb
商業版,據說功能很強大,有命令列和圖形,但是收費,執行速度慢,耗記憶體
http://www.kanxue.com/bbs/showthread.php?p=1300282
使用:
java -Xmx1430m -jar jeb.jar --automation --script=JEBDecompileAll.py classes.dex啟動命令-Xmx 參數是指定java虛擬機器進程記憶體上限的JEBDecompileAll.py 這個Python指令碼裡調用了jeb的api,反編譯了所有的class檔案
java 反編譯 android 反編譯