[Guide] Learning To Theme: Putting the tools to use pt. 1

Search This thread

MysteryEmotionz

Senior Member
Sep 7, 2010
5,615
1,988
Massachussets
Noob Questions- I'm new to theming but i catch on very quick. I just have a few questions tho..I'm running on the Midnight ROM (CWM3)..I like the DK28 Gingerbread Theme 1.8 but would like to change the text colors a lil..So I Decomplied and recompile with zero errors..i ended up with a smaller file and it was named unsignedframework-res.apk..So i changed the name to framework-res.apk and put it back into the DK28 Gingerbread Theme zip so that i could flash it..I tryd to flash it in CWM3 but it told me it was aborted bc it was a bad file..so my two questions are how to get a theme to be CWM3 compatible and what im a doing wrong when it comes to decompiling and recompiling? Any advice would be greatly appreciated Thanks in advance

No need to ps3 the question in to different threads. Check the other thread for your awnser

Sent From Da Hood.
 

chris378

Senior Member
Nov 6, 2010
118
25
Elizabethtown, KY
I haven't made a cwm3 zip yet but for a short cut you can find a theme created for it and copy the files from your theme in leaving the meta inf folder alone. I've noticed in the past as well when I recompile the file gets smaller and smaller according to the pc but that end up flashing all the same. Hope that helps.

Sent from my SPH-D700 using Tapatalk

yea i tryed that with the signed-Fallen_Theme_Glass and when i decompile it i got a message saying "Cant find framewrok resources for package of id: 127.
 

dreamsforgotten

Senior Member
May 4, 2010
5,076
2,522
Louisiana
yea i tryed that with the signed-Fallen_Theme_Glass and when i decompile it i got a message saying "Cant find framewrok resources for package of id: 127.

Wait now I'm confused, or you are. I thought you had a framework you were able to decompile no errors and change some text colors it just wouldnt flash. If that is the case and you just can't flash it in CWM 3, then take the .zip file from Fallen_Theme_Glass and copy your framework (the one you recompiled and it did work) and whatever else is in the theme you are trying to flash, into that zip. The difference is in the script that installs it.
 

chris378

Senior Member
Nov 6, 2010
118
25
Elizabethtown, KY
Wait now I'm confused, or you are. I thought you had a framework you were able to decompile no errors and change some text colors it just wouldnt flash. If that is the case and you just can't flash it in CWM 3, then take the .zip file from Fallen_Theme_Glass and copy your framework (the one you recompiled and it did work) and whatever else is in the theme you are trying to flash, into that zip. The difference is in the script that installs it.

Alright we are close to being on the same page lol sorry thank you for being patient..I want to take the framework from the fallen them and edit just the color values (pretty much just changing colors around right) but when i decompile the framework it gives me that error but still gives me a folder to edit in my project folder..so i open the project folder and open the framework folder and i got to the values folder to change some colors around..then i compile it again..everything goes 100% fine..then i copy and pasted the unsigned framework (but renamed it framework-res.apk) and tryed to flash it but tells me its bad. What am i doing wrong? pls help lol im far from stupid just new to this
 

dreamsforgotten

Senior Member
May 4, 2010
5,076
2,522
Louisiana
I think your main issue is trying to decompile and re compile a theme. You can't only a stock framework. Your best bet would be ask the dev to change that text for you since he has the source on his machine it dont take long. The edited images in his theme are the first problem.

Sent from my SPH-D700 using Tapatalk
 

chris378

Senior Member
Nov 6, 2010
118
25
Elizabethtown, KY
I definitly have alot to learn if "edited images" is whats keeping me from changing text colors lol So my best bet is to start from scratch with the Stock DI18 template and change what i want..then add the META-INF from a theme that is CWM3 compatable..zip it up and BOOM i got a theme? lol
 

MysteryEmotionz

Senior Member
Sep 7, 2010
5,615
1,988
Massachussets
I definitly have alot to learn if "edited images" is whats keeping me from changing text colors lol So my best bet is to start from scratch with the Stock DI18 template and change what i want..then add the META-INF from a theme that is CWM3 compatable..zip it up and BOOM i got a theme? lol

