[Q] Compiling Framework-res.apk Errors - Hero CDMA Q&A, Help & Troubleshooting

The log.txt from apk manager v4.8 is zipped below because it was to big of a text file to upload.
I used v4.8 on my mom's desktop when I was at her place and it worked just fine for compiling framework-res.apk's but now i'm on my laptop and i'm using jdk v1.6 and i can't do it I keep getting those errors Please help thanks

Did you try the
Apk manager if framework-res with the newest framework that can cause errors when compiling and decompiling
Also were you trying to decompile and already themed framework? That fails 9 times out of 10
Sent from my PC36100 using XDA App

kifno said:
The log.txt from apk manager v4.8 is zipped below because it was to big of a text file to upload.
I used v4.8 on my mom's desktop when I was at her place and it worked just fine for compiling framework-res.apk's but now i'm on my laptop and i'm using jdk v1.6 and i can't do it I keep getting those errors Please help thanks
Click to expand...
Click to collapse
I thought you were compiling from source? Wouldn't it make more sense to make the changes directly to the source files?

jasonmaloney said:
I thought you were compiling from source? Wouldn't it make more sense to make the changes directly to the source files?
Click to expand...
Click to collapse
And yes I am compiling from source
Ha! Why didn't I think of that brilliant idea thanks again jm I'll try that right now

Will recompile rom tonight thanks jm. I'm glad I can always receive tips from you from time to time.
Sent from my HERO200 using XDA Premium App

okay jm that doesn't work because some of the values i'm looking for aren't in the source files i have
they get generated once i build the rom and the framework-res.apk is built
I get the same errors when i try to decompile and or compile the apk. I even tried to decomiple the stock cm7 framework-res.apk and i'm still getting errors This isn't right so it has to be something with my computer. I even tried to decompile the final cm7 apk and it doesn't work!!!! I really need help with this so that I can release my latest gingersense rom. JM though it did help with a few of the lines I changed but just not all

kifno said:
okay jm that doesn't work because some of the values i'm looking for aren't in the source files i have
they get generated once i build the rom and the framework-res.apk is built
I get the same errors when i try to decompile and or compile the apk. I even tried to decomiple the stock cm7 framework-res.apk and i'm still getting errors This isn't right so it has to be something with my computer. I even tried to decompile the final cm7 apk and it doesn't work!!!! I really need help with this so that I can release my latest gingersense rom. JM though it did help with a few of the lines I changed but just not all
Click to expand...
Click to collapse
Did you do the apktool if framework res like I said? That fixed the error for me or are you just going to ignore it, sorry for trying to help
Sent from my PC36100 using XDA App

thoughtlesskyle said:
Did you do the apktool if framework res like I said? That fixed the error for me or are you just going to ignore it, sorry for trying to help
Sent from my PC36100 using XDA App
Click to expand...
Click to collapse
no no i want your help i just didn't/don't understand what you mean by if framework res
please post some instructions on how to decompile and compile framework-res.apk files using your fix method that'd be awesome bro and i'd give many thanks to you
this is the only thing holding me back from releasing a newer version of my rom

kifno said:
no no i want your help i just didn't/don't understand what you mean by if framework res
please post some instructions on how to decompile and compile framework-res.apk files using your fix method that'd be awesome bro and i'd give many thanks to you
this is the only thing holding me back from releasing a newer version of my rom
Click to expand...
Click to collapse
Put the framework-res in the folder that has apk tool in it I think apk manager stores it in the "other" folder. Then navigate to the folder in cmd line e.g. "cd C:\android-sdk-windows\tools\other" then type "java -jar apk tool if framework-res" if it doesn't error out and goes back to the cmd line then you should be good I might have the command wrong but im close
Sent from my PC36100 using XDA App

thoughtlesskyle said:
Put the framework-res in the folder that has apk tool in it I think apk manager stores it in the "other" folder. Then navigate to the folder in cmd line e.g. "cd C:\android-sdk-windows\tools\other" then type "java -jar apk tool if framework-res" if it doesn't error out and goes back to the cmd line then you should be good I might have the command wrong but im close
Sent from my PC36100 using XDA App
Click to expand...
Click to collapse
i had someone do the apk decompiling and compiling for me but i will see if this works because i will need to know how to decompile and compile my apk files on my laptop and not have to go to my moms place just to decompile an apk file

