在Mac平臺上反編譯了某個知識付費類的app河质,用的weex技術(shù)。發(fā)現(xiàn)反編譯不成功
流程如下
反編譯apk
java -jar apktool_2.3.0.jar d xxx_1.0.0_beta_offical.apk回編譯(將修改后的文件重新打包為一個apk)
java -jar apktool_2.3.0.jar b xxx_1.0.0_beta_offical簽名后安裝到手機上調(diào)試
結(jié)果發(fā)現(xiàn)在第二步總是不成功,找到https://github.com/iBotPeaches/Apktool/issues/1425 這個issue,發(fā)現(xiàn)作者提到了
Seems you might have an outdated framework. Make sure to run apktool empty-framework-dir --force to refresh those.
完整的回答如下
? Bug1425 apktool d app-debug.apk
I: Using Apktool 2.2.2 on app-debug.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/ibotpeaches/.local/share/apktool/framework/1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
? Bug1425 apktool b app-debug
I: Using Apktool 2.2.2
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...
I: Copying unknown files/dir...
? Bug1425
說的是framework過時了掀鹅,需要在 /home/ibotpeaches/.local/share/apktool
目錄下(這個目錄在執(zhí)行第一步反編譯過程中出現(xiàn)過散休,那個就是你需要重新執(zhí)行的目錄)重新執(zhí)行apktool empty-framework-dir --force
之后重新執(zhí)行這三步,完美解決問題
特地紀錄一下