decompile-java

反編譯apk: 
apktool : http://code.google.com/p/android-apktool/  linux,win,mac 
dex2jar : http://code.google.com/p/dex2jar/ // 注意!!!這裏的版本一定要下對!!否則沒有用!版本是:dex2jar-0.0.7.4-SNAPSHOT正常,dex2jar-0.0.7.5-SNAPSHOT及以後版本很可能異常,目前最新版:dex2jar-0.0.9.8.tar.gz可用(見本文附件) 
jd-gui : http://java.decompiler.free.fr/?q=jdgui  linux,win,mac 
jd-eclipse-plugin update site: 
http://java.decompiler.free.fr/jd-eclipse/update 

方法: 
解壓apk得classes.dex,將其copy到dex2jar-0.0.7-SNAPSHOT目錄。 
cd path/to/dex2jar-0.0.7-SNAPSHOT 
sh dex2jar.sh classes.dex  
得到classes.dex.dex2jar.jar 
打開jd-gui,file -> open ,找到classes.dex.dex2jar.jar即可看到源碼了。 
導出源碼:file -> save all sources 

資源文件: 
apktool d path/to/apk path/to/place/appfiles 
重新打包: 
apktool b path/to/place/appfiles 

如果用jd eclipse plugin, 將classes.dex.dex2jar.jar加入到工程的classpath, 直接雙擊相應的class文件即得源碼。 

一般的apk都是用的proguard機制混淆來達到反反編譯的目的,但這樣的方式隱藏不了軟件的邏輯,最好的加密方式是用classloader機制進行加密,要使用時解密。 

反彙編so:objdump(linux) 
objdump -D sofile 
according to manpage it can also handle arm 
if you have the source you might prefer -S 
(end) 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章