sky201503 / android-apktool2

Automatically exported from code.google.com/p/android-apktool
0 stars 0 forks source link

BrutException: could not exec commad aapt #235

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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 commented 9 years ago
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 commented 9 years ago
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 commented 9 years ago
Issue solve with SDK update (R11 -> R15)

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

GoogleCodeExporter commented 9 years ago
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 commented 9 years ago
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 commented 9 years ago
/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

GoogleCodeExporter commented 9 years ago
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