xml files - Galaxy S II Themes and Apps

to create an android apk or to edit an XML...does it take a lot of programming experience or just to know basic XML codes and how android apks work?cause i do not want to wast time on something i can't even accomplish

You definitely need to have a certain mindset even if you don't currently have the programming experience, you'd have to be prepared to put a lot of time into it, accept there will be a lot of frustration and you will more than likely not achieve what you want to accomplish...
If that doesn't put you off go for it!
This would be a good place to start http://developer.android.com/index.html

gs2rom said:
to create an android apk or to edit an XML...does it take a lot of programming experience or just to know basic XML codes and how android apks work?cause i do not want to wast time on something i can't even accomplish
Click to expand...
Click to collapse
editing xml file using notepad++ is probably the easy part. compiling the apk is the crap part, in my experience.

It's just when i decompile the apk edit it and recompile it... i open the apk with 7zip i can't see the new files added...and when i decompile the systemui.apk
I can't seem to find the drawable-xhdpi..only the drawable-hdpi
Sent from my GT-I9100 using xda premium

gs2rom said:
It's just when i decompile the apk edit it and recompile it... i open the apk with 7zip i can't see the new files added...and when i decompile the systemui.apk
I can't seem to find the drawable-xhdpi..only the drawable-hdpi
Sent from my GT-I9100 using xda premium
Click to expand...
Click to collapse
i believe drawable-xhdpi is for the SGS3. Drawable-hdpi is for the SGS2.

Related

[Q] adding battery % mod to existing theme

