MacOS X APK 最新版本 反編譯
檔案準備
##環境準備
- apktool
- 下載儲存檔名為 apktool
- 重新命名apktool-xxx.jar 為apktool.jar
- 拷貝 (apktool.jar & apktool) 倒 /usr/local/bin
cd /usr/local/bin
sudo chmod +x apktool
sudo chmod +x apktool.jar
- dex2jar
將dex2jar-2.0.zip 解壓然後拷貝其中的所有sh檔案和lib倒/usr/local/bin
sudo chmod +x apktool
- jd-gui
tar xf jd-gui-osx-1.4.0.tar
將JD-GUI.app檔案拷到應用程式中
開始反編譯
apktool d -s XXX.apk
可以得到
- res資料夾就是我們Android中的res資料夾
d2j-dex2jar.sh classes.dex
得到classes-dex2jar.jar 檔案
- 開啟JD-GUI 將classes-dex2jar.jar 檔案 丟到 gui中
整個流程就完成了
其中apktool 有如下選項我們在decode的時候不新增-s選項可以直接解壓出smail檔案,我們也可以直接用d2j的工具將smail檔案轉化為java檔案,這也是一個反編譯的思路
usage: apktool -advance,--advanced prints advance information. -version,--version prints the version then exits usage: apktool if|install-framework [options] <framework.apk> -p,--frame-path
Stores framework files into . -t,--tag Tag frameworks using . usage: apktool d[ecode] [options] <file_apk> -f,--force Force delete destination directory. -o,--output The name of folder that gets written. Default is apk.out -p,--frame-path Uses framework files located in . -r,--no-res Do not decode resources. -s,--no-src Do not decode sources. -t,--frame-tag Uses framework files tagged by . usage: apktool b[uild] [options] <app_path> -f,--force-all Skip changes detection and build all files. -o,--output The name of apk that gets written. Default is dist/name.apk -p,--frame-path Uses framework files located in .