Hi guys,
im currently using netdrg`s sense theme http://forum.xda-developers.com/showthread.php?t=1048792
Now i changed all the green elements of the framework-res.apk to blue. Ive done everything so far, but i have no clue how to edit the color of the progress bar. (the bar when u change the volume, download something and so on...)
Ive heard that u have to edit an xml file, but as i have no clue about editing these files, i want to ask for a little favour.
Ive attached the xml file, and the color which i will use is 1761ab (hex).
So ill thank the guy who will do this for me a thousand times and i can share the theme with you afterwards!
lg l
In order to edit this xml file you need to decompile framework-res.apk. You can use apk_manager. Once the framework has been decompiled you can easily change the hex color for the progress bar (remember that the first 2 digit are for alpha channel). After that you need to recompile the framework. Actually there is another way to do that, but it‘s a bit triky as you need to modify the xmls file by using an hex editor..
If you want i can modify and compile the xml attached for you! Let me know m8
hey, thanks for your answer.
I put the framework-res.apk in the "place here for modding" folder, opened the script and hit 9 to decompile.
Then i edited all the values in the xml file in the "projects" folder and saved it.
Now i compile it, delete the file i edited in the "keep" folder and that other file mentioned.
Now i tried to apply the compiled framework_res.apk back to the system which results in a bootloop, what am i doin wrong?
soulcrash said:
hey, thanks for your answer.
I put the framework-res.apk in the "place here for modding" folder, opened the script and hit 9 to decompile.
Then i edited all the values in the xml file in the "projects" folder and saved it.
Now i compile it, delete the file i edited in the "keep" folder and that other file mentioned.
Now i tried to apply the compiled framework_res.apk back to the system which results in a bootloop, what am i doin wrong?
Click to expand...
Click to collapse
Ok, you are getting close to the solution
Once you got the unsignedframework.zip inside the place-apk-here-for-modding folder, you have to do a little trick in order to get it working...
Unzip all the content of the "unsignedframework-res.apk". You should have 5 objects (3 folders, 2 files).
Zip these files with Winrar/Winzip (whatever) but you must choose "No compression (store)" method to zip it.
Rename this zip into "framework-res.apk".
Put it into an update.zip and it should be OK to flash trough the recovery mode.
keep me updated
Related
Hi!
what i try to do is to make my battery icon increase in 1% or 5% increments.
i got my icons and stat_sys_battery.xml from the "HTC Desire" post below
http://208.100.42.21/showthread.php?t=724778
however, after a few days trying it, i found i couldn't just drag and drop the icons to the "drawable-hdpi" folder and also not the XML files to the "drawable" folder.
"i think" this is because my OWN original XML files are all compiled and the XML copy from the HTC Desire post haven't compile, so when i replace the XML files it doesn't know how to locate the new battery PNGs
then further reading i found out "Apktool" which allows me to decompile the framework-res.apk so i can edit the XMLs
now ... my question is when i compile the folder i have the error:
w: could not find sources
i guess it's obvious that it can't find my folder ... so what the command so be?
the decompile folder is c:\apktool\test2
my compile command is apktool b test2
please help ... please explain a bit more your reply ... i am not a programmer/developer ... thanks.
kakyoin said:
Hi!
what i try to do is to make my battery icon increase in 1% or 5% increments.
i got my icons and stat_sys_battery.xml from the "HTC Desire" post below
http://208.100.42.21/showthread.php?t=724778
however, after a few days trying it, i found i couldn't just drag and drop the icons to the "drawable-hdpi" folder and also not the XML files to the "drawable" folder.
"i think" this is because my OWN original XML files are all compiled and the XML copy from the HTC Desire post haven't compile, so when i replace the XML files it doesn't know how to locate the new battery PNGs
then further reading i found out "Apktool" which allows me to decompile the framework-res.apk so i can edit the XMLs
now ... my question is when i compile the folder i have the error:
w: could not find sources
i guess it's obvious that it can't find my folder ... so what the command so be?
the decompile folder is c:\apktool\test2
my compile command is apktool b test2
please help ... please explain a bit more your reply ... i am not a programmer/developer ... thanks.
Click to expand...
Click to collapse
Im not exactly sure what errors you're getting... But heres two things that might help.
1. If you're using an already themed framework-res.apk to decompile/edit/recompile, don't. Apk Tool needs a clean version of your framework-res.apk. So use a clean version, decompile it, edit your xml, recompile, and finally copy/extract the edited xml file and put it into the framework-res.apk of your choosing.
2. Side Note: Sometimes Apk Tool will say something like "resources could not be found". I believe this is because apk tool tries to reverse engineer the apk to source, which it can't exactly do without all of the java resource files that was used to compile the apk. For XML files however, apk tool is sufficient.
Hello,
little background. i know my way around ROM installation (changing Kernels,modems, installing themes etc.) and read about how to use apk manager.
one of the things i still can't figure out, and seems to me like the next step is modifiyng themes.
i am currently using Perception 10.2, with stock theme. i really like the paragon basic theme + few more icons and items from phoneix and other themes.
i wend ahead and decompiled framework-res.apk from all the themes, and tried to copy over the images from the paragon drawable-hdpi folder to the same folder in Perception.
importent note, i know that there might be an issue with editing a .9.png file, but i assumed copying over a file that works in another rom is acceptable.
hope some of you are still with me.. here is the catch... tried to Compile the apk... and errors...
here is a parital log:
--------
|Sat 01/22/2011 -- 17:23:37.28|
--------------------------------------------------------------------------
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)
'adb' is not recognized as an internal or external command,
operable program or batch file.
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
libpng error: Read Error
ERROR: Failure processing PNG image Z:\F\kombinator work\android hack and hebrew\Developer\Tools\apk_manager_4.9\other\..\projects\framework-res.apk\res\drawable-hdpi\btn_zoom_down_disabled.9.png
libpng error: Read Error
ERROR: Failure processing PNG image Z:\F\kombinator work\android hack and hebrew\Developer\Tools\apk_manager_4.9\other\..\projects\framework-res.apk\res\drawable-hdpi\btn_zoom_down_disabled_focused.9.png
libpng error: Read Error
ERROR: Failure processing PNG image Z:\F\kombinator work\android hack and hebrew\Developer\Tools\apk_manager_4.9\other\..\projects\framework-res.apk\res\drawable-hdpi\btn_zoom_down_normal.9.png
libpng error: Read Error
ERROR: Failure processing PNG image Z:\F\kombinator work\android hack and hebrew\Developer\Tools\apk_manager_4.9\other\..\projects\framework-res.apk\res\drawable-hdpi\btn_zoom_down_pressed.9.png
libpng error: Read Error
ERROR: Failure processing PNG image Z:\F\kombinator work\android hack and hebrew\Developer\Tools\apk_manager_4.9\other\..\projects\framework-res.apk\res\drawable-hdpi\btn_zoom_down_selected.9.png
libpng error: Read Error
Click to expand...
Click to collapse
different error:
Z:\F\kombinator work\android hack and hebrew\Developer\Tools\apk_manager_4.9\other\..\projects\framework-res.apk\res\values\public.xml:3756: error: Public symbol drawable/zzzzz_tw_quickcontact_slider_grip_left declared here is not defined.
Z:\F\kombinator work\android hack and hebrew\Developer\Tools\apk_manager_4.9\other\..\projects\framework-res.apk\res\values\public.xml:3757: error: Public symbol drawable/zzzzz_tw_quickcontact_slider_grip_right declared here is not defined.
Click to expand...
Click to collapse
i hope someone can make sense out of this... i thought it would be a simple proccess, hope i did something wrong and it will be an easy fix...
Thank you so much for reading this far, your help will be appreciated!
Yossi
The problem you're having is with semi-transparent .9 files. The Android SDK png handler can't decompile them, so when you look at them in explorer they'll have a default image meaning they're corrupt.
The easiest way to deal with them is to not decompile and recompile.
PNG Only: With apk manager, take the original framework files from the ROM (or phone if stock) and drop them into place-apk-here-for-modding, then take the themed frameworks, rename them (something like framework-resParagon.apk) and drop those into place-apk-here-for-modding.
Select each one and extract (not decompile).
Open the drawable-hdpi folders side-by-side of the original and the theme, and drag (Copy) the ones you want to the original.
Then Zip the original and select System APK, and you're done. The reason this work is because the .9 files are still in their compiled state.
If you need to copy xml files, do this first, then the first step for png files: Decompile the two, copy the XML files, and recompile. Compiled XML files convert the png names to IDs which may be different between two roms. If you already have .9.png files that don't decompile, here's the fun part and I guess I'm doing all of this out of order, sorry...
Have an orginal apk decompiled with a different name, extract your modded apk, drag the drawable-hdpi out to say desktop, delete that project, decompile, drag the original decompiled drawable-hdpi into your modded one, and now you can edit/copy XML files and recompile. Then delete the project, extract, delete drawable-hdpi and drag the desktop drawable-hdpi to the project and zip it up. Done.
Or quick version.. 7zip helps.
right click the apk you want the images from, extract it.
right click open archive the apk you want the images in.
navage down to the folder that the images are stored in while in 7zip.
go back to the extracted folder and navagate down to the folder the images you want are in.
drag and drop them into the open archive 7zip window.
close archive
push
whiteguypl said:
Or quick version.. 7zip helps.
right click the apk you want the images from, extract it.
right click open archive the apk you want the images in.
navage down to the folder that the images are stored in while in 7zip.
go back to the extracted folder and navagate down to the folder the images you want are in.
drag and drop them into the open archive 7zip window.
close archive
push
Click to expand...
Click to collapse
CuriousTech said:
The problem you're having is with semi-transparent .9 files. The Android SDK png handler can't decompile them, so when you look at them in explorer they'll have a default image meaning they're corrupt.
The easiest way to deal with them is to not decompile and recompile.
PNG Only: With apk manager, take the original framework files from the ROM (or phone if stock) and drop them into place-apk-here-for-modding, then take the themed frameworks, rename them (something like framework-resParagon.apk) and drop those into place-apk-here-for-modding.
Select each one and extract (not decompile).
Open the drawable-hdpi folders side-by-side of the original and the theme, and drag (Copy) the ones you want to the original.
Then Zip the original and select System APK, and you're done. The reason this work is because the .9 files are still in their compiled state.
If you need to copy xml files, do this first, then the first step for png files: Decompile the two, copy the XML files, and recompile. Compiled XML files convert the png names to IDs which may be different between two roms. If you already have .9.png files that don't decompile, here's the fun part and I guess I'm doing all of this out of order, sorry...
Have an orginal apk decompiled with a different name, extract your modded apk, drag the drawable-hdpi out to say desktop, delete that project, decompile, drag the original decompiled drawable-hdpi into your modded one, and now you can edit/copy XML files and recompile. Then delete the project, extract, delete drawable-hdpi and drag the desktop drawable-hdpi to the project and zip it up. Done.
Click to expand...
Click to collapse
Thanks guys! i knew there should be a simple solution!
will try this soon. and post results!
Yossi
Also make sure to double check the sizes, the height and width my be different and give you issues if you copy and past the pngs
Sent from my SGH-I897 using XDA App
Also with 2.2.1 there's a problem with compressed apk files, so in apk manager, you need to set compression to 0. It's not a problem when dropping them into an apk with 7zip.
Different sized png files are usually the expanded notification bar switches. The darkness theme for example uses smaller ones. The size change is in twframework-res.apk/res/layout/status_bar_expanded.xml so those should be copied together (decompiled).
Another way to customize just 1 or a few .xml or .9.png files is to decompile the original, edit the xml or .9.png (with your modified one in mind), then compile. Then rip the compiled files from it and drop them into the themed one, assuming you already used the original the first time.
CuriousTech said:
Also with 2.2.1 there's a problem with compressed apk files, so in apk manager, you need to set compression to 0. It's not a problem when dropping them into an apk with 7zip.
Different sized png files are usually the expanded notification bar switches. The darkness theme for example uses smaller ones. The size change is in twframework-res.apk/res/layout/status_bar_expanded.xml so those should be copied together (decompiled).
Another way to customize just 1 or a few .xml or .9.png files is to decompile the original, edit the xml or .9.png (with your modified one in mind), then compile. Then rip the compiled files from it and drop them into the themed one, assuming you already used the original the first time.
Click to expand...
Click to collapse
so, double - checking that i understood...
method1: replacing images (same size) using copmpiled source and destination.
if i want to copy iver png's from one theme to another, i only decompress (or 7ZIP - open) the apk's - Replace the pics, and compress bacl (with compression set to 0).
method 2 : replacing images of different sizes
if the images are of different sizes, i should decompile both apk's, than i should copy the corrosponding XML from the new image's source, and drop in the original drawable directory, compile the apk, than copy over the image using method 1.
am i correct?
Thank you all for your help!!!
Yossi
In method 1, don't decompress it when using 7zip (or any other), just open the apk, drop the files in where they go, leaving the apk (zip) intact. If you extract the full apk, modify the files, and compress it back to a new apk it will lose the signature. That's what apk manager does when you zip it and select "system APK". It copies the signature from the original to the new one. Think of it like a zip comment. It's not a file, but a chunk of data attached to the zip that can't be copied from one zip to another.
Method 2: Too complicated. Just use method 1 to do as much as you can.
Whoever put the theme together originally did it incorrectly/lazily.
If you want to spend the time fixing it, then you need to decompile the same version of the .apk (the Samsung stock version, for example) and copypasta the themed one on top of it, while keeping the 1 pixel border.
One more question...or maybe two
when i decompile a framework-res.apk, i only get one drawable-hdpi folder.
if i open the apk using 7zip...i have a 2 folders: one is the same... and and another one that have this name: drawable-hdpi-v4
i replaced all the items i wanted in the drawable-hdpi folder..uploaded to the phone...and nothing happend... than i tried copying over some items to the drawable-hdpi-v4 foder..than i saw the changes.... the question is... do i have to copy the files to both follders? or just the drawable-hdpi-v4 folder?
another question tha poped into my mind right now, is it common that after i replace the framework-res.apk, my accounts data gets erased? (gmail account, facebook, etc)?
Thanks!
Yossi
Get the apktool in this thread and rename your old one just in case:
http://forum.xda-developers.com/showthread.php?t=864424&page=5
Oh, read the thread too. Good info!
The -v4 folders are higher resolution, or supposed to be. They take priority over the others, so if the image is only in drawable-hdpi it will be used, if it's in both the -v4 is used, or if it's only in -v4 it's used. I just leave the non-v4 alone, but it might save space to empty it, just scared to try.
You shouldn't lose account data though. That might indicate a problem. Not sure?
MikeyMike01 said:
Whoever put the theme together originally did it incorrectly/lazily.
Click to expand...
Click to collapse
I don't think the theme makers are to blame. Try decompiling a stock apk, then set the opacity of any .9.png to anything but 100%, draw9patch it again, then compile, then decompile and try to view that png. It's going to be damaged.
Well, it's actually easier to photoshop a compiled one, then remove the .9 and drop in draw9patch but you know what I mean.
I just don't think apktool can handle the extra info in a png.
Hey guyz. I have a Samsung Galaxy 5 (GT-i5503). I have installed froyo on it now from samfirmware.com. Right now I'm using a custom ROM from a guy named motafoca. I don't like the battery icons so I thought of changing it to the icons which indicated 1-100% and looked like the default one. So I pulled the framework-res.apk file from the framework directory and added the battery icons through 7zip. I also replaced the xml files in the drawable folder namely stat_sys_battery.xml, and two more files. After that the battery icon disappeared because I had the xml files from the battery mod. Figured out , it had got something to do with the xml file, I tried replacing the original files back but my phone got stuch in boot loop. So, I reflashed and its working now. After reading lot of information on this forum, I understood that we need to decompile the apk file so that we can edit the xml files. I did that and edited the xml files as necessary. Now, when I try to recompile the apk file with apk tool or apkmanager, I am getting an error saying the "Public symbol drawable/filename declared here is not defined" I am getting this error on many files including the ones that I have added. In one of the topics, somebody had suggested that we add the png files through 7zip without extracting the apk and then decompiling the apk so that the public.xml will autogenerate the ids for the new files, but that is not working. Can anyone help please? I am attaching the framework-res.apk file for reference.
Help!-
Sent from my GT-I5500L using XDA App
Bump!
Btw, did you ever get the answer?
Once you decompile the apk with apktool/apkmanager, and add your images and edited xml files, then you will need to delete res/values/public.xml; finally you can recompile the apk file and public.xml will be generated as it is building. Hope this helps.
I realize this is an old thread, but it appears the answer would still be appreciated.
I tried that, but it just gives me a bootloop.
I was wondering if there were any themers out there that have or can make a red theme for fasty 2.5. I would be very greatful. Ive been trying the past couple weeks but im not doing very good. Alot of boot loops.
PS Fasty 2.5 if a kf1 based rom. If that helps at all.
What you trying to do, I know how to code but I'm new to Java and dalvik code. Learning as I go, but maybe I can help you out.
I don't know what all you've been trying, but what I've had success (to a limited degree) with is to pull a current copy of your framework-res.apk, twframework-res.apk, and systemui.apk files out of /system/framework and /system/app (you may need to dig to find them), then open/unzip the folder with 7zip. Make copies of each apk to a safe place as a backup.
Dig around in each folder and change anything without a .9.png extension. An easy thing to do is just to use photoshop and automate a color shift. (You may have to play around with some icons - they don't like being opened if they're indexed color.)
Once you have some files ready, open the pulled .apk's with 7zip again (use the open archive option), and overwrite the files inside of them with the files you edited.
Once that's done, fire up adb again and push your updated files back to the respective folders they came from.
Reboot, and you should be good to go.
I would like to make a red version of the theme honeysmoke by the creators of fasty. I would post the link to it but the website is down.
First thing is your going to need something like Apkmanager if you don't already have it.
http://forum.xda-developers.com/showthread.php?t=1227179
Like jmtheiss said, pull the system files out and unzip them. I use Paint.net, which isn't photoshop, but works well.
OK i have apk manager i decompiled the framework-res.apk
voldomart13 said:
OK i have apk manager i decompiled the framework-res.apk
Click to expand...
Click to collapse
Well if your just starting out you should select to extract it first and then look in res/drawable-hdpi and you will see some .png files. Just look at your phone and figure out what you want to try to mod that you see in the folder. The same would hold true for systemui and twframework-res, both will have .png files in the res/drawable-hdpi folder. Be careful not to modify .9.png files, they are a special file that is stretchable and most paint programs don't recognize them and are difficult to modify with draw9patch editor.
http://forum.xda-developers.com/showthread.php?t=908270
So I've been asking for help from all the great LS-Themers on XDA with little things like changing the music controls to notifications to resolution, etc.
I've been wanting to do the edits myself, but XML editing seemed a little hard.
Anyway, I tried today and correct me if I'm wrong, but, when you want to edit the XML of a LS, you change the mtz file to zip. Unzip it and you should be presented with the files in that lockscreen, pngs, etc.
I unzipped my current LS, 'iDroid.' I got none of that.
I'm attaching the screenshot of what shows when I unzip it.
In the 'description' XML file, I don't get a huge XML code..I get this;
Code:
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<MIUI-Theme><title>iDroid Slide2Unlock</title><author>thefsfempire</author><version>1.0</version><uiVersion>1</uiVersion></MIUI-Theme>
I've opened it with the XML Editor that's on my computer. Microsoft Word and Firefox. They all show that ^
And then there's that 'lockscreen' file. That's just...a file. I can't do anything with it.
There are no folders that show the pngs and stuff.
What am I doing wrong? D: I want to start editing little things on my own, instead of asking everyone all the time.
God! said:
So I've been asking for help from all the great LS-Themers on XDA with little things like changing the music controls to notifications to resolution, etc.
I've been wanting to do the edits myself, but XML editing seemed a little hard.
Anyway, I tried today and correct me if I'm wrong, but, when you want to edit the XML of a LS, you change the mtz file to zip. Unzip it and you should be presented with the files in that lockscreen, pngs, etc.
I unzipped my current LS, 'iDroid.' I got none of that.
I'm attaching the screenshot of what shows when I unzip it.
In the 'description' XML file, I don't get a huge XML code..I get this;
Code:
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<MIUI-Theme><title>iDroid Slide2Unlock</title><author>thefsfempire</author><version>1.0</version><uiVersion>1</uiVersion></MIUI-Theme>
I've opened it with the XML Editor that's on my computer. Microsoft Word and Firefox. They all show that ^
And then there's that 'lockscreen' file. That's just...a file. I can't do anything with it.
There are no folders that show the pngs and stuff.
What am I doing wrong? D: I want to start editing little things on my own, instead of asking everyone all the time.
Click to expand...
Click to collapse
Add .zip to the end of the lock screen that just says 'file' and extract
wez89 said:
Add .zip to the end of the lock screen that just says 'file' and extract
Click to expand...
Click to collapse
Oooh ok. I got it. Thanks. I didn't know you had to change that to zip too.
Okay, so now that I got the editor and I can start changing little things.
In order for this to take effect, I need to save it over the original file as XML.
What about this 'manifest.xml.bak' file? Should I do anything with that, or leave it alone?
Once I've done the edits and save. I need to rezip the advanced folder it's in with 'themes value' that was unzipped with it, then how do I rename it back to just a 'file' type?
God! said:
Oooh ok. I got it. Thanks. I didn't know you had to change that to zip too.
Okay, so now that I got the editor and I can start changing little things.
In order for this to take effect, I need to save it over the original file as XML.
What about this 'manifest.xml.bak' file? Should I do anything with that, or leave it alone?
Once I've done the edits and save. I need to rezip the advanced folder it's in with 'themes value' that was unzipped with it, then how do I rename it back to just a 'file' type?
Click to expand...
Click to collapse
You don't need the manifest.xml.bak you can delete that if you want
To zip it back up you need winrar
You need to have everything in the right folders, so you need your advance folder with your manifest in there, and you need the theme_value..
You have to add those 2, to archive by selecting them and right clicking
Then with the winrar pop up you need to make sure 'store' is selected under compression or method, not at a computer/laptop so not 100% which it is and also make sure zip is selected not rar
Finally remove zip extension from the file and zip the whole lock screen back
EDIT: NVM I GOT IT. YAY. Haha. I can now do little things by myself on future lockscreens.
Now, the next thing I need to learn how to do is changing battery charging status and pngs.
you can use the "old format":
that is
your_theme
|__description.xml
|__preview (optional)
|__lockscreen (it is a folder)
......|__advanced (it is a folder too, coming from lockscreen)
..............|__all lockscreen stuff (as files)
......|__theme_values.xml (in lockscreen)
you ahve to zip in the contents of "your_theme" and name it mtz. then copy to phone and phone asks if you want to convert to new format. chooese yes and done
God! said:
Alright, I added the Advanced folder and themes value file to winrar.
Selected Zip and "Store" under the compression menu. Then ok.
Well it saved it as a zip as 'lockscreen' but there's no way to change it back to just the 'file' type it was.
I tried zipping THAT zip with the rest of the files into a zip, then renaming it to mtz and applying it on my phone, but it just ended up being the default lock.
I must be doing something wrong.
Click to expand...
Click to collapse
When you have zipped it up using the store and zip options, and are left with lock screen.zip.. Open the zip with winrar, don't extract just open, when winrar opens with the files go back a step so you can see the lock screen.zip rather than its files and just delete the zip extension that way and close winrar
---------- Post added at 12:36 AM ---------- Previous post was at 12:33 AM ----------
picard666 said:
you can use the "old format":
that is
your_theme
|__description.xml
|__preview (optional)
|__lockscreen (it is a folder)
......|__advanced (it is a folder too, coming from lockscreen)
..............|__all lockscreen stuff (as files)
......|__theme_values.xml (in lockscreen)
you ahve to zip in the contents of "your_theme" and name it mtz. then copy to phone and phone asks if you want to convert to new format. chooese yes and done
Click to expand...
Click to collapse
This method is by far easy and quicker in my honest opinion
Alrighty then.
Now onto my next issue.
How hard would it be to take away the charging battery/status off this lockscreen and replace it with this kind of battery charging status?
As you can see, the default iPhone charging covers up the music controls and notifications when they come in. I want just the simple glowing bar above the unlocker like the other one.
if you have both manifests then you can swap in the battery section to the ls you want (look for "battery")
you have to copy the appropiate images to your ls and might have to change coordinates
Thanks Picard. That wasn't as hard as I thought.
I deleted all the battery images from the first one and put in the ones from the second.
Deleted the battery section in the XML and replaced it with the other.
Changed the coordinates and ****ing bam! I did it!
Edit; Fixed my coordinate mistake.