I've been reading the theme guides and, time permitting, would like to start playing around. I've been comparing files from the stock theme template to crakes battery percent mod found here: http://forum.xda-developers.com/showthread.php?t=793805&highlight=battery+mod and have been trying to figure out how to use it in another theme. Is it as simple as adding the extra stat_sys_battery_#.png's or does something else have to be done to the framework-res.apk to get the phone to point to the added pngs? I hope thats understandable, thanks in advance for your help all!
amosher13 said:
I've been reading the theme guides and, time permitting, would like to start playing around. I've been comparing files from the stock theme template to crakes battery percent mod found here: http://forum.xda-developers.com/showthread.php?t=793805&highlight=battery+mod and have been trying to figure out how to use it in another theme. Is it as simple as adding the extra stat_sys_battery_#.png's or does something else have to be done to the framework-res.apk to get the phone to point to the added pngs? I hope thats understandable, thanks in advance for your help all!
Click to expand...
Click to collapse
If your theme has 1% intervals already its just a matter of swapping the png files. If the theme don't your gonna have to devompile the apk and edit 3 xml files then recompile
Sent from my SPH-D700 using XDA App
okay, ya thats what i was wondering. any help on the xml files to edit and how? i've got apk manager and have it decompiled, i dont see anything that jumps out.
EDIT: okay i've got in the drawable folder stat_sys_battery, stat_sys_battery_charge, stat_sys_battery_charge_err_vinsq, stat_sys_battery_charge_vinsq, stat_sys_battery_vinsq. my guess is its 3 of those, i guess i can just compare the stock theme with the stock battery mod to see what to do.
amosher13 said:
okay, ya thats what i was wondering. any help on the xml files to edit and how? i've got apk manager and have it decompiled, i dont see anything that jumps out.
EDIT: okay i've got in the drawable folder stat_sys_battery, stat_sys_battery_charge, stat_sys_battery_charge_err_vinsq, stat_sys_battery_charge_vinsq, stat_sys_battery_vinsq. my guess is its 3 of those, i guess i can just compare the stock theme with the stock battery mod to see what to do.
Click to expand...
Click to collapse
You can do that but do you know how to add a line to an xml file
Sent from my SPH-D700 using XDA App
mysteryemotionz said:
You can do that but do you know how to add a line to an xml file
Sent from my SPH-D700 using XDA App
Click to expand...
Click to collapse
in general, yes, but i may not know how for these purposes. what might i be missing?
There's an even easier way.
start adb
and type adb pull /system/framework/framework-res.apk framework-res.apk
(grab frameworkTW-res.apk*i think* if you want it for touchwiz instead)
Next
go here UOT Kitchen
select flashable .zip
go through the stuff
upload the framework-res.apk you just pulled.
wait a bit download package and move to sd card then browse and install it and reboot.
TADA!
art3mis-nyc said:
There's an even easier way.
start adb
and type adb pull /system/framework/framework-res.apk framework-res.apk
(grab frameworkTW-res.apk*i think* if you want it for touchwiz instead)
Next
go here UOT Kitchen
select flashable .zip
go through the stuff
upload the framework-res.apk you just pulled.
wait a bit download package and move to sd card then browse and install it and reboot.
TADA!
Click to expand...
Click to collapse
very interesting, i'll certainly check that out. though i am interested also in learning how to do it myself, but that looks pretty cool!
art3mis-nyc said:
There's an even easier way.
start adb
and type adb pull /system/framework/framework-res.apk framework-res.apk
(grab frameworkTW-res.apk*i think* if you want it for touchwiz instead)
Next
go here UOT Kitchen
select flashable .zip
go through the stuff
upload the framework-res.apk you just pulled.
wait a bit download package and move to sd card then browse and install it and reboot.
TADA!
Click to expand...
Click to collapse
Thee problem with this is if there's any edited .9 pngs in the theme the out come is ****
Sent from my SPH-D700 using XDA App
mysteryemotionz said:
Thee problem with this is if there's any edited .9 pngs in the theme the out come is ****
Sent from my SPH-D700 using XDA App
Click to expand...
Click to collapse
so how about this: i pull the xmls from crakes framework-res.apk (do i need anything from twframework-res.apk?), recompile into the framework-res.apk from the theme i'm hacking, then dump the pngs into drawable-hdpi from the % mod i want to include and just make sure theres an image for each line in the xmls. sound good?
amosher13 said:
so how about this: i pull the xmls from crakes framework-res.apk (do i need anything from twframework-res.apk?), recompile into the framework-res.apk from the theme i'm hacking, then dump the pngs into drawable-hdpi from the % mod i want to include and just make sure theres an image for each line in the xmls. sound good?
Click to expand...
Click to collapse
Sounds great but just remember if your theme has any edited .9.pngs you will get errors with the framework.
What there are you trying to edit?
Sent from my SPH-D700 using XDA App
mysteryemotionz said:
Sounds great but just remember if your theme has any edited .9.pngs you will get errors with the framework.
What there are you trying to edit?
Sent from my SPH-D700 using XDA App
Click to expand...
Click to collapse
basically i want to work in a battery % mod into the theme from AOSP Magic (partially just to see if i can do it ). when you say "has any edited .9.pngs" do you mean if i edit any? or if the theme contains any that are already edited.
amosher13 said:
basically i want to work in a battery % mod into the theme from AOSP Magic (partially just to see if i can do it ). when you say "has any edited .9.pngs" do you mean if i edit any? or if the theme contains any that are already edited.
Click to expand...
Click to collapse
If the theme has any edited already out if you edited any
Sent from my SPH-D700 using XDA App
mysteryemotionz said:
If the theme has any edited already out if you edited any
Sent from my SPH-D700 using XDA App
Click to expand...
Click to collapse
ya i'm a little confused at that point on how i'd handle that. anywhere i can read up on that?
so basically if the theme i want to mod has .9.pngs that were edited from stock, when i decompile and recompile with the new xmls its going to break something? if so, what would i do? use the battery % mod theme and dump the drawable-hdpi folder into the apk after?
amosher13 said:
ya i'm a little confused at that point on how i'd handle that. anywhere i can read up on that?
so basically if the theme i want to mod has .9.pngs that were edited from stock, when i decompile and recompile with the new xmls its going to break something? if so, what would i do? use the battery % mod theme and dump the drawable-hdpi folder into the apk after?
Click to expand...
Click to collapse
What I do is modify the xml files ona stock framework. Make all the changes I need then recompile. Once compiled its a matter of dragging and dropping the pngs
Sent from my SPH-D700 using XDA App
mysteryemotionz said:
What I do is modify the xml files ona stock framework. Make all the changes I need then recompile. Once compiled its a matter of dragging and dropping the pngs
Sent from my SPH-D700 using XDA App
Click to expand...
Click to collapse
gotcha, perfect thanks!

Recompile Question

Ok so I used http://forum.xda-developers.com/showthread.php?t=882742 to upack / uncompile my framework-res. I then made my changes to the xml's that I wanted to edit. I then used the same program to repack them but it does not recompress them for some reason. I tried to use apkmanager but found it very confusing to use it to recompile and could never get it to work correctly. Any help would be appreciated.
With apkmanager after you make your edits you choose 11 to recompile, answer yes and yes, go to the keep folder that it creates and delete everything you edited. You will get a unsigned.apk.
Sent from my ADR6300 using XDA App
Hatman41 said:
Ok so I used http://forum.xda-developers.com/showthread.php?t=882742 to upack / uncompile my framework-res. I then made my changes to the xml's that I wanted to edit. I then used the same program to repack them but it does not recompress them for some reason. I tried to use apkmanager but found it very confusing to use it to recompile and could never get it to work correctly. Any help would be appreciated.
Click to expand...
Click to collapse
if you use apk manager and make xml edits make sure you delete the resources arsa also
newtoroot said:
if you use apk manager and make xml edits make sure you delete the resources arsa also
Click to expand...
Click to collapse
Thanks for the reply but I still find apkmanager very confusing to use to recompile.

Theming questions?

I have been theming on the x2 for awhile now building custom themes .. I just got my nexus yesterday so I downloaded the gummy rom and tried to theme first with apktool and also with apk manager.. I see there have been themes made.. I have yet to be able to decompile any system apks successfully.. are there any new tools I'm missing or steps... would love to start theming again if I can get things to work
Sent from my Galaxy Nexus using xda premium
Kevin3328 said:
I have been theming on the x2 for awhile now building custom themes .. I just got my nexus yesterday so I downloaded the gummy rom and tried to theme first with apktool and also with apk manager.. I see there have been themes made.. I have yet to be able to decompile any system apks successfully.. are there any new tools I'm missing or steps... would love to start theming again if I can get things to work
Sent from my Galaxy Nexus using xda premium
Click to expand...
Click to collapse
yep, you need to update apktool for use with Android 4.0
edit: more specifically...
-Wrong version of apktool (get the latest)
-Wrong verison of apktool dependancies files (same site)
-Wrong version of aapt.exe in Android SDK (get latest SDK)
Alright awesome I'll look into it tonight after work
Sent from my Galaxy Nexus using xda premium
I have the latest version of all of that and can decompile with apktool. The problem is when I build the new apk and copy over the edited files and push back to the phone the app won't work.
A run down of everything I did is here: http://forum.xda-developers.com/showthread.php?t=1452530
Did u try putting it back in the flash able zip with 7 zip? I never use adb push.... in theory if u are able to compile the apk without errors it should work
Sent from my Galaxy Nexus using xda premium
Kevin3328 said:
Did u try putting it back in the flash able zip with 7 zip? I never use adb push.... in theory if u are able to compile the apk without errors it should work
Sent from my Galaxy Nexus using xda premium
Click to expand...
Click to collapse
I pulled the music apk, edited it, rebuilt it, and put the edited files back in the original apk. I did that because I don't know how to sign my own apk so I just used the already signed one with some edited png and xml files. The thing I don't understand is that I pulled an apk once and opened it via 7zip and edited some things, pushed it back and everything was fine (changed out some icons on the contacts.apk)
Do you know where an up-to-date theming guide can be found? I'm very interested in making my own themes instead of requesting themers to make one. Learning experience and all that jazz.
Thanks.
coverton341 said:
I pulled the music apk, edited it, rebuilt it, and put the edited files back in the original apk. I did that because I don't know how to sign my own apk so I just used the already signed one with some edited png and xml files. The thing I don't understand is that I pulled an apk once and opened it via 7zip and edited some things, pushed it back and everything was fine (changed out some icons on the contacts.apk)
Do you know where an up-to-date theming guide can be found? I'm very interested in making my own themes instead of requesting themers to make one. Learning experience and all that jazz.
Thanks.
Click to expand...
Click to collapse
You can't replace xml's in that way.
Sent from my Galaxy Nexus using XDA App
If u properly recompile the apk then yes u can .. u edit it all the XML s and pngs in the apk then recompile.. then drop the recompiled apk into the system app section of the rom u r using unless its the framework Res apk or other framework apk.. once u do this put the new rom zip back into your phone and flash in recovery ... bottom line I'm not the most experienced themer in the forums I just got the phone yesterday so its gonna take time for me to begin theming anything.. that being said perhaps if this thread stays open and more experienced themers can chime in with some tips and advice
Sent from my Galaxy Nexus using xda premium
coverton341 said:
I pulled the music apk, edited it, rebuilt it, and put the edited files back in the original apk. I did that because I don't know how to sign my own apk so I just used the already signed one with some edited png and xml files. The thing I don't understand is that I pulled an apk once and opened it via 7zip and edited some things, pushed it back and everything was fine (changed out some icons on the contacts.apk)
Do you know where an up-to-date theming guide can be found? I'm very interested in making my own themes instead of requesting themers to make one. Learning experience and all that jazz.
Thanks.
Click to expand...
Click to collapse
Also in my short experience theming u should not have to sign a system app... u should recompile then rename it.. then reinsert into the rom you are using.. reflash the rom without any wiping and u should be good try it that way
Sent from my Galaxy Nexus using xda premium
Kevin3328 said:
Also in my short experience theming u should not have to sign a system app... u should recompile then rename it.. then reinsert into the rom you are using.. reflash the rom without any wiping and u should be good try it that way
Sent from my Galaxy Nexus using xda premium
Click to expand...
Click to collapse
Hey Kev did u figured it out yet? I replied to ur PM...
Sent from my Galaxy Nexus using XDA App
Kevin3328 said:
Also in my short experience theming u should not have to sign a system app... u should recompile then rename it.. then reinsert into the rom you are using.. reflash the rom without any wiping and u should be good try it that way
Sent from my Galaxy Nexus using xda premium
Click to expand...
Click to collapse
Actually, GoogleMusic.apk is found in data/app not in system, at least in the ROM I am on. But, am I correct in assuming that I can do the same thing in this instance?
Furthermore, is there no way to theme a single application? Do I need to always theme an app, place it back into the ROM zip, and reflash said ROM?
Can I make my own flashable zip file for a single app?
Sorry to ask so many questions, I just really like tinkering with things and I would really like to get good at theming.
Kevin3328 said:
If u properly recompile the apk then yes u can .. u edit it all the XML s and pngs in the apk then recompile.. then drop the recompiled apk into the system app section of the rom u r using unless its the framework Res apk or other framework apk.. once u do this put the new rom zip back into your phone and flash in recovery ... bottom line I'm not the most experienced themer in the forums I just got the phone yesterday so its gonna take time for me to begin theming anything.. that being said perhaps if this thread stays open and more experienced themers can chime in with some tips and advice
Sent from my Galaxy Nexus using xda premium
Click to expand...
Click to collapse
Sorry misread what you were saying then.
Sent from my Galaxy Nexus using XDA App
I am at work until 1030 then I am gonna set up shop on my CPU first... gotta get the new sdk and apktool then I will gtalk u from there with issues.. all I know is this should be a learning experience lol.. by the looks of this phone it could be awhile b4 I learn what everything "is" framework will be all the apks will be different than what I'm used to
Sent from my Galaxy Nexus using xda premium
coverton341 said:
Actually, GoogleMusic.apk is found in data/app not in system, at least in the ROM I am on. But, am I correct in assuming that I can do the same thing in this instance?
Furthermore, is there no way to theme a single application? Do I need to always theme an app, place it back into the ROM zip, and reflash said ROM?
Can I make my own flashable zip file for a single app?
Sorry to ask so many questions, I just really like tinkering with things and I would really like to get good at theming.
Click to expand...
Click to collapse
U can make update zips and yes u should b able to do the same.. I usually borrow someone else's at first
Sent from my Galaxy Nexus using xda premium
wut? i've never done what you guys have when it comes to compiling/decompiling and replacing stuff. i'm not so sure that works, but i'll take your word for it for now since i've never tried it either. in theory, you can decompile and change xml, recompile and replace that xml, but not if you're dealing with the actual xml folder in apks. your resources change when you mess with that. this is the same for changing smali, except something else changes (it's been a bit since i've dealt with actual dev stuff).
also, it's a big waste (and sometimes troublesome) to flash an entire ROM to update one or a few apks. making one for just testing out things in \system\ will save you time and frustration. you can also make a backup easier for if something bootloops you
Success!!!
All right, first and foremost, thank you immensely for all the suggestions Kevin and others as well.
Here's what I did. I searched the ROM zip to no avail, but then found the apk in the gapps zip. I took it out of there, decompiled, messed around with just a few png files, recompiled and put it back into the gapps zip. Flashed it and it worked. Problem is, only a couple of the edits I made showed up which brings me to my next issue, ICS optimised apps have a tonne of "drawable-***" folders. Drawable, drawable-hdpi, drawable-hdpi-v8,v9,v11, drawable-xdpi, etc....ad nauseum.
I am not messing with any smali code, xml files, or .9.png files yet as I don't know what smali does, xml is a headache, and I have heard horror stories about .9.png files.
I'm going to dink around and see if I can sort out what items need to be changed for my current dpi setting (241) and will report back any findings, but probably not tonight as I have an early course in the morning followed by work.
coverton341 said:
Success!!!
All right, first and foremost, thank you immensely for all the suggestions Kevin and others as well.
Here's what I did. I searched the ROM zip to no avail, but then found the apk in the gapps zip. I took it out of there, decompiled, messed around with just a few png files, recompiled and put it back into the gapps zip. Flashed it and it worked. Problem is, only a couple of the edits I made showed up which brings me to my next issue, ICS optimised apps have a tonne of "drawable-***" folders. Drawable, drawable-hdpi, drawable-hdpi-v8,v9,v11, drawable-xdpi, etc....ad nauseum.
I am not messing with any smali code, xml files, or .9.png files yet as I don't know what smali does, xml is a headache, and I have heard horror stories about .9.png files.
I'm going to dink around and see if I can sort out what items need to be changed for my current dpi setting (241) and will report back any findings, but probably not tonight as I have an early course in the morning followed by work.
Click to expand...
Click to collapse
Let us know how you (hopefully) succeed. Im a bit tempted to try theming myself but ive cant seem to find a guide that is up-to-date - and im learning somthing with every question you are asking - and with every answer the other nice fellows are providing.
:thumbs up!:
I am still trying to figure out how to setup everything.. I know I need newest sdk and newest apk multi tool which I didn't get yet.. I'm gonna tinker around today/tonite and see what I'm doing wrong
Sent from my Galaxy Nexus using xda premium
mrvirginia said:
wut? i've never done what you guys have when it comes to compiling/decompiling and replacing stuff. i'm not so sure that works, but i'll take your word for it for now since i've never tried it either. in theory, you can decompile and change xml, recompile and replace that xml, but not if you're dealing with the actual xml folder in apks. your resources change when you mess with that. this is the same for changing smali, except something else changes (it's been a bit since i've dealt with actual dev stuff).
Click to expand...
Click to collapse
See this is how I read it too. I believe the OP means that he's making changes and then replacing the apk in the flashable zip. Not actually replacing the edited xmls in the original apk. Glad I'm not the only one that read it that way though
coverton341 said:
Success!!!
All right, first and foremost, thank you immensely for all the suggestions Kevin and others as well.
Here's what I did. I searched the ROM zip to no avail, but then found the apk in the gapps zip. I took it out of there, decompiled, messed around with just a few png files, recompiled and put it back into the gapps zip. Flashed it and it worked. Problem is, only a couple of the edits I made showed up which brings me to my next issue, ICS optimised apps have a tonne of "drawable-***" folders. Drawable, drawable-hdpi, drawable-hdpi-v8,v9,v11, drawable-xdpi, etc....ad nauseum.
I am not messing with any smali code, xml files, or .9.png files yet as I don't know what smali does, xml is a headache, and I have heard horror stories about .9.png files.
I'm going to dink around and see if I can sort out what items need to be changed for my current dpi setting (241) and will report back any findings, but probably not tonight as I have an early course in the morning followed by work.
Click to expand...
Click to collapse
no decompiling is necessary for tweaking pngs.
smali code is for messing with policies, etc.
.9.png files can be a pain if you don't recompile the apk correctly.
and this should help with your dpi as far as what to edit so you can see it...
http://developer.android.com/guide/practices/screens_support.html

