[Q] I can't compile framework-res.apk - Android Q&A, Help & Troubleshooting

I can't compile framework-res.apk
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: D:\1\res/drawable-sw600dp-xhdpi
invalid resource directory name: D:\1\res/layout-sw600dp
invalid resource directory name: D:\1\res/layout-w600dp
invalid resource directory name: D:\1\res/values-h720dp
invalid resource directory name: D:\1\res/values-sw600dp
invalid resource directory name: D:\1\res/values-sw600dp-land
invalid resource directory name: D:\1\res/values-sw600dp-w1024dp
invalid resource directory name: D:\1\res/values-sw600dp-w1280dp
invalid resource directory name: D:\1\res/values-w360dp
invalid resource directory name: D:\1\res/values-w480dp
invalid resource directory name: D:\1\res/values-w500dp
invalid resource directory name: D:\1\res/values-w600dp
invalid resource directory name: D:\1\res/values-w720dp
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\TOM\AppData\Local\Temp\APK
TOOL6043000326826960280.tmp, -x, -S, D:\1\res, -M, D:\1\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:182)
at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\U
sers\TOM\AppData\Local\Temp\APKTOOL6043000326826960280.tmp, -x, -S, D:\1\res, -M
, D:\1\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more
I very confused with this problem.
Sorry about my bad english.
Please help me :crying::crying:

Related

Problem with apktool and SystemUI.apk

Hey guys, I'm having trouble building a modded SystemUI.apk. Here is the output I get when trying to rebuild:
[email protected]:~/themes/ics$ apktool b -d -f ./systemui/
I: Smaling...
I: Building resources...
invalid resource directory name: /home/justin/themes/ics/./systemui/res/drawable-sw600dp-hdpi
invalid resource directory name: /home/justin/themes/ics/./systemui/res/values-sw400dp
invalid resource directory name: /home/justin/themes/ics/./systemui/res/layout-sw600dp
invalid resource directory name: /home/justin/themes/ics/./systemui/res/values-sw600dp-port
invalid resource directory name: /home/justin/themes/ics/./systemui/res/values-sw720dp
invalid resource directory name: /home/justin/themes/ics/./systemui/res/layout-sw800dp
invalid resource directory name: /home/justin/themes/ics/./systemui/res/values-sw600dp
invalid resource directory name: /home/justin/themes/ics/./systemui/res/drawable-sw600dp-xhdpi
invalid resource directory name: /home/justin/themes/ics/./systemui/res/values-sw720dp-port
invalid resource directory name: /home/justin/themes/ics/./systemui/res/values-sw800dp
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL2621526238038345530.tmp, -I, /home/justin/apktool/framework/1.apk, -S, /home/justin/themes/ics/./systemui/res, -M, /home/justin/themes/ics/./systemui/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, /tmp/APKTOOL2621526238038345530.tmp, -I, /home/justin/apktool/framework/1.apk, -S, /home/justin/themes/ics/./systemui/res, -M, /home/justin/themes/ics/./systemui/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
[email protected]:~/themes/ics$ ​
I already had to get a modded apktool just to decompile it (issue found here http://code.google.com/p/android-apktool/issues/detail?id=291)
Any ideas? Or perhaps another tool I can use?
EDIT: To clarify, this is for the DAGr8 ICS.

[Q] Problem to compile ICS framework

C:\Users\Hp\Desktop\Herramientas Dev\APKTOOL\ICS Apktool\Original Apktool>apktoo
l b framework-res framework.apk
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: C:\Users\Hp\Desktop\Herramientas Dev\APKTOOL\IC
S Apktool\Original Apktool\framework-res\res/drawable-sw600dp-hdpi
invalid resource directory name: C:\Users\Hp\Desktop\Herramientas Dev\APKTOOL\IC
S Apktool\Original Apktool\framework-res\res/layout-sw600dp
invalid resource directory name: C:\Users\Hp\Desktop\Herramientas Dev\APKTOOL\IC
S Apktool\Original Apktool\framework-res\res/layout-w600dp
invalid resource directory name: C:\Users\Hp\Desktop\Herramientas Dev\APKTOOL\IC
S Apktool\Original Apktool\framework-res\res/values-h720dp
invalid resource directory name: C:\Users\Hp\Desktop\Herramientas Dev\APKTOOL\IC
S Apktool\Original Apktool\framework-res\res/values-sw600dp
invalid resource directory name: C:\Users\Hp\Desktop\Herramientas Dev\APKTOOL\IC
S Apktool\Original Apktool\framework-res\res/values-sw600dp-land
invalid resource directory name: C:\Users\Hp\Desktop\Herramientas Dev\APKTOOL\IC
S Apktool\Original Apktool\framework-res\res/values-sw600dp-w1024dp
invalid resource directory name: C:\Users\Hp\Desktop\Herramientas Dev\APKTOOL\IC
S Apktool\Original Apktool\framework-res\res/values-sw600dp-w1280dp
invalid resource directory name: C:\Users\Hp\Desktop\Herramientas Dev\APKTOOL\IC
S Apktool\Original Apktool\framework-res\res/values-w360dp
invalid resource directory name: C:\Users\Hp\Desktop\Herramientas Dev\APKTOOL\IC
S Apktool\Original Apktool\framework-res\res/values-w480dp
invalid resource directory name: C:\Users\Hp\Desktop\Herramientas Dev\APKTOOL\IC
S Apktool\Original Apktool\framework-res\res/values-w500dp
invalid resource directory name: C:\Users\Hp\Desktop\Herramientas Dev\APKTOOL\IC
S Apktool\Original Apktool\framework-res\res/values-w600dp
invalid resource directory name: C:\Users\Hp\Desktop\Herramientas Dev\APKTOOL\IC
S Apktool\Original Apktool\framework-res\res/values-w720dp
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\Hp\AppData\Local\Temp\APKT
OOL6269438195507176053.tmp, -x, -S, C:\Users\Hp\Desktop\Herramientas Dev\APKTOOL
\ICS Apktool\Original Apktool\framework-res\res, -M, C:\Users\Hp\Desktop\Herrami
entas Dev\APKTOOL\ICS Apktool\Original Apktool\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:182)
at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\U
sers\Hp\AppData\Local\Temp\APKTOOL6269438195507176053.tmp, -x, -S, C:\Users\Hp\D
esktop\Herramientas Dev\APKTOOL\ICS Apktool\Original Apktool\framework-res\res,
-M, C:\Users\Hp\Desktop\Herramientas Dev\APKTOOL\ICS Apktool\Original Apktool\fr
amework-res\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more
C:\Users\Hp\Desktop\Herramientas Dev\APKTOOL\ICS Apktool\Original Apktool>
Some ideas?..
Thanks..
Same problem here :/ have you found any solution ?

