[Android Software Development] raziel23x:
I have been working on a work around for Compiling Theme Chooser Themes since android.git.kernel.org has been down for a while now

Here is the Original How to guide with my changes to it to make things easier for users of this and though who have not downloaded this excellent application src

I am using Windows xp 32 bit with the most recent Version of CYGWIN and everything works just fine while rewriting this guide to work for though who cant access kernel.org anymore due to the downtime.

I am not the ORIGINAL Writier of this guide I have only modified it to work due to the kernel.org being down and supplying a alternative to theme chooser development as well as adjust it to help Cygwin users on windows machines

-COMPILING THEME'S FOR CYANOGEN MOD/T-MOBILE THEME ENGINE-

Web - http://code.google.com/p/android-theme/ - https://github.com/haxzamatic - http://pastebin.com/L8CreqP7

NOTE: This guide assumes you prepared your build environment by following the Cyanogen Mod Wiki - http://goo.gl/LTy7 If you have a x32 system you need to use the CM method below. You also may want to build CM/AOSP before trying this since it's more documented. I did the best I can to put this together please put suggestions and corrections in the comments. I would follow this guide and compile templatebread before adding your additions if it's your first time! A Eclipse Template will be made available from T-Moblie eventually and should make this a lot easier. We need to to compile the apk with -x 10 package scope and is not currently possible to set custom AAPT flags in Eclipse. We need a SDK add-on! When a SDK for the themes is released I will update and make a Templatebread for Eclipse. Hope this clears things up.

Compiled Templatebread APK - http://bit.ly/hdEWsf

The apk is signed and ready to install. If your planning on waiting for the Eclipse Template and want to test or start the theme while waiting I would use apktool and decompile templatebread.apk make your changes and compile. After you compile with apktool use an untouched copy of templatebread you got here and use an archiver to copy your changes into the apk that was compiled correctly. After that sign and test on your device.

PS: I had to figure all of this out myself,if you follow this guide you will end up with a working theme and learn something in the process. Number one thing when trying something out of your comfort zone is not to stress if things go wrong, stress will cause more problems. People give up to quickly, if your patient and persistent you will be fine. Google is your best friend when you have a question. I'm always willing to help anyone and everyone, just contact me.

-Installing REPO-

Make sure you have a ~/bin directory, and setup repo.

cd ~
mkdir -p ~/bin
curl "http://php.webtutor.pl/en/wp-content/uploads/2011/09/repo" > ~/bin/repo
repo init -u https://github.com/android/tools_repo.git -b master
repo sync
chmod a+x ~/bin/repo
PATH=~/bin:$PATH

-START OF GUIDE x64-

We start by getting the source from T-Mobile. Open your terminal...

mkdir themes
cd themes
repo init -u git://github.com/tmobile/themes-platform-manifest.git -b master

Now here where things change from the Orignal Guide

we now want to go into the .repo/manifests

cd .repo/manifests

open the default.xml and search for fetch="git://android.git.kernel.org/"

we want to change

fetch="git://android.git.kernel.org/"

to

fetch="git://codeaurora.org/"

save the default.xml and then go back to the home directory

cd ..
cd ..

now we want to sync the repo to download the src

repo sync
source build/envsetup.sh
lunch themes_generic-eng hdpi

We can make now to make sure it compiles before moving on

make

After you see it works lets start our theme. tree_root means directory your /themes/ folder is in! It's different for each person!

cd tree_root
cd vendor/tmobile/themes
git clone git://github.com/haxzamatic/Templatebread-.git

The themes are all going to be located in...

/home/<USER-DIR>/themes/vendor/tmobile/themes/

In that directory we see the source for Templatebread, open it.

Now this is the source we edit.

package="com.template.theme.templatebread"

to

package="com.yourname.theme.themename"

Then edit...

<theme
pluto:themeId="Templatebread"
pluto:styleId="@style/Templatebread"

to

<theme
pluto:themeId="Themename"
pluto:styleId="@style/Themename"

Save the AndroidManifest.xml

Now open /res/values folder

Open the Strings.xml and edit the following...

<resources>
<string name="app_name">Templatebread Theme</string>
<string name="theme_name">Templatebread</string>
<string name="style_appearance_name">Templatebread</string>
<string name="author">Haxzamatic</string>
<string name="copyright">Haxzamatic</string>
</resources>

to

<resources>
<string name="app_name">Themename</string>
<string name="theme_name">Themename</string>
<string name="style_appearance_name">Themename</string>
<string name="author">yourname</string>
<string name="copyright">yourname</string>
</resources>

Save the strings.xml

Open themes.xml and edit

<resources>
<style name="Templatebread" parent="@android:style/Theme" >

to

<resources>
<style name="YourTheme" parent="@android:style/Yourtheme" >

Save themes.xml

Now open the /src/com/template/ and rename template folder to yourname

Then open /src/com/template/theme/templatebread and rename templatebread folder to yourthemename

So it should be /src/com/template/theme/templatebread.foo.java (So you know this is what the apk will com name will be... ex: com.template.theme.templatebread)

Before "make" we need to edit one more thing, navigate to

/home/<USER-DIR>/themes/vendor/tmobile/products/themes

Now open themes-base.mk and add your theme name in this case we added Templatebread

PRODUCT_PACKAGES += \
ThemeManager \
ThemeChooser \
com.tmobile.themes \
Templatebread \
Cyanbread

Now your ready to make :)

After steps above are done we can build our theme...

cd themes
source build/envsetup.sh
lunch themes_generic-eng
make

After it compiles navigate to the out folder and get your newly compiled apk and sign then zip align after signing!

That's it install on your device and pick the theme in the chooser, apply, and reboot...

-Credits and Honorable mentions-

Original Guide

Artur Graniszewski - For His alternative repository for Repo

Code Aurora - for their Android Alternative git resource

-Thanks and Donations-

If this Guide helps you please use the thanks button or make a donation if you want