Can' t recompiling framework-res - Android Q&A, Help & Troubleshooting

Hi, I searched all internet, but I still don't know why I can't recompile my framework-res.apk
I can decompile it, but only via newest APKTool, other ways getting error.
And recompiling ... I just tried decompile and recompile it, do nothing and it don't work.... I want change language in my phone to polish, it is Kiphone 5s, phone is great, but I can't recompile my translated xml file, because it don' work. It doesn't matter if I use changed files or stock files. Please help me with this.
My log, tried recompiling stock decompiled files ...
[*] framework-res folder
recompiling framework-res.apk...
W: Could not find sources
I: Building resources...
invalid resource directory name: C:\Users\Adrian\Desktop\xdaAutoAPKTool_V4.0.0\_INPUT_APK\framework-res\res/drawable-ldrtl-hdpi
invalid resource directory name: C:\Users\Adrian\Desktop\xdaAutoAPKTool_V4.0.0\_INPUT_APK\framework-res\res/mipmap-xxhdpi
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Adrian\AppData\Local\Temp\APKTOOL1644207117153092899.tmp, -x, -S, C:\Users\Adrian\Desktop\xdaAutoAPKTool_V4.0.0\_INPUT_APK\framework-res\res, -M, C:\Users\Adrian\Desktop\xdaAutoAPKTool_V4.0.0\_INPUT_APK\framework-res\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\Adrian\AppData\Local\Temp\APKTOOL1644207117153092899.tmp, -x, -S, C:\Users\Adrian\Desktop\xdaAutoAPKTool_V4.0.0\_INPUT_APK\framework-res\res, -M, C:\Users\Adrian\Desktop\xdaAutoAPKTool_V4.0.0\_INPUT_APK\framework-res\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
Nie moľna odnale«† dysku.

@Amcio
Try to use the GUI APK Tool for decompiling/recompiling APKs

@eduds
Hi, much thanks for reply, but it still not work ... Are yo have any ideas ? Maybe I will send you file ?
It is log:
2013-12-21
17:31:02,45
Decompiling..
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources: spec=0x01080301 drawable/ic_ab_back_holo_dark, config=-hdpi
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:65)
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:58)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:197)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:166)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:131)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:106)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:83)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:390)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:56)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:48)
at brut.androlib.Androlib.getResTable(Androlib.java:48)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:166)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:99)
at brut.apktool.Main.cmdDecode(Main.java:131)
at brut.apktool.Main.main(Main.java:68)

@Amcio
Try to decompile and recompile right after, without change anything.
Sent from my GT-I9070 using XDA Premium 4 mobile app

Related

Apktool can't compile unchanged app

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.....