The gb theme is for dk28 do your I'm assuming your on dk28. Your gonna have to start with a dk28 framework

Sent From Da Hood.
 

dreamsforgotten

Senior Member
May 4, 2010
5,076
2,522
Louisiana
I definitly have alot to learn if "edited images" is whats keeping me from changing text colors lol So my best bet is to start from scratch with the Stock DI18 template and change what i want..then add the META-INF from a theme that is CWM3 compatable..zip it up and BOOM i got a theme? lol

Edited images dont decompile and recompile right in apk manager the only edit you can pass through it is xml which is your color changes. Trust me ask the dev of the theme what you want it really shouldn't be a problem.

Sent from my SPH-D700 using Tapatalk
 

amosher13

Senior Member
Sep 17, 2010
699
293
CO
also, the issue with the script would actually tell you it aborted due to some error (status 6 or something). saying its "bad" is actually stating that the file is bad. i had this happen before 2 on a few files in a row, probably a bad download. try making the file again or getting it to your phone in a different way, ie: dropbox, email, better data cable etc... should be fine
 

henboffman

Senior Member
Oct 27, 2010
92
4
Midland
This is a great post, and a big reason that android is what it is. I have a question, and I apologize if it has been covered already somewhere or another. Essentially, what I want to do is copy images from one theme and use them on another (I want to use the gingerbread theme available for 2.2, and run it on 2.1). At first, I figured that copying and pasting the drawable-hdpi files would suffice. I realize that there will be xml color manipulation involved, but this is trivial. My confusion lies in the order of operation for replacing image files. When the APK manager gets to that "you'll find a folder named keep, delete any files you changed" prompt is where I get confused. You somewhat cover this in the tutorial, stating to add the edited files after recompiling, or else you'll cry, although I'm not sure WHEN after recompiling I should be doing this, since later in the guide, it discusses signing the apk, which occurs directly after recompiling.
 

dreamsforgotten

Senior Member
May 4, 2010
5,076
2,522
Louisiana
When you get to that point where your following the on screen instructions, and it creates the keep folder, your keeping the original signature so there should be no re signing to begin with. After you delete your edited xmls in the keep folder and it recompiles successfully, pull your finished framework-res.apk (which is named wrongly unsignedframework-res.apk, it is signed) to somewhere else on your pc. Now browse it as an archive with 7 zip and replace the drawable-hdpi. Then flash it.

Sent from my SPH-D700 using Tapatalk
 
  • Like
Reactions: timberwolf671

timberwolf671

Senior Member
Jun 11, 2009
3,633
6,228
Need to give you a thanks, for your post is where I got my start when coming to the Android world and theming. Without it I would still be lost.
 

MysteryEmotionz

Senior Member
Sep 7, 2010
5,615
1,988
Massachussets
Personally I never reference this post untill the other day. Boy am I glad its here.

Android Creative Syndicate- From spontaneous ingenuity, comes creative brilliance
 

MysteryEmotionz

Senior Member
Sep 7, 2010
5,615
1,988
Massachussets
If more gave it a try, they would better understand how much is spend on a theme. More so than making a rom which can be done 1-2 hours. That's not saying those that are don't spend as many hours as we do.

I'm well over 80 hours invested in my theme. This time includes the time I spent on it on eclair since all I did was port my eclair build to froyo. It just sucks no one understand the complexity of a full blown theme. I've been told "all you do is make pretty pictures in photoshop".

Android Creative Syndicate- From spontaneous ingenuity, comes creative brilliance
 

BigNate