[Q] modding question

Hey,
I am a noob (lol) and I have been trying to comile SystemUI apk but after decompiling I cannont recompile it as I get the following error:
apktool b SystemUI ~/Desktop/almostdone.apk
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: /home/wahmed/Android/Danielle/ics/SystemUI/res/layout-sw600dp
invalid resource directory name: /home/wahmed/Android/Danielle/ics/SystemUI/res/drawable-sw600dp-mdpi
invalid resource directory name: /home/wahmed/Android/Danielle/ics/SystemUI/res/values-sw600dp-port
invalid resource directory name: /home/wahmed/Android/Danielle/ics/SystemUI/res/values-sw720dp-port
invalid resource directory name: /home/wahmed/Android/Danielle/ics/SystemUI/res/drawable-sw720dp-mdpi
invalid resource directory name: /home/wahmed/Android/Danielle/ics/SystemUI/res/values-sw600dp
invalid resource directory name: /home/wahmed/Android/Danielle/ics/SystemUI/res/values-sw720dp
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL1718396844567339264.tmp, -I, /home/wahmed/apktool/framework/1.apk, -S, /home/wahmed/Android/Danielle/ics/SystemUI/res, -M, /home/wahmed/Android/Danielle/ics/SystemUI/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, /tmp/APKTOOL1718396844567339264.tmp, -I, /home/wahmed/apktool/framework/1.apk, -S, /home/wahmed/Android/Danielle/ics/SystemUI/res, -M, /home/wahmed/Android/Danielle/ics/SystemUI/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
Click to expand...
Click to collapse
Some help qould be appreciated! :crying:
PS: I am running ubuntu 12.10 beta and have openjdk 6 installed
have you performed:
Code:
java -jar apktool.jar if framework-res.apk
if that doesn't work, try a newer version of apktool.jar perhaps.. last time I checked was v1.5.0 by iBotPeaches.

Possible bug in apktool 1.5

