[AT&T Samsung Galaxy S II SGH-I777] jivy26:
If you have a question ask and I'll try my best to answer it. I decided to create this to help get more things going in our Dev Community. If nothing else you see how much work is put into theming and have more respect for the Dev's that do it.

**This is by no means an all inclusive tutorial, but it will give you a good start. I will continue to update and I am sure Shoman94 will throw a few things in here as well.**

------------------------------------------------------

Basic Tools Needed:

------------------------------------------------------

Stock ROM to theme try ShoStock ROM

Notepad++ for XML and Smali(God FORBID) edits

APK Multi-Tool for decompile and recompile of APK

Graphic Editing Program (If messing with .jpg or .png files) I use Photoshop, however, if you can’t find or afford it GIMP is a great program as well

7-ZIP for packaging your Theme

Theme ZIP folders left in tack so you can drag

------------------------------------------------------

Basic Theme Tips

------------------------------------------------------

- Res>Hdpi will, generally, be were a majority of your APK images are located.

- Res>Values>Colors.xml is primarily “A MASTER CONTROL” of coloring for that particular APK. What is meant by “Master Control” is that more than one layout item references to a certain line in Colors.xml and changing a color in there can effect more than what is desired. So try to find the edit in Res/Layout or Res/Drawable before using Colors.xml as your primary means of editing.

- Framework-res>Res>hdpi > popup*.9.png control your Pop up menu BGs like extended power menu, settings menu popups, things of those nature.

- Easy way to find where the color for a certain text is located. Take a screenshot of the text you want edited. Open that screenshot in image editing program, use color drop to select the text and grab the hex code. Go into Notepad++ then Find in Files and place that hex color in find box. Navigate to the folder /res in the decompiled apk. Hit search. This will not always work, but has helped me a majority of the time. Also keep in mind to read the xml file name before you make the edit because there could be more than one instance of that hex color.

- You can drag images into APKs without having to decompile, however, i've noticed this also can lead to decompile/compile errors if you are not careful. Best practice is to just decompile make your edits and recompile.

------------------------------------------------------

List of XML, edits and what they control

------------------------------------------------------

---[x] Framework-res

-------Extended Power Menu Text Color-------

global_actions_items.xml

Line: 6 add android:textColor="FFhexcode"

-------More to come i'm at work typing purely off memory-------

------------------------------------------------------

Setting up for theming

------------------------------------------------------

Before you start create a Folder on your Desktop and put the theme name you want as the title. Inside theme folder create a folder call it whatever your theme name is. Now extract the entire contents of the ROM to your theme folder so that you maintain the Folder structures. So now you should have two folders inside the Theme folder; themenamefolder and ROM folder.

------------------------------------------------------

How to Decompile APK for editing then Recompile

------------------------------------------------------

1) Put apk you want to edit in place-apk-here-for-modding folder.

2) Run script.bat.

3) In menu enter 9 to decompile apk, use option 10 if it's a core system app like contacts. For option 10 drag twframework into the menu then hit enter.

4) Make your edits then when done enter 11 to compile.

5) Only sign apk(option 12) if it's not a system application.

6) If you get no errors on building you will be given two prompts always enter yes and yes.

7) Once your prompted to hit any key to continue remove anything you’ve edited from the keep folder. If you've messed with an xml delete resources.arsc as well as the xml you edited.

8) Once you've deleted the edited files from keep folder go back to menu hit any key once it's done your edited apk will be in same folder as unedited apk(place-apk-here-for-modding folder).

------------------------------------------------------

Editing .9.png files(Nine Patch)

------------------------------------------------------

If you make an adjustment to these(i.e. hue/saturation) files using an image editing program often times your Nine patch in the images(black lines on borders of image) is no longer true black. An easy fix for this is to simply select 000000 in color palette and then using selection tool select each Nine patch then fill with the 000000 black color. Do this for each nine patch in the image then save and you will not encounter any compiling issues.

------------------------------------------------------

Editing Colors

------------------------------------------------------

android:textColor="@color/blue" is what you will see for most colors in stock apk’s. You can easily replace this with the color you want by using Hex Color Codes as such below:

android:textColor="FF000000" will give you a solid black color. The last 6 of “FF000000” are hex code. The FF of “FF000000” mean completely solid text, so if you were to replace FF with 60 “60000000” you’d have semi transparent black text. Lower the First number more transparent the text “10000000” lowest transparency without being invisible.

The same rules above apply to background colors.

------------------------------------------------------

Compressing your theme with 7-ZIP

------------------------------------------------------

Your Folder Structure should look as such:

Data

Meta-Inf

SDCard

System

1) Now highlight them all and right click > 7-Zip > Add to zip

2) Select compression fastest, name whatever you want the zip file to be named then zip it.

3) Always test your ZIP before releasing for general consumption.