[Samsung Mesmerize] bdemartino:
Guide Part 2....

Preparing for Theme Porter

Okay now that we have some of the side process out of the way, let's get back to the guide.

Determine if you need to make any XML edit's for battery or text color changes and perform them per the processes detailed below. If you do not need to make them, you may skip this step completely and move on to using theme porter.

Correcting Accurate Battery Mod Animations-

Follow this guide to make the changes to the framework to use the new charging animation images and will allow you to then use theme porter to swap the .png files

Decompile the framework-res.apk from the ROM download (I usually just rename this to EE19.apk or whatever the rom is i'm working with)

Decompile the framework-res.apk (I first rename the framework-res.apk file to NEW.apk (or whatever you wish) Note: It will typcially give you errors (unless it's theme'd correctly) but you're just after some code from a few .xml files so don't worry.

In the NEW folder Navigate to

\res\drawable-hdpi\
or
\res\drawable-hdpi-v4\

Copy all of the battery charging .png's and drag them to a folder on your desktop. Then open the EE19 folder within APT (the one you decompiled from the rom you're working from) Drag those images into the /res/drawable-hdpi-v4 directory replacing any existing ones.

open the following file in notepad++

\apt\NEW\res\drawable\stat_sys_battery_charge.xml

Also open the same file within the EE19 decompiled folder

In the THEME xml file select all and copy

In the EE19 xml file, paste this replacing the text. Then save it overwriting the original.

At this point, the battery mod is done and the new .png files exist so that theme porter can do it's work (And the xml is there to make it works when it get's to your phone). If you don't have any text edits to make, you can recompile the apk (as stated in steps in first post) and move on to steps below (skipping the section on changing text).

Changing text colors-

If you have determined that the text in the theme is different from the rom framework (I.E. Text on notifications, menu's, etc.) then you will follow these steps to locate where these changes need to be made.

If you haven't already, decompile the framework-res.apk from the Rom.

Next, determine what text color edit's you need to make and then use this wonderful reference to determine which actual files those edit's correspond to.

Locate the file you need to edit in the decompiled folder, and open it with 7zip.

Typically removing the "inverse" reference on the color line will change it from black to white, or white to black and is the easiest/best way to alter colors in a ROM. (For a quick note, searching for "menu" in the styles.xml files located in /values/ will give you the items you need to change, watch for _bright references for the dividers, change those to _dark instead.

Once you are done making these edits, recompile the folder as stated in first post. And move on to using theme porter.

Using Theme Porter-

PAY CLOSE ATTENTION HERE.

Now that you have the appropriate prep-work done, the easy part finally comes. (Hopefully)

Copy and paste the applications & framework-res.apk twframework-res.apk files from the THEME.zip into the appropriate folders within the OLD folder in theme porter.

Now copy and paste the same files that you copied from the theme.zip, now from the rom (EE19 for example) to the NEW folder in theme porter.

Once all files are in appropriate folders, run the Script.bat file in theme porter. Use a selection of "1" and press enter.

Theme porter will now copy all of the .png files from one .apk to the other (where the folder names are an exact match)

NOTE:At this step, you may have issues where the images aren't brought over (This typically only effects the framework files and just depends on how the file was generated/edited). This can be detrmined by opening the .apk in 7zip and pulling out the res folder, where you can view the files (you will see if it's been changed or not) If it hasn't, you will need to make sure the folder within the Themed .apk's are the exact same as the ROM you're themeing and re-run the theme porter script. (meaning you need to add or remove the -v4 ending depending on where the previous themer placed the themed files)

If you're lucky, everything is done at this point and you can move on to packaging a flashable update.zip.

Packaging A Flashable Update.Zip

A flashable package is simply a .zip file (stored as "store" in 7zip, no compression) that is made up of META-INF and System folders. The META-INF folder is very important as there is a big difference between using one from a ROM (pick and pick) and a theme (NeonGT) You will need to download a theme and pull the META-INF folder out so that you can use it in your theme ports. This is to ensure you have the correct script (edify or ammend) typically now we're using edify so use one from one of the H57 theme's via baked_tator The system folder should contain two folders "framework" and "app" each of which will hold the respective .apk files you have been working with. (but could also contain a "Media" folder for changing bootanimation.zip files, basically any files within the folder structure you create (matches the system structure) will be replaced when flashed. So be careful not to include things I haven't listed here unless you know what you're doing.

And be sure to test these things before even thinking about a release.

Create the following folder that can be re-used with any new theme port, it's the easiest way to keep things organized and not lose track of files.

Create a new folder on your desktop called New Theme

Within that folder paste in the META-INF folder from another EE19 theme.

Create a new folder called "system"

Open system and create two new folders "app" and "framework" (and "media" if you are including the bootanimation.zip from the theme (which typically will work on our phone)

Place approprate files from the NEW folder within theme porter into these folders, respectively

Back up so that you see the META-INF folder and System folder, select those two, right-click and select "add to archive" in the 7zip menu.

Name the file "EE19 ThemeName VX.zip" and select "Store" for the method

Drag this to your desktop and this will be what you will place on your SD card for flashing.

Test the theme thoroughly to make sure everything ported over and everything still works (make sure to test USB, even color XML edits can cause odd issues) and get help from others to make sure the bugs are out.

If you run into issues, check the next post for possible resolutions.

BE SURE TO CREDIT THE PROPER CREATORS!!! I can't express this enough, I have a format for the way I do release posts, feel free to copy it if you'd like but either way make sure you make it known that it's not your work!