apktool主要用于逆向apk文件。它可以將資源解碼,并在修改后可以重新構(gòu)建它們攒驰。它還可以執(zhí)行一些自動(dòng)化任務(wù),例如構(gòu)建apk故爵。
功能
- 將資源解碼成原來(lái)的形式(包括resources.arsc玻粪,class.dex,9.png和xml)
- 將解碼的資源重新打包成apk/jar
- 組織和處理依賴于框架資源的APK
- Smali調(diào)試
- 執(zhí)行自動(dòng)化任務(wù)
安裝方式
參考https://ibotpeaches.github.io/Apktool/install/
使用方式
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 <dir> Stores framework files into <dir>.
-t,--tag <tag> Tag frameworks using <tag>.
usage: apktool d[ecode] [options] <file_apk>
-f,--force Force delete destination directory.
-o,--output <dir> The name of folder that gets written. Default is apk.out
-p,--frame-path <dir> Uses framework files located in <dir>.
-r,--no-res Do not decode resources.
-s,--no-src Do not decode sources.
-t,--frame-tag <tag> Uses framework files tagged by <tag>.
usage: apktool b[uild] [options] <app_path>
-f,--force-all Skip changes detection and build all files.
-o,--output <dir> The name of apk that gets written. Default is dist/name.apk
-p,--frame-path <dir> Uses framework files located in <dir>.
反編譯apk文件
apktool d test.apk
將反編譯后的文件重新打包
apktool b test