|
Thanks to damnitpud for this great explanation and FAQ of Themes and their creation for Android. ToDo: 1. Explain about the files that make up themes a. Explain update.zip and folder structure b. Explain about pngs and apks 2. Explain the tools a. WinRaR b. Auto-sign c. Java JRE and JDK d. Draw9patch tool e. Editing tool 3. Setting up your phone for themes a. Choosing which JF firmware to use b. Using the Eng Boot Loader and why 4. Explain the process to get the files 5. Explain which files to edit 6. Explain how to import modified files 7. Explain about auto-sign and how to use it - I am building a program that will making signing files easier. check it out as i build it! here 1. When you download a theme it comes in the form of an update.zip file. Basically the same as the full update looks, but it is a watered down version. All of the operating system, boot loader and radio files have been removed. a. If you check the file size of JF’s RC30 1.31 and compare it to any of the themes, you will notice that the theme file is about a 3rd the size. JF’s update.zip contains data, META-INF and system folders it also contains a boot.img file. Where as a theme update.zip contains app, framework and META-INF folders. The theme update.zip only contains the folders and files that are necessary for changing the Android theme. If you were to dig deeper into JF’s RC30 1.31 update.zip you will find the folders that are in the theme’s update.zip. For example, double click the system folder and you will see 11 folders and 2 files. The only ones we are concerned about are app and framework. So when you flash a theme it doesn’t bother rewriting all of the OS and boot loader, but only the app and framework folders. b. Inside the app and framework folders are apk files, apk files are like zip files or containers. There are many folders and files inside 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 a few 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 contains the encryption data for 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. They 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 programmer links these 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 basic programming, but for now we will only talk about changing the picture files. 2. The tools you use for creating themes are very basic and you might already have 3 out of 4 installed. a. WinRaR is a must have for everyone, it allows you to create and open compressed files (i.e. Zips, RaRs and about 25 other file types) It would best if you associate WinRaR with zips and apks, the zips can be associated during the install of WinRaR. To associate apks you can right click on an apk and choose “Open With…” make sure to check off the box that says “Always use this program to open this kind of file” b. Auto-Sign was released by Dave da illest 1, to make signing the apks and update.zip an easier process. Before you can flash an update or theme the phone checks to make sure the update.zip is signed by google or by JesusFreake. I will explain this more in Section 3. c. Android apps are built on Java, hence the need for JRE and JDK, You will not be working directly with these apps but part of the signing process uses Java. You can get both files here: http://java.sun.com/javase/downloads/index.jsp you will want to grab the first and second downloads. d. The draw9Patch tool comes with the Android SDK, it is located in the tools folder. This tool is used to edit stretchable images. There is still a lot of research that needs to be done on using this tool. So for now let’s just say do not touch any files with .9.png as an extension. Dave da illest 1 has changed a few of these .9.png files without issue so maybe we can get him to explain them better. I have also edited some of these files but it made some of the images stretch weirdly. e. I am not sure what other photo editors you can use, but everyone I have spoken to about modding the theme uses Adobe Photoshop. I am sure you can use other programs. But I am not aware of any at the time of this writing. 3. Before changing the theme on your phone you will need to gain root access which is explain here: http://forum.xda-developers.com/showthread.php?t=442480 a. As you look through all of the different themes, you will notice some say they are for RC30, RC8 or ADP1. i. RC30 – Is the US version ii. RC8 – is the UK version iii. ADP1 – Stands for Android Developers Phone and was produced for programmers. This version is completely unlocked and does not have any of T-Mobile’s software or locks. b. So your phone is rooted and you’re wondering why you should have the engineering boot loader. Well one reason is because of the 3 Androids on skateboards, the other reason is if your phone bricks during a flash you can fully recover your OS with the fastboot option. More about this can be found here: http://forum.xda-developers.com/showthread.php?t=455860 4. You have a few options here, you can either get the files from RC30 update.zip, one of the other theme’s update.zip or you can use the themes template at the bottom of this thread. All 3 methods you will need to open the update.zip go into the framework folder (if you get it from RC30 you will need to go into system\framework) Extract the framework-res.apk to a folder of your choosing. Most of your editing will take place on the files from this apk. When you are looking at these files in Windows explorer it is best to change the view to Thumbnails and look at all of the images and see if you can figure out where they are placed on your phone’s screen. ::TIP1:: Your best bet is to create a Themes folder on your desktop or in My Documents, somewhere simple to find. You will be dealing with a lot of files and it can get very confusing quickly. The other file you will want to change is Launcher.apk; this file is in the app folder and contains the menu launcher tab, clock, Google search widget, wallpapers and some other things. ::TIP2:: When you open Launcher.apk 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 the files, this is how I ended up flashing the original files after spending a decent amount of time photoshopping. 5. Now the only files you will want to edit are png image files. There are also xml files, they are used to format the UI, you can change the locations of things on the screen but the xmls need to be unencrypted before you can edit them. I have not done this process yet and will update more information later. 6. Importing the files is very simple, as long as you know the layout of the update.zip. Once you have edited all of the files you plan to or just want to test to see how your theme looks. Open the update.zip in WinRaR and go to the location of the files (i.e. Say you changed the 3G icons, you would go to the framework folder and double click on framework-res.apk. This will open another WinRaR window, open Windows Explorer where your edited files are and hold the Ctrl key while clicking the files you want to copy. Now drag them onto the open WinRaR window from the framework-res.apk. When it asks to replace the files choose “Yes” or Yes to All”. Close that WinRaR window and the one from update.zip will tell you “Files have changed would you like to save this file now” click “Yes” again and now your update.zip will contain your modified files. 7. Download and install Stericson's auto-signing tool here.
|