我正在尝试提取apk然后使用apktool重新编译,但它显示如下错误。这些错误意味着什么?怎么解决?
参考此(http://ibotpeaches.github.io/Apktool/documentation/) 我只是简单地使用apktool d xxx.apk和apktool b yyy -o xxx_modified.apk
我的工作环境:
xxxx / test $ uname -a Linux xxx 3.19.0-25-generic#26~14.04.1-Ubuntu SMP 7月24日星期五21:16:20 UTC 2015 x86_64 x86_64 x86_64 GNU / Linux
错误代码:
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_49135464892749518.tmp, p, --forced-package-id, 127, --min-sdk-version, 21, --target-sdk-version, 21, --version-code, 1, --version-name, 1.0, -F, /tmp/APKTOOL499773345384388135.tmp, -0, resources.arsc, -0, arsc, -I, /home/fyp/apktool/framework/1.apk, -S, /home/fyp/fyp201516/test/a.apk_temp/res, -M, /home/fyp/fyp201516/test/a.apk_temp/AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:465)
at brut.androlib.Androlib.buildResources(Androlib.java:403)
at brut.androlib.Androlib.build(Androlib.java:291)
at brut.androlib.Androlib.build(Androlib.java:261)
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: [/tmp/brut_util_Jar_49135464892749518.tmp, p, --forced-package-id, 127, --min-sdk-version, 21, --target-sdk-version, 21, --version-code, 1, --version-name, 1.0, -F, /tmp/APKTOOL499773345384388135.tmp, -0, resources.arsc, -0, arsc, -I, /home/fyp/apktool/framework/1.apk, -S, /home/fyp/fyp201516/test/a.apk_temp/res, -M, /home/fyp/fyp201516/test/a.apk_temp/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:425)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:451)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_49135464892749518.tmp, p, --forced-package-id, 127, --min-sdk-version, 21, --target-sdk-version, 21, --version-code, 1, --version-name, 1.0, -F, /tmp/APKTOOL499773345384388135.tmp, -0, resources.arsc, -0, arsc, -I, /home/fyp/apktool/framework/1.apk, -S, /home/fyp/fyp201516/test/a.apk_temp/res, -M, /home/fyp/fyp201516/test/a.apk_temp/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:93)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:419)
... 6 more
Caused by: java.io.IOException: Cannot run program "/tmp/brut_util_Jar_49135464892749518.tmp": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)
at java.lang.Runtime.exec(Runtime.java:617)
at java.lang.Runtime.exec(Runtime.java:485)
at brut.util.OS.exec(OS.java:84)
... 7 more
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:187)
at java.lang.ProcessImpl.start(ProcessImpl.java:130)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)
... 10 more
答案 0 :(得分:0)
[问题解决]
原因是因为最新的sdk尚未安装 这是安装最新android sdk的链接: