HowTo: Modify Themes and what are these Drawables? - G1 Themes and Wallpapers

::EDIT:: This post may become a bit messy while i build it, but i promise to try and format it as much as possible to make it easier to read! If anyone finds anything inaccurate in this post please let me know!
A couple days ago i didn't think i would have the knowledge to be writing on how to theme for Android. But its amazing what you can learn, when you spend a good 2-3 hours reading on a subject.
If you haven't read How to Theme Develope for Windows for Dummies I would advise you to start there first.
This will basically give you an idea of where the files are that you can change. There are quite a bit of files that you can change and some you shouldn't, at least not until they are understood better. (i.e. any file with .9.png as the extension.) These are stretchable pics and can cause problems with your theme and phone if not done properly)
When you download a theme it looks and acts as if it were a full flash, but the truth is these files only contain what we need to theme. As people learn more about themeing Android, these files should become smaller and smaller. I will explain the folder structure of these update files to make things easier to understand, Below i even have screenshots of them. The best way to learn these folders and apks is to extract them and view them in the thumbnail view in Windows Explorer. I am sure you will find most if not all of the files familiar. When scrolling thru all of the png files see if you can figure out where they appear on your phone.
Folder structure: Folders and apks
Anyone who uses a computer should knows about folders.
apk files are like zip files or containers. They have folders and files inside of them.
There are many folders and files in the update.zip but we are only going to cover a few for now.
app folder - This folder contains all of the apps that will be installed during an update or wipe. You will need to extract only the apks of the apps you wish to change the icon and graphics for.
-Launcher.apk - This file is in the app folder and contains the menu launcher tab, clock, google search widget, wallpapers and some other things.
framework - This folder contains framework-res.apk, this is where the bulk of your editing will take place.
When you open a apk you will see:
assets - This will contain images, sounds and other content used by the programs. Not always used!
META-INF - This contain the encryption data of the update.zip.
res - This folder contains all of the png and xml files. The xml files are used to format the UI, these can be used to change the locations of things on the screen. The xmls need to be unencrypted first. Depending on the apk there can be a bunch of folders under the res folder but we will only concentrate on the drawable ones.
-drawable - The png files in this folder are displayed wheather the keyboard is open or closed. The majority of the files are here.
-drawable-land - These are the files that will show when the keyboard is open. There won't be as many files in these folders. Most of the time the programmer will re-organize the layout with an xml file.
Basically the interface of Android is a bunch of pictures, the program links these pictures to certain actions. As someone making themes you do not have to worry about any programming, in the future when people start unlocking the xml files to change the way things look. Then you will have to learn some programming, but for now we will only talk about changing the picture files.
Below are screenshots for the people who learn quicker visually:
To start off i grabbed the Windows 7 Beta 3.0 from Dave Da Illest 1. also assuming that you read the link above, you Should have WinRaR and it should be associated with zip files. If not then, right click the update.zip and choose "Open With..." and select WinRaR.
Now you should see this screen.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Click the framework folder, you will see framework-res.apk.
Double click framework-res.apk and it will open a new WinRaR window.
You will want to extract these files, i normally extract them to the same folder as the update.zip. Now if you try to extract the whole update.zip you will receive errors. I believe it is because the file is signed. I am not sure how to unsign the whole zip, or if you would even want to.
This is what the folder with the extracted framework-res.apk and update.zip should look like.
Now you want to open the res folder and go into the drawable folder. If you are using Windows Explorer, change the view to thumbnails and you will now see all the files that Dave Da Illest 1 has changed.
To compare the files from JF's RC30 and any other theme you will need to download JF's RC30 v1.31 here. The folder structure is a bit different but easily figured out.
Inside the update.zip the structure is different, but that is only because the people who make these themes have only included the files you need. So when you flash a theme you are not reflashin all of the Android OS, radio and boot loader. you will want to double click system and then you will see the folders from the themes, tucked in with the OS and whatnot. The app folder is at the top like before and the framwork folder is in the middle somewhere. Follow the same instructions as before to extract the files, then tile your windows vertically or horizontally to do a side by side comparison.
It is best to create a folder specifically for these files. (when i first did this my folders were a mess and i ended up spending an hour or so editing a bunch of files, only to flash the original RC30 files on to my phone.)
::TIP:: When you open an apk file from inside the update.zip file, WinRaR may default to a temp folder...(i.e. C:\Documents and Settings\bobbyd\Local Settings\Temp\Rar$DI71.579\framework-res) double check the location of where WinRaR wants to extract files, this is how i ended up flashing the original files after spending a decent amount of time photoshopping.
I will update this thread as more ideas come in or as i read up on more, i am at work and just threw this together very quickly.
::EDIT::
I added themetemplate.zip, Its basically all the apps folders and framework-res.apk extracted with the folder structure intact. I stripped all .9.pngs and xmls out.
Included in the zip is:
update
-app
--AlarmClock
--Browser
--Calculator
--Calendar
--Camera
--Contacts
--Email
--Gmail
--gtalkservice
--IM
--Launcher
--Maps
--Mms
--Music
--MyFaves
--Phone
--Settings
--SoundRecorder
--Superuser
--Sync
--Talk
--Vending
--VoiceDialer
--YouTube
framework
-framework-res
inside each folder is the res\drawable, drawable-land, drawable-port

reserved....

Thanks for the clarification, It does help explain things a bit more. I plan to get started making a theme as soon as I get done downin' all the needed files. I have no internet besides my tetherbot for now, so it's a slooow process!

I figured i'd help by answering some of the questions i had and answered by playing with and dissecting the already created themes.
I didn't want to bother Stericson or Dave with questions they've been asked 100 times already.

WOW good looks.. looks like its time to make some themes..

is it possible to merge this with my how too ?? seems like it would be a great add on

Dave Da illest 1 said:
is it possible to merge this with my how too ?? seems like it would be a great add on
Click to expand...
Click to collapse
I agree.... doesn't mean a thing by itself but merged together with your thread, would give a great visual representation of what is going on.

Dave Da illest 1 said:
is it possible to merge this with my how too ?? seems like it would be a great add on
Click to expand...
Click to collapse
Maybe the mods can sticky this, but wait until i am done editing it? then merge it with your thread. Unless I can still edit it when it is merged =)

yea....how many how to theme threads do we need?....
Like the visual representations...
Stericson

i dunno maybe a mod can put ur post where my reserved spot is on mines .. im not sure if he can tho but i hope he could lol

Stericson said:
yea....how many how to theme threads do we need?....
Like the visual representations...
Stericson
Click to expand...
Click to collapse
I think as many as it takes =) Reading Dave's for dummies howto makes a lot more sense to me now. But last week when i read it i was confused as all hell! I basically put in a bit of info and some pics.
You guys will be thanking me when its all done...just think how many PMs it might save you from =)
If PM=">,last_week"
Then
Thank.damnitpud
End If

I'll merge the 2, the right way, as soon as both of the thread creators give me the ok.

you have my ok

is it possible to like make a list of which file controls what
example i was trying to find the clock images course i found that but other things theres like sooo much :|

also i was wondering does rc30 images differ from rc8 images (for the res and drawbles etc)

Mikey1022 said:
I'll merge the 2, the right way, as soon as both of the thread creators give me the ok.
Click to expand...
Click to collapse
Can you merge it so i can still edit it? if so i am ok with that to.

As far as I'm concerened you can merge all three.....maybye have each of our posts one after the other...will be a great place for information
Stericson
EDIT:
btw,
If PM=">,last_week"
Then
Thank.damnitpud
End If
^^^ Funny

This thread will be closed and placed to rest.
Please post all new comments or question in the new thread, placed here.

Related

Changer for 6.1 Homescreen CPR and DLL files

This is a simple script for helps in locating cpr and dll(it actually looks for dla files like the weather ones are named) files that you have stored on your phone. With it, you can navigate to your file and choose it, and then it will take care of overwriting the current file being used.
I wrote this because I change up my cpr files alot and have different dll files that each one works better with different themes. So I wanted to be able to make a folder on storage card for dlls and cprs that I could easily copy and set on my homescreen.
To use this, once you have placed it on your phone. Run the FileChanger.mscr. It will ask which type of file you want to find and change, pick one and hit OK. Next, the File System Viewer will open and you will need to navigate to where you keep the file and choose it. Click OK, and it will ask you if you want to set the file change. Push Yes or No, and it will do the rest.
You can install these 2 files(in the zip below) anywhere on your phone as long as they stay within the same folder. They can be in main or storage, program files, my documents, wherever you want. Once placed, you could create a link to start menu or use CHome Config to set it to a panel for easy calling. Your cpr and dll files can be place wherever you want also, and do not have to be in the same folders. They could be scattered as long as you know where to look.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
***This is a mortscript file and you will need Mortscript to run it. I attached the cab below for anyone not already using it.
***This only works for Windows Mobile 6.1 Standard
I could have placed this in a cab, but then it would install where I wanted to keep it, and not your choice other than main or storage. That's why I left in zip form. I will add some dll files tomorrow.
EVERYONE : If you have dll files or cpr files you would like to share( and I know some of you have them and can make them) PLEASE post them in here for everyone to enjoy.
Added portrait version so cprs would load correctly.
Here's some neon glow dll files for your homescreen. These dll files also includes new default icons. Just install using the changer.
Here's a few more. After unzipping, just put them on your phone and use the changer to install.
Here's some cpr files that will work to put a simple ODSHOWeather display on clock panel. There is a slim panel and a standard size panel version. Just unzip and use the changer to install.
The Feather zip is for use with Feather Weather and includes slim, standard and mini panels.
All are for landscape devices.
This is exactly what I'm looking for....I'll have to try to figure this editing out.
Thank you so much showaco. That was so simple and exactly what I wanted. Is there a way to slow down the scrolling text. It's fippin fast.
pfunkside said:
Thank you so much showaco. That was so simple and exactly what I wanted. Is there a way to slow down the scrolling text. It's fippin fast.
Click to expand...
Click to collapse
yeah, LOL, in the weather folder. Look in program files\outerdepth\kpweather\ and find loop.mscr. Open this with notepad on your pc. When you look at it you will see the text lines being written, with the RegWriteString lines.
After each one of these, there is a Sleep command. The numbers are milleseconds, so 1000 would be 1 second, 4000 would be 4 seconds, 3500- 3.5 seconds. That's how to set the time delay, just change to desired delay, resave, and then copy to phone. You can set each sleep command to a different delay if you want, some of the texts take less time to read and some more, so just play and get it where you like it.
hey show,,,,, don't forget to post the orange .dll i made for you:
REMEMBER THIS????
Here's two more colored .dll's
Dark Blue: link: http://www.mediafire.com/download.php?msl4lxgfeym
...
Dark Red: link: http://www.mediafire.com/download.php?9zy9jdebelz
I also have a slightly lighter blue one than the one shown above, but i don't have a screenshot of it. If you want to try it, here it is.
Medium Blue: link: http://www.mediafire.com/?8tivjujyy3d
and lastly: for anyone that wants to revert back to the original layout, here is the original .dll file: link: http://www.mediafire.com/?eoyxulnejml
pudgedaddy said:
hey show,,,,, don't forget to post the orange .dll i made for you:
REMEMBER THIS????
Click to expand...
Click to collapse
Yeah, I'll post it tonight, I'll put up the whole theme you put together. I was hoping ya'll would all post your stuff on here. I know you and Outerdepth and NRG all have some, I started to post them all and decided I would let ya'll do it if you wanted to share. Thanks for posting yours!
showaco said:
Yeah, I'll post it tonight, I'll put up the whole theme you put together. I was hoping ya'll would all post your stuff on here. I know you and Outerdepth and NRG all have some, I started to post them all and decided I would let ya'll do it if you wanted to share. Thanks for posting yours!
Click to expand...
Click to collapse
ok.... i only asked you to post that one since i didn't keep that theme or .dll (imagine that?)
This is great, this way i can try yours and even put the WM7 dll from the weather 3.1 app and try them all easily.
Finally got my homescreen how i want it, but different panels to try would be great.
Since my troubles always came from my panels disappearing with a full replacement of cpr files, would it be possible the script replaces common parts of cpr files but leaves panels it doesn't know alone? (Worst are the NRG cpr files bringing up myfaves and the like)And does not show panels that are currently hidden? For say different versions of ClockExpanded w/o touching any of the others?
That would be most awesomest!
But even just replacing bronze in a jiffy is great, thanks,
Daniel
morfic said:
This is great, this way i can try yours and even put the WM7 dll from the weather 3.1 app and try them all easily.
Finally got my homescreen how i want it, but different panels to try would be great.
Since my troubles always came from my panels disappearing with a full replacement of cpr files, would it be possible the script replaces common parts of cpr files but leaves panels it doesn't know alone? (Worst are the NRG cpr files bringing up myfaves and the like)And does not show panels that are currently hidden? For say different versions of ClockExpanded w/o touching any of the others?
That would be most awesomest!
But even just replacing bronze in a jiffy is great, thanks,
Daniel
Click to expand...
Click to collapse
the cpr file is either all or nothing... no merging or editing....... basically the cpr file is similar in concept to the home.xml files..... the cpr file can be edited in notepad as well ( if you have a bit of understanding of how .css or .xml works) what basically happens is that the file( for the excalibur) it replaces the chome_320x240.cpr in the windows directory. The only way a .cpr file will mess up your panels (all by itself) is if a certain chome name ( such as "operator services" or "music") are omitted from the .cpr file..... usually the culprit is something in the registry that has to be manually changed.
I have mortscript.exe in my /Windows directory, courtesy of MiniWeather. If I place these two files into a directory on my storage card, will they still work ok, or do they need to be in the same folder as mortscript?
uansari1 said:
I have mortscript.exe in my /Windows directory, courtesy of MiniWeather. If I place these two files into a directory on my storage card, will they still work ok, or do they need to be in the same folder as mortscript?
Click to expand...
Click to collapse
I believe it will work. If they say not associated with an app, then go to your mortscript.exe and click on it to see if that will register them and then try them again. If they still won't work, then you can do one of two things: 1) move the file changer.mscr and chomerefresh.exe into the folder with the mortscript(they only take up about 3 kb) or 2) download the mortscript cab I posted which I know can run files from anywhere. I have my changer in a new folder I made called changer along with all my files on the storage card. The cpr and dla files do not need to be in same folder as the changer itself, so you can put the cpr and dla files in storage while the file changer itself is in main.
Here's the theme and the dla by itself for all the longhorn fans!
The theme zip has the dll, the scheme.xml, and the UT wallpaper.
Enjoy, courtesy of Pudgedaddy, because he loves the longhorns.hehe
Right, Pudge? Maybe I'll see you at the Red River Rivalary game.
Mini Panels
Here's a cpr for mini panels, they are narrower in width and work with ODSHOWeather for the clock. Shown here with neon blue dll.
I really don't want this thread to end up in the dumpster. Its such a neat tool and i love theming my phone.
Here's a few new dll files just for sports. I included a gold and silver tint to go with the olympics(lol). Also, here's a texans logo panel.
Any requests for team logos?
Here's a new dll file for a variant of the chrome border, this one is by Kron2.

TUTORIAL - decompiling/editing XML

