[Sony Cross-Device General] gamzekal:
How to port Fully Xperia Themes To cm11

-Hi everyone

-I will explain today how to port fully Xperia Themes to Cm11

Xda Portal News

http://www.xda-developers.com/android/port-xperia-themes-to-cyanogenmod-11/

Requirements

They are necessary for succesfully porting

Z2 framework of Ambor

Z2 Calendar

Z2 Settings of RXS

Z2 Clock

Z2 Widgets

Z2 Conversations

Z2 Soundrecorder

Z2 Systemui

Tools

Gimp2

http://www.gimp.org/downloads/

Total Commander

http://www.ghisler.com/deutsch.htm

Notepadd++

http://notepad-plus-plus.org/

Easy Compare

1)You can use [Total Commander] or [Notepad++]

2)For example

3)Go to my theme.apk/res/xml/android.xml

4)Open it and look at drawable line by line

How to use Gimp2

How to edit png files?

1)Watch this video

[YOUTUBE]watch?v=d3Q1Z4wc3gc[/YOUTUBE]

2)That´s it.

Info About RXS Theme Engine

All Z2 Apps

http://xdaforums.com/showthread.php?t=2766508

Z2 Framework

http://xdaforums.com/crossdevice-dev/sony/cm11-how-port-z2-framework-to-cm11-15-t2836856

Preparing Section

1)Download Xperia Themes from xperia threads,googleplay or somewhere.

2)Decompile it via any Apk Multi Tool

3)After decompiling

4)Go to xperia theme.apk/res/assests

5)You will see some zip files.

6)For example

android.zip
com.android.systemui.zip
com.sonyericsson.home.zip
com.sonyericsson.uxp.zip
....

7)Change last name of all files from .zip to .apk

Ex: old :android.zip
new:android.apk

8)Decompile all apk that you have renamed them.

9)Now download this theme from my thread.

maintheme.apk

http://www.mediafire.com/download/tlncyl0cjca1bqc/[21.09.14]maintheme.apk

10)Download new Public.xml of maintheme.apk

http://d-h.st/eEq

11)Decompile maintheme.apk

12)Replace public.xml with old one

13)Again return to step8

Porting Section

How to port framework of theme?

1)Download this file with this file you can find easily each png what you should change

http://d-h.st/3U2

2)Go to android.apk/res/drawable(all drawable files)

ex:drawable-hdpi,-xhdpi,drawable-land-xhdpi....

3)Now you musst be carefull.

4)Compare all of them with drawable pngs of framework files and all name musst be same.

5)When some files are not same name,rename it

ex:from "semc_ic_contact_picture_normal" to ic_contact_picture

6)Check them with all pngs of framework

7)You musst use Gimp2 for this files(.9.pngs)

8)Change color of those pngs according to your theme

activity_picker_bg_activated.9
data_grid_border.9
data_grid_primary.9
day_picker_week_view_dayline_holo.9
drawer_list_divider.9
ic_lock_power_off
ic_lock_profile
ic_lock_reboot
ic_lock_screenshot
light_digital_alarm_icon
light_digital_colon
list_section_divider_holo_dark.9
list_section_divider_holo_light.9
numberpicker_selection_divider.9
overscroll_edge
overscroll_glow
plain_digital_alarm_icon
plain_digital_alarm_lockscreen
progressbar_indeterminate_holo1
progressbar_indeterminate_holo2
progressbar_indeterminate_holo3
progressbar_indeterminate_holo4
progressbar_indeterminate_holo5
progressbar_indeterminate_holo6
progressbar_indeterminate_holo7
progressbar_indeterminate_holo8
divider_strong_holo.9
semc_dialog_divider_holo_colored.9
fastscroll_thumb_default_holo
fastscroll_thumb_pressed_holo
tab_selected_holo.9
tab_selected_pressed_holo.9
ic_contact_picture

9)If android.apk has new pngs,go to maintheme.apk/res/xml/android.xml

10)Add line like this

ex:<item name="drawable/your new png name">@drawable/your new png name</item>

11)Save it and delete all unneceassary pngs of framework theme(maintheme.apk)

How to port Home launcher of Theme?

1)Go to android.apk/res/drawable(all drawable files)

