Cannot build apktool on Ubuntu 14.04 -


i'm trying build apktool (tool decompiling android apk files).
instructions how build @ http://ibotpeaches.github.io/apktool/build/
problem command ./gradlew build fatjar
errors receive are:

brut.androlib.sharedlibrarytest > issharedresourcedecodingandrebuildingworking failed     brut.androlib.androlibexception: brut.androlib.androlibexception: brut.common.brutexception: not exec command: [/tmp/brut_util_jar_9054478823788249311.tmp, p, --forced-package-id, 127, --min-sdk-version, 21, --target-sdk-version, 21, --version-code, 21, --version-name, 5.0-eng.ibotpeaches.20141225.072308, -f, /tmp/apktool134713816630716118.tmp, -0, arsc, -i, /tmp/brut4423679278565619004.tmp/1.apk, -i, /tmp/brut4423679278565619004.tmp/2-shared.apk, -s, /tmp/brut4423679278565619004.tmp/client.apk.out/res, -m, /tmp/brut4423679278565619004.tmp/client.apk.out/androidmanifest.xml]         @ brut.androlib.androlib.buildresourcesfull(androlib.java:459)         @ brut.androlib.androlib.buildresources(androlib.java:397)         @ brut.androlib.androlib.build(androlib.java:285)         @ brut.androlib.sharedlibrarytest.issharedresourcedecodingandrebuildingworking(sharedlibrarytest.java:102)         caused by:         brut.androlib.androlibexception: brut.common.brutexception: not exec command: [/tmp/brut_util_jar_9054478823788249311.tmp, p, --forced-package-id, 127, --min-sdk-version, 21, --target-sdk-version, 21, --version-code, 21, --version-name, 5.0-eng.ibotpeaches.20141225.072308, -f, /tmp/apktool134713816630716118.tmp, -0, arsc, -i, /tmp/brut4423679278565619004.tmp/1.apk, -i, /tmp/brut4423679278565619004.tmp/2-shared.apk, -s, /tmp/brut4423679278565619004.tmp/client.apk.out/res, -m, /tmp/brut4423679278565619004.tmp/client.apk.out/androidmanifest.xml]             @ brut.androlib.res.androlibresources.aaptpackage(androlibresources.java:419)             @ brut.androlib.androlib.buildresourcesfull(androlib.java:445)             ... 3 more             caused by:             brut.common.brutexception: not exec command: [/tmp/brut_util_jar_9054478823788249311.tmp, p, --forced-package-id, 127, --min-sdk-version, 21, --target-sdk-version, 21, --version-code, 21, --version-name, 5.0-eng.ibotpeaches.20141225.072308, -f, /tmp/apktool134713816630716118.tmp, -0, arsc, -i, /tmp/brut4423679278565619004.tmp/1.apk, -i, /tmp/brut4423679278565619004.tmp/2-shared.apk, -s, /tmp/brut4423679278565619004.tmp/client.apk.out/res, -m, /tmp/brut4423679278565619004.tmp/client.apk.out/androidmanifest.xml]                 @ brut.util.os.exec(os.java:93)                 @ brut.androlib.res.androlibresources.aaptpackage(androlibresources.java:413)                 ... 4 more                 caused by:                 java.io.ioexception: cannot run program "/tmp/brut_util_jar_9054478823788249311.tmp": error=2, no such file or directory                     @ java.lang.processbuilder.start(processbuilder.java:1047)                     @ java.lang.runtime.exec(runtime.java:617)                     @ java.lang.runtime.exec(runtime.java:485)                     @ brut.util.os.exec(os.java:84)                     ... 5 more                     caused by:                     java.io.ioexception: error=2, no such file or directory                         @ java.lang.unixprocess.forkandexec(native method)                         @ java.lang.unixprocess.<init>(unixprocess.java:186)                         @ java.lang.processimpl.start(processimpl.java:130)                         @ java.lang.processbuilder.start(processbuilder.java:1028)                         ... 8 more brut.androlib.providerattributetest > isproviderstringreplacementworking failed     brut.androlib.androlibexception: brut.androlib.androlibexception: brut.common.brutexception: not exec command: [/tmp/brut_util_jar_9054478823788249311.tmp, p, --forced-package-id, 127, --min-sdk-version, 21, --target-sdk-version, 22, --version-code, 1, --version-name, 1.0, -f, /tmp/apktool5763864884088802643.tmp, -0, arsc, -i, /home/ran/apktool/framework/1.apk, -s, /tmp/brut4214352291584370372.tmp/issue636.apk.out/res, -m, /tmp/brut4214352291584370372.tmp/issue636.apk.out/androidmanifest.xml]         @ brut.androlib.androlib.buildresourcesfull(androlib.java:459)         @ brut.androlib.androlib.buildresources(androlib.java:397)         @ brut.androlib.androlib.build(androlib.java:285)         @ brut.androlib.providerattributetest.isproviderstringreplacementworking(providerattributetest.java:59)         caused by:         brut.androlib.androlibexception: brut.common.brutexception: not exec command: [/tmp/brut_util_jar_9054478823788249311.tmp, p, --forced-package-id, 127, --min-sdk-version, 21, --target-sdk-version, 22, --version-code, 1, --version-name, 1.0, -f, /tmp/apktool5763864884088802643.tmp, -0, arsc, -i, /home/ran/apktool/framework/1.apk, -s, /tmp/brut4214352291584370372.tmp/issue636.apk.out/res, -m, /tmp/brut4214352291584370372.tmp/issue636.apk.out/androidmanifest.xml]             @ brut.androlib.res.androlibresources.aaptpackage(androlibresources.java:419)             @ brut.androlib.androlib.buildresourcesfull(androlib.java:445)             ... 3 more             caused by:             brut.common.brutexception: not exec command: [/tmp/brut_util_jar_9054478823788249311.tmp, p, --forced-package-id, 127, --min-sdk-version, 21, --target-sdk-version, 22, --version-code, 1, --version-name, 1.0, -f, /tmp/apktool5763864884088802643.tmp, -0, arsc, -i, /home/ran/apktool/framework/1.apk, -s, /tmp/brut4214352291584370372.tmp/issue636.apk.out/res, -m, /tmp/brut4214352291584370372.tmp/issue636.apk.out/androidmanifest.xml]                 @ brut.util.os.exec(os.java:93)                 @ brut.androlib.res.androlibresources.aaptpackage(androlibresources.java:413)                 ... 4 more                 caused by:                 java.io.ioexception: cannot run program "/tmp/brut_util_jar_9054478823788249311.tmp": error=2, no such file or directory                     @ java.lang.processbuilder.start(processbuilder.java:1047)                     @ java.lang.runtime.exec(runtime.java:617)                     @ java.lang.runtime.exec(runtime.java:485)                     @ brut.util.os.exec(os.java:84)                     ... 5 more                     caused by:                     java.io.ioexception: error=2, no such file or directory                         @ java.lang.unixprocess.forkandexec(native method)                         @ java.lang.unixprocess.<init>(unixprocess.java:186)                         @ java.lang.processimpl.start(processimpl.java:130)                         @ java.lang.processbuilder.start(processbuilder.java:1028)                         ... 8 more brut.androlib.buildanddecodejartest > classmethod failed     brut.androlib.androlibexception: brut.common.brutexception: not exec command: [/tmp/brut_util_jar_9054478823788249311.tmp, p, -f, /tmp/brut3478421848789513632.tmp/testjar.jar, -0, arsc, /tmp/brut3478421848789513632.tmp/testjar-orig/build/apk]         @ brut.androlib.res.androlibresources.aaptpackage(androlibresources.java:419)         @ brut.androlib.androlib.buildapk(androlib.java:661)         @ brut.androlib.androlib.build(androlib.java:290)         @ brut.androlib.buildanddecodejartest.beforeclass(buildanddecodejartest.java:45)         caused by:         brut.common.brutexception: not exec command: [/tmp/brut_util_jar_9054478823788249311.tmp, p, -f, /tmp/brut3478421848789513632.tmp/testjar.jar, -0, arsc, /tmp/brut3478421848789513632.tmp/testjar-orig/build/apk]             @ brut.util.os.exec(os.java:93)             @ brut.androlib.res.androlibresources.aaptpackage(androlibresources.java:413)             ... 3 more             caused by:             java.io.ioexception: cannot run program "/tmp/brut_util_jar_9054478823788249311.tmp": error=2, no such file or directory                 @ java.lang.processbuilder.start(processbuilder.java:1047)                 @ java.lang.runtime.exec(runtime.java:617)                 @ java.lang.runtime.exec(runtime.java:485)                 @ brut.util.os.exec(os.java:84)                 ... 4 more                 caused by:                 java.io.ioexception: error=2, no such file or directory                     @ java.lang.unixprocess.forkandexec(native method)                     @ java.lang.unixprocess.<init>(unixprocess.java:186)                     @ java.lang.processimpl.start(processimpl.java:130)                     @ java.lang.processbuilder.start(processbuilder.java:1028)                     ... 7 more brut.androlib.buildanddecodetest > classmethod failed     brut.androlib.androlibexception: brut.androlib.androlibexception: brut.common.brutexception: not exec command: [/tmp/brut_util_jar_9054478823788249311.tmp, p, --forced-package-id, 127, --version-code, 1, --version-name, 1.0, -f, /tmp/apktool4080305473457824664.tmp, -0, arsc, -i, /home/ran/apktool/framework/1.apk, -s, /tmp/brut8741597800933526375.tmp/testapp-orig/res, -m, /tmp/brut8741597800933526375.tmp/testapp-orig/androidmanifest.xml]         @ brut.androlib.androlib.buildresourcesfull(androlib.java:459)         @ brut.androlib.androlib.buildresources(androlib.java:397)         @ brut.androlib.androlib.build(androlib.java:285)         @ brut.androlib.buildanddecodetest.beforeclass(buildanddecodetest.java:47)         caused by:         brut.androlib.androlibexception: brut.common.brutexception: not exec command: [/tmp/brut_util_jar_9054478823788249311.tmp, p, --forced-package-id, 127, --version-code, 1, --version-name, 1.0, -f, /tmp/apktool4080305473457824664.tmp, -0, arsc, -i, /home/ran/apktool/framework/1.apk, -s, /tmp/brut8741597800933526375.tmp/testapp-orig/res, -m, /tmp/brut8741597800933526375.tmp/testapp-orig/androidmanifest.xml]             @ brut.androlib.res.androlibresources.aaptpackage(androlibresources.java:419)             @ brut.androlib.androlib.buildresourcesfull(androlib.java:445)             ... 3 more             caused by:             brut.common.brutexception: not exec command: [/tmp/brut_util_jar_9054478823788249311.tmp, p, --forced-package-id, 127, --version-code, 1, --version-name, 1.0, -f, /tmp/apktool4080305473457824664.tmp, -0, arsc, -i, /home/ran/apktool/framework/1.apk, -s, /tmp/brut8741597800933526375.tmp/testapp-orig/res, -m, /tmp/brut8741597800933526375.tmp/testapp-orig/androidmanifest.xml]                 @ brut.util.os.exec(os.java:93)                 @ brut.androlib.res.androlibresources.aaptpackage(androlibresources.java:413)                 ... 4 more                 caused by:                 java.io.ioexception: cannot run program "/tmp/brut_util_jar_9054478823788249311.tmp": error=2, no such file or directory                     @ java.lang.processbuilder.start(processbuilder.java:1047)                     @ java.lang.runtime.exec(runtime.java:617)                     @ java.lang.runtime.exec(runtime.java:485)                     @ brut.util.os.exec(os.java:84)                     ... 5 more                     caused by:                     java.io.ioexception: error=2, no such file or directory                         @ java.lang.unixprocess.forkandexec(native method)                         @ java.lang.unixprocess.<init>(unixprocess.java:186)                         @ java.lang.processimpl.start(processimpl.java:130)                         @ java.lang.processbuilder.start(processbuilder.java:1028)                         ... 8 more 6 tests completed, 4 failed :brut.apktool:apktool-lib:test failed failure: build failed exception. * went wrong: execution failed task ':brut.apktool:apktool-lib:test'. > there failing tests. see report at: file:///home/ran/apktool/brut.apktool/apktool-lib/build/reports/tests/index.html * try: run --stacktrace option stack trace. run --info or --debug option more log output. build failed 

i tried several times, received same errors.
can fix it?
(somehow in ubuntu 12.04 works, not on ubuntu 14.04).

edit
jar file ./brut.apktool/apktool-cli/build/libs/apktool-cli.jar created, errors remain.

i found problem: aapt missing...,
add aapt, had install android sdk, run android sdk manager (./android in android-sdk-linux/tools), , install android sdk platform-tools.
aapt in android-sdk-linux/built-tools/22.0.1 directory.
had install lib32z1 (with sudo apt-get install) , add aapt directory path env variable in order make aapt working.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -