- Post 1 - Information. PLEASE READ!
- Post 2 - Usage and porting info.
- Post 3 - Features status. To request features use the tab at the top of the thread.
- Post 4 - Ported themes and links.
When posting I only ask of 3 simple requirements.
1) Please search or read first. If the question has been asked/answered i will not reply.
2) Post any log extracts and pictures within the "hide" tags to keep the thread clutter free.
3) Do not quote posts in full. If you have to, use the hide tags
What is CMX?
This is a batch script that runs on Windows to port CM11 themes to work with XTheme/HKTheme engine.
Unless porting png's solely, this is designed to take most of the leg work out of porting themes across, so expect some errors when working with the xml's. It is difficult to encompass all the different CM11 themes and quirks they bring with them without downloading and testing each and every theme available.
Ive tried to make the script as unobtrusive and self sufficient as possible with minimal user input in automatic mode.
If you include xml's, some manual labour may be necessary depending on the theme so expect to get your hands dirty. From the themes I've tested with xml's included, 50% have ported straight through and 50% have failed and required some extra attention.
When the script runs through the asset configuring phase (png's/xml's) it will open up a window for each package folder one at a time. One folder must finish processing before the other begins.
- Java development kit (jdk) -Link. Installed and in your environment path -Link
- CM11 theme to port Take your pick.
- The ability to solve apktool log errors. I will help, but I will not spoonfeed!!.
- Setting up 10 minutes (inc. Java install)
- Porting (depending on theme)
- png's only- 2 minutes.
Difficulty- 2/10. Common error- 9 patch faults.
- inc. xml's- 5 minutes.
Difficulty- Dependant on theme. Common error- xml faults.
- png's only- 2 minutes.
Basically my script will work as follows when ran and "Automatic" is selected:
- Set up required folders.
- Automatically detect the apk in "CMThemeIn" folder and set it as the project or prompt the user to insert an apk.
- Decompile set theme.
- Create all the redirection.xml's required.
- Cycle through the Code:
- Gather xmls from res "drawable" and values" and insert appropriate redirections for that package name.
- Ask the user to input a package name in AndroidManifest.xml.
- Ask the user to input a theme, app, author and original themer name in strings.xml.
- Compile, sign, zipalign and then place the output in "XThemeFinished" folder" ready for installing.
Currently the ports are best served with AOSP but there is an option to add redirections for TouchWiz and Semc (JellyBean 4.2 framework-res.apk).
The script offers you the option to include xml's or not.
Depending on the android version you are using certain xml's may not work or cause conflicts resulting in SOD's, force closes and bootloops.
To recover from a bootloop read the FAQ below.
Currently I wont be porting boot animations and fonts. Although I may add an option to port boot animations etc to a flashable zip.
Finally, the ported themes will NEVER look like the CM counterpart due to the Xposed limitation of themeing "styles.xml". This is not a restriction of the CMX tool, theme .apk or the theme engine
To find out more about the structure and for a better understanding go here and read more:
Q). It says Java not found, how do I add the Java path?
A). Check "What is CMX?" for a guide.
Q). The script fails in auto, what's wrong?
A). Read the log.txt and assets,txt in tools and look for any errors, if you cannot understand them then post your log either as a .txt file or as a snippet wrapped in hide tags as shown above.
Q). Whats the difference between CM10 and CM11 themes?
A). All the drawable resources for CM11 themes now reside in "assetsoverlays" and not "resdrawables" as they previously did. Also they no longer use redirection xml's.
Due to this change, XTheme and HKTheme engines do not support CM11 themes...until now.
Q). Why doesn't the theme look like the CM11 counterpart?
A). This is due to styles.xml not being supported and xml restrictions if not included.
Q). I've got a bootloop, how can I fix it?
A). Go and follow the instructions here: http://tinyurl.com/nm4eups
Q). Why does it take longer when porting than it used to?
A). I have muted the opening of seperate windows. Each folder in the CM11Themeassets directory is processed one at a time to prevent errors. This must be done correctly or this will have detrimental effects to the xml's being created and
cause compiling errors.
Q). What are the duties of the folders?
- "tools": Contains all the resources needed to help porting.
- "CMThemeIn": This is the folder you place your desired CM theme to be ported.
- "CMThemeOut": When apktool decompiles the apk from "CMThemeIn", this is the source/reference for porting.
- "XTheme": Contains the resources from "CMThemeOut" that have been configured and modified to be X/HKTheme compatible.
- "XThemeFinished: This folder is used to store the newly created, X/HKTheme compatible apk.
Q). How do I remove "ON" and "OFF" from the switches?
A). See this post: Link.
Q). I get "invalid resource directory name" in the error log, how do I fix it?
A). Something has broken the script process and caused the creation of unnecessary folders. Goto "XThemeXThemeBase.apkres" and remove the folders detailed in the log.
Example: "XThemeXThemeBase.apkresdrawable-SomeRandomName" delete "SomeRandomName" folder
- @brut.all, @iBotPeaches and @JesusFreke for apktool and smali/baksmali respectively.
- @nhnt11 for his xml generator.jar.
- @existz and @xIC-MACIx for letting me test on their themes.
- @rovo89, @ruqqq and @hdbk1986 for Xposed, Xtheme and HKTheme respectively.
- @pierx for TouchWiz 4.2 framework-res redirections.
- All the beta-testers.
CMX, Tool/Utility for all devices (see above for details)
Current Beta Version: v3
Beta Release Date: 2014-09-15
Last Updated 2014-09-27