Senior Member
Jul 23, 2010
264
53
Phoenix
Thanks man for making the guide it helped so much I didn't know how to edit xml files but I do now.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 24
    [Guide] Learn To Theme Part 1: Everything you need to get started

    So you want to theme android.
    Don't know where to start.
    This should help.

    ***This is written going in step with editing a theme for the Samsung Epic 4g, but the principle can be applied to any android phone, granted there will be differences in phones***





    First off you are going to need the basic tools:
    7zip - http://www.7zip.com
    Gimp - http://www.gimp.org/downloads/

    Second off you need a general understanding of what you are about to do.

    The majority of files you are going to edit will be found within framework-res.apk. This is a file located inside of the folders system/framework inside of a rom. A rom of course is a collection of files which combines into your operating system.

    To get to the framework-res.apk file you will need 7zip, it's like winzip but is real quick for themeing.
    http://www.7-zip.org/download.html

    7zip will see any file named *.apk as a file named *.zip. With WinRar, Winzip, and others you have to rename the apk file .zip edit it, and rename it back to .apk. With 7zip this is not necessary. All you have to do is right click a file and choose 7zip-Open archive.
    So you have your rom downloaded onto your desktop or in a folder you set up as the root of your themeing.

    On my PC I have a folder inside of User/Documents/ called Themes

    I also theme for the Samsung Moment so I have all my themes labeled inside of there:
    (My folder looks as follows)
    Epic Green Mayan Theme
    DE03 Stock Theme Template
    DI18 Stock Theme Template
    Epic Files
    Pink Life Moment
    Pink Life Epic
    Mayan Green Moment
    Epic Black Hole

    First and foremost, you really need a Stock *** Theme Template. *** being whatever version your phone is running.
    The stock theme template serves a number of purposes. First, it is deodexed. This means that all of the files in system/ and system/framework that have the .odex extention are deleted and the stock apps that are included on your phone by default are replaced with files that have been full deodexed files.
    This is essential for themeing because if they weren't deodexed, either your apps would ForceClose when you reboot after themeing or they will dissappear from your laucher tray and desktop, meaning essential they are deleted by the phone.

    Another good thing about a stock theme template is that it deodexes your phone from an update zip so you can theme the stock rom your running instead of having to install another rom simply to apply a theme.
    Download your stock theme template for the Epic 4G here for EC05
    http://xdaforums.com/showthread.php?t=1042386

    So lets begin here.

    Open your folder on your PC that holds your theme. For me it will be Users/Documents/Themes/NewTheme
    Inside of that folder (COPY) your stock theme template to this folder. You will want an original theme template to remain inside of it's own folder cause obviously you are going to edit the one inside of New Theme folder.

    Stock_DI18_Theme_Template.zip

    Now rename stock_DI18_Theme_Template.zip to the name of your new theme.
    NewTheme.zip

    Now right click the .zip file and choose 7zip-Open Archive.
    Double Click on the folder labeled "system" to Open it.
    Double Click on the folder labeled "framework" to Open it

    Here you will notice several files including one called framework-res.apk.
    Inside your theme folder /Themes/New Theme/ create another folder called framework.
    Drag and drop the file framework-res.apk into the framework folder.
    Right click on framework-res.apk and choose 7zip-Open Archive.
    Double click on the folder labeled "res"
    Now you will notice several folders. On the Epic 4g the main one you want is called Drawable-Hdpi
    Drag and drop this folder into the same folder you created called framework.

    Open this folder and browse around. There are many images in here that your phone pulls in various locations. The first thing I like to do doing this on a new phone is to play with my phone and at the same time look in this folder and try to locate the same files I'm looking on the phone itself. You'll begin to see similarities inside of the drawable-hdpi folder for instance files that begin with the label sys_stat_*_* usually show up in your status bar. The rest you will learn over time.

    You will also come across two main file types. The first is .png and the second is .9.png. This write up will not cover those, coming in the future.

    A popular start for most people is wanting to alter the status bar. This is an easy one or so it seems.
    navigate into the drawable-hdpi inside of the framework folder located /Themes/NewThemes/framework

    scroll down until you find a file named status_bar_background.9.png
    Since it's a .9.png you already know we can't edit it yet. The reason is the .9.png files are pictures that might hold more then one place on the phone and most probably will be portrait and landscape. The status bar is one size on portrait mode, but when you flip your phone into landscape, it has to stretch to fit the screens. In order to stretch a picture and retain it's looks, a tool called draw9patch in the android sdk is used to show you your image in 3 different stretch modes. Your goal is to set the guidlines on what must be retained at each zoom. After you add these guidlines on the picture, they show up in the picture. You have to program the guidelines inside of the picture and remove them from being displayed. That is done by a program called Eclipse. (Use version 3.5) But all this will come into play later don't rush out and get confused because familiarizing yourself the basic pictures and colors found in framework-res.apk is your current goal. Just because you have no idea what you are doing with the .9.png files doesn't mean you can't change the color of the status bar though. The next best thing is to "borrow" one from a theme that exists so you can get a feel for modding some files. The only one you can't use from another theme is the clear status bar. That has to be done in xml files as well and for now were sticking to the basics. Here's what you do. Find the theme that holds the status bar you like. To make sure you preserve all the files the way they need to be it's best to make a whole new folder in the theme folder called whatever theme you plan to use as a donor /Themes/Donor Theme/. Open the theme zip with 7zip open archive. Navigate to res (double click) and framework. Make another folder inside /donor theme/ called framework. Drag and drop the framework-res.apk. Open this file in 7zip and drag and drop drawable-hdpi into the framework folder. Now open it and scroll down to the status_bar_background you intend to borrow. (Right about now it's not wize to have your windows of "my computer" open full screen you can do this a lot easier with two open explorers side by side swapping files). Side by side, open the drawable-hdpi folders in both theme folders, /New Theme/ and /Donor Theme/. Drag the status bar from the donor theme into the folder for the new theme. Microsoft will give you **** about it choose copy and replace and your done. Now to get this change back in the theme is pretty easy. Your drawable-hdpi folder inside /Themes/New Theme/framework is where you will alter the pictures, framework-res.apk is where your going to put it. In your framework folder is the original framework-res.apk If you closed the instance of 7zip where you had framework-res.apk for new theme open, you need to right click and re-open it. Double click on /res and open it. Drag and drop the drawable-hdpi into the open archive NewTheme.zip where all the other drawable folders are. Make sure not to copy it IN one of those other drawable folders. It will overwrite the one thats already there automatically. Now, you have to stick that framework-res.apk back into NewTheme.zip before your ready to flash it from recovery. First close the 7zip instance of framework-res.apk. Right click and open NewTheme.zip double click on system/framework/. Now drag and drop the framework-res.apk from /New Theme/framework into NewTheme.zip. Your done, now flash the NewTheme.zip in recovery and see how it worked.

    Any other file you choose to edit, the steps will be the same. Edit the image in drawable-hdpi, drag it into framework-res.apk, drag framework-res.apk into the theme /res/framework/ folder. You will be doing this a lot.

    That's it for part 1. This will give you enough to play with and familiarize you with the images used by most any android phone. If this were a samsung moment you would be doing all of this editing inside the same file structure except in framework-res.apk /res folder you would be editing a folder called drawable-mpdi.

    Part two will be out soon enough. I'll go more in dept inside the framework-res.apk/twframework-res.apk
    12
    [Guide] Learning to Theme: Required Tools

    How To Theme
    Required Tools



    First off this is the very 1st guide in my line of theme guides. This one is just to reference you to the required tools, and instructions on how to set them up since it can be a little tricky. The link at the bottom is for guide 1, what to do with these tools now that you have them. At the bottom of that guide is link to a two part Putting the tools to use covering editing images in framework and .9.png files.


    Grab you some tools:

    Gimp:
    www.gimp.org

    7zip:
    http://www.7-zip.org/download.html

    Java6:
    http://www.oracle.com/technetwork/java/javase/downloads/index.html
    scroll down and select (under Java Platform, Standard Edition, JDK 6 Update 22) Download JDK
    Download and install with the on screen instructions.

    Android SDK:
    http://developer.android.com/sdk/installing.html
    Notice the instructions on Step 2. Downloading the SDK Starter Package.
    It says "On Windows, right-click on My Computer, and select Properties. Under the Advanced tab, hit the Environment Variables button, and in the dialog that comes up, double-click on Path (under System Variables). Add the full path to the tools/ directory to the path."

    This means if you extracted the folder called android-sdk-windows inside the zip you downloaded @ C:\android-sdk-windows, then when you go to add the path (there will already be other values in your path, type a ";" behind the last one and type in c:\android-sdk-windows\tools
    this means you can call any of those scripts inside of android-sdk-windows\tools by typing them at the c:\ in command prompt.

    For example, if you did not do this, and you wanted to use adb, you have to open the command prompt and type the following
    C:\>
    C:\>cd android-sdk-windows\tools
    C:\android-sdk-windows\tools>
    C:\android-sdk-windows\tools>adb ***

    After adding the tools folder to path you can do the following
    C:\>
    C:\>adb ***



    APK Manager 4.9 (Latest Version):
    http://xdaforums.com/showthread.php?t=695701

    There is a video on the page as well to give you an overview of how to work it.

    I downloaded the zip, created a folder at the c:\ drive called apk manager. Opened the archive (apkmanager4.9.zip) highlighted all the folders and the bat file, drag and dropped them into the folder located at C:\apk manager\.


    Eclipse 3.5:
    http://www.eclipse.org/downloads/packages/release/galileo/r

    This is called Eclipse galileo download the one called Eclipse Classic
    Once again you extract this file into a folder on your computer like you did with APK Manager. I created the folder @ C:\eclipse\

    Now navigate to this website to learn how to add the adroid sdk into eclipse to have it ready when we are going to need it.
    http://developer.android.com/sdk/installing.html

    Note the android SDK download at the top, you should already have this. Read right below where it instructs you to add that into eclipse.

    Start out like this. Open Eclipse now that it is installed. It's the icon in the eclipse folder that looks like a purple planet. With Eclipse open on your screen click on Window in the tool bar at the top. Click on Help-Install new software. The box that appears, it says "type or select a site" ignore this text input box and go straight to click "Add" button. When it comes up name it Eclipse Plugins and in the field where you put the web address, type the following: https://dl-ssl.google.com/android/eclipse/ . Click on the box next to developers tools and click next at the bottom. This will install what is called Android SDK and AVD Manager. Eclipse will probably need to restart to add the plugin to the menu list. Alternatively, if you get errors doing this there is a problem with you computer connecting to the secure server (in the web address you typed https: note the S at the end. If, for any reason you do get errors, simply go back to Help-Install New Software, and this time put in the web address field http://dl-ssl.google.com/android/eclipse/ When eclipse opens back up, click on Window and select "Android SDK and AVD Manager". Now your screen should look like the pictures in the link.

    Now Eclipse Should be upgraded.

    After following this all the software should be installed to work on themes.


    Next Guide Below

    Click My thanks button below ;)
    7
    [GUIDE] Learning to Theme: Putting the tools to use


    APK Manager:

    This is one of my favorite programs it makes the whole process smoother imo.
    Navigate your harddrive to c:\apk manager\ or wherever you extracted the progam to.
    Grab the framework-res.apk from a theme template/rom/etc.. and drop it in the folder called "place here for modding"
    Double click on Script.bat. Leave the apk manager window with the folders (where Script.bat is) open.
    Look into the second section called "Advanced tasks Such As Code Editing
    Type "9" to decompile apk
    Immediately type 11 to recompile apk (This step is because I have ran across framework-res.apk's before that wouldn't recompile even if no changes were made and this could save you some time down the road.
    Minimize the window, Maximize the apk manager window
    Open the folder called projects
    Open the folder called framework-res.apk
    Open the folder called res

    Here is where there are plenty of files you can edit. These are the XML files that control the look and behavior of android. If you are lost at this point, lets work on a file together to get the feel for what is possible in here. Scroll down and click on the folder called "values" and open it. Inside you will find a file called colors.xml. Right click on the file and choose open with and choose notepad if you have nothing else that works as a basic text editor. Me personally, I use Notepad++. It's a free download. Either way once it is opened, you will see many values that look like this:
    (This is not stock Epic colors.xml file so don't be confused)
    #ffb97f7d
    #ffffffff
    #ff000000
    #00000000
    #ff000000
    #ffffffff

    These are text colors for your primary and secondary text on your phone, as well as background highlight colors.
    Note Background_dark background_light. That is the background color so if it is the same as your text colors you won't be able to see the text. I made this mistake before so you can change every text color in this file but leave the backgrounds alone, or use a color your text will show up on.

    #ffb97f7d
    #ffb97f7d
    #ffb97f7d
    #ff64917d
    #ff64917d
    #ff64917d
    #ff64917d
    #ff808080

    Here, the color name=" describes the text, the "#ffb97f7d" is actual code for the color.
    So if you want to change this color, where do you get the codes from?
    Easiest way for me is to use the color chooser in Gimp, when you pick a color, either background or foreground, it will show you the hex value on the screen. But remember that the color codes Gimp gives you hold 6 places ie #000000. The values in the xml files hold 8, so when you compile there will be an error. That is because the first two places describe transparency. You need to add "FF" in front of any value you get from Gimp. So if the code in Gimp is 000000 in the xml file you need to put #ff000000. Always start the code with a "#".


    Now the question is what text is described by dim_foreground_dark? Two ways to find out. Change it, compile it, flash it. Or dig around the "out" folder in apk manager and look for text xmls. The next one is located in /apk manager/projects/framework-res.apk/res/color

    You will see primay_text_(dark)(dark_disable_only)(dark_focused)(dark_nodisable)(light)(light_disable_only)(light_focused)(light_nodisable)
    Search_url_text
    secondary_text_(dark)(dark_nodisable)(light)(light_nodisable)
    tab_indicator_(text)(textv4)
    and a few more. You can open each of these xml files and see what's inside. We'll use primary_text_dark.xml as an example. Right click and edit with notepad++
    Take a look at this line in the code:

    android:color=" (this tells the xml what color to display. The @color tells where to pull the value from. So you either find color.xml like we did above and edit the field bright_foreground_dark_disabled to render the color your after, or you can simply put the hex color code right here bypassing the need to look up @color(color.xml). It would look like this if you did that. and the "#ff000000" would give this text color the value of black. Instead if you had used the color "#ffffffff" you would get the color white.
    Here note android:color in the code. That's because some of the values are for text, and some are for background. In the text lines elsewhere, as seen below, we will use android:textColor instead.


    Now this is all general text colors. If you want to edit status bar text, both in the status bar, and when it's expanded, you'll need to dig in a different folder. Navigate to this folder in apk manager on your c:\ drive. C:\apk manager\projects\framework-res.apk\res\layout. You are looking for the following file called status_bar.xml.
    Keep in mind when your looking through these xml files, you will see this value in a lot of fields "android:id="@id/icons" or something similar. These are keys to what you are editing. The first line you might want to edit in status_bar.xml would be line #13 which looks like this:

    The only thing that's important on this line is @id/tickerText which tells you a color value here would let you change the color of the ticker text. The ticker text is the text that pops up in the status bar for things like a text message being recieved, and if your phone is set that way, the content of your text message.
    There is just one problem here. In most lines where you can edit color you will see this already in the line android:textColor="********" and that value is NOT in the ticker text line. But being that this is a text view line because the id is ticker text, you can add the value android:textColor in right before the words "android:id=". The edited line will look like this:
    5
    Learn To Theme Putting The Tools To Use Part 2 .9.pngs


    We are going to walk through editing a .9 file and getting it back in place to do this as you read the guide.


    Before you begin, check out this video from fxn
    http://www.youtube.com/watch?v=KNvGgmJDqPQ

    Now the guide will get you lined up with the instructions in the video.

    Open "my computer" and navigate to C:\apk manager\.
    In another window open C:\*\Documents\Themes\
    Browse to the folder in Themes that holds your theme template
    Right click and Browse your stock di18 theme template or rom.
    Navigate to system/framework/
    In your apk manager window, open the folder called place here for modding
    Click and hold framework-res.apk in your second window which is the 7zip browing the zip file.
    Drag the apk into place here for modding folder.
    Now you can close the zip file window.
    Back out of the place here for modding window and you should be back in the apk manager folder.
    Run Script.bat and choose the option "9" and hit enter.
    Click open the folder called projects
    Click open the folder named framework-res.apk
    Click open the folder named drawable-hdpi.
    Find the file icon_highlight_rectangle.9.png Pay attention to the screen while your scrolling. Apk manager decompiled all the .9.png files exposing the lines that were used in draw9patch by default.
    Right Click the file and choose edit with gimp.
    Now in gimp you will see the picture, and the lines drawn in for draw9patch. This will save you time. Edit the picture as you see fit. Change the color, or completely redesign the image. Then when you goto save it, choose file save as. Keep the same file name but save it on your desktop, creating another folder naming it new theme nine files. Save the image.
    Open up Eclipse.
    Click on file-new-android project
    When it Opens, click in the field named Project Name type "nine files"
    In the field called "Built Target", choose Android 1.5, click the check box next to it.
    In the field called "Application Name" type "ninefiles"
    In the field called "Package Name" type "com.example.ninefiles"
    No Quotes in any field.
    Uncheck the box labeled "Create Activity".

    Now your Workspace should be open in eclipse, and on the left pane there should be a folder labeled ninefiles. Double click on it and it will expand a folder tree. Look for res. Then click it if it's not expanded as well. Look for drawable. There will be a file in there called icon.png. Leave that file alone. Now on your desktop, open the folder called new theme nines. Click, drag and drop the edited icon_highlight_rectangle.9 file right into that drawable folder in eclipse. You are skipping using draw9patch because the lines were there from the start.

    Now go back to the parent folder in Eclipse, the one labaled ninefiles where all the other folders come from. Right click on it and choose android tools all the way near the bottom. Then slide over and choose export unsigned application. This will bring up the save prompt on your screen, choose the desktop once again, and export it. It will show a message about the export and telling you to zip align it and sign it with a device key. Ignore all this, your just using Eclipse to target that .9.png. Keep in mind every time you open Eclipse now, it will show you the workspace with ninefiles. Expand the folders, delete the last image you used Eclipse to work on and add new ones in, bypassing the need to create a new android project each time.

    Lets say your new .9.png image is nothing like the original and it won't display correctly using the lines on it after decompiling in apk manager. You need to feed the image through draw9patch.bat located in c:\android-sdk-windows\tools\
    Double click it and a shell will open, then another one will open on top of it that has a square with a down arrow in it. Save your image from gimp into the folder on the desktop called new theme nines, like you did above. Then Drag and drop the saved image on top of the windows inside the square, and on top the arrow lol.

    The picture will be transformed in draw9patch concentrate on the outer edges along the entire image. Bring your mouse over to the left of image around dead center. Click once and draw a pixel. Next go dead center on the top just like you did on the left and draw the 1 pixel. Now expand that line up and down on the left side looking at your 3 preview pictures on your right hand side. If there is no gradient or fade effect to your image the center pixel will be about good enough but if your image fades, expand that line up and down and your 3 previews will give you an idea if you capture it or not. Once you have the left side of the image looking good, begin the same process on the top. Use as little line as possible to have the image looking right. Never have a gap in the line that you draw.

    Now focus on the right side and the bottom. The two lines drawn there should be about the size of the entire image minus a few pixels at the very end. You can get the idea from the one you pulled from apk manager and adjust the lines to work on your changes. When your done with draw9patch, click file save 9 patch. It will save in the folder on your desktop. Now drag and drop this image into the drawable folder of Eclipse/ninefiles as described above.

    This should be a shortcut to getting you busy with 9 files. Any questions or anything noticed missing, please let me know.

    One last bit of advice. Sometimes when you open a file in draw9patch, the image is zoomed in too big and you can't get to the outer edges to draw the top and bottom lines. There is a bar at the bottom of the program that will allow you to zoom in and out of the main image and zoom in more to the 3 preview images. Use these to adjust the image to where you can work with them.



    All these introduction guides should get you started, your own drive should take you the rest of the way. I'm not the first to write a theme guide I'm just sharing with the Epic community because the amount of new users who are requesting how to do these things. All my information came from asking questions to those that were theming before me like Khanning, Crake, Chibucks, the list is never ending. Also this list of videos here have helped a lot:
    http://xdaforums.com/showthread.php?t=593932
    2
    Meta Morph tutorial
    by Dreamsforgotten

    This is a primer in using MetaMorph on the Samsung Epic, at the time of writing I'm using a froyo leak with the Bonsai 2.0.1 rom so MetaMorph being a little buggy for us now will probably clear up when official is out. The bottom of the guide addresses what I'm talking about.



    Create a folder on your desktop. Call it froyo (or whatever).

    Inside that folder make one called framework-res (don't put the .apk)
    Inside that folder put the folders you need to edit example

    If I want to change the images in drawable-hdpi, make the folders like this

    froyo/framework-res/res/drawable-hdpi

    so inside the froyo folder create "framework-res". Inside framework-res create "res". Inside res create "drawable-hdpi". It follows the same structure as apk manager when you decompile. If you want to edit the styles.xml, that gets recompiled into resources.arsc. If you are in apk manager and you goto projects, you'll see unsignededitedframework-res, open it and right inside you'll see resources.arsc, androidmanifest.xml, res, meta inf, etc. So to MetaMorph the resources.arsc, your NEW resources.arsc goes into

    froyo/framework-res/

    Do this for any .jar or .apk file, create your folder structure and put only the new files into the folder, you don't have to flash an entire drawable-hdpi folder only the files you are changing.

    Next thing you need to do is make a xml file that tells metamorph what files your editing and links the folders you created to that file. Do that like this:

    Inside the froyo folder, create a text file. Either open Notepad and save the file into this folder or right click choose new file, text file. Set your .xml file up like this:

    <?xml version="1.0"?>

    <themename>Crystalline Froyo</themename> <--You can call this whatever
    <themeversion>2.1</themeversion> <--Number that whatever number you want
    <screenshot></screenshot> <--include a screenshot if you like. put the screen in /froyo and type the file name here
    <author>Dreamsforgotten</author> <--your name
    <authorweblink>http://xdaforums.com/member.php?u=2551535</authorweblink>
    <phone>Samsung Epic</phone>
    <rom>Bonsai 2.0.1</rom>
    <themedescription>UI Improvements for Crystalline Froyo</themedescription>

    <item>framework-res.apk</item>
    <path>/system/framework/</path>
    <description>**** a Reboot Required</description>


    Now the line right above this <item, path, description> You have to follow this for any folder your updating. Notice in the <item> space, you put the actual apk name being edited. So here I have <item>framework-res.apk</item> This tells metamorph to put your edits from the folder you named framework-res into framework-res.apk in the same structure as you set up, ie /res/drawable-hdpi or /res/anim whatever it is you might be editing. It's that simple. Now say you wanted to theme the market. You can use metamorph to theme system apps, but NOT market apps!!!!!! You would do this

    <item>vending.apk</item> <--name of APK
    <path>/system/app/</path <--path to the APK
    <description>Market Update</item> <--whatever you like for descripton

    You would put somewhere inside the xml as well. You can put the instructions for MetaMorph to flash in any order you like, You can theme apks first, framework-res first, however you like, BUT its good practice to put the framework-res last because it causes a reboot and anything behind it won't flash. Samsung devices pay attention, TWframework-res and framework-res both require a reboot, so you have to have two separate metamorph zips.

    Now, moving along. You have your xml file with all the fields written properly, you have your folder structure set up you just need to do two more things. Inside your original froyo folder on your PC, create a blank text file. Name it .nomedia that (dot).nomedia don't forget the period. This tells media scanner not to add all your images from this zip into your gallery. It's very important. Now the final step, zipping it all up to flash. Whatever you chose to name that xml file for example I used this on the last one I created. crystalline2.1.xml This was the name of my theme control file (the .xml file inside of froyo) so your zip file HAS to be named the same exact thing. If your xml is theme.xml, then your zip has to be theme.zip. If your xml file is theme1.2.xml then your zip file has to be theme.1.2.zip. It will error if the zip and xml file don't match. That's it copy it to your SD card under AndroidThemes, open MetaMorph and apply!

    Keep in mind MetaMorph has a 500 file limit and gets buggy when you push it toward the 500 mark. Break large themes into 2-3 different files if you must. You already have to have two separate flashes for our two frameworks on the Epic so you might as well split the images between the two anyway.

    One last note on MetaMorph on the Epic. I'm using the latest and I noticed sometimes you open it and it closes right back, or you go to extract a new theme and it closes. Seems that the free version has issues with displaying the ads (which could be due to the host file on Bonsia I'm running, not sure, but when you open MetaMorph, give it time for the ads to load before hitting the start checks button. If the ads at the top and bottom of the app don't load soon, and it doesn't close on its own, proceed. If you give it time for the ads to load and it crashes, just open it right back up. Sometimes it takes me 2-3 times opening MM to get it to stay on the screen but after it does, the flash goes smooth every time.