Compiling problem :(

I get this error when trying to recompile:
Code:
F:\apktoolv2>apktool b working/ClockPackage built/ClockPackage
I: Checking whether sources has changed...
I: Smaling...
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, D:\Users\Matt\AppData\Local\Temp\APKTOOL6725272433658742721.tmp, -I, D:\Users\Matt\apktool\framework\1.apk, -I, D:\
Users\Matt\apktool\framework\2.apk, -S, F:\apktoolv2\working\ClockPackage\res, -M, F:\apktoolv2\working\ClockPackage\And
roidManifest.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, D:\Users\Matt\AppData\Local\Temp\APKTOOL6725
272433658742721.tmp, -I, D:\Users\Matt\apktool\framework\1.apk, -I, D:\Users\Matt\apktool\framework\2.apk, -S, F:\apktoo
lv2\working\ClockPackage\res, -M, F:\apktoolv2\working\ClockPackage\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": CreateProcess error=2, The system cannot find the file specif
ied
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at brut.util.OS.exec(OS.java:78)
... 7 more
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 11 more
I'm using the same tool I've used before to decompile adn recompile and all I've done is change ONE colour value in the values/color.xml
Is there any way to just compile that xml to I can use it with VRT?
What I do when some nasty error pops up while re-compiling.
Open the apk in winRAR, go to folder where you have modified a perticular file (ex: your file), paste it there. Winrar will do everything and no need to sign also.
Well there is no guarantee That this method should work 'always'.
Sent from my GT-I9300
I need to use the XML file in a theme, though. So, does it not need to be compiled first?
Kryten2k35 said:
I need to use the XML file in a theme, though. So, does it not need to be compiled first?
Click to expand...
Click to collapse
Yea, just realised the method I gave doesn't work with xml's.
EDIT: Which tool are you using?? Apktool??
I suggests you use apkmanager. . It'll generate a readable log in the form of an text file.
OK.. never mind. You fixed it yourself.
Sent from my GT-I9300
http://forum.xda-developers.com/showthread.php?t=1558171
The ICS apktool here seems to work.
Rather odd. But it's building now. Hopefully this is it.
DELETED
Ok
I got the file to compile and build.
Now I can't find the values/color.xml file. Is it actually resources.arsc?

APKTOOL - recompiling Xperia arc S's SystemUI error

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

Need help with recompiling SystemUI

Hi guys i've problem with recompiling system apk using apktool. I want to remove battery percentage and i succed to decompile sytemui.apk and then i edited status_bar.xml. But when i want to recompiling, i get this error message
C:\apktool>apktool b sytemui SytemUI-new.apk
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: C:\apktool\sytemui\res/drawable-sw600dp-hdpi
invalid resource directory name: C:\apktool\sytemui\res/layout-sw600dp
invalid resource directory name: C:\apktool\sytemui\res/values-sw600dp
invalid resource directory name: C:\apktool\sytemui\res/values-sw600dp-port
invalid resource directory name: C:\apktool\sytemui\res/values-sw720dp
invalid resource directory name: C:\apktool\sytemui\res/values-sw720dp-port
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\MUHAMM~1\AppData\Local\Tem
p\APKTOOL5827614113126593031.tmp, -I, C:\Users\Muhammad Khusnul\apktool\framewor
k\1.apk, -S, C:\apktool\sytemui\res, -M, C:\apktool\sytemui\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\MUHAMM~1\AppData\Local\Temp\APKTOOL5827614113126593031.tmp, -I, C:\Users\Mu
hammad Khusnul\apktool\framework\1.apk, -S, C:\apktool\sytemui\res, -M, C:\apkto
ol\sytemui\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
Could someone help me please how to solve this problem ? or could someone remove battery percentage from my systemui, please?
Its system not sytem.
Sent from my Xperia S
Yes the spelling is wrong... And use new aapt and apktool...
Sent from my LT22i using Tapatalk 2
shmoejoe said:
Its system not sytem.
Sent from my Xperia S
Click to expand...
Click to collapse
I know it should be systemui. But "sytemui" is the folder name that contain decompiled SystemUI
techno-np said:
Yes the spelling is wrong... And use new aapt and apktool...
Sent from my LT22i using Tapatalk 2
Click to expand...
Click to collapse
Could you give me the link, please?
Sent from my ST25i using xda app-developers app

[Q] Decompile SemcPhone.apk

Hey guys,
can anyone try decompiling SemcPhone.apk with apktool or any other tool then recompile ? If it works, please send the me appropriate aapt and apktool Ive been trying for ages but I keep getting silly errors due to '/' and '\' both appearing in address of 4 folders I tried deleting them to compile but then, I lose dialler functionality in apk :/
And I know its been done before so Im just wondering how the compiling was done I tried quite a few versions of aapt and all and so far, nothing worked Let me know at the earliest if you get it working cause I really want to decompile that apk :fingers-crossed:
Thanks in Advance
Cheers
I've had exact same this issue for a loong time. I've tried versions apktool and apkmanager. Any framework dependant apk ( SystemUI works fine I think ).
After decompiling, and trying to recompile, those same 4 directory name problems occur. Latest try is apktool 1.5.1. If anyone can help solve this, please post. Neectron may be able to help.
Even Im hoping someone will come up with a solution soon Its definitely possible because a friend of mine did compile SemcPhone for my rom but I didnt come across this error till after he left So Im in the lurch as well
Lets hope for the best And thanks for bumping the topic
Cheers
Can you copy and paste the error here?.I'll take a look.
This is what I had. Not sure if it's the same as Min3r
Code:
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: C:\AndroidRomCooking\apkmanager\other\..\projects\SemcPhone_orig.apk\res/values-mcc454-mnc1000
invalid resource directory name: C:\AndroidRomCooking\apkmanager\other\..\projects\SemcPhone_orig.apk\res/values-mcc454-mnc1000-zh-rCN
invalid resource directory name: C:\AndroidRomCooking\apkmanager\other\..\projects\SemcPhone_orig.apk\res/values-mcc454-mnc1000-zh-rHK
invalid resource directory name: C:\AndroidRomCooking\apkmanager\other\..\projects\SemcPhone_orig.apk\res/values-mcc454-mnc1000-zh-rTW
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\SURAJK~1\AppData\Local\Temp\APKTOOL1654663731666785591.tmp, -I, C:\Users\Surajkumar\apktool\framework\1.apk, -I, C:\Users\Surajkumar\apktool\framework\2.apk, -S, C:\AndroidRomCooking\apkmanager\other\..\projects\SemcPhone_orig.apk\res, -M, C:\AndroidRomCooking\apkmanager\other\..\projects\SemcPhone_orig.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\SURAJK~1\AppData\Local\Temp\APKTOOL1654663731666785591.tmp, -I, C:\Users\Surajkumar\apktool\framework\1.apk, -I, C:\Users\Surajkumar\apktool\framework\2.apk, -S, C:\AndroidRomCooking\apkmanager\other\..\projects\SemcPhone_orig.apk\res, -M, C:\AndroidRomCooking\apkmanager\other\..\projects\SemcPhone_orig.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
Delete those folders and try?
Exact same error I get Google Search said the issue was due to outdated aapt but I tried pretty much every aapt I could find and no luck I then deleted the file and after a few Plurals.xml fixes, I got it to compile but the apk will be corrupt and create FCs when you try to make/receive calls
Hope we can finally be able to compile that darn file soon
Hey neectron, do you know where the index of folders.etc is ? There has to be an xml file which contains list of values folders right ? I think it might be a syntax or formatting error there causing the issue. Unfortunately, I dont know the apk file structure so well so I cant do it myself
Min3r said:
Hey neectron, do you know where the index of folders.etc is ? There has to be an xml file which contains list of values folders right ? I think it might be a syntax or formatting error there causing the issue. Unfortunately, I dont know the apk file structure so well so I cant do it myself
Click to expand...
Click to collapse
I think AndroidManifest.xml manages that,but there won't be any index.
The mcc454-mnc1000 etc.are used to support different carriers.
Google AndroidManifest you will get clearer explanation.
same problem.Any ideia?
Install additional framework files
Sent from my ST25i using xda app-developers app
I can perfectly do this!
Andrewasth said:
Install additional framework files
Sent from my ST25i using xda app-developers app
Click to expand...
Click to collapse
which ones and how?
I only managed to install framework-res.apk
Me‎ said:
which ones and how?
I only managed to install framework-res.apk
Click to expand...
Click to collapse
systemui and semcgeneric one from the framework folder
same way
apktool if xxx.apk
bonjour j'ai un soucis , impossible de compiler SemcPhone.apk
j'ai des erreurs alors que j'ai apporté trois petite modifications et si je ne modifie rien ca me marque les mêmes erreur
Code:
C:\apktool>apktool d SemcPhone.apk SemcPhone
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Dada\apktool\framework\1.apk
I: Loaded.
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Loading resource table from file: C:\Users\Dada\apktool\framework\2.apk
I: Loaded.
I: Done.
I: Copying assets and libs...
C:\apktool>apktool b SemcPhone
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: C:\apktool\SemcPhone\res/values-mcc454-mnc-1
invalid resource directory name: C:\apktool\SemcPhone\res/values-mcc454-mnc-1-zh
-rCN
invalid resource directory name: C:\apktool\SemcPhone\res/values-mcc454-mnc-1-zh
-rHK
invalid resource directory name: C:\apktool\SemcPhone\res/values-mcc454-mnc-1-zh
-rTW
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec command: [aapt, p, --min-
sdk-version, 19, --target-sdk-version, 19, -F, C:\Users\Dada\AppData\Local\Temp\
APKTOOL937899277147708100.tmp, -I, C:\Users\Dada\apktool\framework\1.apk, -I, C:
\Users\Dada\apktool\framework\2.apk, -S, C:\apktool\SemcPhone\res, -M, C:\apktoo
l\SemcPhone\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:355)
at brut.androlib.Androlib.buildResources(Androlib.java:280)
at brut.androlib.Androlib.build(Androlib.java:203)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:214)
at brut.apktool.Main.main(Main.java:74)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not
exec command: [aapt, p, --min-sdk-version, 19, --target-sdk-version, 19, -F, C:
\Users\Dada\AppData\Local\Temp\APKTOOL937899277147708100.tmp, -I, C:\Users\Dada\
apktool\framework\1.apk, -I, C:\Users\Dada\apktool\framework\2.apk, -S, C:\apkto
ol\SemcPhone\res, -M, C:\apktool\SemcPhone\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:335)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:333)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sd
k-version, 19, --target-sdk-version, 19, -F, C:\Users\Dada\AppData\Local\Temp\AP
KTOOL937899277147708100.tmp, -I, C:\Users\Dada\apktool\framework\1.apk, -I, C:\U
sers\Dada\apktool\framework\2.apk, -S, C:\apktool\SemcPhone\res, -M, C:\apktool\
SemcPhone\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:333)
... 6 more
HELP ME ¨PLEASE

Categories

Resources