**This is for system apk's, not for market ones. To modify apps you've downloaded and installed, you will need a program like the fantastic Apk Manager, since non-system apps are signed and have to be resigned after getting messed with**
*MY TYPICAL DISCLAIMER!*
I AM NOT A DEV! I just like tinkering with this phone because I'm overall an extremely picky and obsessive person. I have no prior android experience (besides a little tinkering with my X10), and am in NO way an expert. But since I know how to mess with my phone a little bit and I've been asked to share, I will =) But follow these instructions at your own risk! I am not responsible for the untimely death of your phone, so please be cautious and careful, and if you have any questions about any step, before you try it, ask me or someone who knows! I don't want the blood of your dead phone on my hands! It's Christmas, after all! =)
These instructions are for Windows computers. Sorry, I'm just not familiar with mac or linux. =(
***Editing XML's***
So you want to modify something a little more complicated than just a PNG- there's something there you want gone, something too big or small, and you want to modify an XML. Here's what you need for starters:
7zip for your computer
Root explorer for your phone
apktool and apktool-install-windows for your computer from here
-Install it to your computer, as described in the link. (Just unpacking the items into c:/Windows is easiest)
Hex editor for your computer (I really like Notepad++)
For an example, I will be using the HORRIBLE yellow pages infiltration of the LG Nitro, thanks to surely some agreement between AT&T and YP. One example is the contacts list, where AT&T in its infinite wisdom has decided that the most important contact of all is the yellow pages, being the only permanent contact stuck in your list, shrinking your visible actual contacts list:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I don't like it, and I want it gone. I've already uninstalled yellow pages, and the dead button is still there! I will edit an XML to remove it =)
1.) Copy the apk you want to modify from your phone (using root explorer) and transfer to your computer
In this case, I wanted my Contacts.apk, which is in /system/app. Keep a copy safe somewhere, just in case something goes wrong, or you want to revert back to the original apk. The vast majority of system apps are in the /system/app folder, with the major exception of framework-res.apk. This is the phone’s BIG cajone in /system/framework, and as such, should be handled with utmost care. Messing with framework-res.apk incorrectly is an EASY way to brick your phone in a heartbeat.
2.) Decompile your apk
Put the apk in C:\ (I think you can put it in other places, but just for consistency, I'll say put it there =) ). Decompile it by using apktool. You can find more details elsewhere, but to keep it as brief as possible, here's how in a nutshell (there are other ways to do this, where to put files, etc, but for consistency's sake, this is how I do it):
-run cmd.exe
-in the command window, change your directory until you get all the way to C:\ (keep typing "cd.." and hitting enter until you're there)
-in the window type the following and hit enter:
apktool d nameofapk.apk
(In this case, type "apktool d Contacts.apk")
******IF YOU GET A LONG STRING OF "Could not decode attr value..." ENDING WITH "Can't find framework for package of id: 2. You must install proper framework files, see project website for more info." (like you do when decompiling some apk's like SystemUI.apk) SKIP TO THE END FOR SPECIAL INSTRUCTIONS******
-the decompiled apk will now be extracted into a folder of the same name without the .apk extension (here, C:\Contacts)
3.) Find and edit the XML you want!
Now that it's been decompiled, the XML will be magically readable with Notepad++ (before decompiling, opening XML's with a hex editor produces gibberish. Now, you can actually read the text of it!). In this case, the XML we want to edit is here:
C:\Contacts\res\layout-finger\contacts_list_item_top_search_att.xml
In this XML, lines 14, 15 and 16 refer to that stupid bar in Contacts.apk with the yellow pages and ICE buttons. Included in lines 14, 15 and 16 are: android:layout_height="60.0dip", android:layout_height="51.0dip", and android:layout_height="51.0dip", respectively.
Change all 3 numerical values to 0.0 in all three cases, so now in lines 14, 15 and 16, it shows: android:layout_height="0.0dip", android:layout_height="0.0dip", and android:layout_height="0.0dip", instead.
Save the changes to this file and close! (You should have your original apk backed up somewhere else already!)
4.) Recompile the apk with the newly edited XML in it!
In cmd.exe (still in directory C:\), type:
apktool b nameofapkfolder
*do NOT type nameofapk.apk. Leave off the .apk extension! You're recompiling the decompiled folder, NOT the .apk! For example, here to rebuild Contacts, type
apktool b Contacts
This can take a while. It's okay if you get some "has no default translation" lines popping up. Just ignore them.
Now, in that same decompiled folder, you will have a new "build" folder. Inside are your newly recompiled files for your apk!
5.) Find the recompiled XML from the build folder and move it into a copy of the original .apk!
It will be in the same organization as it was within the .apk. For example, that XML we edited is located here:
C:\Contacts\build\apk\res\layout-finger\contacts_list_item_top_search_att.xml
If you open this recompiled XML, you'll see that it's back to being gibberish. That's because it's been successfully recompiled!
Now, find your original, unedited .apk, right click, 7zip, and open archive. Navigate to the original XML in that apk and drag and drop your newly edited/recompiled XML into that folder, letting it overwrite the original one! This is your newly edited .apk with the changes you want in your XML!
6.) Put this newly modified apk back onto your phone. Using root explorer, copy the new apk into the /system folder of your phone.
7.) CHANGE THE PERMISSIONS of the apk to match those of the original apk in /system/app.
In this case, long press on the Contacts.apk, select permissions, and select the check boxes as follows- Owner: Read, Write; Group: Read; Others: Read. This matches the permissions of Contacts.apk in /system/app
8.) Move the new apk into /system/app, and let it overwrite the original!
9.) Restart your phone!
Voila! The stupid bar is gone, and I have a little more room for my REAL contacts!
******SPECIAL INSTRUCTIONS FOR DECOMPILING ERROR******
Some apk's (like SystemUI.apk) require OTHER (framework) apk's be "installed" in order to decompile properly. To install an apk, put it in C:\, then type the following command in cmd.exe when in directory C:\:
apktool if nameofapk.apk
But which other apk needs to be installed?? The secret is that when you try to decompile your apk and it produces those errors, apktool will actually tell you (in its way) what other apk is needed! For example, decompiling SystemUI.apk results in notifications ending in this:
"Can't find framework for package of id: 2. You must install proper framework files..."
id: 2 is your key. In /system/framework, there are 3 other apk's besides framework-res.apk. These are:
RES_cappuccino.apk
RES_model.apk
RES_sui.apk
If you install framework-res.apk:
apktool if framework-res.apk
you get the following statement:
I: Framework installed to: C:\Users\User\apktool\framework\1.apk
This means that id: 1 = framework-res.apk! If you install the other 3 apk's (RES_cappuccino, model, and sui), you'll find that they are:
RES_cappuccino.apk = id: 2
RES_model.apk = id: 4
RES_sui.apk = id: 3
SO, when you try to decompile SystemUI.apk, and it says "Can't find framework for package of id: 2," it's asking that you first install RES_cappuccino.apk before decompiling SystemUI.apk! So before apktool d SystemUI.apk, type:
apktool if RES_cappuccino.apk
It will say, "Framework installed to C:\Users\User\apktool\framework\2.apk
And now, when you decompile SystemUI.apk, it will work (as will recompiling! =) )
Good luck! Godspeed! =)
This is awesome! Thank you very much.
I've successfully managed use Apk Manager 4.9 - Makes Modifying Ur Apk A Breeze (Windows/Linux) for SystemUI.apk, but it did create additional useless folders.
One question though, what about resources.arsc file?
According to apk manager that file needs to be recreated when .xml files are changed.
It seems like that's the case when you have significant changes to the xml, like deleting lines or adding code, etc. When I just change values in the xml, it doesn't seem to require rewriting resources (which I'm not super comfortable with), so until we get a recovery mode, I just try to be creative in how I edit xml's to get what I want by just changing values =)
NICE!! Great job sir!
Did you ever get rid of the headphones icon, by the way? It shouldn't be too tricky
itiskonrad said:
Did you ever get rid of the headphones icon, by the way? It shouldn't be too tricky
Click to expand...
Click to collapse
Well, kind of...I do now know how to remove it, unfortunately it will have to wait until apktool get updated to v1.4.4, because current version does not work for our resources-res.apk (we seem to have ICS formatted .apk's). I already twice soft bricked my phone trying recompile this apk
Once we get the proper tool, we might start getting some interesting mods, like more quick settings for instance.
itiskonrad, can you post the actual file for removing yp from contacts. I am on mac with no pc available at the moment.
Sure thing! Here:
Contacts - No Yellow Pages
Be sure to follow steps 6-9, though! Especially the part about changing permissions!
Great thanks. Worked great.
Sent from my LG-P930 using Tapatalk
I couldnt get the new APK Manager which is now called APK Tools to work properly. Since the original link didnt work i decided to search out the old APK Manager to give it a shot, and it worked beautifully! For those that want the old one, you can get it here:
http://www.gamefront.com/files/17870566
i used it to change my contact list to black with white text. Much nicer!
itiskonrad said:
***Editing XML's***
3.) Find and edit the XML you want!
Now that it's been decompiled, the XML will be magically readable with Notepad++ (before decompiling, opening XML's with a hex editor produces gibberish. Now, you can actually read the text of it!). In this case, the XML we want to edit is here:
C:\Contacts\res\layout-finger\contacts_list_item_top_search_att.xml
Click to expand...
Click to collapse
Hi, I have a problem, I can not correctly open the XML files from ROM. I want to edit the file primary_text_dark.xml of framework-res \ res \ I can not see it correctly. Help me please, the XML files from ROM, I can not correctly open and edit in any xml editor. What is the trick?
example
https://lh5.googleusercontent.com/-Mlx3d1--g0E/T7yNMCOcCyI/AAAAAAAAAcE/aIV-2zHN8x8/s720/fotka%2520%252014.jpg
What you are looking at is a non-decompiled xml that is unreadable. You need to first decompile the apk which carries the xml you want to edit in order for it to be readable. You first have to complete steps 1 and 2 and decompile framework-res.apk as described in the guide in order to get a readable primary_text_dark.xml.
Thank you for your advice.
Error...
Hello everyone!
Dude, thanks for the post. It is very clear!
I have a question. I did everything step by step to decompile the framework-res and edit it, but when I try to recompile it, the APK folder created inside the new folder BUILD is empty.
What can have happened?
(translation via Google Translate)
Hmm, not sure. Try decompiling and recompiling immediately after without making any changes, just to make sure the commands are working. If that doesn't work, maybe there's something wrong with the commands? For example, I know it sounds stupid, but make sure to recompile, you're typing
apktool b framework-res
NOT
apktool b framework-res.apk
Thank you Itiskonrad!
Yes, the commands are working. Decompiled and compiled again without changes, and everything went well.
I realized that change depending on what I do when this error occurs. Now I'm changing slowly and has not worked.
The strange thing is that I do not see the changes on the device. My intention is to change the entire text of the notifications in order to use a black theme in my status bar.
I made a theme based on UotKitchen and I'm improving, but notifications such as downloads and ongoing calls persist with the font color black, which makes their visibility.
I will continue testing until something works!
Big hug!
(translation via Google Translate)
itiskonrad,
Do you use an ICS leak? Could you please modify status bar apk and remove carrier from there?
Shouldn't be the final APK zipaligned?
Thanks, great

