Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BrutException: could not exec commad aapt #235

Closed
GoogleCodeExporter opened this issue Mar 18, 2015 · 7 comments
Closed

BrutException: could not exec commad aapt #235

GoogleCodeExporter opened this issue Mar 18, 2015 · 7 comments

Comments

@GoogleCodeExporter
Copy link

Hi, i successfully decompile my framework-res.apk, then i made a change on xml 
file. After that when i try to build apk i am getting exception.

brut.androlib.AndrolibException: brut.common.BrutException: could not exec 
command: [aapt, p, -F, 
C:\Users\Yucel\AppData\Loca\Temp\APKTOOL4612787316361712642.tmp, -x, -S, 
c:\framework-res\res, -M, c:\framework-res\AndroidManifest.xml]
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:193)
        at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
        at brut.androlib.Androlib.buildResources(Androlib.java:248)
        at brut.androlib.Androlib.build(Androlib.java:171)
        at brut.androlib.Androlib.build(Androlib.java:154)
        at brut.apktool.Main.cmdBuild(Main.java:174)
        at brut.apktool.Main.main(Main.java:59)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, 
C:\Users\Yucel\AppData\Loca\Temp\APKTOOL4612787316361712642.tmp, -x, -S, 
c:\framewo
rk-res\res, -M, c:\framework-res\AndroidManifest.xml]
        at brut.util.OS.exec(OS.java:83)
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
        ... 6 more

My System:
Windows 7 x64 tr-TR
apktool 1.4.1
apktool-install-windows-r04-brut1

Original issue reported on code.google.com by 1black.f...@gmail.com on 5 Nov 2011 at 11:43

Attachments:

@GoogleCodeExporter
Copy link
Author

Same issue with latest apktool release.

My System:
Ubuntu Lucid Lynx (x86_64)
apktool 1.4.2
apktool-install-linux-r04-brut1

Original comment by adrien.b...@gmail.com on 3 Dec 2011 at 7:47

@GoogleCodeExporter
Copy link
Author

I was getting this error because of i'm tring to decompile/compile a custom 
roms apk.
I can decompile/compile an original framework-res.apk without any problem.
Maybe you are trying a custom apk, so u get the same problem.

Original comment by 1black.f...@gmail.com on 3 Dec 2011 at 9:32

@GoogleCodeExporter
Copy link
Author

Issue solve with SDK update (R11 -> R15)

Original comment by adrien.b...@gmail.com on 16 Dec 2011 at 1:30

@GoogleCodeExporter
Copy link
Author

I am having same issue :'( and SDK update didn't solve issue sorry Adrien.b

Original comment by SteveLV...@gmail.com on 11 Apr 2012 at 3:39

@GoogleCodeExporter
Copy link
Author

exact error I am getting :'(




Steve-Laptop:c66e88531184 stevelv702$ apktool b -f
I: Smaling...
I: Building resources...
/usr/local/bin/aapt: /usr/local/bin/aapt: cannot execute binary file
Exception in thread "main" brut.androlib.AndrolibException: 
brut.common.BrutException: could not exec command: [aapt, p, -F, 
/var/folders/rl/s5c53_bx0zn1yhnmn9sxgzg40000gn/T/APKTOOL7630072128416074195.tmp,
 -I, /Users/stevelv702/apktool/framework/1.apk, -S, 
/Users/stevelv702/Downloads/1184zip/c66e88531184/./res, -M, 
/Users/stevelv702/Downloads/1184zip/c66e88531184/./AndroidManifest.xml]
    at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)
    at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
    at brut.androlib.Androlib.buildResources(Androlib.java:248)
    at brut.androlib.Androlib.build(Androlib.java:171)
    at brut.androlib.Androlib.build(Androlib.java:154)
    at brut.apktool.Main.cmdBuild(Main.java:182)
    at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, 
/var/folders/rl/s5c53_bx0zn1yhnmn9sxgzg40000gn/T/APKTOOL7630072128416074195.tmp,
 -I, /Users/stevelv702/apktool/framework/1.apk, -S, 
/Users/stevelv702/Downloads/1184zip/c66e88531184/./res, -M, 
/Users/stevelv702/Downloads/1184zip/c66e88531184/./AndroidManifest.xml]
    at brut.util.OS.exec(OS.java:83)
    at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
    ... 6 more
Steve-Laptop:c66e88531184 stevelv702$ 

Original comment by st...@stevelv702.com on 11 Apr 2012 at 11:59

@GoogleCodeExporter
Copy link
Author

/usr/local/bin/aapt: /usr/local/bin/aapt: cannot execute binary file

aapt could not be found / executed. Not an Apktool bug.

Original comment by connor.tumbleson on 17 Nov 2012 at 2:26

  • Changed state: Invalid

@GoogleCodeExporter
Copy link
Author

I had the same problem. Fixed with using the original aapt (by adding the 
android platform-tools to the first place of my PATH) from the sdk.

Original comment by dieu...@gmail.com on 13 Feb 2013 at 5:38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant