错误如下:
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_7329934395291017709.tmp, p, --forced-package-id, 127, --min-sdk-version, 9, --version-code, 1, --version-name, 1.789.0.1, -F, /tmp/APKTOOL4412835032657668593.tmp, -0, arsc, -I, /home/debm/apktool/framework/1.apk, -S, /home/debm/share/1003789BY/res, -M, /home/debm/share/1003789BY/AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:458)
at brut.androlib.Androlib.buildResources(Androlib.java:396)
at brut.androlib.Androlib.build(Androlib.java:285)
at brut.androlib.Androlib.build(Androlib.java:256)
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_7329934395291017709.tmp, p, --forced-package-id, 127, --min-sdk-version, 9, --version-code, 1, --version-name, 1.789.0.1, -F, /tmp/APKTOOL4412835032657668593.tmp, -0, arsc, -I, /home/debm/apktool/framework/1.apk, -S, /home/debm/share/1003789BY/res, -M, /home/debm/share/1003789BY/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:419)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:444)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_7329934395291017709.tmp, p, --forced-package-id, 127, --min-sdk-version, 9, --version-code, 1, --version-name, 1.789.0.1, -F, /tmp/APKTOOL4412835032657668593.tmp, -0, arsc, -I, /home/debm/apktool/framework/1.apk, -S, /home/debm/share/1003789BY/res, -M, /home/debm/share/1003789BY/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:93)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:413)
... 6 more
Caused by: java.io.IOException: Cannot run program "/tmp/brut_util_Jar_7329934395291017709.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:186)
at java.lang.ProcessImpl.start(ProcessImpl.java:130)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)
... 10 more
处理问题在 centos 上,可运行如下两行代码
yum install libstdc++.so.6
yum install zlib.i686