[Android Themes] AngelDE98:
You can stop F5-ing.

What's that all about? Didn't that exist already?

This tool converts an CM10 / AOKP / ... theme to an XThemeEngine (showthread.php?t=2240180 , I'm still "too new to add links" I guess).

The second post of that thread is just an instruction post. It tells you how to port the theme manually. I've made the script on base of that tutorial and then ported it to Java code so it's cross-platform.

The MAIN PROS:

- Easier with graphical user interface!

- Generates the missing redirections.xml for you!

- Doesn't need the SampleTheme.apk and doesn't need any IDE like Eclipse!

One-Time Set-Up:

1. Download apktool with signapk and testkeys in the same folder.

2. Download the .jar

I've removed the instructions for the shell script - the .sh itself is still inside the upload.zip.

Everytime you run it:

Select all the needed files. The GUI will help you.

Also, if aapt isn't inside of your $PATH, use the optional file chooser for that.

The folder containing aapt is usually platform-tools in the SDK folder.

WARNING: Any damage to your device is NOT MY FAULT. Any damage to any of the apks is NOT MY FAULT. Any damage to the Linux, NT or GNU Kernel is NOT MY FAULT. Any usage of Chuck Norris in this post is NOT MY FAU~~~~UU~~ IT'S MY FAULT!

WARNING: The output is A RAW PORT (except the generated redirections if missing) that may not work on some devices. Please port the .apk manually if needed.

When you encounter any problems, please reply with device, Android version and input theme (link to thread and APK if possible). Thanks!

Known problems (legend: p- problem c-- cause w--- workaround f--- fix) :

p- Applying theme failed.

c-- It's not my fault if the themers use separate xml files and / or forgett redirections.xml .

w--- Create one on your own and modify the code inside the .sh file (you can't overlook it...). It's easier than it sounds. Just replace ./tmpst/res/xml/redirections.xml with the path to your own one.

f--- Update to 2.0+

c-- The theme needs a device-specifiic redirections.xml due to Samsungs / Sonys / ... package and resource stuff.

w--- Port the theme on your own. That's really sad - that's why I've added it to my TODO list.

Changelog:

1.0: Initial release

1.1: Added missing zipalign

1.2: Added code snippet that copy-pastes the sampletheme apk's redirections.xml if there is no one. Unfournately it only has an entry for SystemUI so the code should be modified by the user easily to load a custom redirections.xml instead.

2.0: Ported to Java (.jar) for cross-platform support; removed zipalign for some time; added auto-generation of redirections.xml

ToDo: (* = focused, + = added)

+ Autogenerate redirections.xml if missing (aka Fix failed applying theme).

+ Fix failed applying theme. Some debug options in XThemeEngine would be helpfull... :/ (Edit: See the problem "Applying theme failed.")

+ Make more efficient

+ Add missing zipalign (if requested by too many users) (Edit: Just. Do. It.)

+ Make thread "first post" more user-friendly

+ Port it to a commandline .jar or GUI .jar (Edit: I prefer GUI .jar)

* Find device-specifiic redirections.xml and implement an option to choose from them. Yes, I mean you, Samsung and Sony!

- Add images to the first post

- Re-addd the zipaligning