How can i recompile framework-res.apk - Android

Hi
First i searched the forum about the problem i am having and non of the solutions worked with me.
I decompiled with apk manager 4.9 and made my changes and then recompiled but got alot of errors then i tried using apktool 1.4.1 and also the same problem happened i decompile without problems but the recompile is the problem.
here is what i get when i try to recompile:
Code:
Decompile:
C:\Users\DooM\Desktop\andvanced menu mode>java -jar apktool.jar d framework-res.
apk
I: Loading resource table...
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
-------------------
Compile
C:\Users\DooM\Desktop\andvanced menu mode>java -jar apktool.jar b framework-res
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\DooM\AppData\Local\Temp\AP
KTOOL2069251178817473438.tmp, -x, -S, C:\Users\DooM\Desktop\andvanced menu mode\
framework-res\res, -M, C:\Users\DooM\Desktop\andvanced menu mode\framework-res\A
ndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:174)
at brut.apktool.Main.main(Main.java:59)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\U
sers\DooM\AppData\Local\Temp\APKTOOL2069251178817473438.tmp, -x, -S, C:\Users\Do
oM\Desktop\andvanced menu mode\framework-res\res, -M, C:\Users\DooM\Desktop\andv
anced menu mode\framework-res\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:87)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more
Caused by: java.io.IOException: Cannot run program "aapt": CreateProcess error=2
, The system cannot find the file specified
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 th
e 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

Anyone can help?

Try to get rid of the spaces in the path. Move it to a folder directly under the c drive or another drive. It doesn't like spaces in the path really. This fixed a problem i was having.

Still getting the error

try finding aapt for windows that should fix ya

??? any news ???

I think the decompiler is not able to find the path to aapt.
Sent from my LG-P500 using XDA Premium App

wrong post...pls delete

Related

[HELP]Changing Icons

