[Epic 4G Themes] dreamsforgotten:
[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