這里貼出關鍵部分,如果你需要看英文原版請點擊下面的連接。下面中文部分是我的簡單翻譯。
I decompiled an apk file using dex2jar and opened the resulting jar file in jd-gui. I can view almost all of the code nicely but one section - the constants - displays only // INTERNAL ERROR // and nothing else. Is there a way to retrieve the constants?
問題:
我用dex2jar工具反編譯了apk文件,但當我用jd-gui反編譯前面操作獲得的jar文件的時,能很完美地看到大部分類反編譯后的代碼,但有一部分類不能顯示出來--constants類,僅僅顯示了錯誤:“// INTERNAL ERROR //”,並且沒能反編譯出任何東西,請問還有什么辦法恢復constants這個類成java代碼文件嗎?
Anyone passing by this question should look at this instead: https://github.com/deathmarine/Luyten
Using this instead of jd-gui, I was able to successully view all code which showed as INTERNAL ERROR on jd-gui.
You can also try Jadx: https://github.com/skylot/jadx
答案:請去github地址:https://github.com/deathmarine/Luyten,下載反編譯工具,用這個工具代替jd-gui,我能夠成功反編譯所有之前用jd-gui無法反編譯的文件,也可以用Jadx: https://github.com/skylot/jadx試試,祝你好運,反正我的搞定了,特此記錄經驗,分享給大家
英文簡單,簡要翻譯,只是希望能有所幫助。
ps:我用的是luyten工具,本工具提供有.exe后綴的可執行文件,也有.jar版本,讀者可以在https://github.com/deathmarine/Luyten地址找一下,不想下載源碼的朋友可以用它們,但我不知道它們是否是最新的。所以我下載的是源碼來運行工具,為了方便,你可以到我的github:https://github.com/langtianya/Luyten下載,因為我添加了兩個依賴的包。
看原版:http://stackoverflow.com/questions/17643825/using-java-decompiler-jd-gui-and-getting-internal-error
作者:ouchuquan
出處:http://www.cnblogs.com/langtianya/p/5140226.html
本文版權歸作者和博客園共有,歡迎轉載,但未經作者同意必須保留此段聲明,且在文章頁面明顯位置給出原文連