Hi.
I modified xml file in the framework-res.apk.
I did : apktool d framework-res.apk
I modify the file xml , and build : apktool b framework-res framework-res_ok.apk
Here part of errors :
/sauv/home/franck/Desktop/xml/framework-res/res/values/public.xml:2135: error: Public symbol string/lockscreen_screen_locked declared here is not defined.
/sauv/home/franck/Desktop/xml/framework-res/res/values/public.xml:2134: error: Public symbol string/lockscreen_service_detached declared here is not defined.
/sauv/home/franck/Desktop/xml/framework-res/res/values/public.xml:2133: error: Public symbol string/lockscreen_service_disabled declared here is not defined.
/sauv/home/franck/Desktop/xml/framework-res/res/values/public.xml:2157: error: Public symbol string/lockscreen_sim_corporate_locked_message declared here is not defined.
/sauv/home/franck/Desktop/xml/framework-res/res/valuException in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL7805925130020059301.tmp, -x, -S, /sauv/home/franck/Desktop/xml/framework-res/res, -M, /sauv/home/franck/Desktop/xml/framework-res/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(Unknown Source)
at brut.androlib.Androlib.buildResourcesFull(Unknown Source)
at brut.androlib.Androlib.buildResources(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.apktool.Main.cmdBuild(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL7805925130020059301.tmp, -x, -S, /sauv/home/franck/Desktop/xml/framework-res/res, -M, /sauv/home/franck/Desktop/xml/framework-res/AndroidManifest.xml]
at brut.util.OS.exec(Unknown Source)
... 7 more
Thanks ( sorry for my bad English )
Solved Delete please
apk toll
you may change if you with apktool do not work normal bilder....
Best of all you push originalbilder again in apk and try it over again
franck1135 said:
Solved Delete please
Click to expand...
Click to collapse
How!!?
I have this problem too.
hello mate
could u tell us how did u find the way ??... i have the same problem... the images are not defined....
share with us your experience and guide us.... tx
I figured this out with help from the apk manager thread. The problem seems to be related to corrupt image resources in non-stock apks and the solution I found was to decompile a stock framework-res.apk file and copy the png files from "drawable-hdpi" into the one you are working on.
Keep in mind that I am own a Samsung Epic so my experience might not be the same as yours. I was trying to edit and recompile the framework-res.apk from srf 1.1 rom.
I put the framework-res files from the srf and stock roms, plus the required touchwiz framwork file in on dir and did the following...
Code:
C:\apkedit>apktool if framework-res-srf.apk
C:\apkedit>apktool if twframework-res.apk
C:\apkedit>apktool d framework-res-srf.apk
C:\apkedit>apktool d framework-res-stock.apk
C:\apkedit>copy /y framework-res-stock\res\drawable-hdpi\*.png framework-res-srf
\res\drawable-hdpi
C:\apkedit>apktool b framework-res-srf
The first build resulted in the following error....
Code:
res\drawable-hdpi\statusbar_background.png:0: error: Resource entry statusbar_ba
ckground is already defined.
res\drawable-hdpi\statusbar_background.9.png:0: Originally defined here.
I fixed it by deleting res\drawable-hdpi\statusbar_background.png...
Code:
C:\apkedit>del framework-res-srf\res\drawable-hdpi\statusbar_background.png
C:\apkedit>apktool b framework-res-srf
Success!!
I then took the resources.arsc from the .\framework-res-srf\build\apk directory and replaced the one in the original apk file and my phone booted and the replaced strings showed up.
Thanx pall...i shall try it... i thought that my problems where comes from some problem with the path of java...
Related
ok guys this is really pissing me off, i have been trying for a few days now to do a simple extended power menu mod, the problem is apktool. I have a galaxy i9000 and no matter what i edit in framework-res /values, it always comes up with a bunch of errors ending in :
....... declared here is not defined, it is not the mod i am adding in, it is perfectly fine, it just says for example:
"C:\Users\Webstar1\Desktop\apk manager\other\..\projects\framework-res.apk\res\values\public.xml:2612: error: Public symbol string/Reboot declared here is not defined."
it would be nice if i got some help, will also give a few thanks if it works.
You need to check what is at the top of the error list, as the 'not decleared' are just caused by something else. If it is something like .9 files, remove them before trying to recompile
l0st.prophet said:
You need to check what is at the top of the error list, as the 'not decleared' are just caused by something else. If it is something like .9 files, remove them before trying to recompile
Click to expand...
Click to collapse
OK I will report back in the morning , thanks for the reply.
Sent from my GT-I9000 using XDA App
some one please help. i have done every thing i can find, searched everywhere, and tried all the ways to decompile and compile i can find. i have been have this same thing happing. i just tried deleting the .9.png at the top but now im getting this error
c:\apps\framework-res\res\values\public.xml:2891: error: Public entry identifier
0x1080406 entry index is larger than available symbols (index 1030, total symbo
ls 1030).
c:\apps\framework-res\res\values\public.xml:2891: error: Public symbol drawable/
selected_day_background declared here is not defined.
c:\apps\framework-res\res\values\public.xml:3529: error: Public symbol drawable/
statusbar_background declared here is not defined.
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\Roscoe\AppData\Local\Temp\
APKTOOL7709919181824916577.tmp, -x, -0, arsc, -S, c:\apps\framework-res\res, -M,
c:\apps\framework-res\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(Unknown Source)
at brut.androlib.Androlib.buildResourcesFull(Unknown Source)
at brut.androlib.Androlib.buildResources(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.apktool.Main.cmdBuild(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\U
sers\Roscoe\AppData\Local\Temp\APKTOOL7709919181824916577.tmp, -x, -0, arsc, -S,
c:\apps\framework-res\res, -M, c:\apps\framework-res\AndroidManifest.xml]
at brut.util.OS.exec(Unknown Source)
... 7 more
c:\apps>
Don't delete the .9.pngs!!!
can somebody help me with APK Manager ?
decompiling is easy breasy, but when coming to compile the apk i get an error
took framework from something i cooked on UOT, then removed the music controls + toggle buttons..
Code:
--------------------------------------------------------------------------
|vr 08-07-2011 -- 21:41:37,18|
--------------------------------------------------------------------------
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode, sharing)
--------------------------------------------------------------------------
|vr 08-07-2011 -- 21:42:03,37|
--------------------------------------------------------------------------
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode, sharing)
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
C:\apk_manager_4.9\other\..\projects\framework-res.apk\res\layout\status_bar_expanded.xml:5: error: Error parsing XML: duplicate attribute
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Mjuksel\AppData\Local\Temp\APKTOOL4554741090717303056.tmp, -x, -S, C:\apk_manager_4.9\other\..\projects\framework-res.apk\res, -M, C:\apk_manager_4.9\other\..\projects\framework-res.apk\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(Unknown Source)
at brut.androlib.Androlib.buildResourcesFull(Unknown Source)
at brut.androlib.Androlib.buildResources(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.apktool.Main.cmdBuild(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Mjuksel\AppData\Local\Temp\APKTOOL4554741090717303056.tmp, -x, -S, C:\apk_manager_4.9\other\..\projects\framework-res.apk\res, -M, C:\apk_manager_4.9\other\..\projects\framework-res.apk\AndroidManifest.xml]
at brut.util.OS.exec(Unknown Source)
... 7 more
have this problem when trying to compile an app.apk and don't know y...
Sent from my Optimus 2X using XDA Premium App
you can´t compile already themed apk´s again (like UOT Kitchen files), after you decompiled them...
with an orig. apk compiling works !
i also tried with themed cyanbread from UOT, no way to compile again ...
original cyanbread works ...
this really sucks
here´s some info ...
Well somehow this wasnt the problem for me, i couldnt compile original apks either.
It works now however, very strange..
/close /exit
I am noob at theming but started off to explore things. Today I decompiled my framework-res.apk using apk-tool, then changed PNG images in folder 'drawable-mdpi', fine till here but when I try to recompile my framework-res.apk I get following errors, any idea?
Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.
C:\Windows>cd apk tool
C:\Windows\apk tool>apktool b framework-res
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
res\drawable-mdpi\status_bar_background.png:0: error: Resource entry status_bar_
background is already defined.
res\drawable-mdpi\status_bar_background.9.png:0: Originally defined here.
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\eyusawa\AppData\Local\Temp
\APKTOOL3098020830120440330.tmp, -x, -S, C:\Windows\apk tool\framework-res\res,
-M, C:\Windows\apk tool\framework-res\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\U
sers\eyusawa\AppData\Local\Temp\APKTOOL3098020830120440330.tmp, -x, -S, C:\Windo
ws\apk tool\framework-res\res, -M, C:\Windows\apk tool\framework-res\AndroidMani
fest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more
C:\Windows\apk tool>
Click to expand...
Click to collapse
If playing with ICS systems apks, make sure you decompile with apktool 1.4.2 and compile with apktoll 1.4.3
Compiling and decompiling errors will be solved by this.
Google "Modified apktool for ICS"
You will get links to download
hey guuys, i am using xdaAutoTool to customize the framework-res apk,,
i have installed the framework apk, and it decompiles perfectly fine,, i make my changes and if i recompile it comes up with this
-----------------------------------------------------
[*] Processing framework-res folder...
-----------------------------------------------------
Recompiling framework-res.apk...
W: Could not find sources
I: Building resources...
invalid resource directory name: C:\Users\winxuser\Desktop\xdaAutoTool_V4.0.3\_INPUT_APK\framework-res\res/animator
invalid resource directory name: C:\Users\winxuser\Desktop\xdaAutoTool_V4.0.3\_INPUT_APK\framework-res\res/drawable-sw600dp-mdpi
invalid resource directory name: C:\Users\winxuser\Desktop\xdaAutoTool_V4.0.3\_INPUT_APK\framework-res\res/interpolator
invalid resource directory name: C:\Users\winxuser\Desktop\xdaAutoTool_V4.0.3\_INPUT_APK\framework-res\res/layout-sw600dp
invalid resource directory name: C:\Users\winxuser\Desktop\xdaAutoTool_V4.0.3\_INPUT_APK\framework-res\res/layout-w600dp
invalid resource directory name: C:\Users\winxuser\Desktop\xdaAutoTool_V4.0.3\_INPUT_APK\framework-res\res/mipmap-hdpi
invalid resource directory name: C:\Users\winxuser\Desktop\xdaAutoTool_V4.0.3\_INPUT_APK\framework-res\res/mipmap-ldpi
invalid resource directory name: C:\Users\winxuser\Desktop\xdaAutoTool_V4.0.3\_INPUT_APK\framework-res\res/mipmap-mdpi
invalid resource directory name: C:\Users\winxuser\Desktop\xdaAutoTool_V4.0.3\_INPUT_APK\framework-res\res/mipmap-xhdpi
invalid resource directory name: C:\Users\winxuser\Desktop\xdaAutoTool_V4.0.3\_INPUT_APK\framework-res\res/values-h720dp
invalid resource directory name: C:\Users\winxuser\Desktop\xdaAutoTool_V4.0.3\_INPUT_APK\framework-res\res/values-sw600dp
invalid resource directory name: C:\Users\winxuser\Desktop\xdaAutoTool_V4.0.3\_INPUT_APK\framework-res\res/values-sw600dp-land
invalid resource directory name: C:\Users\winxuser\Desktop\xdaAutoTool_V4.0.3\_INPUT_APK\framework-res\res/values-sw600dp-w1024dp
invalid resource directory name: C:\Users\winxuser\Desktop\xdaAutoTool_V4.0.3\_INPUT_APK\framework-res\res/values-sw600dp-w1280dp
invalid resource directory name: C:\Users\winxuser\Desktop\xdaAutoTool_V4.0.3\_INPUT_APK\framework-res\res/values-w360dp
invalid resource directory name: C:\Users\winxuser\Desktop\xdaAutoTool_V4.0.3\_INPUT_APK\framework-res\res/values-w480dp
invalid resource directory name: C:\Users\winxuser\Desktop\xdaAutoTool_V4.0.3\_INPUT_APK\framework-res\res/values-w500dp
invalid resource directory name: C:\Users\winxuser\Desktop\xdaAutoTool_V4.0.3\_INPUT_APK\framework-res\res/values-w600dp
invalid resource directory name: C:\Users\winxuser\Desktop\xdaAutoTool_V4.0.3\_INPUT_APK\framework-res\res/values-w720dp
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 15, --target-sdk-version, 15, -F, C:\Users\winxuser\AppData\Local\Temp\APKTOOL2968905148637335578.tmp, -x, -S, C:\Users\winxuser\Desktop\xdaAutoTool_V4.0.3\_INPUT_APK\framework-res\res, -M, C:\Users\winxuser\Desktop\xdaAutoTool_V4.0.3\_INPUT_APK\framework-res\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:358)
at brut.androlib.Androlib.buildResources(Androlib.java:283)
at brut.androlib.Androlib.build(Androlib.java:206)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 15, --target-sdk-version, 15, -F, C:\Users\winxuser\AppData\Local\Temp\APKTOOL2968905148637335578.tmp, -x, -S, C:\Users\winxuser\Desktop\xdaAutoTool_V4.0.3\_INPUT_APK\framework-res\res, -M, C:\Users\winxuser\Desktop\xdaAutoTool_V4.0.3\_INPUT_APK\framework-res\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:357)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 15, --target-sdk-version, 15, -F, C:\Users\winxuser\AppData\Local\Temp\APKTOOL2968905148637335578.tmp, -x, -S, C:\Users\winxuser\Desktop\xdaAutoTool_V4.0.3\_INPUT_APK\framework-res\res, -M, C:\Users\winxuser\Desktop\xdaAutoTool_V4.0.3\_INPUT_APK\framework-res\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:355)
... 6 more
DONE!
if someone could point out were im going wrong that would be great
Yes..i too had that problem earlier..don't know why.. but got it only when decompiling JB 4.2.2 framework-res.apk..
Well i'll reasearch again n tell u..
Have you tried compiling without making any changes to ensure it works fine? It could be a bug with the program as the above Guy said, you could be trying to compile a 4.2 apk which sometimes causes errors..
Because I am seeing so many damn errors in there that I can't believe it..
Thanks for the ffeed back.. Yes i did try without editibg stuff and yes it worked. Its the framework from ics aosp
Sent from my GT-I9300 using xda app-developers app
winxuser said:
Thanks for the ffeed back.. Yes i did try without editibg stuff and yes it worked. Its the framework from ics aosp
Sent from my GT-I9300 using xda app-developers app
Click to expand...
Click to collapse
Did you change the mentioned files in the log?
no i only changed arrays.xml
winxuser said:
no i only changed arrays.xml
Click to expand...
Click to collapse
Bug with the program then..
Hello to all.
* Sorry for my bad English
Practically I have problems, I'm trying to edit the files,
as the framewrok-res.apk and systemui.apk
I note always problems, because sometimes I can compile it yourself, but do not go on your smartphone, sometimes apktool I do not fill out the application.
apktool gives me this error:
Code:
[email protected]:~$ apktool b '/home/giacomo/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.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL1748812502506136072.tmp, -x, -S, /home/giacomo/framework-res/res, -M, /home/giacomo/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, /tmp/APKTOOL1748812502506136072.tmp, -x, -S, /home/giacomo/framework-res/res, -M, /home/giacomo/framework-res/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": error=2, File o directory non esistente
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
at java.lang.Runtime.exec(Runtime.java:617)
at java.lang.Runtime.exec(Runtime.java:485)
at brut.util.OS.exec(OS.java:78)
... 7 more
Caused by: java.io.IOException: error=2, File o directory non esistente
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:135)
at java.lang.ProcessImpl.start(ProcessImpl.java:130)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1022)
... 10 more
Help please... thk
Did you include aapt engine with apktool?
Also did you install framework resources?
majdinj said:
Did you include aapt engine with apktool?
Also did you install framework resources?
Click to expand...
Click to collapse
missing the aapt file in your opinion?
however, I installed both the framework-res that the tw-framewrok-res
Showing error
java.io.IOException: Cannot run program "aapt": error=2, File o directory non esistente
Sent from my GT-I9500 using xda premium