Guys! Can someone teach me how to change every icons in a stock rom. Including notification icons, system apps icons, and every other icons. Thanks!
Extract every app. Go to the drawable - mdpi folder. Search for the icon that appears in the app drawer (the name may differ on an app to app basis). Replace that icon.
Same for notification and other icons. They are present in systemui.apk, framework-res.apk, twframework.apk.
This is the simple way. But may give errors sometimes.
You can also decompile each apk to reduce some errors.
Do not replace .9.png files directly.
There's a tut by music.soul for that.
TeamCooper Developer
TheMyth Developer
shaaan said:
Extract every app. Go to the drawable - mdpi folder. Search for the icon that appears in the app drawer (the name may differ on an app to app basis). Replace that icon.
Same for notification and other icons. They are present in systemui.apk, framework-res.apk, twframework.apk.
This is the simple way. But may give errors sometimes.
You can also decompile each apk to reduce some errors.
Do not replace .9.png files directly.
There's a tut by music.soul for that.
TeamCooper Developer
TheMyth Developer
Click to expand...
Click to collapse
Thanks for that!
How do I extract those apps? Can I have the link for the tutorial of music.soul?
Huh..i just told you by pm?
Thanks Prawsome! I already extracted the rom and the apk. Can I just simply drag and drop and replace the png there? How do I compile this to flash in my phone?
kevin03 said:
Thanks Prawsome! I already extracted the rom and the apk. Can I just simply drag and drop and replace the png there? How do I compile this to flash in my phone?
Click to expand...
Click to collapse
You can just drag and drop ...
Its much simpler.
TeamCooper Developer
TheMyth Developer
shaaan said:
You can just drag and drop ...
Its much simpler.
TeamCooper Developer
TheMyth Developer
Click to expand...
Click to collapse
Ya,i already told that via PM
Thanks guys! I'll try theming first before I step up in creating roms.
Sent from my GT-S5830 using xda premium
I also like to know how to edit those
.9 png
Sent from my GT-S5830 using xda premium
kevin03 said:
I also like to know how to edit those
.9 png
Sent from my GT-S5830 using xda premium
Click to expand...
Click to collapse
Refer music.soul's tutorial,and see shen's tutorial in xdatv
What do I need to do here? How do I compile using apk multi tool?
Make sure you have adb from Android's SDK Tools
Ace-ing all tests.
EmoBoiix3 said:
Make sure you have adb from Android's SDK Tools
Ace-ing all tests.
Click to expand...
Click to collapse
Where can I get that? I have Android SDK installed.
Haha I always decompile and compile using root explorer, much quicker
Sent from my GT-S5830 using xda premium
kevin03 said:
Where can I get that? I have Android SDK installed.
Click to expand...
Click to collapse
Make sure ADB is set in your environment path
EmoBoiix3 said:
Make sure ADB is set in your environment path
Click to expand...
Click to collapse
Lol emo he is a newbie ..
Be more specific ...!!
You need to install Android sdk at the root of your main drive.
What i mean is if your windows is installed in c: drive, you need to install the sdk in c: too
TeamCooper Developer
TheMyth Developer
shaaan said:
Lol emo he is a newbie ..
Be more specific ...!!
You need to install Android sdk at the root of your main drive.
What i mean is if your windows is installed in c: drive, you need to install the sdk in c: too
TeamCooper Developer
TheMyth Developer
Click to expand...
Click to collapse
Oops :x
Ace-ing all tests.
Help. I got this error(s) while compiling.
Code:
--------------------------------------------------------------------------
|Bier 04/20/2012 -- 16:28:32.44|
--------------------------------------------------------------------------
--2012-04-20 16:28:32-- [url]http://update.apkmultitool.com/apkver.txt[/url]
Resolving update.apkmultitool.com (update.apkmultitool.com)... 199.59.62.20
Connecting to update.apkmultitool.com (update.apkmultitool.com)|199.59.62.20|:80
... connected.
HTTP request sent, awaiting response... 200 OK
Length: 152 [text/plain]
Saving to: `apkver.txt'
0K 100% 2.69M=0s
2012-04-20 16:28:36 (2.69 MB/s) - `apkver.txt' saved [152/152]
java version "1.7.0_03"
Java(TM) SE Runtime Environment (build 1.7.0_03-b05)
Java HotSpot(TM) 64-Bit Server VM (build 22.1-b02, mixed mode)
'""platform-tools"\adb.exe"' is not recognized as an internal or external comman
d,
operable program or batch file.
--------------------------------------------------------------------------
|Bier 04/20/2012 -- 16:29:32.33|
--------------------------------------------------------------------------
--2012-04-20 16:29:32-- [url]http://update.apkmultitool.com/apkver.txt[/url]
Resolving update.apkmultitool.com (update.apkmultitool.com)... 199.59.62.20
Connecting to update.apkmultitool.com (update.apkmultitool.com)|199.59.62.20|:80
... connected.
HTTP request sent, awaiting response... 200 OK
Length: 152 [text/plain]
Saving to: `apkver.txt'
0K 100% 2.15M=0s
2012-04-20 16:29:32 (2.15 MB/s) - `apkver.txt' saved [152/152]
A subdirectory or file projects already exists.
A subdirectory or file place-apk-here-for-modding already exists.
A subdirectory or file place-ogg-here already exists.
A subdirectory or file place-apk-here-to-batch-optimize already exists.
A subdirectory or file place-apk-here-for-signing already exists.
java version "1.7.0_03"
Java(TM) SE Runtime Environment (build 1.7.0_03-b05)
Java HotSpot(TM) 64-Bit Server VM (build 22.1-b02, mixed mode)
'""platform-tools"\adb.exe"' is not recognized as an internal or external comman
d,
operable program or batch file.
The system cannot find the path specified.
The system cannot find the path specified.
I: Baksmaling...
I: Loading resource table...
W: Skipping "android" package group
I: Loaded.
I: Loading resource table from file: C:\Users\KBJM\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
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.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\KBJM\AppData\Local\Temp\AP
KTOOL5321257451601952888.tmp, -I, C:\Users\KBJM\apktool\framework\1.apk, -S, C:\
Android\android-sdk\projects\Phone.apk\res, -M, C:\Android\android-sdk\projects\
Phone.apk\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\KBJM\AppData\Local\Temp\APKTOOL5321257451601952888.tmp, -I, C:\Users\KBJM\a
pktool\framework\1.apk, -S, C:\Android\android-sdk\projects\Phone.apk\res, -M, C
:\Android\android-sdk\projects\Phone.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:87)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more
Caused by: java.io.IOException: Cannot run program "aapt": CreateProcess error=2
, The system cannot find the file specified
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 th
e 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: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\KBJM\AppData\Local\Temp\AP
KTOOL3323233914729102421.tmp, -I, C:\Users\KBJM\apktool\framework\1.apk, -S, C:\
Android\android-sdk\projects\Phone.apk\res, -M, C:\Android\android-sdk\projects\
Phone.apk\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\KBJM\AppData\Local\Temp\APKTOOL3323233914729102421.tmp, -I, C:\Users\KBJM\a
pktool\framework\1.apk, -S, C:\Android\android-sdk\projects\Phone.apk\res, -M, C
:\Android\android-sdk\projects\Phone.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:87)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more
Caused by: java.io.IOException: Cannot run program "aapt": CreateProcess error=2
, The system cannot find the file specified
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 th
e 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: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\KBJM\AppData\Local\Temp\AP
KTOOL511263930702225055.tmp, -I, C:\Users\KBJM\apktool\framework\1.apk, -S, C:\A
ndroid\android-sdk\projects\Phone.apk\res, -M, C:\Android\android-sdk\projects\P
hone.apk\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\KBJM\AppData\Local\Temp\APKTOOL511263930702225055.tmp, -I, C:\Users\KBJM\ap
ktool\framework\1.apk, -S, C:\Android\android-sdk\projects\Phone.apk\res, -M, C:
\Android\android-sdk\projects\Phone.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:87)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more
Caused by: java.io.IOException: Cannot run program "aapt": CreateProcess error=2
, The system cannot find the file specified
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 th
e 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
--------------------------------------------------------------------------
|Bier 04/20/2012 -- 18:18:01.09|
--------------------------------------------------------------------------
--2012-04-20 18:18:01-- [url]http://update.apkmultitool.com/apkver.txt[/url]
Resolving update.apkmultitool.com (update.apkmultitool.com)... 199.59.62.20
Connecting to update.apkmultitool.com (update.apkmultitool.com)|199.59.62.20|:80
... connected.
HTTP request sent, awaiting response... 200 OK
Length: 152 [text/plain]
Saving to: `apkver.txt'
0K 100% 2.80M=0s
2012-04-20 18:18:03 (2.80 MB/s) - `apkver.txt' saved [152/152]
A subdirectory or file projects already exists.
A subdirectory or file place-apk-here-for-modding already exists.
A subdirectory or file place-ogg-here already exists.
A subdirectory or file place-apk-here-to-batch-optimize already exists.
A subdirectory or file place-apk-here-for-signing already exists.
java version "1.7.0_03"
Java(TM) SE Runtime Environment (build 1.7.0_03-b05)
Java HotSpot(TM) 64-Bit Server VM (build 22.1-b02, mixed mode)
'""platform-tools"\adb.exe"' is not recognized as an internal or external comman
d,
operable program or batch file.
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\KBJM\AppData\Local\Temp\AP
KTOOL990441015776411318.tmp, -I, C:\Users\KBJM\apktool\framework\1.apk, -S, C:\A
ndroid\android-sdk\projects\Phone.apk\res, -M, C:\Android\android-sdk\projects\P
hone.apk\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\KBJM\AppData\Local\Temp\APKTOOL990441015776411318.tmp, -I, C:\Users\KBJM\ap
ktool\framework\1.apk, -S, C:\Android\android-sdk\projects\Phone.apk\res, -M, C:
\Android\android-sdk\projects\Phone.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:87)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more
Caused by: java.io.IOException: Cannot run program "aapt": CreateProcess error=2
, The system cannot find the file specified
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 th
e 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
--------------------------------------------------------------------------
|Bier 04/20/2012 -- 19:28:23.79|
--------------------------------------------------------------------------
--2012-04-20 19:28:23-- [url]http://update.apkmultitool.com/apkver.txt[/url]
Resolving update.apkmultitool.com (update.apkmultitool.com)... 199.59.62.20
Connecting to update.apkmultitool.com (update.apkmultitool.com)|199.59.62.20|:80
... connected.
HTTP request sent, awaiting response... 200 OK
Length: 152 [text/plain]
Saving to: `apkver.txt'
0K 100% 3.53M=0s
2012-04-20 19:28:25 (3.53 MB/s) - `apkver.txt' saved [152/152]
A subdirectory or file projects already exists.
A subdirectory or file place-apk-here-for-modding already exists.
A subdirectory or file place-ogg-here already exists.
A subdirectory or file place-apk-here-to-batch-optimize already exists.
A subdirectory or file place-apk-here-for-signing already exists.
java version "1.7.0_03"
Java(TM) SE Runtime Environment (build 1.7.0_03-b05)
Java HotSpot(TM) 64-Bit Server VM (build 22.1-b02, mixed mode)
'""platform-tools"\adb.exe"' is not recognized as an internal or external comman
d,
operable program or batch file.
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\KBJM\AppData\Local\Temp\AP
KTOOL4248781643639054177.tmp, -I, C:\Users\KBJM\apktool\framework\1.apk, -S, C:\
Android\android-sdk\projects\Phone.apk\res, -M, C:\Android\android-sdk\projects\
Phone.apk\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\KBJM\AppData\Local\Temp\APKTOOL4248781643639054177.tmp, -I, C:\Users\KBJM\a
pktool\framework\1.apk, -S, C:\Android\android-sdk\projects\Phone.apk\res, -M, C
:\Android\android-sdk\projects\Phone.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:87)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more
Caused by: java.io.IOException: Cannot run program "aapt": CreateProcess error=2
, The system cannot find the file specified
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 th
e 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
Press any key to continue . . .
Need help here guys.
Sent from my GT-S5830 using xda premium
.....
EDIT: wrog thread XD

