Wiki

Clone wiki

Theme Manager Ex (Theme Engine) / Theme Manager Ex - Under the hood

How themes are applied

Theme Manager Ex will parse and apply the official theme.xml first.
When done, if themeEx.xml is found, it will apply the extended resources.

Extended themes are "backward compatible", ie you can apply them in Settings, but all the extended resources will be ignored.

Theme Manager Ex will keep track of any change and you can see these files in the Theme Manager Ex folder in ux0:data/thmx.

Icons

The official theme engine gives you the ability to customize the icons for a limited amount of system apps, but it actully supports any app!

The reason you can't customize all the apps using an official theme is that there is no tag defined for them, thus the theme engine will not read your new and unknown tags!

Theme Manager Ex takes advantage of this to customize the icon of any app.

The override is done in tbl_appinfo_icon -> reserved02.
The path of the icon MUST start with deviceName:/.
deviceName: may be an invalid path!



Title Color

Some system apps have a title and a color is defined in the database.

You can find it in tbl_livearea -> titleColor.
It is a decimal value and you need to convert it Hex to have an RGBA color. (Online Converter - tested)



Style

The style is defined in tbl_livearea -> style



Live Area Images

Live Area resources can be found inside a contents folder.

ur0:appmeta contains a decrypted copy of the resources located in ux0:app.

vs0 containes system apps resources (decrypted).

You can find the full path to the contents folder in tbl_livearea -> org_path.

Seems that this value is not used to load the live area resources, thus you CANNOT change this path to load resources from a custom folder.

The same apply for the gate and background images, furthermore to change them you have to disable the update trigger.

Theme Manager Ex will replace these resources physically.



Apps with an empty live area

These apps have an empty folder in ur0. No livearea folder is found.

To add live area resources to these apps Theme Manager Ex:

  1. will add a new line in tbl_livearea for that app.
  2. will create the live area resources in ur0:appmeta for that app.



To restore the empty live area, Theme Manager Ex:

  1. will temporarily disable the trigger in tbl_livearea_frame
  2. will tempararily disable the trigger in tbl_livearea -> tgr_livearea_del_img
  3. will remove the app from tbl_livearea
  4. will remove the livearea folder from ur0:appmeta/AppID




Templates and Live Area frames

The template.xml defines the style of an app.

You can find it in the contents folder where the live area resources are placed.

This file is parsed only ONCE:

  • When you install an app.
  • When you reset the database.



You can find live area frames in tbl_livearea_frame and you need to disable the delete trigger to edit them.

Theme Manager Ex will temporarily disable the trigger to delete any existing frame of the app you want to override and it will parse and create all the frames found in the template.xml.

System templates and simple custom templates are supported. (See sources/template_utils.c)

You can only add ONE custom bg and ONE custom img per frame.

Every Live Area Style has a frame limit.



Splash Images

System apps have a splash image named pic0.png.

They use a fixed path and name and they cannot be found in the database.

Theme Manager Ex will replace these resources physically.



Theme Manager Ex Debug Mode

To enable logs you need to compile Theme Manager Ex with the -THMXD flag.

Shiplog 2.0 plugin is required to collect logs (no need for the shipload app).

You can find logs in ux0:dump/logger.txt (remember to delete this file from time to time!).

Updated