i get the following error
Code:
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Kevin>cd C:\apk manager v4.8\other
C:\apk manager v4.8\other>java -jar apktool.jar if framework-res
Exception in thread "main" brut.androlib.AndrolibException: java.io.FileNotFound
Exception: framework-res (The system cannot find the file specified)
at brut.androlib.res.AndrolibResources.installFramework(Unknown Source)
at brut.androlib.Androlib.installFramework(Unknown Source)
at brut.apktool.Main.cmdInstallFramework(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
Caused by: java.io.FileNotFoundException: framework-res (The system cannot find
the file specified)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
... 4 more
C:\apk manager v4.8\other>

kifno said:
i get the following error
Code:
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Kevin>cd C:\apk manager v4.8\other
C:\apk manager v4.8\other>java -jar apktool.jar if framework-res
Exception in thread "main" brut.androlib.AndrolibException: java.io.FileNotFound
Exception: framework-res (The system cannot find the file specified)
at brut.androlib.res.AndrolibResources.installFramework(Unknown Source)
at brut.androlib.Androlib.installFramework(Unknown Source)
at brut.apktool.Main.cmdInstallFramework(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
Caused by: java.io.FileNotFoundException: framework-res (The system cannot find
the file specified)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
... 4 more
C:\apk manager v4.8\other>
Click to expand...
Click to collapse
Try doing a Google search I think I got the command wrong, just search for apk tool if framework-res
Sent from my PC36100 using XDA App

i'm just going to wipe my windows 7 portion of my computer and back up all my files to my linux mint side and then re-install and set up my windows 7 ulimate partion and see if it works (btw what version of java does apktools need? 1.5 or 1.6 jdk? and does it need jre & jdk or just one?)
and then i'll do the same for my linux partition except i'll use ubuntu instead of linux mint this time. hopefully one of the two can get apktool working (preferrably both ) but we'll see this weekend when i do all that. right now....*yawn* i'm going to sleep
i have a good feeling that that will work this weekend

I believe apktools needs 1.6 java runtime environment (jre)
Sent from my HTC Hero CDMA using XDA App

Just noticed this post, Kifno. Looked at the error you got and that is the same one I got when I tried it for you. Like I said in the PM to you, it has something to do with that second edit you are doing...That was the common denominator between the three that I couldn't get to compile for you...

ranger61878 said:
Just noticed this post, Kifno. Looked at the error you got and that is the same one I got when I tried it for you. Like I said in the PM to you, it has something to do with that second edit you are doing...That was the common denominator between the three that I couldn't get to compile for you...
Click to expand...
Click to collapse
even when i just decompile and compile without any changes i get those errors so i believe its something i did on my laptop so this weekend i'm just going to wipe both partitions one at a time while backing up each others files onto one another as i do so. then i'll be fresh and i can reset up my machine and track every step i did to get it developement ready and see what is causing the problem. then if i still get the same errors i'll post what all i did after setting up my windows 7 partition and linux partition. and then that'll make it much easier to figure out the problem

Related

UOT Kitchen-> SHTF w/Error Log

Trying to create Circle Batt (no other changes) through UOT Kitchen for the Assonance 5.0 ROM.
When it finishes with the loaded Framework-res.apk file, the finished screen shows SHTF, and has an error log as follows:
+ WORKING_DIR=UOT-DW-12-15-19-37-1
+ java -Xmx64m -jar ./tools/apktool.jar d data/working_dir/UOT-DW-12-15-19-37-1/framework/framework-res.apk data/working_dir/UOT-DW-12-15-19-37-1/temp/fw_dec
I: Loading resource table...
I: Decoding resources...
I: Copying assets and libs...
+ WORKING_DIR=UOT-DW-12-15-19-37-1
+ java -Xmx64m -jar ./tools/apktool.jar b data/working_dir/UOT-DW-12-15-19-37-1/temp/fw_dec/ data/working_dir/UOT-DW-12-15-19-37-1/framework-unsigned.apk
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
aapt: warning: string 'keyguard_password_attempt_count_pin_code_1' has no default translation in /home/circle/ver2b/data/working_dir/UOT-DW-12-15-19-37-1/temp/fw_dec/res; found: he_IL
aapt: warning: string 'permdesc_restartPackages' has no default translation in /home/circle/ver2b/data/working_dir/UOT-DW-12-15-19-37-1/temp/fw_dec/res; found: he_IL
aapt: warning: string 'permlab_restartPackages' has no default translation in /home/circle/ver2b/data/working_dir/UOT-DW-12-15-19-37-1/temp/fw_dec/res; found: he_IL
/home/circle/ver2b/data/working_dir/UOT-DW-12-15-19-37-1/temp/fw_dec/res/values-hdpi-v4/drawables.xml:3: error: Resource entry stat_sys_battery_6 is already defined.
res/drawable-hdpi-v4/stat_sys_battery_6.png:0: Originally defined here.
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL9068952899748163720.tmp, -x, -0, arsc, -S, /home/circle/ver2b/data/working_dir/UOT-DW-12-15-19-37-1/temp/fw_dec/res, -M, /home/circle/ver2b/data/working_dir/UOT-DW-12-15-19-37-1/temp/fw_dec/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/APKTOOL9068952899748163720.tmp, -x, -0, arsc, -S, /home/circle/ver2b/data/working_dir/UOT-DW-12-15-19-37-1/temp/fw_dec/res, -M, /home/circle/ver2b/data/working_dir/UOT-DW-12-15-19-37-1/temp/fw_dec/AndroidManifest.xml]
at brut.util.OS.exec(Unknown Source)
... 7 more
Click to expand...
Click to collapse
Anyone know if this file can be used? I am presuming not. But there really is no documentation on that site about this type of thing.
Is that ROM already themed? It has to be with a stock framework for that kitchen to work.
I'd say so. It says "Modified version of Gingerbread Theme".
I wonder what I need to do to get Circle Batt then. I'll ask in that thread, in the meantime if you have any thoughts, it is appreciated.
ewingr said:
I'd say so. It says "Modified version of Gingerbread Theme".
I wonder what I need to do to get Circle Batt then. I'll ask in that thread, in the meantime if you have any thoughts, it is appreciated.
Click to expand...
Click to collapse
I say use a stock framework, get the pngs for the battery from the kitchen. Open up the kitchen apk with winrar/7zip (doesnt matter if you unzip to extract them) pull all the batt icons out and drop them into the ROM framework that you want to use (do not unzip the framework, explore apk contents using winrar/7zip).
Thanks for the suggestion.
I'd say if I had the stock framework, the UOT Kitchen would have worked. Problem is, I don't have the stock framework.
I have posted a query on the thread. One person there said the UOT worked for him. I don't know if he got that same error I did or not. I'm tempted to ask for his file...but then I want to be sure. I think I'll have to reload completely again if it borks my load (at least that's all I know to do when that happens).
Getting tired of flashing lately. Hoping to settle for a while
Reefermattness said:
I say use a stock framework, get the pngs for the battery from the kitchen. Open up the kitchen apk with winrar/7zip (doesnt matter if you unzip to extract them) pull all the batt icons out and drop them into the ROM framework that you want to use (do not unzip the framework, explore apk contents using winrar/7zip).
Click to expand...
Click to collapse
+1
When making my battery mod for the Gingerbread theme, this is what I did, and it worked perfectly.
Any suggestions on where I can get the stock file?
Oh, and did you apply that to the Assonance 5.0 ROM? I see from your SIG that you are on Perception Build 3, which was not Gingerbread.
ewingr said:
Any suggestions on where I can get the stock file?
Oh, and did you apply that to the Assonance 5.0 ROM? I see from your SIG that you are on Perception Build 3, which was not Gingerbread.
Click to expand...
Click to collapse
ANY stock framework.... All you need is the pngs inside.
Sent from my SGH-T959D using Tapatalk
Reefermattness said:
ANY stock framework.... All you need is the pngs inside.
Sent from my SGH-T959D using Tapatalk
Click to expand...
Click to collapse
To be more precise, you are saying to 'replace the pngs inside', right?
My comfort zone is to use UOT Kitchen. I tried the replace once, and somehow screwed things up.
So it sounds like I can take any 2.2 framework-res.apk, and run it through the kitchen and use it.
But, then I've tried using one that worked, for example, from a Cognition 3, and use on a 4 (Maybe not those specific builds), and it didn't work.
Having been burned on this from a couple different angles, I'm just a bit skittish.
Couldn't you just get the *.png's from FightSpit's original thread for his Circle Batt Mod?
Then just put them into your framework-res.apk and re-apply using your favorite tool (ADB Push or Root File Manager).
Maybe. I was told I need the 'original' framework file. but maybe that's only if i want to use UOT, which was in fact my question. That is my preference, but I'm coming to see that it is impossible if you have a modified theme.
ewingr said:
So it sounds like I can take any 2.2 framework-res.apk, and run it through the kitchen and use it.
Click to expand...
Click to collapse
Never, ever, use a framework-res.apk that was not part of the original rom in question.
PNG files are easily replaced using any zip file editor.
Sent from my Captivate.
So just so I'm understanding correctly, if I want to customize the battery pngs manually (or any png for that matter?) I can:
Upload a stock 2.2 framework to UOT Kitchen, pull out the pngs, place them in say Perception 9's or Assonance 5's framework-res.apk? Can I also just create pngs using an image editor and drop those in?
How would I reapply using adb or Root File Manager? Do I need to use a tool of some sort to sign the apk after I change the pngs?
I'm trying to get into doing my own theming... so still learning! I'm using this guide to get started: http://forum.xda-developers.com/showthread.php?t=817998.
the kitchen seems to be having issues for me as well. no matter what framework-res i use i get errors. even stock ones.

