Hello, I have made a CM7 theme and I'm unable to compile it. I have investigated it a little and found out that if I decompile a theme and then compile it back without ANY change, it gives the following error:
Code:
[email protected]:~/Desktop$ apktool b xres
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL2420487276909255487.tmp, -x, -I, /home/chris/apktool/framework/1.apk, -S, /home/chris/Desktop/xres/res, -M, /home/chris/Desktop/xres/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/APKTOOL2420487276909255487.tmp, -x, -I, /home/chris/apktool/framework/1.apk, -S, /home/chris/Desktop/xres/res, -M, /home/chris/Desktop/xres/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:87)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
Caused by: java.io.IOException: Cannot run program "aapt": java.io.IOException: error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
at java.lang.Runtime.exec(Runtime.java:593)
at java.lang.Runtime.exec(Runtime.java:466)
at brut.util.OS.exec(OS.java:78)
... 7 more
Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.<init>(UNIXProcess.java:148)
at java.lang.ProcessImpl.start(ProcessImpl.java:65)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
... 10 more
Can you help please?!
You got JDK and android sdk?
may be something wrong with the manifest as well, please upload it.
Sent from my LT26i using xda premium
I have same problem, I installed JDK, JRE, Android SDK & Eclipse. but there is no single apk i can recompile. For many ones i get some errors while decopiling. and I couldn't recompile even without changing the apk.
the error is always this:
Code:
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathN
otExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java:142)
at brut.androlib.Androlib.build(Androlib.java:159)
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.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:
103)
at brut.androlib.Androlib.readMetaFile(Androlib.java:138)
... 4 more
I tried apktoll 1.4.3 and 1.4.1. only 1.4.3 works.
Chris95X8 said:
Hello, I have made a CM7 theme and I'm unable to compile it. I have investigated it a little and found out that if I decompile a theme and then compile it back without ANY change, it gives the following error:
Code:
[email protected]:~/Desktop$ apktool b xres
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL2420487276909255487.tmp, -x, -I, /home/chris/apktool/framework/1.apk, -S, /home/chris/Desktop/xres/res, -M, /home/chris/Desktop/xres/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/APKTOOL2420487276909255487.tmp, -x, -I, /home/chris/apktool/framework/1.apk, -S, /home/chris/Desktop/xres/res, -M, /home/chris/Desktop/xres/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:87)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
Caused by: java.io.IOException: Cannot run program "aapt": java.io.IOException: error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
at java.lang.Runtime.exec(Runtime.java:593)
at java.lang.Runtime.exec(Runtime.java:466)
at brut.util.OS.exec(OS.java:78)
... 7 more
Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.<init>(UNIXProcess.java:148)
at java.lang.ProcessImpl.start(ProcessImpl.java:65)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
... 10 more
Can you help please?!
Click to expand...
Click to collapse
i have the same issue, have you fixed it??
Make sure you have the necessary framework installed using the "apktool if framework.apk" command (where framework.apk is the name of the framework APK).
SifJar said:
Make sure you have the necessary framework installed using the "apktool if framework.apk" command (where framework.apk is the name of the framework APK).
Click to expand...
Click to collapse
I am not trying to modify any system app. i want to modify an like Go SMS and when i try to compile it, it throws error
janeindiran said:
I am not trying to modify any system app. i want to modify an like Go SMS and when i try to compile it, it throws error
Click to expand...
Click to collapse
Hmm, that's strange. Have you tried other apps? Also make sure you have JDK and Android SDK etc. all installed.
SifJar said:
Hmm, that's strange. Have you tried other apps? Also make sure you have JDK and Android SDK etc. all installed.
Click to expand...
Click to collapse
Ya. Updating SDK hope it works.
The above error shows that "aapt" could not be run. This is a tool from the Android SDK. If you have the SDK installed, open a command prompt/terminal and try typing "aapt". If it doesn't work, this is the problem. Most likely an issue with your PATH environment variable. This is assuming you are getting the exact same error as the one you quoted and said you got the same error. If not, please post the EXACT output from apktool when you try and build an APK to help identify the issue.
How to decompile com.htc.resources.apk
I want to decompile com.htc.resources.apk and I am related it to framework.apk .but if I compile it then the error is coming.
The all information is below:
I: Building resources...
invalid resource directory name: E:\Android\Apk Manager\other\..\projects\com.htc.resources.apk\res/values-w1dp-mdpi
invalid resource directory name: E:\Android\Apk Manager\other\..\projects\com.htc.resources.apk\res/values-w2dp-mdpi
invalid resource directory name: E:\Android\Apk Manager\other\..\projects\com.htc.resources.apk\res/values-w4dp-mdpi
invalid resource directory name: E:\Android\Apk Manager\other\..\projects\com.htc.resources.apk\res/values-w5dp-mdpi
invalid resource directory name: E:\Android\Apk Manager\other\..\projects\com.htc.resources.apk\res/values-zh-rCN-w1dp-mdpi
invalid resource directory name: E:\Android\Apk Manager\other\..\projects\com.htc.resources.apk\res/values-zh-rCN-w2dp-mdpi
invalid resource directory name: E:\Android\Apk Manager\other\..\projects\com.htc.resources.apk\res/values-zh-rCN-w4dp-mdpi
invalid resource directory name: E:\Android\Apk Manager\other\..\projects\com.htc.resources.apk\res/values-zh-rCN-w5dp-mdpi
invalid resource directory name: E:\Android\Apk Manager\other\..\projects\com.htc.resources.apk\res/values-zh-rTW-w1dp-mdpi
invalid resource directory name: E:\Android\Apk Manager\other\..\projects\com.htc.resources.apk\res/values-zh-rTW-w2dp-mdpi
invalid resource directory name: E:\Android\Apk Manager\other\..\projects\com.htc.resources.apk\res/values-zh-rTW-w4dp-mdpi
invalid resource directory name: E:\Android\Apk Manager\other\..\projects\com.htc.resources.apk\res/values-zh-rTW-w5dp-mdpi
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\lenovo\AppData\Local\Temp\APKTOOL8394420027419036969.tmp, -x, -I, C:\Users\lenovo\apktool\framework\1.apk, -S, E:\Android\Apk Manager\other\..\projects\com.htc.resources.apk\res, -M, E:\Android\Apk Manager\other\..\projects\com.htc.resources.apk\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, C:\Users\lenovo\AppData\Local\Temp\APKTOOL8394420027419036969.tmp, -x, -I, C:\Users\lenovo\apktool\framework\1.apk, -S, E:\Android\Apk Manager\other\..\projects\com.htc.resources.apk\res, -M, E:\Android\Apk Manager\other\..\projects\com.htc.resources.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
Can you help me?
Sorry for my poor English.
Similar issue
I am having similar issues. I can decompile everything just fine, I just cannot recompile anything. I tried with both apktool and xdaautotool. I have the jre, jdk, sdk all installed. The directory for the jdk and jre are set too so that isn't the issue. My adb commands work so I think the sdk works too. I have no clue what is up here. Here is my error from xdaautotool because i can't pull the error from the terminal (no clue how to copy from the terminal)
Code:
Recompiling LatinIME.apk...
I: Smaling...
I: Building resources...
invalid resource directory name: C:\xdaAutoTool_V4.0.3\_INPUT_APK\LatinIME\res/drawable-xhdpi
invalid resource directory name: C:\xdaAutoTool_V4.0.3\_INPUT_APK\LatinIME\res/mipmap-480dpi
invalid resource directory name: C:\xdaAutoTool_V4.0.3\_INPUT_APK\LatinIME\res/mipmap-hdpi
invalid resource directory name: C:\xdaAutoTool_V4.0.3\_INPUT_APK\LatinIME\res/mipmap-mdpi
invalid resource directory name: C:\xdaAutoTool_V4.0.3\_INPUT_APK\LatinIME\res/mipmap-xhdpi
invalid resource directory name: C:\xdaAutoTool_V4.0.3\_INPUT_APK\LatinIME\res/values-sw600dp
invalid resource directory name: C:\xdaAutoTool_V4.0.3\_INPUT_APK\LatinIME\res/values-sw600dp-land
invalid resource directory name: C:\xdaAutoTool_V4.0.3\_INPUT_APK\LatinIME\res/values-sw768dp
invalid resource directory name: C:\xdaAutoTool_V4.0.3\_INPUT_APK\LatinIME\res/values-sw768dp-land
invalid resource directory name: C:\xdaAutoTool_V4.0.3\_INPUT_APK\LatinIME\res/xml-sw600dp
invalid resource directory name: C:\xdaAutoTool_V4.0.3\_INPUT_APK\LatinIME\res/xml-sw600dp-land
invalid resource directory name: C:\xdaAutoTool_V4.0.3\_INPUT_APK\LatinIME\res/xml-sw768dp
invalid resource directory name: C:\xdaAutoTool_V4.0.3\_INPUT_APK\LatinIME\res/xml-sw768dp-land
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\ALESSA~1\AppData\Local\Temp\APKTOOL767021605952811925.tmp, -I, C:\Users\Alessandro Eppacher\apktool\framework\1.apk, -S, C:\xdaAutoTool_V4.0.3\_INPUT_APK\LatinIME\res, -M, C:\xdaAutoTool_V4.0.3\_INPUT_APK\LatinIME\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, C:\Users\ALESSA~1\AppData\Local\Temp\APKTOOL767021605952811925.tmp, -I, C:\Users\Alessandro Eppacher\apktool\framework\1.apk, -S, C:\xdaAutoTool_V4.0.3\_INPUT_APK\LatinIME\res, -M, C:\xdaAutoTool_V4.0.3\_INPUT_APK\LatinIME\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
DONE!
I would recommend copying aapt.exe to a directory that's in your system path, like C:\Windows, which would bear no harm (in a clean system of course). You can find aapt.exe in the Android SDK, or in the x-APKTool package. I was having those errors, but then doing that fixed it for me.
It's very easy to fix Add C:\Program Files (x86)\Android\android-sdk\platform-tools to PATH env
Or the directory path where you have aapt.exe to PATH
mastfun said:
It's very easy to fix Add C:\Program Files (x86)\Android\android-sdk\platform-tools to PATH env
Or the directory path where you have aapt.exe to PATH
Click to expand...
Click to collapse
sorry but how .. i have the same prob ?
I've got this exact same problem and it's driving me nuts. I've added every possible path to the environment variables. Still getting a lot of these types of errors. Using latest apk tool.....
Related
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.
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.
I had been looking before for the same thread I created, but I hadn't found so I created this one. I want to mod some apps for my Jelly Sandwich ROM. Decompiling goes well, but recompiling - error!
This what I exactly do:
apktool if framework-res.apk (success)
apktool d SystemUI.apk (success)
apktool b SystemUI.apk (error)
This is what I get after recompiling command:
Code:
I: Checking whether sources has changed...
I: Smaling...
Exception in thread "main" brut.androlib.AndrolibException: Could not write dex
to file: SystemUI\build\apk\classes.dex
at brut.androlib.src.DexFileBuilder.writeTo(DexFileBuilder.java:61)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:50)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:35)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:222)
at brut.androlib.Androlib.buildSources(Androlib.java:179)
at brut.androlib.Androlib.build(Androlib.java:170)
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: java.io.FileNotFoundException: SystemUI\build\apk\classes.dex (Odmowa
dostŕpu)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at brut.androlib.src.DexFileBuilder.writeTo(DexFileBuilder.java:57)
... 8 more
Even without changing anything, apktool doesn't recompile my apk.
I have tried to recompile on two PCs - both of them have latest Java software installed.
-----------------EDIT------------------------
I got something like that once also:
Code:
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: C:\Users\JA\Desktop\apktool\SystemUI\res/drawab
le-sw600dp-hdpi
invalid resource directory name: C:\Users\JA\Desktop\apktool\SystemUI\res/layout
-sw600dp
invalid resource directory name: C:\Users\JA\Desktop\apktool\SystemUI\res/values
-sw600dp
invalid resource directory name: C:\Users\JA\Desktop\apktool\SystemUI\res/values
-sw600dp-port
invalid resource directory name: C:\Users\JA\Desktop\apktool\SystemUI\res/values
-sw720dp
invalid resource directory name: C:\Users\JA\Desktop\apktool\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\JA\AppData\Local\Temp\APKT
OOL5816768975862364769.tmp, -I, C:\Users\JA\apktool\framework\1.apk, -S, C:\User
s\JA\Desktop\apktool\SystemUI\res, -M, C:\Users\JA\Desktop\apktool\SystemUI\Andr
oidManifest.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\JA\AppData\Local\Temp\APKTOOL5816768975862364769.tmp, -I, C:\Users\JA\apkto
ol\framework\1.apk, -S, C:\Users\JA\Desktop\apktool\SystemUI\res, -M, C:\Users\J
A\Desktop\apktool\SystemUI\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more
Re:Error
Getting same error :crying: how u solved it...pls help me
maxio1998 said:
I had been looking before for the same thread I created, but I hadn't found so I created this one. I want to mod some apps for my Jelly Sandwich ROM. Decompiling goes well, but recompiling - error!
This what I exactly do:
apktool if framework-res.apk (success)
apktool d SystemUI.apk (success)
apktool b SystemUI.apk (error)
This is what I get after recompiling command:
Code:
I: Checking whether sources has changed...
I: Smaling...
Exception in thread "main" brut.androlib.AndrolibException: Could not write dex
to file: SystemUI\build\apk\classes.dex
at brut.androlib.src.DexFileBuilder.writeTo(DexFileBuilder.java:61)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:50)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:35)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:222)
at brut.androlib.Androlib.buildSources(Androlib.java:179)
at brut.androlib.Androlib.build(Androlib.java:170)
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: java.io.FileNotFoundException: SystemUI\build\apk\classes.dex (Odmowa
dostŕpu)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at brut.androlib.src.DexFileBuilder.writeTo(DexFileBuilder.java:57)
... 8 more
Even without changing anything, apktool doesn't recompile my apk.
I have tried to recompile on two PCs - both of them have latest Java software installed.
-----------------EDIT------------------------
I got something like that once also:
Code:
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: C:\Users\JA\Desktop\apktool\SystemUI\res/drawab
le-sw600dp-hdpi
invalid resource directory name: C:\Users\JA\Desktop\apktool\SystemUI\res/layout
-sw600dp
invalid resource directory name: C:\Users\JA\Desktop\apktool\SystemUI\res/values
-sw600dp
invalid resource directory name: C:\Users\JA\Desktop\apktool\SystemUI\res/values
-sw600dp-port
invalid resource directory name: C:\Users\JA\Desktop\apktool\SystemUI\res/values
-sw720dp
invalid resource directory name: C:\Users\JA\Desktop\apktool\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\JA\AppData\Local\Temp\APKT
OOL5816768975862364769.tmp, -I, C:\Users\JA\apktool\framework\1.apk, -S, C:\User
s\JA\Desktop\apktool\SystemUI\res, -M, C:\Users\JA\Desktop\apktool\SystemUI\Andr
oidManifest.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\JA\AppData\Local\Temp\APKTOOL5816768975862364769.tmp, -I, C:\Users\JA\apkto
ol\framework\1.apk, -S, C:\Users\JA\Desktop\apktool\SystemUI\res, -M, C:\Users\J
A\Desktop\apktool\SystemUI\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more
Click to expand...
Click to collapse
Try to install other resource apk or change the apktool version
Firstly, Make sure you have aapt in your path.
Secondly, Find out are there any other resource apk in directory system/framework, if exist, install them using:
"apktool if system/framework/SemcGenericUxpRes.apk" for example.
If still does not work, try to change the version of apktool. The newest is 1.5.2, but version 1.4.1 seems to work well.
maxio1998 said:
I had been looking before for the same thread I created, but I hadn't found so I created this one. I want to mod some apps for my Jelly Sandwich ROM. Decompiling goes well, but recompiling - error!
This what I exactly do:
apktool if framework-res.apk (success)
apktool d SystemUI.apk (success)
apktool b SystemUI.apk (error)
This is what I get after recompiling command:
Code:
I: Checking whether sources has changed...
I: Smaling...
Exception in thread "main" brut.androlib.AndrolibException: Could not write dex
to file: SystemUI\build\apk\classes.dex
at brut.androlib.src.DexFileBuilder.writeTo(DexFileBuilder.java:61)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:50)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:35)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:222)
at brut.androlib.Androlib.buildSources(Androlib.java:179)
at brut.androlib.Androlib.build(Androlib.java:170)
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: java.io.FileNotFoundException: SystemUI\build\apk\classes.dex (Odmowa
dostŕpu)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at brut.androlib.src.DexFileBuilder.writeTo(DexFileBuilder.java:57)
... 8 more
Even without changing anything, apktool doesn't recompile my apk.
I have tried to recompile on two PCs - both of them have latest Java software installed.
-----------------EDIT------------------------
I got something like that once also:
Code:
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: C:\Users\JA\Desktop\apktool\SystemUI\res/drawab
le-sw600dp-hdpi
invalid resource directory name: C:\Users\JA\Desktop\apktool\SystemUI\res/layout
-sw600dp
invalid resource directory name: C:\Users\JA\Desktop\apktool\SystemUI\res/values
-sw600dp
invalid resource directory name: C:\Users\JA\Desktop\apktool\SystemUI\res/values
-sw600dp-port
invalid resource directory name: C:\Users\JA\Desktop\apktool\SystemUI\res/values
-sw720dp
invalid resource directory name: C:\Users\JA\Desktop\apktool\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\JA\AppData\Local\Temp\APKT
OOL5816768975862364769.tmp, -I, C:\Users\JA\apktool\framework\1.apk, -S, C:\User
s\JA\Desktop\apktool\SystemUI\res, -M, C:\Users\JA\Desktop\apktool\SystemUI\Andr
oidManifest.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\JA\AppData\Local\Temp\APKTOOL5816768975862364769.tmp, -I, C:\Users\JA\apkto
ol\framework\1.apk, -S, C:\Users\JA\Desktop\apktool\SystemUI\res, -M, C:\Users\J
A\Desktop\apktool\SystemUI\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more
Click to expand...
Click to collapse
abanduan said:
Secondly, Find out are there any other resource apk in directory system/framework, if exist, install them using:
"apktool if system/framework/SemcGenericUxpRes.apk" for example.
Click to expand...
Click to collapse
+1
...Sent from Zed
i am also having alot of Errors :/
installing framework is good
decompiling also good
recompiling just dusnt happen
Hi.
I need help.. When I try recompile SystemUI.apk I get this error:
Code:
C:\android\apk tool>apktool b test SystemUI1.apk
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: C:\android\apk tool\test\res/drawable-sw600dp-hdpi
invalid resource directory name: C:\android\apk tool\test\res/drawable-sw720dp-hdpi
invalid resource directory name: C:\android\apk tool\test\res/layout-sw600dp
invalid resource directory name: C:\android\apk tool\test\res/values-sw600dp
invalid resource directory name: C:\android\apk tool\test\res/values-sw600dp-port
invalid resource directory name: C:\android\apk tool\test\res/values-sw720dp
invalid resource directory name: C:\android\apk tool\test\res/values-sw720dp-port
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Martin\AppData\Local\Temp\APKTOOL377918059572126641.tmp, -I, C:\Users\Martin\apktool\framework\1.apk, -S, C:\android\apk tool\test\res, -M, C:\androi
d\apk tool\test\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, C:\Users\Martin\AppData\Local\Temp\APKTOOL377918059572126641.tmp, -I, C:\Users\Martin\apktool\framework\1.apk, -S, C:\android\apk tool\test\res, -M, C:\android\apk tool\test\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
Thanks for advices
At a guess, it looks like you haven't installed any resource files. And you might be using an old version of apktool.
Try Tickle My Android..
Sent from my SK17i using xda premium
Ticklefish said:
At a guess, it looks like you haven't installed any resource files. And you might be using an old version of apktool.
Try Tickle My Android..
Sent from my SK17i using xda premium
Click to expand...
Click to collapse
Thanks. And how i install resource files?
Sent from my U8800 using xda app-developers app
You need update the "aapt". You can download lastest aapt at the attachments. Replace this file with your aapt.exe file
forumber2 said:
You need update the "aapt". You can download lastest aapt at the attachments. Replace this file with your aapt.exe file
Click to expand...
Click to collapse
Thanks. But I got new error :crying:
Code:
C:\android\apktool>apktool b test new.apk
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
res\drawable-hdpi\status_bar_close_on.png:0: error: Resource entry status_bar_close_on is already defined.
res\drawable-hdpi\status_bar_close_on.9.png:0: Originally defined here.
res\drawable-hdpi\status_bar_hr.png:0: error: Resource entry status_bar_hr is already defined.
res\drawable-hdpi\status_bar_hr.9.png:0: Originally defined here.
C:\android\apktool\test\res\layout\status_bar_expanded.xml:12: error: Error: No resource found that matches the given name (at 'background' with value '@drawable/notification_header_bg2').
C:\android\apktool\test\res\layout\status_bar_expanded.xml:13: error: Error: No resource found that matches the given name (at 'background' with value '@drawable/notification_header_bg2').
C:\android\apktool\test\res\layout\status_bar_expanded.xml:13: error: Error: No resource found that matches the given name (at 'minHeight' with value '@dimen/notification_panel_widget_height').
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Martin\AppData\Local\Temp\APKTOOL5457996143886151145.tmp, -I, C:\Users\Martin\apktool\framework\1.apk, -S, C:\android\apktool\test\res, -M, C:\androi
d\apktool\test\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, C:\Users\Martin\AppData\Local\Temp\APKTOOL5457996143886151145.tmp, -I, C:\Users\Martin\apktool\framework\1.apk, -S, C:\android\apktool\test\res, -M, C:\android\apktool\test\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
My money is on old version .
Sent from my HTC One X using xda premium
S.a.M.e.R_d said:
My money is on old version .
Sent from my HTC One X using xda premium
Click to expand...
Click to collapse
My money is on somebody taking a shortcut when doing some modding on this apk.
It's complaining that there are duplicate png's in the apk. Two of these will need to be deleted before you try and recompile. Which two depends on the images themselves. Have a look at them and delete the two you don't want.
There's also an error that says you're missing an image file called notification_header_bg and you're missing a dimension. Sort all this out and you should be able to recompile without any problems.
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