[MOD][XPOSED][4.0+] XThemeEngine beta5 - Theme engine for any rooted phone

Search This thread

ruqqq

Senior Member
Oct 12, 2008
526
1,255
What is XThemeEngine?
XThemeEngine allows you to theme your device similar to how T-Mobile/CM10 Theme Engine. Install theme apk, activate theme from XThemeEngine app. Voila! Forget MetaMorph. Forget flashing zips.

XThemeEngine is powered by Xposed Framework by rovo89. You will be prompted to install if you haven't.

Install Instructions
  1. Install Xposed Installer
  2. Install Xposed Framework (from the Xposed Installer app)
  3. Install XThemeEngine from the link at the bottom of this post
  4. Activate the module in Xposed Installer app
  5. Download SampleTheme (or create your theme!), activate through XThemeEngineApp
  6. Enjoy!

Which device has XThemeEngine been tested on?
Galaxy Nexus (4.2 stock), Xperia V (JB Stock), Galaxy S3 (JB Stock), Galaxy Note 2 (JB Stock).

Confirmed working by XDA members: Xperia U, Xperia P, Xperia T, Xperia TX, Galaxy S Duos, Lenovo A800, Ainol Novo Hero2, HP Touchpad 4.2.2, Cherry Mobile Flare / Karbonn A9+, L9, SIII, Optimus G, Motorola RAZR HD, Galaxy S Advance I9070, Xperia Sola, LG Motion 4G

Does not work: HTC One X(L) Stock, HTC One Stock

Theoretically, XThemeEngine should work with Android 4.0 and above. Only for ARM devices though. x86 devices are NOT supported. To learn more, read Xposed Framework FAQ.

This would further be limited depending on the theme selected (similar to CM10 theme engine). Do report the device you're using if it works for you too.

Current Limitations
  • Does not support ringtones/wallpapers
  • Avoid res/layout at the moment (despite supported)
  • res/values/styles.xml is NOT supported and may never be
  • XThemeEngine and Themes cannot be stored on external storage or /mnt/asec

Screenshot
Running ported LunarUI II theme on Xperia V stock rooted
7p7lhhw.png
y9CbZyG.png


Download
From G+ Page: https://plus.google.com/communities/107334160991587538620/

SampleTheme apk: https://www.dropbox.com/s/quqsjj9e6kt7nls/SampleTheme.apk
SampleTheme GitHub: https://github.com/ruqqq/SampleTheme
The SampleTheme only changes your battery icons
 
Last edited:

ruqqq

Senior Member
Oct 12, 2008
526
1,255
How To Create Theme

Refer to https://github.com/ruqqq/SampleTheme for SampleTheme project. AndroidManifest.xml has all the info. Essentially, the theme format is 90% similar to CM10 Themes.

How To Port Themes from CM10

ONLY PROCEED IF YOU'RE CONFIDENT OF FINDING SOLUTION TO PROBLEMS AND NOT RELY ON GETTING SPOON FEED.

Prerequisites
  • Basic Knowledge with Intellij/Eclipse + Android SDK (able to create a new project and run it on a phone)
  • Basic Command Line Knowledge
  • apktool
  • Some Intelligence
  • I will not tolerate google-able questions

Steps
  1. apktool d THEME_APK
  2. Create a new Intellij/Eclipse project with the same package name as the theme (can find this out in AndroidManifest.xml)
  3. Copy res and AndroidManifest.xml apktool extracted into the new project, replacing the generated files.
  4. Add
    Code:
    <uses-permission android:name="sg.ruqqq.XThemeEngine.permission.SYSTEM_THEME" />
    just after manifest tag
  5. Delete res/values/public.xml (if any)
  6. Make sure there is a file called res/xml/redirections.xml and the file contents is set up to reflect the theme (refer to SampleTheme or read and understand T-Mobile Theme structure)
  7. Build, Install and Apply Theme!
  8. Soft Reboot!

