[G1 Themes and Wallpapers] damnitpud:
::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.

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 <a href="http://android-dls.com/files/jf/v1.31/JFv1.31_RC30.zip">here</a>. 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