How CyanogenMod 12 Theme Engine Works


Super Moderator
Staff member
Premium Member
Oct 6, 2011
Reaction score

The first few nightly builds of CyanogenMod 12 were missing the all new theme engine app completely. The latest nightlies do include the app. Theme Engine is a go! I have done a bit of playing around with the theme engine. So far I have opened the app which prompted me to download the theme showcase which features curated themes that are known to be compatible with CM12. These are both paid and free themes. I did try downloading both free and paid themes neither would show up. Apparently there are still bugs in the Theme Engine, atleast in the week old nightly that I am currently running. I am sure that if they haven't already, CM will have the kinks worked out.

If you have run CyanogenMod for any length of time you have probably wondered just how theme manager works. How does it change the color of your framework, the wallpaper, or the style of you app icons. It's nothing short of magic. Many of you are technically minded enough to know that there are some underlying factors that allow all of this to work. Today the CM team released a blog post that explains exactly how the theme engine in CM12 works.

This is done by leveraging a framework known as Runtime Resource Overlays, which was contributed to AOSP by Sony in 2014. Part of the RRO framework is a tool called IDMAP. IDMAP inspects the resources in an application and compares the resource types and names to those in the themed resources. For those resources that match it stores a mapping of the original resource to the matching resource in the theme. Once this process is complete we are left with an efficient way to determine if a resource is themed and where that resource resides.

This is just a bit of the explenation. For a good read head to the link below for the full post.