Please help!! Able to decompile ICS APK yet unable to Compile it back again!

Before everything else, don't even try to say to me that I need to research, because I searched and searched I even filled up my computer with a bunch of apktools and aapt and various decompilers, both Command line and with GUI, it's freaking me out! Please help.!!.
-----------------------------------------------------
[*] SystemUI.apk
-----------------------------------------------------
Recompiling SystemUI.apk folder...
I: Smaling...
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Vince\AppData\Local\Temp\APKTOOL9216640018277012755.tmp, -I, C:\Users\Vince\apktool\framework\1.apk, -S, C:\Users\Vince\Downloads\xdaAutoTool\_INPUT_APK\SystemUI\res, -M, C:\Users\Vince\Downloads\xdaAutoTool\_INPUT_APK\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, C:\Users\Vince\AppData\Local\Temp\APKTOOL9216640018277012755.tmp, -I, C:\Users\Vince\apktool\framework\1.apk, -S, C:\Users\Vince\Downloads\xdaAutoTool\_INPUT_APK\SystemUI\res, -M, C:\Users\Vince\Downloads\xdaAutoTool\_INPUT_APK\SystemUI\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 specified
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
Done!
deCompiling = APKTool 1.4.3
Compiling = Tried every version...
on another version of AAPT i get a freaking Invalid resource thingy says that some folders are invalid...

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

Can' t recompiling framework-res

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

Categories

Resources