ex:drawable-hdpi,-xhdpi,drawable-land-xhdpi....

2)Copy all pngs from Xperia Theme to your new ported theme(it musst copy same direction:from drawable-land hdpi to drawable-land hdpi )

3)Search this pngs and change color of them via Gimp2

drawer_list_selected

4)Seach pngs when you see dopple pngs that they have same name,delete old pngs.

5)If com.sonyericsson.home.apk has new pngs,go to maintheme.apk/res/xml/com_sonyericsson_home_z2.xml and com_sonyericsson_home.xml

6)Add line like this

ex:<item name="drawable/your new png name">@drawable/your new png name</item>

7)Save it and delete all unneceassary pngs of home theme(maintheme.apk)

How to make Clock app colorizable?

1)Search this pngs and change color of them via Gimp2

nav_bar_alarm_theme
nav_bar_alarm_theme_v2
nav_bar_stopwatch_theme
nav_bar_stopwatch_theme_v2
nav_bar_timer_theme
nav_bar_timer_theme_v2
nav_bar_worldclock_theme
nav_bar_worldclock_theme_v2

2)If com.sonyericsson.organizer has new pngs,go to maintheme.apk/res/xml/com_sonyericsson_organizer and add line like this

ex:<item name="drawable/your new png name">@drawable/your new png name</item>

3)Save it

How to make Calendar app colorizable?

1)For changing color of calendar app ,please go to Color Section

2)If com_android_calendar has new pngs,go to maintheme.apk/res/xml/com.android.calendar and add line like this

ex:<item name="drawable/your new png name">@drawable/your new png name</item>

3)Save it

How to port Systemui of Theme?

1)Go to com.android.systemui.apk/res/drawable(all drawable files)

ex:drawable-hdpi,-xhdpi,drawable-land-xhdpi....

2)Copy all pngs from Xperia Theme to your new ported theme(it musst copy same direction:from drawable-land hdpi to drawable-land hdpi )

3)Seach pngs when you see double pngs that they have same name,delete old pngs.

4)Search this pngs and change color of them via Gimp2

statusbar_settings
status_bar_close_on.9
statusbar_brightness

5)If com.android.systemui.apk has new pngs,go to maintheme.apk/res/xml/com_android_systemui and add line like this

ex:<item name="drawable/your new png name">@drawable/your new png name</item>

6)Save it and delete all unneceassary pngs of systemui theme(maintheme.apk)

How to port Conversation.apk of Theme?

1)Go to com.sonyericsson.conversations.apk/res/drawable(all drawable files)

ex:drawable-hdpi,-xhdpi,drawable-land-xhdpi....

2)Copy all pngs from Xperia Theme to your new ported theme(it musst copy same direction:from drawable-land hdpi to drawable-land hdpi )

3)Seach pngs when you see double pngs that they have same name,delete old pngs.

4)If com.sonyericsson.conversations.apk has new pngs,go to maintheme.apk/res/xml/com_sonyericsson_conversations.xml and add line like this

ex:<item name="drawable/your new png name">@drawable/your new png name</item>

5)Save it and delete all unneceassary pngs of conversation theme(maintheme.apk)

How to port Settings.apk of Theme?

1)Go to com.android.settings.apk/res/drawable(all drawable files)

ex:drawable-hdpi,-xhdpi,drawable-land-xhdpi....

2)Copy all pngs from Xperia Theme to your new ported theme(it musst copy same direction:from drawable-land hdpi to drawable-land hdpi )

3)Seach pngs when you see double pngs that they have same name delete old pngs.

4)RepeXpersiS settings has some different pngs

5)Please rename those pngs according to RXS settings

from ic_settings_personalization to ic_settings_personalization_settings
from ic_settings_connectivity to ic_settings_xperia_connectivity_settings
from ic_settings_sync to ic_settings_profiles
from ic_settings_call to ic_settings_callsettingsxperia

6)If com.android.settings.apk has new pngs,go to maintheme.apk/res/xml/com_android_settings and add line like this

ex:<item name="drawable/your new png name">@drawable/your new png name</item>

7)Save it and delete all unneceassary pngs of settings theme(maintheme.apk)

How to port Soundrecorder of Theme?