Wondering if someone with more than 10 posts can drop this over in the dev forum for apktool 1.5?
There appears to be a bug in the way the tool handles paths on windows computers with some apk's. A sample apk is the Launcher2.apk from 4.1.2.
It decodes fine, but turning around to immediately build it again results in:
C:\Launcher2\4.1.2\Launcher2.stock>apktool b -f
I: Smaling...
I: Building resources...
invalid resource directory name: C:\Launcher2\4.1.2\Launcher2.stock\.\res/drawable-sw600dp-hdpi
invalid resource directory name: C:\Launcher2\4.1.2\Launcher2.stock\.\res/drawable-sw600dp-land-hdpi
invalid resource directory name: C:\Launcher2\4.1.2\Launcher2.stock\.\res/drawable-sw600dp-nodpi
invalid resource directory name: C:\Launcher2\4.1.2\Launcher2.stock\.\res/drawable-sw600dp-xhdpi
invalid resource directory name: C:\Launcher2\4.1.2\Launcher2.stock\.\res/drawable-sw720dp-land-hdpi
invalid resource directory name: C:\Launcher2\4.1.2\Launcher2.stock\.\res/drawable-sw720dp-nodpi
invalid resource directory name: C:\Launcher2\4.1.2\Launcher2.stock\.\res/layout-sw600dp-port
invalid resource directory name: C:\Launcher2\4.1.2\Launcher2.stock\.\res/layout-sw720dp
invalid resource directory name: C:\Launcher2\4.1.2\Launcher2.stock\.\res/layout-sw720dp-land
invalid resource directory name: C:\Launcher2\4.1.2\Launcher2.stock\.\res/layout-sw720dp-port
invalid resource directory name: C:\Launcher2\4.1.2\Launcher2.stock\.\res/values-sw340dp
invalid resource directory name: C:\Launcher2\4.1.2\Launcher2.stock\.\res/values-sw340dp-land
invalid resource directory name: C:\Launcher2\4.1.2\Launcher2.stock\.\res/values-sw340dp-port
invalid resource directory name: C:\Launcher2\4.1.2\Launcher2.stock\.\res/values-sw600dp
invalid resource directory name: C:\Launcher2\4.1.2\Launcher2.stock\.\res/values-sw600dp-land
invalid resource directory name: C:\Launcher2\4.1.2\Launcher2.stock\.\res/values-sw600dp-port
invalid resource directory name: C:\Launcher2\4.1.2\Launcher2.stock\.\res/values-sw720dp
invalid resource directory name: C:\Launcher2\4.1.2\Launcher2.stock\.\res/values-sw720dp-land
invalid resource directory name: C:\Launcher2\4.1.2\Launcher2.stock\.\res/values-sw720dp-port
invalid resource directory name: C:\Launcher2\4.1.2\Launcher2.stock\.\res/xml-sw600dp
invalid resource directory name: C:\Launcher2\4.1.2\Launcher2.stock\.\res/xml-sw720dp
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p,
--min-sdk-version, 16, --target-sdk-version, 16, -F, C:\Users\akuiphj\AppData\Local\Temp\APKTOOL7573147755302264770.tmp
, -I, C:\Users\akuiphj\apktool\framework\1.apk, -S, C:\Launcher2\4.1.2\Launcher2.stock\.\res, -M, C:\Launcher2\4.1.2\Lau
ncher2.stock\.\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:255)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:324)
at brut.androlib.Androlib.buildResources(Androlib.java:269)
at brut.androlib.Androlib.build(Androlib.java:192)
at brut.androlib.Androlib.build(Androlib.java:174)
at brut.apktool.Main.cmdBuild(Main.java:188)
at brut.apktool.Main.main(Main.java:70)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 16, --target-sdk-version, 16,
-F, C:\Users\akuiphj\AppData\Local\Temp\APKTOOL7573147755302264770.tmp, -I, C:\Users\akuiphj\apktool\framework\1.apk, -
S, C:\Launcher2\4.1.2\Launcher2.stock\.\res, -M, C:\Launcher2\4.1.2\Launcher2.stock\.\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:253)
... 6 more
I was able to build the apk on linux so I'm pretty sure its a windows only problem with the handling of / vs \.
(as a side, holy crap, who made the captcha's on this site?! They are impossible!)

not able to compile apk(systemUI) cyanogen

hey i tried to decompile systemui.apk
it decompiled successfully using apktool
but whenever i tries to recompile it it shows dis error
it is of cyanogen mod 9.1
C:\Users\yo\Downloads\Compressed\New folder (2)>apktool b SystemUI
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: C:\Users\yo\Downloads\Compressed\New folder (2)
\SystemUI\res/drawable-sw600dp-mdpi
invalid resource directory name: C:\Users\yo\Downloads\Compressed\New folder (2)
\SystemUI\res/drawable-sw720dp-mdpi
invalid resource directory name: C:\Users\yo\Downloads\Compressed\New folder (2)
\SystemUI\res/layout-sw600dp
invalid resource directory name: C:\Users\yo\Downloads\Compressed\New folder (2)
\SystemUI\res/values-sw600dp
invalid resource directory name: C:\Users\yo\Downloads\Compressed\New folder (2)
\SystemUI\res/values-sw600dp-port
invalid resource directory name: C:\Users\yo\Downloads\Compressed\New folder (2)
\SystemUI\res/values-sw720dp
invalid resource directory name: C:\Users\yo\Downloads\Compressed\New folder (2)
\SystemUI\res/values-sw720dp-port
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\yo\AppData\Local\Temp\APKT
OOL3042390860033165785.tmp, -I, C:\Users\yo\apktool\framework\1.apk, -S, C:\User
s\yo\Downloads\Compressed\New folder (2)\SystemUI\res, -M, C:\Users\yo\Downloads
\Compressed\New folder (2)\SystemUI\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(An drolibResources.jav
a:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib .java:301)
at brut.androlib.Androlib.buildResources(Androlib.jav a: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, C:\U
sers\yo\AppData\Local\Temp\APKTOOL3042390860033165 785.tmp, -I, C:\Users\yo\apkto
ol\framework\1.apk, -S, C:\Users\yo\Downloads\Compressed\New folder (2)\SystemUI
\res, -M, C:\Users\yo\Downloads\Compressed\New folder (2)\SystemUI\AndroidManife
st.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(An drolibResources.jav
a:191)
... 6 more
plz help me
?
theviper said:
hey i tried to decompile systemui.apk
it decompiled successfully using apktool
but whenever i tries to recompile it it shows dis error
it is of cyanogen mod 9.1
C:\Users\yo\Downloads\Compressed\New folder (2)>apktool b SystemUI
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: C:\Users\yo\Downloads\Compressed\New folder (2)
\SystemUI\res/drawable-sw600dp-mdpi
invalid resource directory name: C:\Users\yo\Downloads\Compressed\New folder (2)
\SystemUI\res/drawable-sw720dp-mdpi
invalid resource directory name: C:\Users\yo\Downloads\Compressed\New folder (2)
\SystemUI\res/layout-sw600dp
invalid resource directory name: C:\Users\yo\Downloads\Compressed\New folder (2)
\SystemUI\res/values-sw600dp
invalid resource directory name: C:\Users\yo\Downloads\Compressed\New folder (2)
\SystemUI\res/values-sw600dp-port
invalid resource directory name: C:\Users\yo\Downloads\Compressed\New folder (2)
\SystemUI\res/values-sw720dp
invalid resource directory name: C:\Users\yo\Downloads\Compressed\New folder (2)
\SystemUI\res/values-sw720dp-port
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\yo\AppData\Local\Temp\APKT
OOL3042390860033165785.tmp, -I, C:\Users\yo\apktool\framework\1.apk, -S, C:\User
s\yo\Downloads\Compressed\New folder (2)\SystemUI\res, -M, C:\Users\yo\Downloads
\Compressed\New folder (2)\SystemUI\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(An drolibResources.jav
a:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib .java:301)
at brut.androlib.Androlib.buildResources(Androlib.jav a: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, C:\U
sers\yo\AppData\Local\Temp\APKTOOL3042390860033165 785.tmp, -I, C:\Users\yo\apkto
ol\framework\1.apk, -S, C:\Users\yo\Downloads\Compressed\New folder (2)\SystemUI
\res, -M, C:\Users\yo\Downloads\Compressed\New folder (2)\SystemUI\AndroidManife
st.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(An drolibResources.jav
a:191)
... 6 more
plz help me
Click to expand...
Click to collapse
Try to rename the folder to something like: android (Or any name, without spaces)
Did u install framework using apktool ?
Sent from my GT-I9001 using xda app-developers app

Categories

Resources