ubuntu下反編譯android apk

來源:互聯網
上載者:User

轉載請註明出處:http://blog.csdn.net/awebkit


1. 解壓apk

首先下載dex2jar

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

在dex2jar的解壓縮目錄下面,有個dex2jar.sh

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. 解壓(unzip)jar包。 

unzip 20110712162837687-445218608_dex2jar.jar


3. 查看class檔案。

這裡有兩種方法。

3.1 使用jdgui

下載jd-gui

http://java.decompiler.free.fr/?q=jdgui

./jd-gui

這種方式查看class檔案,有可能會報錯“Index out of bounds”.

3.2 使用jadEclipse

下載安裝:

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

匯入檔案:Build Path==>Configure Build Path==>Libraries ,點擊Add Class Folder==>Creat New Folder

然後把.class檔案放到建立立的目錄下面。

這樣就可以使用eclipse查看.class檔案了

如果您沒有按照使用篇步驟,那麼您使用 eclipse反編譯外掛程式,會拋異常

Could not open the editor: The Class File Viewer cannot handle the given input ('org.eclipse.ui.ide.FileStoreEditorInput').

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.