Please help me with theming!

Okay, I am really sorry if this sounds negative or like a rant, first off. I really want to get into theming. I have been trying for weeks, possibly months, to figure out how to do certain things. I have only recently been able to successfully make a zipthemer mod, and that's very easy. I really need specific help. The tutorials that I have seen are not specific enough, as they assume that you have prior knowledge of things like SDK and ADB. I am a completely clean slate. I have been completely unsuccessful in finding a step by step tutorial that I can actually follow to get the things done that I want to do. Maybe it's just me, but I have been literally hours searching for it. I have asked for help, but never get any because people tell me to go research how to do it.
I want to do only two things now...I am running dark paranoid android and I want to change the circlemod battery from the stock to white. I have the pngs, I just don't know where to put them or what files need to be edited. I also have no coding experience, so I need fairly specific help to learn what things need to change.
I also want to change the clock in the status bar from the ICS blue to white.
That's it....I know it sounds like it should be simple, but it's not to me. I have tried and tried to find the answers on my own, but have been wholly unsuccessful. It has left me feeling jaded and frustrated, leading to this thread.
Can somebody please point me somewhere that will teach me what I need to know with kid gloves? I want to really get into doing this and participate in the community, but I fail time and time again. I have tried to find pre-made themes to do what I want, but everything is usually too deeply modded whereas I only want to change a few things. Please help!
they go in the systemui.apk /res/drawables-xhdpi folder. If there is already a circles mod there, you don't need to code anything. The status bar clock color is in styles.xml of systemui.apk. The color code for ics is #33b5e5, so change it to #ffffff.
Here's the line of code you need to change. https://github.com/android/platform...r/packages/SystemUI/res/values/styles.xml#L41
change @android:color/holo_blue_light to #ffffff.
This is called hard coding, and in an ideal world, you'd change it to @color/status_bar_clock then add that value to colors.xml, but i know google will never optimize their code that way
artvandelay440 said:
they go in the systemui.apk /res/drawables-xhdpi folder. If there is already a circles mod there, you don't need to code anything. The status bar clock color is in styles.xml of systemui.apk. The color code for ics is #33b5e5, so change it to #ffffff.
Click to expand...
Click to collapse
Thank you very much. I didn't know which XML to look at.
I am pretty sure I tried putting the mod in that folder but it didn't take for some reason. I have looked pretty deeply into any other place they could be and can't find it for some reason.
Sent from my Galaxy Nexus using Tapatalk 2
liquid150 said:
Thank you very much. I didn't know which XML to look at.
I am pretty sure I tried putting the mod in that folder but it didn't take for some reason. I have looked pretty deeply into any other place they could be and can't find it for some reason.
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
Look in the /drawable folder in systemui. If the mod is present, you should find a stat_sys_battery_circle.xml in there.
artvandelay440 said:
Look in the /drawable folder in systemui. If the mod is present, you should find a stat_sys_battery_circle.xml in there.
Click to expand...
Click to collapse
Thank you I will check it out.
Sent from my Galaxy Nexus using Tapatalk 2
No problem. I'm writing a guide for my site on theming that's aimed at both beginners and advanced. I'll link it here when I'm done.
Sent from my Galaxy Nexus using Tapatalk 2
artvandelay440 said:
No problem. I'm writing a guide for my site on theming that's aimed at both beginners and advanced. I'll link it here when I'm done.
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
Any idea why when I flash white numbers into phone.apk it doesn't change anything? I am not in a place I can play with XML (no computer) so I tried something else.
Does pa/cm10 use a different apk?
Sent from my Galaxy Nexus using Tapatalk 2
liquid150 said:
Any idea why when I flash white numbers into phone.apk it doesn't change anything? I am not in a place I can play with XML (no computer) so I tried something else.
Does pa/cm10 use a different apk?
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
Phone.apk dial numbers used for "During a call dialer" so you have to change Contacts.apk dial numbers.
Yep- he's right. The ones in phone.apk are for the in-call dialpad.
Is there a fairly specific tutorial thread that I can turn to for editing XML files? From my very limited understanding I have to decompile it and work through it myself. Do I do this through ADB and push it? Is there an ADB tutorial to do things like that? I was hoping somebody here has a fairly specific noob-friendly tutorial.
My issue is that most of the tutorials that I have seen just say things like "use X tool and decompile." Well, I don't know how to do that. lol.
Thanks to everyone for all your help, and also to anybody else that helps in advance.
liquid150 said:
Is there a fairly specific tutorial thread that I can turn to for editing XML files? From my very limited understanding I have to decompile it and work through it myself. Do I do this through ADB and push it? Is there an ADB tutorial to do things like that? I was hoping somebody here has a fairly specific noob-friendly tutorial.
My issue is that most of the tutorials that I have seen just say things like "use X tool and decompile." Well, I don't know how to do that. lol.
Thanks to everyone for all your help, and also to anybody else that helps in advance.
Click to expand...
Click to collapse
For decompile:
*you will need to have Java runtime installed*
1.download http://minus.com/mwgtTbmZd
2.create a folder c:\apktools
3.Take the zip and unzip all 4 files to c:\apktools
4.You will need to pull the framework-res.apk from the rom you are working on. Copy it to c:\apktools
5.Rename apktool.jar.1.4.2 to apktool.jar
6.Open a command window and make sure everything you do from now on is while you are in this folder c:\apktools
* If you don't know how, just open command window and by use this command ( cd.. ) until you are in ( C:\ ) driver then ( cd apktools )
7.In command window type: java -jar apktool.jar if framework-res.apk
You only need to do this once, unless you are working on a different Rom
8.decompile framework-res with apktool: java -jar apktool.jar d framework-res.apk
make any changes you want
9.Now compile: java -jar apktool.jar b framework-res
If you get error compile it with apktool version 1.4.3, So what I do at this point is rename apktool.jar to apktool.1.4.2, and then rename apktool.jar.1.4.3 to apktool.jar
10.Once it is done compiling you will need to go to c:\apktools\framework-res\dist and you will now see your new framework-res.apk
Just remember to copy any apk you want to decompile right into the root of c:\apktools
--
Now put your new for example framework-res in flashable zip (attached) and flash by using Rom Manager aka CWM.
Note that framework-res.apk should be inside framework folder, and SystemUI.apk inside app folder.
I'll make one tonight and link it.
Sent from my Galaxy Nexus using Tapatalk 2
Oh, one more question...is this a lot easier to do in Linux? I haven't installed my copy of Ubuntu on my new box yet because I haven't felt the need yet.
liquid150 said:
Oh, one more question...is this a lot easier to do in Linux? I haven't installed my copy of Ubuntu on my new box yet because I haven't felt the need yet.
Click to expand...
Click to collapse
I'd start in Linux since more of the advanced concepts require it.
Sent from my Galaxy Nexus using Tapatalk 2
Check this out. It might help http://www.jbthemes.com/artvandelay440/theming-guide/
I am having trouble finding the status bar xml controlling clock color (battery, too). I am not seeing a values nor styles folder nor XML in System UI. My ROM is DarkPA. If anybody knows offhand where I should look please let me know, otherwise I will continue on my own.
you won't see a /values folder until you decompile it. then, it will be in /res.
liquid150 said:
Oh, one more question...is this a lot easier to do in Linux? I haven't installed my copy of Ubuntu on my new box yet because I haven't felt the need yet.
Click to expand...
Click to collapse
get that ubuntu booted
Sent from my Galaxy Nexus using Tapatalk 2
If you still need help tomorrow let me know. I could either do the edits for you or help you with the apps you need ...
Thyrus said:
If you still need help tomorrow let me know. I could either do the edits for you or help you with the apps you need ...
Click to expand...
Click to collapse
I am available as well. Hit me up via talk if need be. I have helped many setup theming. Although i use xdaautoapktool which is much more comprehensive theming tool...
Sent from my Nexus 7 using Xparent Blue Tapatalk 2