Porting Themes without Intellij/Eclipse
  • By the way there's another easier method to port a theme, without IntelliJ or Eclipse.
    I assume you know how to use apktool and how to sign .apk.
    1. Decompile sampletheme.apk
    2. Decompile your desired theme .apk
    3. In sampletheme folder just delete "res" folder, replace it with the "res" folder from your desired theme.
    4. Edit androidmanifest.xml and add the line below (before application tag)
    Code:
    <uses-permission android:name="sg.ruqqq.XThemeEngine.permission.SYSTEM_THEME" />
    (Optional) You may also replace package="com.theme.name" with the ported theme name.
    5. Build, sign. Thats it. ;)


XThemeEngine-only Redirections

Unlike CM Themes which is made just for CM and it's cousins (AOKP etc.), XThemeEngine is made to support various devices. Hence there will be a problem of fragmentation for theme devs.

I implemented an extra functionality to workaround the fragmentation. This require you to add a new file: res/xml/xthemeengine_redirections.xml. This file works the same as res/xml/redirections.xml except with 3 new attributes: deviceManufacturer, deviceModel, deviceId. These attributes defines the condition for which device to do the redirections for. The attribute can have multiple values separated by commas.

Example:
Code:
<package-redirections android:name="com.android.systemui" android:resource="@xml/xthemeengine_com_android_systemui" android:minSdkVersion="16" deviceManufacturer="Sony" deviceModel="LT25i,LT29i,LT30p" deviceId="9.1.A.0.490,9.1.A.1.140" />

xthemeengine_com_android_systemui.xml will be loaded to theme com.android.systemui for Sony LT25i, LT29i, LT30p and only for the specific ROM versions. This way, I can theme status bar layouts for specific device without causing FCs.

FAQ

  • Why does the ported theme not look 100% as the original theme?

    There are 2 reason for this. Firstly, as stated in the previous post, styles.xml is not working for XThemeEngine. Hence, the ported themes would not work 100%. For better success, port a theme which is closer to Holo styles (dark background, bright text). Second reason, which is the most common reason, is that the theme is made for CM10. CM10 is very close to AOSP while your device which is running stock rom only retain some parts of AOSP. The theme need to be properly ported (analyze your stock rom frameworks and redirect the proper files in your ported theme etc.) to fully support your device.
 
Last edited:

[GS]

Senior Member
Jun 24, 2012
536
124
Durres
Im testing in galaxy S3 mini and work great with sample theme! batery icon change... but work afer normal reboot,no with soft reboot
 
Last edited:

sadiq23

Guest
Jan 31, 2013
6
633
Awesome!!!
Worked on my Xperia P ICS
Here screenshot(observe battery icon)

Sent from my Xperia P using XDA-premium
 

Attachments

  • uploadfromtaptalk1366296684881.jpg
    uploadfromtaptalk1366296684881.jpg
    119.1 KB · Views: 49,770
  • Like
Reactions: snow_angels_xk83

XDA.AGM

Senior Member
Dec 19, 2012
363
735
Madrid
:eek: This is amaaazing :eek: many thanks !!

screenshots Xperia U (Stock Ics) sample green theme for framework & systemui

changes - Tabs - Slider - green button system ui - battery 100 step green , green switch , at the moment, all works well :good: :laugh: ;)

now alot of works for do :D
 

Attachments

  • Screenshot_2013-04-18-16-54-55.jpg
    Screenshot_2013-04-18-16-54-55.jpg
    29.5 KB · Views: 54,623
  • Screenshot_2013-04-18-16-55-05.jpg
    Screenshot_2013-04-18-16-55-05.jpg
    26.3 KB · Views: 50,239
  • Screenshot_2013-04-18-16-55-42.jpg
    Screenshot_2013-04-18-16-55-42.jpg
    25.3 KB · Views: 48,195
  • Screenshot_2013-04-18-16-56-39.jpg
    Screenshot_2013-04-18-16-56-39.jpg
    20.5 KB · Views: 43,541

sadiq23

Guest
Jan 31, 2013
6
633
can you post a small guide on how to do it?