1)Go to maintheme.apk/res/drawable-xxhdpi

2)Search this pngs and change color of them via Gimp2

button_audio_quality_selected_disabled
button_audio_quality_selected_normal
button_audio_quality_unselected_disabled
button_audio_quality_unselected_normal
apptheme_scrubber_control_disabled_holo
apptheme_scrubber_control_normal_holo
apptheme_scrubber_primary_holo
apptheme_scrubber_secondary_holo
apptheme_scrubber_track_holo_light
apptheme_scrubber_control_pressed_holo

3)If com.sonymobile.androidapp.audiorecorder has new pngs,go to maintheme.apk/res/xml/com_sonymobile_androidapp_audiorecorder and add line like this

ex:<item name="drawable/your new png name">@drawable/your new png name</item>

4)Save it and delete all unneceassary pngs of soundrecorder theme(maintheme.apk)

How to make Xperia Widgets colorizable?

1)Search this pngs and change color of them via Gimp2

dark_analog_face
light_analog_face
dark_analog_hour_hand
drawable/dark_analog_minute_hand
dark_analog_second_hand
light_alarm_icon
light_analog_hour_hand
light_analog_minute_hand
light_analog_second_hand
progressbar_fill.9
progressbar_glow
music_particle_big
music_particle_med
music_particle_sml
default_contact

2)Name of Xperia Widgets packages

com.sonyericsson.advancedwidget.clock

com.sonyericsson.advancedwidget.music

com.sonymobile.advancedwidget.topcontacts

com.sonyericsson.advancedwidget.onoff

3)If xperia Widgets have new pngs,go to this locations

maintheme.apk/res/xml/com_sonyericsson_advancedwidget_clock

maintheme.apk/res/xml/com_sonyericsson_advancedwidget_clock

maintheme.apk/res/xml/com_sonyericsson_advancedwidget_clock

maintheme.apk/res/xml/com_sonyericsson_advancedwidget_clock

4)Add line like this

ex:<item name="drawable/your new png name">@drawable/your new png name</item>

5)save it and delete all unneceassary pngs of settings theme(maintheme.apk)

How to make dialer and contacts colorizable?

1)Search this pngs and change color of them via Gimp2

ic_menu_person_dk
ic_menu_star_dk
ic_menu_group_dk

3)If com.android.dialer.apk has new pngs,go to maintheme.apk/res/xml/com_android_dialer and com_android_contacts has new pngs,go to maintheme.apk/res/xml/com_android_contacts

4)Add line like this

ex:<item name="drawable/your new png name">@drawable/your new png name</item>

5)Save it and delete all unneceassary pngs of dialer and contacts theme(maintheme.apk)

How to change of framework background?

1)You can change with them all background of apps

2)Go to android.apk/res/drawable-xxhdpi

3)Search them

semc_bg_dark_tile

semc_bg_light_tile

4)They have sometimes different names.Search as "semc_bg"

5)Change it

From semc_bg_dark_tile to semc_bg

From semc_bg_light_tile to semc_bg_light

6)Save it and delete all unneceassary pngs about background(maintheme.apk)

How to change of app icon,wallpaper and prewiew of Theme?

1)Go to maintheme.apk/res/drawable-xxhdpi

2)Copy all of them

3)Go to this page

http://www.picresize.com/

4)Resize it is like maintheme pngs

Change from "semc_theme_lockscreen_wallpaper" to "app_icon"
from "semc_theme_preview" to "preview"
from "semc_theme_wallpaper" to "default_wallpaper"
5)Paste them to drawable-nodpi
6)Howewer paste default_wallpaper and preview to drawable-xxhdpi
paste app_icon to drawable-mdpi,hdpi.

How to add new apk support to your Theme?

1)I will explain it with an example

2)You want to add z2 album support in your theme

Steps

1)Decompile SemcAlbum.apk

2)Go to SemcAlbum.apk/res/AndroidManifest.xml

Search "package"

3)You will find ----->package="com.sonyericsson.album"

4)Copy "com.sonyericsson.album"

5)Go to maintheme.apk/res/xml

6)Download this file

http://d-h.st/5FM

7)And rename this file as com_sonyericsson_album.xml

8)Paste it to maintheme.apk/res/xml

