sky201503 / android-apktool-1

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

brut.common.BrutException: could not exec command #378

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hello,

I have use APKMultitools with apktools 1.5.1 and trying to compile the 
framework-res.apk
First I decompile that file without any problem.

When I trying to recompile they have found error like this :
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: C:\cygwin\home\akbar\FJAPKTools\Working\res/dra
wable-ldrtl-mdpi
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, --min-sdk-version, 17, --target-sdk-ver
sion, 17, -F, C:\Users\akbar\AppData\Local\Temp\APKTOOL8607123268457693199.tmp,
-x, -S, C:\cygwin\home\akbar\FJAPKTools\Working\res, -M, C:\cygwin\home\akbar\FJ
APKTools\Working\AndroidManifest.xml]

=================================================
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: C:\cygwin\home\akbar\FJAPKTools\Working\res/dra
wable-ldrtl-mdpi
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, --min-sdk-version, 17, --target-sdk-ver
sion, 17, -F, C:\Users\akbar\AppData\Local\Temp\APKTOOL1757422973888190577.tmp,
-x, -S, C:\cygwin\home\akbar\FJAPKTools\Working\res, -M, C:\cygwin\home\akbar\FJ
APKTools\Working\AndroidManifest.xml]
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:258)
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: C:\cygwin\home\akbar\FJAPKTools\Working\res/dra
wable-ldrtl-mdpi
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, --min-sdk-version, 17, --target-sdk-ver
sion, 17, -F, C:\Users\akbar\AppData\Local\Temp\APKTOOL1037301417103334839.tmp,
-x, -S, C:\cygwin\home\akbar\FJAPKTools\Working\res, -M, C:\cygwin\home\akbar\FJ
APKTools\Working\AndroidManifest.xml]
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:258)
        at brut.androlib.Androlib.buildResourcesFull(Androlib.java:337)
        at brut.androlib.Androlib.buildResources(Androlib.java:284)
        at brut.androlib.Androlib.build(Androlib.java:207)
        at brut.androlib.Androlib.build(Androlib.java:180)
        at brut.apktool.Main.cmdBuild(Main.java:209)
        at brut.apktool.Main.main(Main.java:72)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sd
k-version, 17, --target-sdk-version, 17, -F, 
C:\Users\akbar\AppData\Local\Temp\APKTOOL1037301417103334839.tmp, -x, -S, 
C:\cygwin\home\akbar\FJAPKTools\Working\res, -M, 
C:\cygwin\home\akbar\FJAPKTools\Working\AndroidManifest.xml]
        at brut.util.OS.exec(OS.java:83)
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:256)
        ... 6 more
mv: cannot stat `Working/dist/*.apk': No such file or directory
----------
Working unsigned apk placed into 'out' directory

What version of the product are you using? On what operating system?
I have trying use framework-res.apk from Jelly Bean 4.2.1 on Cyanogenmod 10.1
I have running that on cygwin with Java 1.6 and Windows 8 Pro.

Please help me to fix this problem.

Thanks.

Akbar.

Original issue reported on code.google.com by ak...@nicosoft.co.id on 29 Dec 2012 at 7:09

Attachments:

GoogleCodeExporter commented 9 years ago

ibotpeaches@raganok:~/Downloads/Apktool$ apktool d -f framework-res.apk I: Loading resource table... I: Loaded. I: Decoding AndroidManifest.xml with resources... I: Regular manifest package... I: Decoding file-resources... I: Decoding values / XMLs... I: Done. I: Copying assets and libs... ibotpeaches@raganok:~/Downloads/Apktool$ apktool b framework-res W: Could not find sources I: Checking whether resources has changed... I: Building resources... I: Building apk file... ibotpeaches@raganok:~/Downloads/Apktool$


no error. Make sure you have updated aapt. MigrationInstructions

Original comment by connor.tumbleson on 29 Dec 2012 at 11:59

GoogleCodeExporter commented 9 years ago
Great. It works now. Thanks.

Original comment by ak...@nicosoft.co.id on 30 Dec 2012 at 12:54

GoogleCodeExporter commented 9 years ago
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could 
not exec command: [aapt, p, --min-sdk-version, 17, --target-sdk-version, 17, 
-F, C:\Users\sev_user\AppData\Local\Temp\APKT
OL357971799682067571.tmp, -0, arsc, -I, 
C:\Users\sev_user\apktool\framework\1.apk, -S, D:\DATA\Programing 
Android\adt-bundle-windows-x86_64-20130522\sdk\platform-tools\SystemUI\res, -M, 
D:\DATA\Progr
ming 
Android\adt-bundle-windows-x86_64-20130522\sdk\platform-tools\SystemUI\AndroidMa
nifest.xml]
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:357)
        at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336)
        ... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, 
--min-sdk-version, 17, --target-sdk-version, 17, -F, 
C:\Users\sev_user\AppData\Local\Temp\APKTOOL357971799682067571.tmp, -0, ar
c, -I, C:\Users\sev_user\apktool\framework\1.apk, -S, D:\DATA\Programing 
Android\adt-bundle-windows-x86_64-20130522\sdk\platform-tools\SystemUI\res, -M, 
D:\DATA\Programing Android\adt-bundle-windows-
86_64-20130522\sdk\platform-tools\SystemUI\AndroidManifest.xml]
        at brut.util.OS.exec(OS.java:89)
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:355)

I updated aapt.exe but the problem always happens. I pull SystemUI and 
framework-res from Android 4.2.2 and use apk 1.5.2 and latest aapt. Help me to 
resolve it.

Original comment by annv1...@gmail.com on 19 Jun 2013 at 9:15

GoogleCodeExporter commented 9 years ago
I'm really sorry for a noob question, but where can I download apktool 2.0? 
There's only 1.5.2 version available now.
Yes, I'm having the same issue with latest apktool.

Original comment by bsi...@gmail.com on 23 Jul 2013 at 8:52

GoogleCodeExporter commented 9 years ago
May it caused by windows-style path used in the command when invoked in cygwin.

Original comment by zouguang...@gmail.com on 2 Aug 2014 at 7:11