It is simple, here:-
1) First download and install Xposed
2) Then open Xposed and there you'll find "Install/update", press that!
3) Now reboot
4) next download and install XThemeEngine
5) Now download any of sample theme and install it
6) Open Xposed and swipe your screen to "Modules"
7) There activate XThemeEngine
8) Now open XThemeEngine
9) There you'll find option "choose theme" press and select "sample theme"
10) below that there will be a option "apply theme", press that
11) Reboot and your done!

Don't forget to hit thanx button!
 
Last edited:

pierx

Senior Member
Dec 3, 2011
461
1,044
Wow, this is great. I've been on stock for while, but i do missing theme engine.

Xposed is getting more mature now, nice job guys.
 

Marsou77

Senior Member
Feb 2, 2011
1,469
350
Earth
I have installed LunarUI CM10 but Xtheme doesn't find it...

EDIT : Reading the 3rd post anserwed me ;)
 
Last edited:

defcomg

Senior Member
Dec 10, 2006
3,854
3,302
33
Just like a solar eclipse, every now and then a magical moment happens on XDA, and this is one those moments.

I've been dreaming for this kind of mod for a long time and now it's a reality.

I'll send some beers on pay day.
Many thanks and kudos.:good:

Right on this was one of the most major turn off for using a stock rom lack of theme support

XDA to the rescue :D
 

