2

我正在尝试提取 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 Fri Jul 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
4

1 回答 1

0

[问题解决了]

原因是因为最新的sdk还没有安装这里是安装最新的android sdk的链接:

https://askubuntu.com/questions/318246/complete-installation-guide-for-android-sdk-adt-bundle-on-ubuntu

于 2015-11-16T07:17:43.193 回答