[TOOL] [Updated 8/18/11!!] APK_Manager_4.9_Honeycomb_Edition

Just though I'd take the time to update apk_manager_4.9 and call it apk_manager_4.9_Honeycomb_Edition. I've modified a few tools inside apk manager to now work with honeycomb apk's. Hopefully this will come in handy for you all.
Credits:
All credits go to the prior developers of APK MANAGER 4.9 HERE. I just took the time to update it for Honeycomb. Please refer to this link for instructions as well.
Thanks to Daneshm90 for giving me the okay to release this version so hopefully all you themers/developers out there will take this and run with it.
Changelog:
aapt - (From updated SDK)
apktool - (From updated SDK & MAD Industries)
zipalign - (From updated SDK)
Here is the download
APK_Manager_4.9_Honeycomb_Edition
Mirror_1
Mirror_2
MAC USERS:
Please click HERE for everything you need for APK Manager for a MAC courtesy of MAD Industries
Updated 08/18/11
Changelog:
Cleaned up script to and compile settings and systemui apks
Code:
echo Building Apk
IF EXIST "%~dp0place-apk-here-for-modding\%capp%" (del /Q "%~dp0place-apk-here-for-modding\%capp%")
java -Xmx%heapy%m -jar apktool.jar b -f "../projects/%capp%" "%~dp0place-apk-here-for-modding\%capp%"
if errorlevel 1 (
echo "An Error Occured, Please Check The Log (option 21)"
PAUSE
)
(Lines 489-495 if you're using Notepad++)
You can either re-download the APK-Manager_4.9_Honeycomb_Edition.zip from above or you can download the new Script.bat HERE
Just extract the Script.bat and replace the old one.
Some Extra Instructions:
To do this U MUST make a new folder in C:/users/<yourname>/ and call it apktool and a sub folder within it called framework. If you have this there already YOU ROCK!!
Mine reads:
Code:
C:/Users/Thomas/apktool/framework
Now within that framework folder you need a copy of a complete stock framework-res.apk and you need to rename it to 1.apk
You also need a copy of a complete stock twframework-res.apk and rename it 2.apk
So it should read:
Code:
C:/Users/<yourname>/apktool/framework/1.apk
and
Code:
C:/Users/<yourname>/apktool/framework/2.apk
Remember any apk you are attempting to decompile MUST BE COMPLETE STOCK to do so.
I have done all of this and tested over and over again and I am getting no errors whatsoever. If you do get some errors please make sure all your paths for SDK are setup correctly including setting a path for Java JDK as well.
PM me with any questions or concerns regarding all this. I will do my best to respond within a timely manner.
reserved for future
this one too hehe
Nice tool, will be useful.
PhantomHacker said:
Nice tool, will be useful.
Click to expand...
Click to collapse
Just hope more people will use it to it's fullest potential. And this tool does a lot of different things. Thanks PhantomHacker.
Very nice, thanks
Makes work easier
Thanks Doc I found this tool to become very handy when I did some things for the Samsung Epic 4G. I had to be able to use it for the Tab lol. Thanks again. Keep up the fantastic work yourself.
works like a charm Asus eee pad
depulle87 said:
works like a charm Asus eee pad
Click to expand...
Click to collapse
Awesome depulle87 glad to hear
Sent from my Nexus S 4G using XDA Premium App
I was to early with that, it seems to ''shrink'' my framework-res.apk so I can't use it.
It was 6.506kb and after a decompile and than compile it is 4.082kb, no changes made.
I didn't see it yesterday and I ended reflashing my TF
depulle87 said:
I was to early with that, it seems to ''shrink'' my framework-res.apk so I can't use it.
It was 6.506kb and after a decompile and than compile it is 4.082kb, no changes made.
I didn't see it yesterday and I ended reflashing my TF
Click to expand...
Click to collapse
Try after you select your project (Option 22) select (Option 19) Set your compression level and change it to 0.
That shouldn't shrink it at all.
Sorry about that let me know if that works as well so I can update OP
sorry man, it still shrinks my apk
Okay let me look into it. Sorry man.
Thanks man, should I upload my apk file so you can test it ?
yeah pm me with the link
Updated 8/18/2011
I've updated the OP a ton so please read away.
Well, that was easy
One small nitpick: What is the rationale behind overwriting the original files when compiling? Just curious.
And, for us antiquated old geezers building on something like a Windows Server 2003, framework-res.apk and twframework-res.apk should be present as
C:\Docume~1\<username>\apktool\framework\1.apk and 2.apk respectively.
Edit: Which sort of happens automagically, if you ...
java -jar other/apktool.jar if place-apk-here-for-modding/twframework-res.apk
... on that sort of platform.
what's the function of this app?
denis_sianto said:
what's the function of this app?
Click to expand...
Click to collapse
It's not an app
Sent from my MB855 using xda premium
denis_sianto said:
what's the function of this app?
Click to expand...
Click to collapse
It makes creating a theme fairly easy. It allows access to xml's, smali files(****ed up java files lawl!(i know what they are, i just like that version better)), and all the images in whatever apk you put in it. SO you can put in your new images, edit old images, edit xml files, edit smali files.

[Q] Decompiling Swype 3.25 Beta

I want to theme the newest 3.25 beta version of Swype, but I am getting an error when decompiling the apk:
Code:
I: Baksmaling...
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources:
spec=0x7f030009 layout/udb_edit, config=[DEFAULT]
at brut.androlib.res.data.ResConfig.addResource(Unknown Source)
at brut.androlib.res.data.ResConfig.addResource(Unknown Source)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(Unknown Source)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(Unknown Source)
at brut.androlib.res.decoder.ARSCDecoder.readType(Unknown Source)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(Unknown Source)
at brut.androlib.res.decoder.ARSCDecoder.readTable(Unknown Source)
at brut.androlib.res.decoder.ARSCDecoder.decode(Unknown Source)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(Unknown Source)
at brut.androlib.res.AndrolibResources.loadMainPkg(Unknown Source)
at brut.androlib.res.AndrolibResources.getResTable(Unknown Source)
at brut.androlib.Androlib.getResTable(Unknown Source)
at brut.androlib.ApkDecoder.getResTable(Unknown Source)
at brut.androlib.ApkDecoder.decode(Unknown Source)
at brut.apktool.Main.cmdDecode(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
If I delete the resources.arsc file in the apk it will decompile. I need the res folder decompiled, however, if I'm going to be changing colors. Any ideas?
bump 10char
Having same issue trying to recompile swype.apk for the HP touchpad!
whistler4ever said:
Having same issue trying to recompile swype.apk for the HP touchpad!
Click to expand...
Click to collapse
Recompile? How did you get it decompiled?
I have the same problem.. Themeing the keyboard isn't the issue it's easy to do.. simply replace the old keyboards with the newly theme'd keyboards then sign it done and done..
my problem is I want to theme the predictive text view/area for example I made a pink type theme for a friend of mine with black font/ they want the predictive text area to match that or be black font on a white bg..
also when it comes to changing the colour of the swype line that can be done with hexediting since I've seen many posts on that...
I seen some posts you made before on this issue and apparently from what someone else said on that thread this is caused by a limitation of the apktool/apk manager... I hope its not the case.
I've seen some of your themes on your sig links what exactly are you changing that you need to decompile swype for?
WildStriker said:
I've seen some of your themes on your sig links what exactly are you changing that you need to decompile swype for?
Click to expand...
Click to collapse
Same thing as you. No problem to change the keyboards, but you have to decompile to change the colors of the predictive text, trace color, etc.
thekdub said:
Same thing as you. No problem to change the keyboards, but you have to decompile to change the colors of the predictive text, trace color, etc.
Click to expand...
Click to collapse
ive decompiled & compiled v3.23 using apk manager 4.7 with no issues.
ive attached the version of apk manager im using, just in case,
tho it could be the different version of swype?
worth a try,
if all else fails, try posting your query in Brut.all/ apktool thread:
http://forum.xda-developers.com/showthread.php?t=640592
kam333 said:
ive decompiled & compiled v3.23 using apk manager 4.7 with no issues.
ive attached the version of apk manager im using, just in case,
tho it could be the different version of swype?
worth a try,
if all else fails, try posting your query in Brut.all/ apktool thread:
http://forum.xda-developers.com/showthread.php?t=640592
Click to expand...
Click to collapse
Thanks. Yeah, v3.23 decompiles without errors, but that version of Swype has different key sizes than 3.6 and 3.25. I would have to redo all my themes. Too much work. I did post a reply in that thread. So far, no response.
Fixed!
Hey, not sure how closely you have been following this issue. Awhile back I found this and commented posting my exact error with swype when decompiling:
code.google.com/p/android-apktool/issues/detail?id=197
which is a duplicate of this that was already posted:
code.google.com/p/android-apktool/issues/detail?id=195
Long story short didn't keep track of it until now decided to check up on it and I am excited to see that it was fixed and tested it out replacing my apktool.jar with the newer 1.4.2 that was released.
I'm happy to say that it successfully decompiled swype! (3.25). Just in time too, the new version of Swype came out recently and now is forcing everyone to update. Simple mod will fix this . (I'll be sticking with the newest version of Swype but my friend is to attached to their theme I made haha.)
Anyways happy theming!
Get the newest apktool here:
code.google.com/p/android-apktool

[SOLVED]error decompiling systemui.apk? help?

update: found all the right tools, needed patch apktool and updated aapt.exe from sdk13 ( HC3.2)
attached at bottom of post.
has anyone managed to decompile any Honeycomb systemui.apk without any errors? I have tried a few, many diff. ways and keep getting error: mulitple resources in dimens.xml and a bunch of java code. looks like it may not have been compiled properly?? Is there a way to force decompile? or maybe someone with linux and apktool latest version 1.4.2?
anyone made a UOT Kitchen theme with honeycomb and systemui.apk yet?
thanks for the help guys.
seeing if UOT kitchen could manage.. this is the saem error I get.
Decompiling framework-res.apk UOT-11-22-22-09-2
I: Loading resource table...
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
Decompiling SystemUI.apk UOT-11-22-22-09-2
I: Framework installed to: /root/apktool/framework/1.apk
I: Baksmaling...
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources: spec=0x7f090009 dimen/status_bar_icon_padding, config=-port-v13at 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:196)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:165)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:130)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:105)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:82)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:48)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:315)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:50)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:43)
at brut.androlib.Androlib.getResTable(Androlib.java:44)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:148)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
at brut.apktool.Main.cmdDecode(Main.java:120)
at brut.apktool.Main.main(Main.java:57)
Compiling framework-res.apk UOT-11-22-22-09-2
W: Could not find sources
I: Building resources...
I: Building apk file...
Compiling SystemUI.apk UOT-11-22-22-09-2
I: Framework installed to: /home/uot/apktool/framework/1.apk
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: 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:174)
at brut.apktool.Main.main(Main.java:59)
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
unzipped .apk and tried axmlprinter2:
It sounds a lot like the systemui.apk resources have malformed or invalid xmls, what rom source are you using exactly?
Try decompiling 506/507 to see if any of those work first, i'm guessing you're using the ones from r6.
yes r6, I though I have tried others even from a stock ROM. I wasnt able to extract system.img as I have in the past (Im on windowze) because I restored my laptop and all my tools are gone.
If you could check when you have time to try to decompile any honeycomb systemui.apk I would be grateful as I have been researching a lot, and Im sure its just a waste, as you say this is malformed or "hack" compiled Im sure.. not saying it was DJ's doing..
and rather that try to extract system .img with windows.. ( ive tried yaffs expert.apk.. no help) and cygwin.dll, with unyaffs.exe, and wunyaffs, both end up with stack trace dump. which tells me this .apk is bad news. I think it said something about a permissions error with unyaffs; My next step was going to fastboot 507/508 system.img and then pull systemui.apk, likely could screw up my ROM. I like R6 though works best for me.
thanks for the help TheManii
would you be able to unpack 506/507 system.img and just send me the .apk I will try to decompile if you are busy or just let me know if youre able to decompile one.. that would be a tremendous help.
this is definetly something we should not be seeing on an official ROM correct??
the system.img inside the 50x pkgs are ext4, not yaffs2, you'll need something that can read ext3/4 partitions to open it.
but i'm getting the same error in decompiling the systemui.apk in 506-wifi, you might want to ask brut about this, afaik the latest apktool can decompile normal HC level apks.
As an aside, I wouldnt expect r6 themes to be compatable with r7+ as r7+ are based on 507, same reason cwm isnt compatable with r6
at the least I think it should just decompile with errors and just display the multiple resources. so you're getting this on an official ROM, thats not good coding is it?
coding is serious business though. I will have to post on bruts google project page.
found this, a few people have same issue.
http://code.google.com/p/android-ap... Type Status Priority Milestone Owner Summary
huh, was it really part of api13? i figured it would have been 11/12
but one of the hc releases (i guess it was 3.2/api13) introduced dpxnn support, if you look at systemui.apk\res\layout-sw600dp or drawable-sw600dp-mdpi they overlap with the normal versions because it provides a more granular approach.
Didnt know apktool still doesnt support it. Regardless all api13+ apps should be doing it this way preferably.
more research finds this..
The "multiple resources" problem occurs when the same resource appears in two configurations in the apk (e.g. two screen sizes), which are not detected by apktool in ResConfigFlags.java. In the two cases above, the problematic resource appears in both the default config and the XLARGE config which apktool does not detect. Therefore, apktool tried to add the same resource to the default config twice rather than creating an XLARGE config space.
Ferenc Boldog's fix in https://github.com/fboldog/brut.apktool/commit/1b6d63cb355d4a36274f5edf0383a2c4e6e0f868 solves that particular problem by adding XLARGE support. Thanks Ferenc!
know how this boldog's file might work on windows?? I emailed brut.all to see if I could get a beta..
If it works without any further mods you can recompile it or wait for the next ver of apktool, i'm guessing that part/fix will be in it.
You'd need at least the jdk to compile it, and depending on file structure, linux
it seems I have found an apktool for sdk13 posted by brut on his page.. I need to get my own SDK13v aapt.exe though, updating my android sdk manager now... installing 4.0 too , this could be a while..
here is the .zip I found for sdkr13 (3.2), give it a shot if you have the latest sdk and aapt, curious if it works.
got it... woo hoo stoked! needed sdk r13 aapt.exe , didnt work with apktool 1.4.1 but did with another apktool for for 3.2
That's good news, as I'll also need to eventually recompile 3.2 apks if i ever get around to adding full langs into chimeradroid
and I got status bar clock themed for my ICS theme... cool..
Questions or Problems Should Not Be Posted in the Development Forum
Please Post in the Correct Forums and Read THIS
Moving to General
chrisrotolo said:
got it... woo hoo stoked! needed sdk r13 aapt.exe , didnt work with apktool 1.4.1 but did with another apktool for for 3.2
Click to expand...
Click to collapse
I'm still having a ton of issues with this, could one of you walk me through it? I'm working with the Asus Transformer, but having the same issue. I can now decompile properly with apktool, but compiling just fails miserably...
I have apktool 1.4.2, but apparently the new aapt.exe is needed? Would you be able to give me a link to that?
updated first post. attached .zip of apktool and files that worked for me.
@JDV28, are you decompiling a stock .apk? or themed .apk? and what kind of changes are you making? .xml edits? .9.png's? and what a re the errors? so we can try to help.
chrisrotolo said:
updated first post. attached .zip of apktool and files that worked for me.
@JDV28, are you decompiling a stock .apk? or themed .apk? and what kind of changes are you making? .xml edits? .9.png's? and what a re the errors? so we can try to help.
Click to expand...
Click to collapse
I think I figured out my own issue, I was decompiling and recompiling a themed SystemUI.apk, and if I remember correctly, that doesnt work.
Am I right? If so, why??
Also, I am getting a 9patch error like you said in the pm, any fix for that? that's the only issue now.
Personally I would suggest making any.xml edits , recompiling then dragging .9's and any other .png's and dropping them into the new .apk arhive. You could try xultimate search for it I think its on Droid forums.
Link: http://forum.xda-developers.com/showthread.php?t=700904
There are many guides on how to patch .9 's

