[Galaxy S I9000 General] Monkey_Grass:
This tutorial is for people building roms based on CyanogenMod only !

This tutorial will explain how to use a custom CyanogenMod apk theme as the default when building roms

Things you will need

1. Java JDK and Java JRE installed

2. ApkTool - Download

3. Notepad++ - Download

4. Theme apk file

5. Your custom rom

Step 1

Download and extract apktool into a folder on the root of you drive, call the folder apk

Once extracted you you have three files like this View attachment 2484539

Step 2

If you have already packaged your rom use something such as WinRAR to extract it to a folder.

Once extracted it should look similar to this View attachment 2484543

Step 3

In your rom folder navigate to system/framework and look for the framework-res.apk file

It should look like this View attachment 2484548

Step 4

Copy the framework file to your apktool folder

Your apk tool folder should now look like thisView attachment 2484553

Step 5

Now copy your theme into the same folder

The folder should now look like thisView attachment 2484556

Step 6

Run command prompt and enter the following commands

cd C:\apk

apktool if framework-res.apk

apktool d <whatever your theme apk is called>.apk

Your CMD windows should now look like this View attachment 2484567

Step 6

Go back to your apktool folder and now you should have a folder called <your theme name>.apk

It will look like this View attachment 2484571

Step 7

Go inside that folder and open AndroidManifest.xml with Notepad++

View attachment 2484572

Step 8

Once you open this file you need to look for two strings, they should look similar to these ones

View attachment 2484574

Step 9

Once you have found these strings minimize the Notepad++ window and navigate back to your rom folder

Now navigate to system and open build.prop with Notepad++ and add these two lines

persist.sys.themeId=~~~~~~
persist.sys.themePackageName=+++++++++

Replace "~~~~~" with theme id from AndriodManifest.xml

Replace "+++++" with package name from AndroidManifest.xml

Mine would look like this View attachment 2484624

Now save build.prop

Step 10

Go to your rom folder and navigate to system/app and copy your theme apk inside of this folder

Now zip your rom back up and flash it

When your rom boots you should now see you custom theme:)

Note

If you cant get apktool to work and it keeps saying something along the lines of "java is not an exacutable command"

Make sure you have installed the Java SDK and Java JRE and navigate to C:\Program Files (x86)\java

and you should see a folder called "jdk1.7.0_45" or "jdk" with different numbers after it

Now go to control panel and on the right hand side click "Advanced System Settings"

Then click "environment variables"

Under "system variables" create a new variable and call it JAVA_HOME

In variable value put the path of your java sdk folder so it would be

C:\Program Files (x86)\Java\jdk<what ever numbers are here on your pc>

Or 32 bit users

C:\Program Files\Java\jdk<what ever numbers are here on your pc>

Now before you save the environment variable put the path in speech marks like this View attachment 2484637

Now save and reboot