使用apktool重新编译apk时出错

时间:2015-04-14 02:48:34

标签: apktool

我无法使用apktool重新编译任何apk,这里是错误日志:

W: Could not find sources
invalid resource directory name: C:\Users\pradeepkumar\Downloads\Compressed\Advanced+ApkTool+v4.1.0+By+BDFreak\AdvancedApkTool\3-Out\framework-res.apk\res values-?@-rES
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [C:\Users\PRADEE~1\AppData\Local\Temp\brut_util_Jar_5055861152156375473.tmp, p, --forced-package-id, 1, --min-sdk-version, 21, --target-sdk-version, 21, --version-code, 21, --version-name, 5.0.2-d3aebb81ea, -F, C:\Users\PRADEE~1\AppData\Local\Temp\APKTOOL1542257552202253955.tmp, -x, -0, arsc, -S, C:\Users\pradeepkumar\Downloads\Compressed\Advanced+ApkTool+v4.1.0+By+BDFreak\AdvancedApkTool\3-Out\framework-res.apk\res, -M, C:\Users\pradeepkumar\Downloads\Compressed\Advanced+ApkTool+v4.1.0+By+BDFreak\AdvancedApkTool\3-Out\framework-res.apk\AndroidManifest.xml]
    at brut.androlib.Androlib.buildResourcesFull(Androlib.java:437)
    at brut.androlib.Androlib.buildResources(Androlib.java:374)
    at brut.androlib.Androlib.build(Androlib.java:277)
    at brut.androlib.Androlib.build(Androlib.java:250)
    at brut.apktool.Main.cmdBuild(Main.java:225)
    at brut.apktool.Main.main(Main.java:84)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [C:\Users\PRADEE~1\AppData\Local\Temp\brut_util_Jar_5055861152156375473.tmp, p, --forced-package-id, 1, --min-sdk-version, 21, --target-sdk-version, 21, --version-code, 21, --version-name, 5.0.2-d3aebb81ea, -F, C:\Users\PRADEE~1\AppData\Local\Temp\APKTOOL1542257552202253955.tmp, -x, -0, arsc, -S, C:\Users\pradeepkumar\Downloads\Compressed\Advanced+ApkTool+v4.1.0+By+BDFreak\AdvancedApkTool\3-Out\framework-res.apk\res, -M, C:\Users\pradeepkumar\Downloads\Compressed\Advanced+ApkTool+v4.1.0+By+BDFreak\AdvancedApkTool\3-Out\framework-res.apk\AndroidManifest.xml]
    at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:488)
    at brut.androlib.Androlib.buildResourcesFull(Androlib.java:423)
    ... 5 more
Caused by: brut.common.BrutException: could not exec command: [C:\Users\PRADEE~1\AppData\Local\Temp\brut_util_Jar_5055861152156375473.tmp, p, --forced-package-id, 1, --min-sdk-version, 21, --target-sdk-version, 21, --version-code, 21, --version-name, 5.0.2-d3aebb81ea, -F, C:\Users\PRADEE~1\AppData\Local\Temp\APKTOOL1542257552202253955.tmp, -x, -0, arsc, -S, C:\Users\pradeepkumar\Downloads\Compressed\Advanced+ApkTool+v4.1.0+By+BDFreak\AdvancedApkTool\3-Out\framework-res.apk\res, -M, C:\Users\pradeepkumar\Downloads\Compressed\Advanced+ApkTool+v4.1.0+By+BDFreak\AdvancedApkTool\3-Out\framework-res.apk\AndroidManifest.xml]
    at brut.util.OS.exec(OS.java:89)
    at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:482)
    ... 6 more

1 个答案:

答案 0 :(得分:0)

在最近的apktool代码库中,fixed已经bloggedRC4没有此修复程序。我build几天前修了这个bug。所以来自{{3}}来源或等待Apktool的最终版本。

基本上,您拥有的版本不支持BCP-47限定符和2个字节的3个字符。因此ast-rES被不正确地解码,这会产生无效的目录错误。