[Tutorial] How to use Lg Weather Widget on CM7 or Miui beta

Tutorial to add Lg classes to the framework.jar in order to make work the original weather widget of LG in every rom.
I have made this process successfully in the CyanogenMod 7.2RC1 and in the MIUI 2.1a.
I discovered this process thanks to doc3000, which created to me the framework.jar of CM7 with Lg classes. After a while researching, I discovered the process.
First of all, make a backup of your rom just in case something goes wrong, be able to recover the terminal restoring it from the recovery, given the fact that a wrong framework.jar will produce a bootlop.
The files you need are:
1) baksmali.jar y smali.jar ,which you can get it from here: http://code.google.com/p/smali/. I have used the .jar files
2) original LG framework.jar file, for example in whatever rom STOCK, available in “/system/framework/framework.jar”
3) framework.jar of the rom to which we want to add the LG classes, available in “/system/framework/framework.jar”
4) WeatherWidget.apk which you can get too from whatever STOCK rom, available in “/system/app/WeatherWidget.apk”
1) Open a console, then cd to the folder where you have the 4 files. Run:
Code:
java -jar baksmali.jar framework.jar -o outlg
This will make a folder named “outlg”, which it will have all the LG Classes of the framework.jar
2) Repeat the same with the framework.jar of the rom that we want to add the LG classes running the command
Code:
java -jar baksmali.jar framework.jar -o out
3) Go to the folder “outlg/com” and make a copy of the “lge” folder to the “out/com” folder.
4) Now run
Code:
java -jar smali.jar out -o classes.dex
5) Open the framework.jar of the rom that we want to add the LG Classes with Winzip / 7zip ... , and replace the file classes.dex from the inside by the one we just have created. (Don't use Winrar, it make an incorrect framework.jar with a bootloop as a result. I don't know if Winzip work, but I confirm 7zip yes)
6) Insert the modified framework.jar to the “/system/framework” overwritting the original file, and checking that it has group and owner “root” and the correct permissions ( To know the correct permissions, look the permissions of any file in the folder “/system/framework/”...)
7) Copy the file “WeatherWidget.apk” in “/system/app/” and put he same permissions as any apk in that directory, check that the group and the owner are “root” too
8) Restart the device, and here we have the original LG weather widget in our favourite rom.
This process should work in every rom in every device, not only in the Optimus Black, but I could not check it because I only have an Optimus Black.
Sorry for my english >.<
Cheers!!!
Thank you i gonna try it out. but why it is in Q&A section? Maybe moderator could move this thread to themes&apps section? xD anyway thank you dude
I have less than 10 posts, I can't post on Development forum, but you are right, apps and themes are the correct forum, sorry >.<
Enviado desde mi LG-P970 usando Tapatalk
It ok maybe moderator can move it some day and more people find it?
Sent from my P970 using XDA
Hang on, i got an idea. i can create thread for you and put link on this thred hows that?
Runtime,
Great toturial on getting stock weather widget to work with cm7.
Any way you could put all this into a flashable zip?
I have abandon stock rom for months now and dont want to go back to extract files. Just too much efforts.
Thanks,
Sent from my LG-P970 using XDA
fongnd said:
Runtime,
Great toturial on getting stock weather widget to work with cm7.
Any way you could put all this into a flashable zip?
I have abandon stock rom for months now and dont want to go back to extract files. Just too much efforts.
Thanks,
Sent from my LG-P970 using XDA
Click to expand...
Click to collapse
If i could make you a flashable zip i would make it for you. But i dont know how to. So ill just make you a zip containing all of needed files c: (btw it seems like the original poster of this left this thread D: )
Sent from my LG-P970 using XDA
Hi all,
I can do a normal zip with all the files needed. This night I will do the zip.
A flashable zip is usseles when developers make a change involving "CyanogenMod/android_frameworks_base" because the framework.jar change. You need to do the process again to get a new framework.jar or you will get a bootlop.
Since u back so i ask qustion again...
Do you want me to open thread for you in themes and apps and give a link to your post... i take no credit for ur work.. so want me to?
P.S. im making zip now
Sent from my LG-P970 using XDA
foggydisaster said:
If i could make you a flashable zip i would make it for you. But i dont know how to. So ill just make you a zip containing all of needed files c: (btw it seems like the original poster of this left this thread D: )
Sent from my LG-P970 using XDA
Click to expand...
Click to collapse
thanks for offering me all necessary files.
I've just go through the tutorial again to rehearse all the command that I need to do.... I think I will screw up on this.... I have a busy life and I cant afford to have bootloop on phone. Just too time consuming.
Zip Is Here!
As i promised, ZIP with all STOCK files you need to go Good Luck with this
LINK:
->> http://dl.dropbox.com/u/78691851/StockFiles.zip <<-​ Have fun c:
foggydisaster said:
As i promised, ZIP with all STOCK files you need to go Good Luck with this
LINK:
->> http://dl.dropbox.com/u/78691851/StockFiles.zip <<-​ Have fun c:
Click to expand...
Click to collapse
Have you try this? meaning get the lg weather widget to work on cm7/muiu
The command that RUNTIME listed... do we execute these on the Android Terminal on the phone
thanks,
fongnd said:
Have you try this? meaning get the lg weather widget to work on cm7/muiu
The command that RUNTIME listed... do we execute these on the Android Terminal on the phone
thanks,
Click to expand...
Click to collapse
As i understood you do this in ADB on your PC....ive got an idea, i can do this for ya just send me your framework.jar (/system/framework/framework.jar) And i can try aply this for you
foggydisaster said:
As i understood you do this in ADB on your PC....ive got an idea, i can do this for ya just send me your framework.jar (/system/framework/framework.jar) And i can try aply this for you
Click to expand...
Click to collapse
link below is the framework.jar from my CM7
https://docs.google.com/open?id=0BwQDdoY7L1pGQ1J6MmQ1Y1pRSUU
thanks,
fongnd said:
link below is the framework.jar from my CM7
https://docs.google.com/open?id=0BwQDdoY7L1pGQ1J6MmQ1Y1pRSUU
thanks,
Click to expand...
Click to collapse
Ok dude its night now so ill do this for you tomorow c: but ull have this i promise nighty night
Sent from my GT-I9001 using XDA
Hi all,
@foggydisaster
I apreciate you offer, I you want to do for me, I thanks you.
The commands are for a windows/linux terminal/shell with java installed, no need to have ABD or android SDK installed. On windows do Start->Run->Cmd, on linux simply open a terminal emulator.
runtime_Err0r said:
Hi all,
@foggydisaster
I apreciate you offer, I you want to do for me, I thanks you.
The commands are for a windows/linux terminal/shell with java installed, no need to have ABD or android SDK installed. On windows do Start->Run->Cmd, on linux simply open a terminal emulator.
Click to expand...
Click to collapse
Ill go with ubuntu c:
Sent from my GT-I9001 using XDA
i have a problem... when i run comand to extract LGE framework.jar it shows folowing:
"
Code:
[email protected]:~/Desktop/workfolder$ java -jar baksmali.jar framework.jar -o outlg
UNEXPECTED TOP-LEVEL EXCEPTION:
org.jf.dexlib.DexFile$NoClassesDexException: zip file framework.jar does not contain a classes.dex file
at org.jf.dexlib.DexFile.<init>(DexFile.java:298)
at org.jf.baksmali.main.main(main.java:265)
[email protected]:~/Desktop/workfolder$
Any ideas?
foggydisaster said:
i have a problem... when i run comand to extract LGE framework.jar it shows folowing:
"
Code:
[email protected]:~/Desktop/workfolder$ java -jar baksmali.jar framework.jar -o outlg
UNEXPECTED TOP-LEVEL EXCEPTION:
org.jf.dexlib.DexFile$NoClassesDexException: zip file framework.jar does not contain a classes.dex file
at org.jf.dexlib.DexFile.<init>(DexFile.java:298)
at org.jf.baksmali.main.main(main.java:265)
[email protected]:~/Desktop/workfolder$
Any ideas?
Click to expand...
Click to collapse
I edit my first post with CODE tags, copy again the commands and it will work. It's a problem with the "-" simbol in plain text with browser. My fault.
Still the same itworks with CM7 framework filebut not with LGE..

Categories

Resources