[Android Software Development] Tatsun0x0:
Apktool java application not executing

I've been having problems trying to compile apk files with this tool under Ubuntu based distros. I've been able to compile using windows machines but after migrating to an ubuntu based distro I've been having this permission problem that has something to do with java. I'm currently using 1.7.0_80 JDK and I have installed all the necessary dependencies and such including the proper permissions on both the java applet and the apktool wrapper(chmod -x) but every single time I try to compile apk files under this OS the output ends up as an execution error stating that it doesn't have proper permissions to execute which I never had such a problem under windows.

Here's the error:

Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_8290370826470470248.tmp, p, --forced-package-id, 127, --min-sdk-version, 8, --target-sdk-version, 21, --version-code, 88, --version-name, 88, -F, /tmp/APKTOOL5517082458349505315.tmp, -0, arsc, -I, /home/lm-paa-dev/apktool/framework/1.apk, -S, /home/lm-paa-dev/Documents/Psiphon Handler Mods/Psiphon.ver.88.build.88/res, -M, /home/lm-paa-dev/Documents/Psiphon Handler Mods/Psiphon.ver.88.build.88/AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:459)
at brut.androlib.Androlib.buildResources(Androlib.java:397)
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_8290370826470470248.tmp, p, --forced-package-id, 127, --min-sdk-version, 8, --target-sdk-version, 21, --version-code, 88, --version-name, 88, -F, /tmp/APKTOOL5517082458349505315.tmp, -0, arsc, -I, /home/lm-paa-dev/apktool/framework/1.apk, -S, /home/lm-paa-dev/Documents/Psiphon Handler Mods/Psiphon.ver.88.build.88/res, -M, /home/lm-paa-dev/Documents/Psiphon Handler Mods/Psiphon.ver.88.build.88/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:419)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:445)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_8290370826470470248.tmp, p, --forced-package-id, 127, --min-sdk-version, 8, --target-sdk-version, 21, --version-code, 88, --version-name, 88, -F, /tmp/APKTOOL5517082458349505315.tmp, -0, arsc, -I, /home/lm-paa-dev/apktool/framework/1.apk, -S, /home/lm-paa-dev/Documents/Psiphon Handler Mods/Psiphon.ver.88.build.88/res, -M, /home/lm-paa-dev/Documents/Psiphon Handler Mods/Psiphon.ver.88.build.88/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_8290370826470470248.tmp": error=13, Permission denied
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=13, Permission denied
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

I even tried running the applet as root and this still happens :/ . Do any of you guys have an idea how to fix this? The command I used is:

apktool b "Name_of_apk_to_build"

and

sudo apktool b "Name_of_apk_to_build"

and both those commands end up as the error above

EDIT #1: Oh flubber nuggets! I've just read dermaze's reply to this thread and I have the same problem as he does. I still don't know what to do with the aapt though.

EDIT #2: Nevermind this post... I never knew the tmp partition/directory is mounted as read-only... So this command

sudo mount -o remount,exec /tmp

should work for me too.