Top Liked Posts

  • There are no posts matching your filters.
  • 503
    What is XThemeEngine?
    XThemeEngine allows you to theme your device similar to how T-Mobile/CM10 Theme Engine. Install theme apk, activate theme from XThemeEngine app. Voila! Forget MetaMorph. Forget flashing zips.

    XThemeEngine is powered by Xposed Framework by rovo89. You will be prompted to install if you haven't.

    Install Instructions
    1. Install Xposed Installer
    2. Install Xposed Framework (from the Xposed Installer app)
    3. Install XThemeEngine from the link at the bottom of this post
    4. Activate the module in Xposed Installer app
    5. Download SampleTheme (or create your theme!), activate through XThemeEngineApp
    6. Enjoy!

    Which device has XThemeEngine been tested on?
    Galaxy Nexus (4.2 stock), Xperia V (JB Stock), Galaxy S3 (JB Stock), Galaxy Note 2 (JB Stock).

    Confirmed working by XDA members: Xperia U, Xperia P, Xperia T, Xperia TX, Galaxy S Duos, Lenovo A800, Ainol Novo Hero2, HP Touchpad 4.2.2, Cherry Mobile Flare / Karbonn A9+, L9, SIII, Optimus G, Motorola RAZR HD, Galaxy S Advance I9070, Xperia Sola, LG Motion 4G

    Does not work: HTC One X(L) Stock, HTC One Stock

    Theoretically, XThemeEngine should work with Android 4.0 and above. Only for ARM devices though. x86 devices are NOT supported. To learn more, read Xposed Framework FAQ.

    This would further be limited depending on the theme selected (similar to CM10 theme engine). Do report the device you're using if it works for you too.

    Current Limitations
    • Does not support ringtones/wallpapers
    • Avoid res/layout at the moment (despite supported)
    • res/values/styles.xml is NOT supported and may never be
    • XThemeEngine and Themes cannot be stored on external storage or /mnt/asec

    Screenshot
    Running ported LunarUI II theme on Xperia V stock rooted
    7p7lhhw.png
    y9CbZyG.png


    Download
    From G+ Page: https://plus.google.com/communities/107334160991587538620/

    SampleTheme apk: https://www.dropbox.com/s/quqsjj9e6kt7nls/SampleTheme.apk
    SampleTheme GitHub: https://github.com/ruqqq/SampleTheme
    The SampleTheme only changes your battery icons
    93
    How To Create Theme

    Refer to https://github.com/ruqqq/SampleTheme for SampleTheme project. AndroidManifest.xml has all the info. Essentially, the theme format is 90% similar to CM10 Themes.

    How To Port Themes from CM10

    ONLY PROCEED IF YOU'RE CONFIDENT OF FINDING SOLUTION TO PROBLEMS AND NOT RELY ON GETTING SPOON FEED.

    Prerequisites
    • Basic Knowledge with Intellij/Eclipse + Android SDK (able to create a new project and run it on a phone)
    • Basic Command Line Knowledge
    • apktool
    • Some Intelligence
    • I will not tolerate google-able questions

    Steps
    1. apktool d THEME_APK
    2. Create a new Intellij/Eclipse project with the same package name as the theme (can find this out in AndroidManifest.xml)
    3. Copy res and AndroidManifest.xml apktool extracted into the new project, replacing the generated files.
    4. Add
      Code:
      <uses-permission android:name="sg.ruqqq.XThemeEngine.permission.SYSTEM_THEME" />
      just after manifest tag
    5. Delete res/values/public.xml (if any)
    6. Make sure there is a file called res/xml/redirections.xml and the file contents is set up to reflect the theme (refer to SampleTheme or read and understand T-Mobile Theme structure)
    7. Build, Install and Apply Theme!
    8. Soft Reboot!

    Porting Themes without Intellij/Eclipse
    • By the way there's another easier method to port a theme, without IntelliJ or Eclipse.
      I assume you know how to use apktool and how to sign .apk.
      1. Decompile sampletheme.apk
      2. Decompile your desired theme .apk
      3. In sampletheme folder just delete "res" folder, replace it with the "res" folder from your desired theme.
      4. Edit androidmanifest.xml and add the line below (before application tag)
      Code:
      <uses-permission android:name="sg.ruqqq.XThemeEngine.permission.SYSTEM_THEME" />
      (Optional) You may also replace package="com.theme.name" with the ported theme name.
      5. Build, sign. Thats it. ;)


    XThemeEngine-only Redirections

    Unlike CM Themes which is made just for CM and it's cousins (AOKP etc.), XThemeEngine is made to support various devices. Hence there will be a problem of fragmentation for theme devs.

    I implemented an extra functionality to workaround the fragmentation. This require you to add a new file: res/xml/xthemeengine_redirections.xml. This file works the same as res/xml/redirections.xml except with 3 new attributes: deviceManufacturer, deviceModel, deviceId. These attributes defines the condition for which device to do the redirections for. The attribute can have multiple values separated by commas.

    Example:
    Code:
    <package-redirections android:name="com.android.systemui" android:resource="@xml/xthemeengine_com_android_systemui" android:minSdkVersion="16" deviceManufacturer="Sony" deviceModel="LT25i,LT29i,LT30p" deviceId="9.1.A.0.490,9.1.A.1.140" />

    xthemeengine_com_android_systemui.xml will be loaded to theme com.android.systemui for Sony LT25i, LT29i, LT30p and only for the specific ROM versions. This way, I can theme status bar layouts for specific device without causing FCs.

    FAQ

    • Why does the ported theme not look 100% as the original theme?

      There are 2 reason for this. Firstly, as stated in the previous post, styles.xml is not working for XThemeEngine. Hence, the ported themes would not work 100%. For better success, port a theme which is closer to Holo styles (dark background, bright text). Second reason, which is the most common reason, is that the theme is made for CM10. CM10 is very close to AOSP while your device which is running stock rom only retain some parts of AOSP. The theme need to be properly ported (analyze your stock rom frameworks and redirect the proper files in your ported theme etc.) to fully support your device.
    88
    can you post a small guide on how to do it?

    It is simple, here:-
    1) First download and install Xposed
    2) Then open Xposed and there you'll find "Install/update", press that!
    3) Now reboot
    4) next download and install XThemeEngine
    5) Now download any of sample theme and install it
    6) Open Xposed and swipe your screen to "Modules"
    7) There activate XThemeEngine
    8) Now open XThemeEngine
    9) There you'll find option "choose theme" press and select "sample theme"
    10) below that there will be a option "apply theme", press that
    11) Reboot and your done!

    Don't forget to hit thanx button!
    38
    how many people owuld want the holo glass theme?
    22