9)Add related drawable lines into this xml file

10)Save it (com_sonyericsson_album.xml)

11)Open redirections.xml in maintheme.apk/res/xml

12)Add this line

<package-redirections android:name="com.sonyericsson.album" android:resource="@xml/com_sonyericsson_album" android:minSdkVersion="9" />

13)Save it (redirections.xml)

Tutorial

<package-redirections android:name="PACKAGE NAME" android:resource="@xml/XML NAME" android:minSdkVersion="9" />
ex:
1)Package name of Album:com.sonyericsson.album
2)XML name of Album:com_sonyericsson_album
3)Package name musst contents alway this sign "." between sentences
4)Xml name musst contents always this sign "_" between sentences.

5)Thats all.

How to change of appi con of Z2 apps?

1)Go to app.apk/res/mipmap and drawable(all drawable and mipmap files)

2)Most Apps have generally app icon in mipmap but sometimes in drawable

3)Search it as "launcher,app_icon..."

4)Copy png or pngs from app.apk to mipmap or drawable files(look at for it into xml folder in maintheme.apk.You will find related xml files and There is some drawable lines about it)

5)Save it and delete all unneceassary pngs about app icon(maintheme.apk)

Color Section

How to change color of Theme?

Related Packages

com.sonyericsson.uxp

com.sonyericsson.home

com.android.systemui

How to find Color Values?

1)Go to xxx(theme).apk/values/colors.xml

This is most important.I will explain detail

What is color value?

ex:it is #fffcc68b (light brown)

How to get color value?

1)Go to this page

http://www.w3schools.com/cssref/css_colorsfull.asp

How to change of color?

[B][U][COLOR="DarkGreen"]Old [/COLOR][/U][/B]
<color name="somc_color_dark">#fffcc68b</color>(Light-Brown)
[B][U][COLOR="DarkGreen"]New[/COLOR][/U][/B]
<color name="somc_color_dark">#ffd700</color>(Gold-Yellow)
#FFD700

1)Some colors are about systemui,android framework,calendar

Please dont change those colors

[if you see new color on packages(above),change it ]

<color name="home_badge_text_color">#e6303030</color>
<color name="apptray_background_color">#00000000</color>
<color name="apptray_drawer_text_color">#cbff0000</color>
<color name="apptray_drawer_badge_text_color">#e6303030</color>
<color name="cui_grid_divider_color">#30ffffff</color>
<color name="status_bar_light_background">#ff000000</color>
<color name="status_bar_opaque_background">#00570000</color>
<color name="semc_theme_illumination_color_Calendar">#fff4fa2f</color>
<color name="light_theme_accent_addition">#ff303030</color>
<color name="text_shadow_color">#e5000000</color>
<color name="memory_avail">#ffb2b2b2</color>
<item type="color" name="memory_apps_usage">@color/semc_theme_color_light</item>
<color name="memory_downloads">#fffcb13c</color>
<color name="memory_dcim">#ffdb6770</color>
<color name="memory_music">#ffd2b6dc</color>
<color name="memory_cache">#ff637085</color>
<color name="memory_misc">#ff4798d2</color>
<color name="memory_user_light">#ffcac5a5</color>
<color name="memory_user_dark">#ff7c9769</color>
<color name="system_bar_background_opaque">#78000000</color>
<color name="notification_panel_solid_background">#00000000</color>
<color name="moving_item_background">#80000000</color>
<item type="color" name="accent_color_illumination">@color/semc_theme_color_light</item>
<item type="color" name="somc_theme_accent_color_light">@color/accent_color_dark</item>
<item type="color" name="blue_focused">@color/semc_theme_color_light</item>
<item type="color" name="neutral_pressed">@color/semc_theme_color_light</item>
<item type="color" name="semc_text_color_highlight">@color/semc_theme_color_light</item>
<item type="color" name="linear_color_bar_left_color">@color/semc_theme_color_light</item>
<item type="color" name="linear_color_bar_middle_color">@color/semc_theme_color_light</item>
<color name="linear_color_bar_right_color">#ff888888</color>
<color name="linear_color_bar_gray_color">#ffd6d6d6</color>
<color name="data_usage_series_fill_color">#c0c961db</color>
<color name="data_usage_series_fill_color_secondary">#66c961db</color>
<color name="system_bar_background_semi_transparent">#ff5e5e5e</color>
<color name="system_ui_light_background">#ff5e5e5e</color>
<color name="system_bar_background_fully_transparent">#00000000</color>
<color name="status_bar_recents_app_label_color">#66000000</color>
<color name="notification_list_shadow_top">#80000000</color>
<color name="start_color">#ff181818</color>
<color name="end_color">#ff242424</color>
<color name="frame_color">#ff4d4d4d</color>
<color name="notification_panel_scrim_color">#ff000000</color>
<color name="scalebar_line_color">#fffcc68b</color>
<item type="color" name="blue_light">@color/semc_theme_color_light</item>
<color name="black_dark">#ff2a2a2a</color>
<color name="blue_medium">#66e4633a</color>
<color name="blue_dark">#ff112026</color>
<item type="color" name="blue_tab">@color/semc_theme_color_light</item>
<color name="list_item_selected_background">#ffffbe79</color>
<item type="color" name="status_bar_clock_color">@color/semc_theme_color_light</item>
<item type="color" name="semc_theme_accent_color_dark">@color/semc_theme_color_light</item>