[Guide/Tutorial][17/06/12]How to make "basic" theming mods + .9.png tutorial

[Guide/Tutorial][17/06/12]How to make "basic" theming mods + .9.png tutorial
If you find this guide useful then please rate the thread, i dont really care about thanks, thanks.
Give a man a theme and he can flash for a day.
Teach him how to theme and he can flash for a lifetime.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
-------------------------------------------------------------------------------------------
"What's in the guide??"
*Basic image editing
*Using UOT kitchen to change the battery icons
*Popular image names and locations (GB)
*How to decompile using apk manager4.9
*Editing .9.png's
*How to use the universal theme.zip
*Create a batch Hue action in Photoshop
-------------------------------------------------------------------------------------------
I'm constantly seeing people asking for minor changes to ROMS, Themes, Mods etc, so i thought i would post this to let the talented people get on with what they do best, and the rest of us can stop harassing them for simple tasks that we are all capable of ourselves.
"Could you add these images from this ROM to your theme?"
"Can you change the colour of the battery in you ROM?"
"Is it possible to have different status bar colour?"
Well people it's time to learn some basic theming/modding/skinning, whatever you want to call it.Lets say you want to change the colour of the battery....
​What you will need:
*7zip (free)
*Greenfish icon editor pro (free/ windows) or *Gimp (free/ all platforms)
Getting going:
[1]
Firstly open up your ROM/Theme/Mod with 7zip and navigate to:
"system/framework/"
*If framework-res is a folder drog and drop to a suitable location on you pc.
*If it is an .apk then extract it and unpack.
TIP: drag it out then right click>7zip>extract to "***".
TIP2: Create a copy of this folder in case you make a mistake!!
[2]
Now navigate into "framework-res/res/drawable-hdpi/", in here are your battery images named "stat_sys_battery.png"
[3]
Open up Greenfish/Gimp, and drag across the images you want to adjust.
[Greenfish] Select Filter>Hue/Saturation
In the window that opens adjust the properties until you get your desired effect.
Save and close.
[Gimp] Select tools>color tools>hue-saturation
In the window that opens adjust the properties until you get your desired effect.
Save and close.
[4]
When your happy with the results open up(NOT EXTRACT!!) the Universal Theme template provided using 7zip and navigate to-
"system/framework/framework-res.apk/res/drawable-hdpi/"
Drag the newly adjusted images across.
Close and place on your sdcard to be flashed from recovery.
-------------------------------------------------------------------------------------------Now lets say you want to use different signal images....
​[1]
Get the ROM/Theme/Mod containing the images you want to use
Open up with 7zip and navigate to "system/app/systemUI.apk/res/drawable-hdpi/"
in here are your signal images named "stat_sys_signal.png"
[2]
Open up(NOT EXTRACT!!) the Universal Theme template provided using 7zip and navigate to-
"system/app/systemUI.apk/res/drawable-hdpi/"
Drag the desired images across.
Close and place on your sdcard to be flashed from recovery.
-------------------------------------------------------------------------------------------
That was easy was'nt it!
There are free software programs out there like gimp that let you batch process images but im not aware of the methods used, if anyone is then please post.
Please feel free to post helpful info and ask questions about locations of images or anything else related. Hopefully myself or anyone else in the know will help.
If you want to go deeper into theme-ing here is an amazing guide:
http://forum.xda-developers.com/showthread.php?t=916814
-------------------------------------------------------------------------------------------
>>> Universal Theme empty template <<<
Thanks to JR soft and also Intronauta for universal theme http://www.htcmania.com/showthread.php?t=258333 .Based on the "VillainTheme system" tool by VillainTeam. More info etc, head to www.villainrom.co.uk.
dully79 said:
I'm constantly seeing people asking for minor changes to ROMS, Themes, Mods etc, so i thought i would post this to let the talented people get on with what they do best, and the rest of us can stop harassing them for simple tasks that we are all capable of ourselves.
"Could you add these images from this ROM to your theme?"
"Can you change the colour of the battery in you ROM?"
"Is it possible to have different status bar colour?"
Well people it's time to learn some basic theming/modding/skinning, whatever you want to call it. Ill add more info to this as necessary.
Please feel free to post helpful info and ask question about locations of images or anything else related. Hopefully myself or anyone else in the know will help.
Like i said is is a very basic guide, if you want to go deeper into it, here is an amazing guide:
http://forum.xda-developers.com/showthread.php?t=916814
>>> Universal Theme empty template <<<
Thanks to JR soft and also Intronauta for universal theme.(based on the "VillainTheme system" tool by VillainTeam. More info etc, head to www.villainrom.co.uk).
Hopefully this helps some people.
Click to expand...
Click to collapse
Thanks dully .Very usefull guide indeed.I use paint.net for changing colour but i found really usefull this empty template
And a little help.The only thing i do is to make the necessary changes png's or xml's into system/app or framework is that right?
Do i need anything else eg extras?
Thanks again!!!
This will come in useful. thanks
Your very welcome.
I use "actions" in photoshop for batch processing, but i also have another program which is really good called "AbleBatchConverter", unfortunately thats paid software.
Greenfish is ideal for minor adjustments- its a small file size, easy on resources, quick and has some good features, but best of all........it's free.
siberian tiger said:
Thanks dully .Very usefull guide indeed.I use paint.net for changing colour but i found really usefull this empty template
And a little help.The only thing i do is to make the necessary changes png's or xml's into system/app or framework is that right?
Do i need anything else eg extras?
Thanks again!!!
Click to expand...
Click to collapse
If you put any xml's into the framework folders there is a good chance it will break it from being "Universal"
The "XTRAS" depends on what your doing.
The "XTRAS" folder is where you put apk's to be installed instead of just images in the system folder.
Example how to use "XTRAS" folder:
Open "Vending.apk"
Goto "res/drawable-hdpi/"
Drag and drop in images with matching names
Close apk
Open UT empty template
Goto "XTRAS/app/
Drag and drop Vending.apk inside
Close and place on sdcard for flashing
When flashed this will install "Vending.apk" into "system/app/"
Hope this helps.
Always here to help and share my friend...!!!
===THANK YOU=== mate !
Universal-Flasher-tool_v3.0
Hello everyone!
This version of the template that you use (2.X) is somewhat outdated. Version 3.0 has many new features, and is much faster and safer.
http://www.multiupload.com/HOP6RWMNOB
Basically, has a new advanced configuration file (MOD.config) where you can enable / disable functions (more information inside the file).
Have also been replaced binaries zip and busybox with a new binary 7z, much faster. The process is much faster now than before.
It also supports theming non-system applications (though not recommended).
Enjoy it!!!
jrsoft said:
Hello everyone!
This version of the template that you use (2.X) is somewhat outdated. Version 3.0 has many new features, and is much faster and safer.
http://www.multiupload.com/HOP6RWMNOB
Basically, has a new advanced configuration file (MOD.config) where you can enable / disable functions (more information inside the file).
Have also been replaced binaries zip and busybox with a new binary 7z, much faster. The process is much faster now than before.
It also supports theming non-system applications (though not recommended).
Enjoy it!!!
Click to expand...
Click to collapse
Does it support "sdcard"?
The last script supported "emmc", that's why I still use v.2*
dully79 said:
Does it support "sdcard"?
The last script supported "emmc", that's why I still use v.2*
Click to expand...
Click to collapse
Yes, the script autodetects the path of the sdcard. You can also manually set the path very easily to the new file MOD.config. Check this out:
Code:
[SDCARD PATH]
##########################################
default_internal_sdcard=/emmc
##########################################
##########################################
default_external_sdcard=/sdcard
##########################################
*It's not necessary to modify this
parameters unless you really need another
custom folder path for your sdcards in the
recovery. You should try before change
this!! and remember don't modify the
generic "sdcard" folder name in XTRAS.
The system will adapt the paths depending
of this values.
Cheers mate, your a legend. I could never get vrtheme to play nice but yours runs perfect.
If anyone previously downloaded the empty template, please download this version instead, it has many improvents over the old zip including speed.
Links:
>>>HERE<<<
And in the OP.
Thanks.
UOT kitchen battery
Ok lets say we want to change our battery for the new flavour of the month.
If you plan on using a battery theme from UOT kitchen then just follow "UOT Battery" instructions.
If you want to use a theme you found floating around the forums that doesn't work for your ROM then follow "Custom Battery".
UOT Battery
Here is how to gain a new battery theme using UOT kitchen:
FOR ICS AND ABOVE USE SYSTEMUI.APK
Get your "framework-res.apk", there are many methods to do this, i'll let you pick one.
Go HERE and click the "file upload" tab, select "system files" and upload your framework-res.apk. To avoid problems please us a CLEAN/UN-THEMED framework-res.apk
Now click the "battery" tab, check "use this mod", now choose whichever battery theme tickles your fancy.
Click the "summary" tab and "submit work to kitchen"
Wait for the kitchen to cook your files then flash your new battery theme from CWM
Reboot and enjoy
---------------------------------------------------------------------------------------------------
Custom Battery
Here is how to gain a new custom battery using UOT kitchen:
Download and open up the battery theme you would like to use using 7zip.
Navigate to "framework-res.apk/res/drawable-hdpi/"
Count how many "stat_sys_battery_*.png" and "stat_sys_battery_charge_*.png" are inside and remember or write it down(keep this window open).
Get your "framework-res.apk", there are many methods to do this, i'll let you pick one.
Again navigate to "framework-res.apk/res/drawable-hdpi/" and count how many "stat_sys_battery_*.png" and "stat_sys_battery_charge_*.png" are inside, then close.
If there is the same number of images in both files then goto "UT.zip" below, if not continue to step 7.
Go HERE and click the "file upload" tab, select "system files" and upload your framework-res.apk. To avoid problems please us a CLEAN/UN-THEMED framework-res.apk
Now click the "battery" tab, check "use this mod", now find a battery theme on UOT that uses the same number of images as what you wrote down earlier.
If applicable scroll down to the bottom and select a charging animation style, I would reccomend hybrid.
Click the "summary" tab and "submit work to kitchen"
Once your theme is cooked open up the UOT.zip with 7zip and navigate to "framework-res.apk/res/drawable-hdpi/".
Now select all the battery images from the window you left open earlier and drag and drop them onto the UOT.zip window, click yes to confirm and close.
Now you have a modified framework-res.apk that will correctly display all the battery images, just simply flash from CWM recovery.
---------------------------------------------------------------------------------------------------
UT.zip
Download the empty template from the OP.
Open up the empty template and navigate to "framework-res.apk/res/drawable-hdpi/". If the directory doesn't exist just simply create the folders being case-sensitive.
Now select all the battery images from the window you left open earlier and drag and drop them onto the empty template window, click yes to confirm and close.
Now you have a universal theme.zip that will theme battery images on your ROM.
Here is a link for a esk02k's CWM flashable glass orb battery mod zip, it contains 100 discharging and 100 charging png's:
esk02k battery orb mod
Preview
And here is a link for my Power Battery mod, it contains 100 discharging and 100 charging png's:
Phone Candy Power Battery
Preview
Both links are in universal theme format.
---------------------------------------------------------------------------------------------------
Thanks for the guide, dully79. Got a quick question...
I am currently on a stock (but rooted) 2.3.4 rom on my international Galaxy S2. I am pretty noobish at hacking around with the Galaxy S2, so if I may.
Rather than editing framework-res.apk from a rom and then flashing the whole thing in CWM, can I just extract the framework-res.apk from the rom running on the phone at the moment, using Root Explorer, edit the PNG files that I want, save the PNGs back into framework-res.apk and then just overwrite framework-res.apk on the phone (again using Root Explorer), reboot the phone and then enjoy the changes I've made?
Or is that asking for a disaster?
I apologise for being incredibly ignorant in the ways of Android modding. I'm still getting used to all this Android modding stuff. Modding the Nokia N900 was no trouble at all!
I have made a full backup of the phone on CWM, and I have one of them USB Jigs, just in case...
I wouldn't recommend it as your framework-res.apk is constantly being called by various things. I tried it once using root explorer on my old HTC hero and ended up in a world of pain.
If you want to do edits on board the best thing would probably be:
1- copy and paste your framework-res on your sd.
2- extract your framework and make the edits you want.
3- download the UT empty template from OP and extract that, if the files are extracted individually instead of into a folder then put them into folder.
4- copy your new images into the extracted empty template in MORPH/system/framework/framework-res.apk/res/drawable-hdpi/ (if the directory doesn't exist just create it being case-sensitive).
5- zip up the files INSIDE the extracted empty template folder using store add the compression method (beware that some zip apps don't seem to play nice with cwm).
6- flash from cwm
This method will only replace the images you added into the extracted empty template.
Hope this helps, if you need anything else just ask.
Thanks for the reply
So the empty theme template will work ok with the stock (but rooted) 2.3.4 Touchwiz rom that my phone shipped with?
Will the same method you described above also work for systemui.apk so I can edit the green Wifi/Bluetooth/GPS/Sound/Auto Rotation switches in the notification tray?
Thanks again I'm looking forward to shifting the green-ness of a lot of the graphics - I'd much prefer blue!
Yes mate it will.
If you just want to change images use the MORPH folder with the correct directory to the images like described above.
And if you want to replace full apk's you place them in XTRAS.
Don't edit any .9.pngs, as in changing the hue, these need to be decompiled before editing.
You can swap compiled .9's for compiled .9's but be careful with them as these can cause force closes and boot loops. There are guides around xda about editing them.
Another thank you to you, dully79!
I've followed the instructions you laid out, and I've turned the stock battery level (and charging indicator) blue!
I'd post a picture, but I'm not allowed to yet. Gotta shift my forum training wheels.
But I assure you, it looks goooooooood...
This is only just the beginning...
I'm going to make every single graphic a different colour, with lens flare! /vomits
Thanks again for this guide, this has started me off on the journey of Android discovery!
Crugath said:
Another thank you to you, dully79!
I've followed the instructions you laid out, and I've turned the stock battery level (and charging indicator) blue!
I'd post a picture, but I'm not allowed to yet. Gotta shift my forum training wheels.
But I assure you, it looks goooooooood...
This is only just the beginning...
I'm going to make every single graphic a different colour, with lens flare! /vomits
Thanks again for this guide, this has started me off on the journey of Android discovery!
Click to expand...
Click to collapse
No probs mate, I'm more than happy to pass on what I've learned.
Don't hesitate to ask if you needed owt.
Seeing as you've offered, I think I'll take you up on the offer to answer more questions! lol...
I am trying to change the progress bar colour. I can find progressbar_indeterminate#.png, which is fine, but I can't find the regular solid progress bar. Do you know what that's called and where it might live?
And another, I'm trying to change the colour of the background of a slider for things like changing volume in the settings, I also can't find the PNG for that. If you know where I can look, please let me know!
That's found in progress_horizontal.xml in framework-res.apk/res/drawable.
To make edits you need to decompile first to make the xml readable, then re compile.
Here is a blue progress bar with a grey background from my phone candy theme if you don't want to edit xmls, just extract it from the zip and put it in the correct directory in the MORPH folder.

[GUIDE] Changing status bar icons by editing framework-res.apk and lots more

So friends, here is a quick and easy guide for changing the status bar icons of your Gingerbread(Actually any phone )
For those who don't know how to do it(for anyone actually :highfive
Theory
Android is the awesome platform which is easily configurable and is able of being edited very easily
The icons used in every app and Android framework are located as png images in apk of those respective apps in location:-
*.apk/res/drawable-mdpi (in my case, as our phone is mdpi)
So, we can change any icon of our status bar like battery, signal, (not clock[clock is to be configures in SystemUI.apk{will post how to change it shortly}]), etc by editing png's in framework-res.apk
Not even that, you can edit images of any app as I told you
There are several ways to decompile and compile apk in which we have made change
If we want full access of apk and want to change every thing like the xml's in it and smali content in jar files, then we would have to do it on computer by apktool or apkmanager
But, we are here to only change image, so we would not go in detail of apktool or apkmanager. For changing images, that can be very easily done even on the phone by an app NinjaMorph that is made for developers by our senior head and DEVELOPING LEGEND Stephen(Stericson)
But be careful as backing up the original file if you do something wrong
And as you all know any developer or even a newbie posting something interesting that you want to try WILL NOT BE RESPONSIBLE for your mobile blowing up, resting in peace, sleeping like a dead, behaving like a non-living BRICK, or anything whatsoever that may or may not happen to phone in this universe or any other universe known or unknown
What to do if anything happened to my mobile
We have had a backup of your original file so we can restore it
But if while editing the system files like framework-res.apk
If you deleted some un-backed up apk's
Well you can always have backup of your ROM and that is why Koushik Datta has made clockworkmod Recovery
You can restore your ROM from there
Pre-Requisites
Patience
Mind
A Android (A spare one if you brick your phone, just kidding)
Root access(to change the apk)
NinjaMorph(http://bit.ly/ninjamorph)
Root Explorer(Optional)(http://bit.ly/stericson)
GUIDE
So Let's Start
Download NinjaMorph. Install it and give it root access. It will prompt for starting checks. Click on start checks.
Now you would have three options, namely, New Project, Finish Project, Existing Project
Click on new project. Go to system/framework/ and click on framework-res.apk. It will start extracting files
Once it has extracted all the files, it will open to show you what is inside framework-res.apk.
Exit it and go to your file explorer.
Go to /sdcard/AndroidThemes/workspace/framework-resapk
This is what is inside apk. Go to res/drawable-mdpi folder
There you will see hundreds of icons of your menu, lockscreen, battery, signal, and everything
You can edit them and replace them as you want. But the name of the file you are replacing and size and dimension must be equal to the file you are replacing with(I recommend Googling and finding icons of battery, signal, and other things)[I have even used hdpi icons, there was no problem]
If you download a theme file which is to be flashed in recovery that is not for your phone, no problem, extract the zip and place its framework-res.apk in your sdcard and extract the apk with Ninjamorph. Replace your icons with its icons and TADA
After you have done replacing the icons and you are satisfied(I am never)
Go to NinjaMorph. Click on Fininsh Projects. Click on framework-resapk. It will recompile and ask to replace the original apk with modded one. Click OK
Then it will ask if you want to remove the completed project, Say No(As you would need it if something gets wrong)
Reboot your phone
Maximum chances are that your icons will be replaced. Rare cases have their status bar gone or no change, if so:-
Download(Buy) Root Explorer. Go to /sdcard/AndroidThemes/workspace,
There you will see framework-res.apk. Copy it and go to /system/framework
Mount as R/W
Paste the apk. If it asks that file already exists, overwrite it.
SET PERMISSIONS
Long click on framework-res.apk and click on permissions
You will see three columns
Read Write Execute
You have to set them in the following way
x means you have to tick it
blank means uncheck
Read Write Execute
.....x........x.................
.....x...........................
.....x...........................
Click OK
You will see it as rw-r--r--
Reboot
Do it over again if nothing happens
Enjoy
This way you can edit not only framework-res.apk but any apk
Treat
This section is different from the thread topic
I: Faking Up
Want to make your device show Jelly Bean in About Phone
Go to Root Explorer
Go to /system
Long click on build.prop
Click on Open in a Text Editor
Change the files as
ro.build.display.id=Jelly Bean
ro.build.version.release=4.1.4
Save Changes
Reboot
II: Easter Egg
You all must know that an image of GingerBread Zombie comes up when you repeatedly click on Android Version in Setting>About Phone
Wanna change it to look like Jelly Bean?
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Extract framework-res.apk
Go to res/drawable-nodpi
You will see platlogo.jpg
Replace it with the file in attachment
Recompile
Reboot
Troubleshooting
Will find and update it
Tell me what problems are you having
Nice guide. How to change color of clock in gingerbread because white is ugly? Maybe you can add that in future.
Verstuurd van mijn GT-S5660
FlemishDroid said:
Nice guide. How to change color of clock in gingerbread because white is ugly? Maybe you can add that in future.
Verstuurd van mijn GT-S5660
Click to expand...
Click to collapse
Yes
It is a tedious process
By editing smali files of classes.dex of SystemUI.apk
BUMP
which file do you you need for notificationbar background???
jkoetsier said:
which file do you you need for notificationbar background???
Click to expand...
Click to collapse
Add @amdroid:background @ frawable/statbarbg
In statusbar tracking.xml
Then add statbarbg.png in drawable-mdpi
For gb clock u need to do smali
Devilsking has made good guide
Sent from my ST25i using xda app-developers app
Thanks man, its working!!
Sent from my GT-S5660 using xda premium
SpaceCaker said:
Add @amdroid:background @ frawable/statbarbg
In statusbar tracking.xml
Then add statbarbg.png in drawable-mdpi
For gb clock u need to do smali
Devilsking has made good guide
Sent from my ST25i using xda app-developers app
Click to expand...
Click to collapse
*android
BUMP
BUMP
BUMPS are unneeded, if theres nothing to say, dont do it.
Sent from my GT-S5660 using xda app-developers app
Bigger PNG's
Quick question, I know this is an old topic, but upon googling I found this and I feel that my question sort of belongs here. Not even sure if OP is still around to look at this thread, but here goes:
I swapped out a png image for the statusbar icon of an app called CoolSymbols (not using this guide, but using APK Multi tool, but I imagine that the png sizes will have to be the same). Now, this app had a quite ugly statusbar icon, with jagged edges. I replaced it by a circle icon. This circle is pretty much the same size as the previous icon, so the icon looks jagged as well.
Here is the question: Do I simply make a bigger png image, so it will get cropped <---- doubt this
or do I create another folder like res/drawable-hdpi, but for xxhdpi (drawable-xxhdpi???), and if so will that fix the problem, or will I also have to point to that folder somewhere in another file <--- probably the way to go
I hope someone can help me out here!
(PS: I hope my issue is clear from the text above, I don't have a possibility to post proper screenshots until tomorrow, but they will be provided if needed)
(Also I'm sorry if there may have been a more recent topic about this, then I totally missed this!)
JaySilverMusiq said:
Quick question, I know this is an old topic, but upon googling I found this and I feel that my question sort of belongs here. Not even sure if OP is still around to look at this thread, but here goes:
I swapped out a png image for the statusbar icon of an app called CoolSymbols (not using this guide, but using APK Multi tool, but I imagine that the png sizes will have to be the same). Now, this app had a quite ugly statusbar icon, with jagged edges. I replaced it by a circle icon. This circle is pretty much the same size as the previous icon, so the icon looks jagged as well.
Here is the question: Do I simply make a bigger png image, so it will get cropped <---- doubt this
or do I create another folder like res/drawable-hdpi, but for xxhdpi (drawable-xxhdpi???), and if so will that fix the problem, or will I also have to point to that folder somewhere in another file <--- probably the way to go
I hope someone can help me out here!
(PS: I hope my issue is clear from the text above, I don't have a possibility to post proper screenshots until tomorrow, but they will be provided if needed)
(Also I'm sorry if there may have been a more recent topic about this, then I totally missed this!)
Click to expand...
Click to collapse
You need to create an image of correct pixels according to your phone's dpi
Have a look here - http://developer.android.com/design/style/iconography.html

[Guide] Modding your rom.zip

Dear all,
I have recently managed to modify Lloirs SlimBean 3.1 rom to both update the apps and adjust the themes, so I thought I would take the time to share how this can be done with you all.
This guide will not tell you how to build a rom from source, but instead how to initially ruin the perfectly good rom someone else made, and then eventually customise it to your little hearts content without ever having to ./make it.
The intent of the guide is to cover
rom.zip File structure
apks & apktool
SystemUI and framework-res.apk
Anything amazing I haven't thought of yet
The first thing to realise is that both the rom file that you flash and the .apk files within it are all basically .zip files and can be opened using 7zip or other linux variants like fileroller. So if all you want to do is open up the rom and poke around, then I suggest you do just that. Its a great place to start to try and get your head around what is going on in there!
I have tried to do all of these modifications with the minimum install of tools and whatnot, as I like to be as close to what is actually being done as possible. There are a variety of all in one tools available, and a quick search of XDA will find them. In my experience these tend to become outdated quite quickly or development stops. So best to learn from the basics, which means the lowest level of tool possible.
With all that said I strongly recommend getting your mits on Gimp-2.8, fileroller and apktool.
Code:
sudo apt-get install gimp file-roller
Apktool can be found from the Git - repository or the google code site,
http://code.google.com/p/android-apktool/ I'll add install instructions and info on this tool in the specific section. There is also an excellent XDA thread covering the progress iBotPeaches is making with the tool.
http://forum.xda-developers.com/showthread.php?t=1755243
rom.zip File Structure
WIP
OK lets get started with the basics. Download a flashable rom.zip file and start poking your nose where it didn't belong before. If your ready yo get down and dirty just go ahead and unzip it into its own folder. Depending on what rom.zip you have will depend on how much of the file structure below you will see:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
and here we have the root of the flashable.zip starting from the top we have:
data: this contains anything that is already signed and not part of the original build but that we want to install with the rest of the rom
META-INF: Full of all the meta information you could ever dream of. This contains all the certification and signing files along with our most important file of the install script.
system: This contains all the files that actually make up our ROM so this is everything above the HAL (Hardware Abstraction Layer). In here are the goodies I will describe how to play with later.
boot.img: Is the all important kernel, if you are S-OFF this will flash on install, if not you will need to use fastboot to flash it separately.
So if your unhappy with all of this and want out of the woods already then you can just re-zip the files back together and they will work fine, no harm done. If not the lets move onto the easy folder data. I say easy because we can't break anything here, if you get it wrong then the packages here just won't install.
DATA
So as we can see above, we have a folder called app, which is full of a load of packages that I wanted to include into the rom, but and this is the important part. I didn't want this apps to be system apps, this means I wanted them to be easy to remove without using root access. As you will see system apps live somewhere else, not totally unlike the system/app folder :silly:. Another important point is that the apps/packages, I will use these terms interchangeably, that get installed from here are all signed, this means they have a signature in there meta.inf files saying that they have not been messed with. Most app developers will sign there work, to help keep it safe, and stop people from pirating it with such ease. All apps from the playstore are signed in such a manner. The apps in other folders must not be signed, but we will get back to that. If you have any apps or packages you have got the .apk from XDA thread or elsewhere this is one of the best places to put them if you want them to install with your rom.zip
So the truth be told, I have no idea what other folders you can put in aside from the app one, but I am sure there are plenty, if you find any let me know.
NEXT, we have the META-INF folder:
META-INF
Here as mentioned we have or CERT.SF which is a certification file, our MANIFEST.MF which is the manifest ie list of everything going into this rom, and CERT.RSA another signature file. DON'T BE MESSING WITH THESE. They are core to the install process, and generated by the build scripts used to create the rom in the first place. You can open and look at them all, which will help your general understanding and break nothing, however No saving the files.
Above is the full expanded file structure, again there is really nothing you want to mess with in here, but I'll explain what I know about them. First up is the:
Android folder files, which these cover the Over The Air (OTA) update information, this is just some data that identifies what version etc of the rom for what phone you are using. It used to make sure you get the right ota update, in this rom I haven't set up ota as I have literally no idea how.
google folders stashed in the second android folder are the updater files, this is effectively a list of what the recovery program is to do when installing the rom, so you will even find the lovely message that gets printed as your rom installs saying its all going well.
This leaves us with the most important of all the folders, the system folder. In here as mentioned before are all the golden nuggets that make the trove that is your rom. Lets take a peek.
As we would be hoping the folder is full of goodness! Taking it from the top we have:
SYSTEM
system/addon.d This contains shell scripts (Ones that would run in your terminal) here we have the 50 - slimupdate.sh slimupdate script, again for OTA but this backs up the hosts (I'll get to this later) file so that it is re-instated after the upgrade. Secondly we have the 81-aio_gapps.sh which backs up the gapps that you had installed before the ota update. So they can be put back afterwards. Feel free to open these look around, and if your not doing any ota they are pretty useless.
APP
system/app This is a very significant folder as it contains all the apps that will run as part of the system, in here you'll find the dialer phone.apk, the google search package velvet.apk, the google play store vending.apk and your text messenger mms.apk. All of these files are important, come unsigned as they used to be unavailable on the playstore, and for other important reasons I am unaware of. The important part is that when we start to think about editing them with apktool, or you make your own they stay unsigned them.
The system folder is protect as read only (-ro) so that these files are not available to be changed during normal use of the phone. Of course using esExplorer or another root explorer you can change the -ro mount setting to -rw allowing you to write to the folder as well, and so change the files.
I will be happy to answer any questions as to what .apk file relates to what if you are stuck at any point. You can remove and re-install these as you wish, but be warned remove the sytemUI.apk will result in very limited functionality on the phone, which is why I will be talking it up a bit later. Its also worth noting that different roms use different android versions of the .apk and they won't always play nicely together. Whats more some of the .apks are reliant on each other, for instance googles gallery.apk and camera.apk have cross funstionality, as do mms.apk, phone.apk, contacts.apk, and contactsprovider.apk, as they share usage and files.
BIN
Just like in your linux file directory the bin folder holds all the functions and programs that get called throughout the day to day use of android. As an example adb and the backuptool are in here. Again I would advise not messing with these files, but be aware that when your trying to add new packages or functionality to a rom you may find yourself adding files or functions in here.
/-- OK enough for now I'll get back to this --/
apks and apktool
OK so hopefully we now know where all the lovely .apk files are hiding within the file structure of our rom. Which don't get me wrong is nice enough in itself, but what we really really wanna do is open these bad boys up and start editing them just the way we like it.
The simplest way to do this is with 7zip or fileroller, you should be able to just double click pop them open, then navigate to the res folder where you will find all the folders with the .png and .9.png s for the gui systems in the app. If your using gimp or photoshop or pretty much any paint related software you can immediately go ahead and edit the .png files. The smart thing to do here is not to replace any files but edit and save them as the same resolution, as you may have noticed that the different res folders are separated into different resolutions and upright and sideways display. For the HOV most of what we want will always be in teh HDdpi or xHDdpi folders. Do Not Edit the .9.pngs As this will result in the failure later. This method is only really useful if your lazy, and only want to grey-scale a single image or what.
If you've got this far you probably want to be able to edit the .9.png s and start opening and changing the .xml code so that you can edit default backgrounds and text colours. To do this we will want the excellent apktool,
http://code.google.com/p/android-apktool/
This tool will unpack the .apk file and allow us to rebuild it as well, however it is rom specific to some degreee, as some .apks have been created using a different aapt file (Slim, some AOKPs) and so will require a more specific version. This may sound like a pain, but it can be dealt with super easily.
The slim one can be found here and has just recently been updated to handle Slim4.4 apks
https://github.com/SlimRoms/apktool
So how do I install, and then run these tools? How do I swap between slim and aosp or other .apktool versions?
First is first, download the version of the tools you want, either through direct link on the googlecode page or from downloading as .zip from the github page. Its worth noting that the latest apktool (v2) which works with java1.7 and can be downloaded from the github works slightly differently from the guide here, but its easy to work out how and is documented on the website.
I am going to assume we are too lazy to read the website, in which case stoppit go back read the website!
That done we can now run the install.sh script in terminal which will create an apktool folder where we can run the tool to our delight.
Importantly it should also put an aapt, apktool, and apktool,jar file into our /usr/local/bin/
Please note that any file structure starting with / is from the true root of the file structure whereas any with ~/ will be starting from your root folder in my case /mcgi5sr2/
This is one place where files go that you can execute anywhere within your file structure, so you can apktool anywhere in your file structure, please not that the decompiled files will always end up in your ~/apktool/<fileName>.apk folder.
So with this knowledge we can rip the aapt, apktool and apktool.jar out of the slimapktool, rename and put them in the /usr/local/bin/ folder for safe keeping. To use them in the heat of battle we simply rename the exisitng ones to 1.5 or 2 or whatever really, then change the name of the slim files back to aapt, apktool and apktool.jar . This way we can swap between them with ease. There are other ways of doing this, but they are beyond my ken (understanding).
OK so we are now installed, and can swap between apktool versions and have an apktool folder! We can really begin.
Delve into you rom or phone and pull out systemUI.apk from your rom/system/app folder and framework-res.apk rom/system/framework/ folder. This can also be done using adb
Code:
adb pull /system/systemUI.apk /apktool/systemUI.apk
adb pull /system/framework/framework-res.apk /apktool/framework-res.apk
Should do the trick, With some HTC roms ie stock you may find you need to also pull the htc-framework-res.apk. Once this has been done then one of the most important steps takes place. We extract the file framework for the rom so that we can decompile and recompile successfully for the phone. From within the same folder as the systemUI.apk and framework-res.apk on your computer type:
Code:
apktool if systemUI.apk
apktool if framework-res.apk
this will create a framework folder within ~/apktool/ which should contain a 1.apk and normally a 127.apk these are SUPER important let them be.
Finally it seems we are ready to decompile the .apk file we wanted to edit, a good place to start is the phone.pk or mms.apk so move the file wherever, I use the ~/apktool/ folder for all this craziness. Then type:
Code:
apktool d mms.apk
The magic should happen and you will have a ~/apktool/mms folder! In which is basically a lot of the same stuff in the unzipped version we talked about earlier. This can be edited to your delight and then recompiled, in fact its worth recompiling immediately to check it all works, nothing more annoying than spending a long time working in your res and values folders only to have it not recompile! So,
Code:
apktool b mms
Note the fact that the .apk is no longer present this is because we are building using the folder as source.
We are not done! We need to make sure the certification and signing is all correct, so we need to open the original .apk file, and extract the AndroidManifest.xml and the META-INF folder and replace the ones in the ~/apktool/mms/build/apk/ folder this will make sure we have the original signatures. Then we
Code:
apktool b mms
one final time, now the finished mms.apk should be in ~/apktool/mms/dist/ folder ready for use in the rom.
Once decompiled not only can we edit the .png files in the res/drawable folders but we can edit the .9.png files and the .xml and if we are really know what we are about the .smali files. I strongly recommend staying away from smali unless you really know whats up. There is an important rule to follow when editing .9.png files as well, that you should not alter the black lines that surround the edges. Everything else can be edited bar them.
As you can see above these lines normally only a pixel or so wide, but play an important role in how the files are used, stretched, repeated etc. In fact in some cases I have found that even using black (rgb ff000000) caused problems so I used just off black (rgb ff010000). The RGB codes used in the .xml files are also slightly different to normal, the first two digits represent how transparent the colour is with ff being solid, and 00 being transparent.
.xml files of interested will undoubtedly be found in the /res/values folder, as this is where most of the colours are defined.
There are a lot of things that can go awry in this, but if you follow these instructions you should be cool. Any issues you can try me, or go for the mega thread on apktool listed at the top.
A few pointers on what you'll find in the different folders once you've decompiled the .apk can be found in the post below about SystemUI.apk and Framework-res.apk
SystemUI and Framework-res
reserved to cover these special apks
Forgotten Isle
reserved for any new important things I may want to tag onto the en of this
File Structure
Also reserved...... for a reason yet to become apparent
Awesome work mcgi5sr2. This guide is really useful..
MScorporation95 said:
Awesome work mcgi5sr2. This guide is really useful..
Click to expand...
Click to collapse
I'm pretty busy right now, but will try and finish this for anyone else who is interested. I would add a build guide, but there are a lot of those out right now anyway.
If people are interested we could start a build and build errors thread for Primo to help each other out
Thank you!!!
---------- Post added at 09:01 PM ---------- Previous post was at 08:55 PM ----------
Very good guide
Sent from my One V using XDA Premium 4 mobile app
HTC ONE V reflash from *ZIP
hi, could you suggest me how to flash from ZIP(official EU ROM, downloaded from htc dev site), and I won't to change below mentioned?
* bootloader - LOCKED
* have orig. ROM but UK oriented
vinm07 said:
hi, could you suggest me how to flash from ZIP(official EU ROM, downloaded from htc dev site), and I won't to change below mentioned?
* bootloader - LOCKED
* have orig. ROM but UK oriented
Click to expand...
Click to collapse
You have to unlock your bootloader and install a recovery to flash a rom.

Categories

Resources