[Q] Able to de and re compile framework-res.apk?

I was just wondering if anyone with the UAMDL software has been able to decompile and recompile the framework on here yet.
I have tried with the APK multi tool and the decompile works fine but when I try to recompile it errors our right away.
Anyone have any luck with this?
If so what tool did you use?
Yes I have.
Sent from my SGH-M919 using Tapatalk 2
I'd like to know this as well, and how people have been successful. I haven't had any luck installing framework-res.apk or recompiling a modified app. From my understanding, it's an issue with apktool and aapt that needs to be updated.
TheArtiszan said:
I was just wondering if anyone with the UAMDL software has been able to decompile and recompile the framework on here yet.
I have tried with the APK multi tool and the decompile works fine but when I try to recompile it errors our right away.
Anyone have any luck with this?
If so what tool did you use?
Click to expand...
Click to collapse
That and SystemUI.apk are both missing files needed for them to decompile and recompile right
evil..............out
elesbb said:
Yes I have.
Sent from my SGH-M919 using Tapatalk 2
Click to expand...
Click to collapse
Can you elaborate on what tools you used and how to set it up please?
I have been stuck trying to get this to work for over a week now.
Sent using xda premium.
evil1art said:
That and SystemUI.apk are both missing files needed for them to decompile and recompile right
evil..............out
Click to expand...
Click to collapse
There are ways for making it work though
TheArtiszan said:
Can you elaborate on what tools you used and how to set it up please?
I have been stuck trying to get this to work for over a week now.
Sent using xda premium.
Click to expand...
Click to collapse
I used the tool in my signature and you have to remove some layout paramaters in the xml files then recompile and copy the originals over to the newly compiled apk.
elesbb said:
There are ways for making it work though
I used the tool in my signature and you have to remove some layout paramaters in the xml files then recompile and copy the originals over to the newly compiled apk.
Click to expand...
Click to collapse
Im the one who figured out the missing style for the systemui
evil..............out
evil1art said:
Im the one who figured out the missing style for the systemui
evil..............out
Click to expand...
Click to collapse
Yeah so did I lol. Ive ran into that issue before and thats all you have to do to get around it.
elesbb said:
There are ways for making it work though
I used the tool in my signature and you have to remove some layout paramaters in the xml files then recompile and copy the originals over to the newly compiled apk.
Click to expand...
Click to collapse
We have our own modified apk manger works good
evil..............out
evil1art said:
We have our own modified apk manger works good
evil..............out
Click to expand...
Click to collapse
Ahhh. That makes life a lot easier lol. How did you modify it? Build it from source or edit the jar file?
elesbb said:
Ahhh. That makes life a lot easier lol. How did you modify it? Build it from source or edit the jar file?
Click to expand...
Click to collapse
Modified the original files and changed memory heap etc
evil..............out
Oh okay that makes sense.
I am editing the framework res apk
Making changes only to the arrays.xml file in the values folder.
Which styles should I be commenting out and then which file should I copy to the original?
I tried putting a + in front of a few lines based on the errors I was getting but that seemed to make it worse.
Sent using xda premium.
I think the arrays and other values xml get compiled into the resources file no?
Sent using xda premium.
TheArtiszan said:
I think the arrays and other values xml get compiled into the resources file no?
Sent using xda premium.
Click to expand...
Click to collapse
Everything in the values directory is found in your resources.arsc file in the apk.
Sent from my SGH-M919 using Tapatalk 2
Ah that makes sense.
The changes made for layouts, does that go into the same area though?
Just wondering if that might cause a problem since that is what I would want to move over.
Sent from my HTC VLE_U using xda premium
That is odd.
I can get this to decompile in apk multi tool but not Elesbb's GUI
I get the following error:
Tue 06/25/2013
0:46:56.39
Decompiling.. "C:\Users\Bill\APK GUI\framework-res.apk"
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources: spec=0x010802f4 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)
-----------------------------------------------------------------
Did I miss something.
Made some progress and decompiling ok now on a different computer.
If I add the + before the layouts would that cause operation issues?
I would like to know too.
Still having trouble.
What did you do too decompile?
Okay I can now get it to recompile adding the +layout to the xml files that were erroring in the compile log and only other change was made was to the arrays.xml file to enable bluetooth tethering like on the GS3 did.
however when I push it to the phone and chmod and try it I get a boot loop.
Did I do something wrong?
Am I supposed to copy out the resource.asrc from the file I compiled like a zip then add it to the original that I pulled using 7zip or something?
Any input would be greatly appreciated.
TheArtiszan said:
Okay I can now get it to recompile adding the +layout to the xml files that were erroring in the compile log and only other change was made was to the arrays.xml file to enable bluetooth tethering like on the GS3 did.
however when I push it to the phone and chmod and try it I get a boot loop.
Did I do something wrong?
Am I supposed to copy out the resource.asrc from the file I compiled like a zip then add it to the original that I pulled using 7zip or something?
Any input would be greatly appreciated.
Click to expand...
Click to collapse
Move the AndroidManifest.xml and Meta-INF folder from the original apk to the modified one.
Sent from my SGH-M919 using xda premium

Categories

Resources