Systemui and Framework values change it according to com.sonyericsson.uxp

<color name="somc_color_dark">#fffcc68b</color>
<color name="somc_color_light">#fffcc68b</color>
<color name="somc_color_light_off">#fffcc68b</color>
<color name="somc_color_bright">#fffcc68b</color>
<color name="semc_theme_color_light">#fffcc68b</color>
<color name="semc_theme_color_dark">#fffcc68b</color>
<color name="accent_color_neutral">#fffcc68b</color>
<color name="accent_color_light">#fffcc68b</color>
<color name="semc_theme_illumination_color_light">#fffcc68b</color>
<color name="semc_theme_illumination_color_dark">#fffcc68b</color>
<color name="somc_theme_accent_color_dark">#fffcc68b</color>

Home Values

(i remember it changes accent_color_dark color of home.apk but i am not sure please test it)

<color name="accent_color_neutral">#fffcc68b</color>

<color name="accent_color_light">#fffcc68b</color>

<color name="accent_color_dark">#fffcc68b</color>

Soundenchaments Values

<color name="scalebar_line_color">#fffcc68b</color>
<color name="scalebar_center_line_color">#fffcc68b</color>
<color name="surround_preset_name_color">#fffcc68b</color>
<color name="surround_preset_summary_color">#fffcc68b</color>
<color name="freqnum_color">#fffcc68b</color>

Conversations Values

<color name="somc_accent_color_neutral">#fffcc68b</color>
<color name="semc_theme_accent_color">#fffcc68b</color>
<color name="semc_theme_accent_color_sent">#fffcc68b</color>

Calendar Values

It changes otomatically according to framework color

Highlight_text Values

<color name="link_text_dark">#fffcc68b</color>
<color name="link_text_light">#fffcc68b</color>
<color name="highlighted_text_holo_dark">#fffcc68b</color>
<color name="highlighted_text_holo_light">#fffcc68b</color>
<color name="suggestion_highlight_text">#fffcc68b</color>
<color name="perms_dangerous_grp_color">#ff224e74</color>
<color name="perms_dangerous_perm_color">#ff224e74</color>
<color name="keyguard_avatar_frame_pressed_color">#ff224e74</color>

Finishing Section

How to change Theme,Wallpaper,Author,App Name?

For this

1)Go to my theme.apk/res/values/strings.xml

<string name="app_name">NewTheme for KK</string>
<string name="theme_name">NewTheme </string>
<string name="style_appearance_name">NewTheme </string>
<string name="author">Your name</string>
<string name="copyright">Your name</string>
<string name="wallpaper_label">NewTheme Wallpaper</string>

How to change package Name of your Theme?

1)You musst change package name.If your package name is same with old theme,you can not use both theme.

2)Go to mytheme.apk/res/androidmanifest.xml

3)Find this word "package"

ex:com.gamzekal.themename.apk

4)Change it what do you want

-Compile your new theme.apk

-You have successfully ported Xperia Themes to Cm11

Credits

@ Ambor