Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,732,310 Members 45,243 Now Online
XDA Developers Android and Mobile Development Forum
View Poll Results: IS MY GUIDE HELPFUL?
YES 85 98.84%
NO 1 1.16%
Voters: 86. You may not vote on this poll

[Guide/Tutorial][JB 4.3+]Create Your Own Xperia Theme

Tip us?
 
SArnab©®
Old
(Last edited by SArnab©®; 13th July 2014 at 06:15 AM.) Reason: Edit Guide
#1  
SArnab©®'s Avatar
Senior Member - OP
Thanks Meter 1596
Posts: 1,862
Join Date: Dec 2012
Location: Asansol

 
DONATE TO ME
Angry [Guide/Tutorial][JB 4.3+]Create Your Own Xperia Theme

Create your own Xperia™ theme

[Now no need to wait for new themes to come up. Have a look/colour in your mind? Want to have a special theme for yourself? Then why to be dependent upon others? Do it all by yourself with the help of my guide.]

Hello,
I made this guide because there was no official documentation or how to about this. I have gone through the official themes + few other themes from market and got the idea from them.
I have myself tested this guide before posting so its 100% working. I have Stock Xperia Google Android 4.3.


If you just want to change System Accent Colours and/or App BG, Navigation Bar BG, etc. then try this Xposed Module of mine.
Xperia Themes - Xposed Module


Note :
Code:
At the time of writing this guide I assume that you have a basic knowledge of Android Developers Tool[ADT]. I also assume that you are familiar with Android apps and their development process.
What things you gonna need to follow my tutorial :
  • A computer / laptop [seriously speaking it's one of the most important thing lol. ]
  • Java installed and added to environment path[if you are windows user like me]
  • ADT + Eclipse [I recommend ADT bundle]
  • Theme files [check attachment for these]
  • My guide for sure.
  • Time and Brain.

The guide / tutorial starts now :

PART ONE : CREATE XPERIA THEME, CHANGE SYSTEM COLOURS.
  • Start/open ADT
  • Go to File > New > Android Application Project



  • Give your desired name to the Theme, The Android Application Project.
  • Give your desired package name to the app.
  • Set Minimum Android Requirement to Android Jelly Bean 4.3 and Maximum to Android Kitkat 4.4/4.4.2



  • In the next screen un-tick the option to add app icon and Activity
  • Choose the workspace folder else tick to set the default one.



  • Now open AndroidManifest.xml and add this Permission :
Code:
<uses-permission android:name="com.sonymobile.permission.RUNTIME_SKIN" />
  • Now replace the <Application ...></application> Node with this code :
Code:
<application 
        android:label="@string/semc_theme_title" 
        android:icon="@drawable/semc_theme_lockscreen_wallpaper" 
        android:allowBackup="false">
        
        <uses-library android:name="com.sonymobile.runtimeskinning" />
        
        <meta-data 
            android:name="com.sonymobile.runtimeskinning.core.image_wallpaper" 
            android:resource="@drawable/semc_theme_wallpaper" />
        
        <meta-data 
            android:name="com.sonymobile.runtimeskinning.core.lockscreen_background" 
            android:resource="@drawable/semc_theme_lockscreen_wallpaper" />
        
    </application>
Please note : You may change the theme icon.



  • Now just after
Code:
<uses-permission android:name="com.sonymobile.permission.RUNTIME_SKIN" />
  • Add this block of code :
Code:
<runtime-skin version="1">
        <asset path="android.zip" target="android">
            <laf-version-filter from="1" to="1" />
        </asset>
        <asset path="com.sonyericsson.uxp.zip" target="com.sonyericsson.uxp">
            <laf-version-filter from="1" to="1" />
        </asset>
    </runtime-skin>
Please note : You will need to push android.zip & com.sonyericsson.uxp.zip files with all theme resources to the asset folder.[You can find these two in attachments]



Note :You can add asset reference for more apps as you extend the theming support.
For Example you can add this to add support for theming SystemUI.apk :

Code:
<asset path="com.android.systemui.zip" target="com.android.systemui">
            <laf-version-filter from="1" to="1" />
        </asset>
Also note that you will need to push com.android.systemui.zip file with all theme resources to the asset folder.
  • Now save AndroidManifest.xml
  • You will get errors. Nothing to worry. Its known and easy to fix.
  • Open themeProject > values > strings.xml
  • Change
Code:
<string name="app_name">Pink</string>
  • To
Code:
<string name="semc_theme_title">Pink</string>
  • Save and close the file.
  • Now Reopen AndroidManifest.xml
  • Follow Pic for Correcting the error :
    • Turn off check lint errors.


  • To correct the errors in Application node move Wallpaper and icon pictures to drawable-xxdpi according to your need.

  • Now download and extract the zip file from attachments.
  • You will find two folders inside.
    • The 1st one is for framework-res.apk theming.
    • The 2nd one for Sony framework theming.
  • In android folder :
    • You need move theme png resources if you want to change the look, into respective drawable folders.
      • FOR THIS FOLLOW THE PART TWO OF THE GUIDE IN POST #2
    • Else just edit the three files inside the color folder as per your desired color.
  • In com.sonyericsson.uxp folder :
    • You need to edit res > values > colors.xml as per your theme colour preference.
  • Now when you think you are ready to create the theme use Apktool[Or your desired tool] to recompile android and com.sonyericsson.uxp.

  • Sign both the recompiled apks and then rename :
    • From android.apk to android.zip
    • From com.sonyericsson.uxp.apk to com.sonyericsson.uxp.zip
  • Now Move both the renamed zips to the assets folder of your project.

  • When everything is set your theme project tree should be like this to great extent.
  • Test the theme through Eclipse else export by signing and share your masterpiece with others.
GUYS AM ATTACHING MY THEME SOURCE SO THAT YOU ALL CAN GO THROUGH THAT IF YOU FELL INTO SOME PROBLEM.

PLEASE RATE THE THREAD WITH 5 STARS IF YOU THINK MY GUIDE IS HELPFUL.

ALSO CLICK ON TIP US SO THAT THIS GUIDE CAN COME UP ON XDA PORTAL.

ADD A LINK TO THIS THREAD IN YOUR SIGNATURE TO EXTEND THE NEWS OF THIS THREAD AND ALSO TO SHOW YOUR SUPPORT.

THANK-YOU.

CREDITS :

@
funky0308 [IT WAS HE WHO GAVE ME THE IDEA TO EDIT ASSETS FILES THROUGH HIS GUIDE OF EDITING XPERIA THEMES]
SONY FOR THIS AWESOME OPTION TO THEME OUR MOBILE. @SArnab©® [THAT'S ME] FOR CREATING THIS WHOLE GUIDE.
Attached Files
File Type: zip Xperia Theme Files.zip - [Click for QR Code] (7.2 KB, 601 views)
File Type: zip Xperia_Pink_Theme_Source.zip - [Click for QR Code] (3.31 MB, 857 views)
Mobile Phone : Sony Xperia™ M Dual C2004 | Android 4.3 Stock Rooted | Locked Bootloader | Xposed Framework.
Tablet : Samsung Galaxy Tab 3 8.0 SM-T311 | Android 4.2.2 Stock

Xposed Modules : Android Theme Engine a.k.a. ExThemer | Android Apps Theme Engine a.k.a. ExThemer 2


Android Apps : Google Play Link

Guides :
Guide To Re-Lock The Boot-Loader Of Any Sony Xperia Device If Ta Partition Backup Done Before Unlocking
[Guide/Tutorial][JB 4.3+]Create Your Own Xperia Theme

The Following 76 Users Say Thank You to SArnab©® For This Useful Post: [ Click to Expand ]
 
SArnab©®
Old
(Last edited by SArnab©®; 4th May 2014 at 04:44 AM.) Reason: Updated and added new guide
#2  
SArnab©®'s Avatar
Senior Member - OP
Thanks Meter 1596
Posts: 1,862
Join Date: Dec 2012
Location: Asansol

 
DONATE TO ME
Angry Adding Image and drawable resources into your Xperia theme.

PART TWO : ADDING DRAWABLE PNGS AND JPEGS TO YOUR XPERIA THEME.

THIS PART OF MY GUIDE WILL HELP YOU IN ADDING IMAGES TO YOUR THEME TO CHANGE THE LOOK TO THE GREATEST POSSIBLE WAY.

BEFORE I START, I WANT YOU ALL TO KNOW ONE SIMPLE THING. IN THIS GUIDE HERE I WILL BE SHOWING YOU HOW TO ADD THEMED IMAGES IN FRAMEWORK APK. THE SAME PROCEDURE WORKS FOR XPERIA HOME AND SYSTEM-UI APK. SO PLEASE DO NOT ASK SILLY QUESTIONS AS HOW TO THEME STATUS-BAR ICONS AND ETC. , ETC.

FOLLOW UP FROM HERE AND SOON YOU WILL BE MAKING PROFESSIONAL THEMES ON YOUR OWN.

STEPS :
  • De-compile "framework-res.apk"
  • Open up framework-res/res/drawable-hdpi/ [Or whatever dpi your device supports]
  • NOTE : HERE I WILL SHOW YOU HOW TO CHANGE :
    • APPS BACKGROUND
    • VOLUME BAR SCRUBBER
You can replace any drawable present in this folder. But we are going to change the background images only for this time.
If you go down you will find two pngs named : "semc_bg" & "semc_bg_light". These are the Pngs that we need to replace to replace the App's background.


  • Now download/create/paint or do whatever you want and get hands on two different pngs, one for Dark Theme [ Like Settings in Android 4.1.x/4.2.x in Sony ] and another for Light Theme [ Like Settings in Android 4.3 in Sony ] and rename them to "semc_bg" & "semc_bg_light" respectively.
  • Move the two newly renamed pngs to the respective drawable-xxdpi folder of the android folder that you had previously downloaded from the above post : apktool/android/drawable-hdpi/here



  • NOTE : YOU NEED TO PLACE ALL YOUR DESIRED IMAGES INTO RESPECTIVE DRAWABLE-FOLDERS.
  • Now you need to do the same thing to theme Scrubbers.





  • Once you are ready with all the pngs continue with rest of the guide in post #1.
Attached Thumbnails
Click image for larger version

Name:	guide1.jpg
Views:	10047
Size:	187.5 KB
ID:	2724400   Click image for larger version

Name:	guide2.jpg
Views:	9940
Size:	230.1 KB
ID:	2724401   Click image for larger version

Name:	guide3.jpg
Views:	9896
Size:	202.0 KB
ID:	2724402   Click image for larger version

Name:	guide4.jpg
Views:	10294
Size:	162.5 KB
ID:	2724403   Click image for larger version

Name:	guide5.jpg
Views:	10324
Size:	171.9 KB
ID:	2724404  

Click image for larger version

Name:	guide6.jpg
Views:	157
Size:	166.9 KB
ID:	2724405  
The Following 30 Users Say Thank You to SArnab©® For This Useful Post: [ Click to Expand ]
 
SArnab©®
Old
(Last edited by SArnab©®; 21st May 2014 at 02:49 AM.)
#3  
SArnab©®'s Avatar
Senior Member - OP
Thanks Meter 1596
Posts: 1,862
Join Date: Dec 2012
Location: Asansol

 
DONATE TO ME
FAQ'S :

Q. HOW TO THEME SYATEMUI?
ANS. FOLLOW THESE STEPS :

Goto your apktool folder.
In its root create a new folder and name it com_android_systemui
Copy AndroidManifest.xml from android folder that you downloaded and paate inside com_android_systemui folder.
Make a new folder inside com_android_systemui folder and name it res.
Open res folder and add another new folder named drawable-yourdevicedpi (don't ask me what I mean by yourdevicedpi)
Add yoir desired resources in drawable.
If you want to change colour then add values folder inside res folder. Create color.xml file and add color code.

Recompile, sign and rename to zip.

Q. HOW TO THEME ANY OTHER SYSTEM APP?
ANS. FOLLOW THE ABOVE STEPS WITH FEW CHANGES SUCH AS :

INSTEAD OF com_android_systemui NAME THE MAIN FOLDER AS PER THE APP NAME YOU WANT TO THEME.
FOR EXAMPLE com_android_contacts FOR CONTACTS/PEOPLE APP.
ALSO ADD RELEVANT RESOURCES IN DRAWABLE FOLDERS.
Mobile Phone : Sony Xperia™ M Dual C2004 | Android 4.3 Stock Rooted | Locked Bootloader | Xposed Framework.
Tablet : Samsung Galaxy Tab 3 8.0 SM-T311 | Android 4.2.2 Stock

Xposed Modules : Android Theme Engine a.k.a. ExThemer | Android Apps Theme Engine a.k.a. ExThemer 2


Android Apps : Google Play Link

Guides :
Guide To Re-Lock The Boot-Loader Of Any Sony Xperia Device If Ta Partition Backup Done Before Unlocking
[Guide/Tutorial][JB 4.3+]Create Your Own Xperia Theme

The Following 14 Users Say Thank You to SArnab©® For This Useful Post: [ Click to Expand ]
 
dipesh1502
Old
#4  
dipesh1502's Avatar
Senior Member
Thanks Meter 3240
Posts: 2,224
Join Date: Sep 2013
Location: MUMbai

 
DONATE TO ME
Well done bro
Going to try it asap


If You Like My Work Please Consider A Small Donation


For Donating Click Here
 
please do the following:
Sign in to your PayPal account page
Go to 'Send Payment'
Enter my email id "dipesh.febrius@gmail.com"
option "Personal payment" doesn't work for India, please set "Online purchases". and check Goods or Service (preferably service)
Make the payment of the desired amount of donation you want to send.
Thank you for your kind donations!
The Following User Says Thank You to dipesh1502 For This Useful Post: [ Click to Expand ]
 
SArnab©®
Old
#5  
SArnab©®'s Avatar
Senior Member - OP
Thanks Meter 1596
Posts: 1,862
Join Date: Dec 2012
Location: Asansol

 
DONATE TO ME
Quote:
Originally Posted by dipesh1502 View Post
Well done bro
Going to try it asap
Sure, go forward and do share whatever you come up with.

I will update the guide very soon to show how to add resources and add more apps support.

Sent from my C2004 using Tapatalk
Mobile Phone : Sony Xperia™ M Dual C2004 | Android 4.3 Stock Rooted | Locked Bootloader | Xposed Framework.
Tablet : Samsung Galaxy Tab 3 8.0 SM-T311 | Android 4.2.2 Stock

Xposed Modules : Android Theme Engine a.k.a. ExThemer | Android Apps Theme Engine a.k.a. ExThemer 2


Android Apps : Google Play Link

Guides :
Guide To Re-Lock The Boot-Loader Of Any Sony Xperia Device If Ta Partition Backup Done Before Unlocking
[Guide/Tutorial][JB 4.3+]Create Your Own Xperia Theme

The Following User Says Thank You to SArnab©® For This Useful Post: [ Click to Expand ]
 
Levered
Old
#6  
Levered's Avatar
Recognized Contributor
Thanks Meter 1440
Posts: 1,534
Join Date: Feb 2012
Location: Malaysia

 
DONATE TO ME

The Following 2 Users Say Thank You to Levered For This Useful Post: [ Click to Expand ]
 
Faiyaz5yaz
Old
(Last edited by Faiyaz5yaz; 14th April 2014 at 07:55 AM.)
#7  
Faiyaz5yaz's Avatar
Senior Member
Thanks Meter 23
Posts: 135
Join Date: Jan 2014
Default great one!!

nice

---------- Post added at 12:28 PM ---------- Previous post was at 12:23 PM ----------

SArnab©® , can u help me find a link for starting cm9/10 themes for galaxy devices ? am intrested in theming
----------------------------
Forgot to Hit THANKS?
Well!! Raise your standards

The Following User Says Thank You to Faiyaz5yaz For This Useful Post: [ Click to Expand ]
 
Daniel D.
Old
#8  
Daniel D.'s Avatar
Senior Member
Thanks Meter 281
Posts: 825
Join Date: Apr 2012

 
DONATE TO ME
Wow, THIS is a guide, many thanks for that. I downloaded the theme for my wife - she loves pink.
New: Sony Xperia SP C5303 (locked BL) - 12.1.A.1.201
Old: Sony Xperia Arc S LT18i (unlocked BL) - My Custom ROM (based on .587) - LuPuSv16_R1 (SmartassH3 & sio) - V6 SuperCharger - Mounts2SD

German Translations made by me:
ES File Explorer v3 | ScriptManager/SManager | Android Weather
The Following User Says Thank You to Daniel D. For This Useful Post: [ Click to Expand ]
 
Prm593
Old
#9  
Prm593's Avatar
Senior Member
Thanks Meter 71
Posts: 217
Join Date: Jun 2013
Location: jaipur
Awsm work arnab!! thanks for creating such a comprehensive guide.
XPERIA SP
C5302 || Locked Bootloader || Unofficial Slimkat 4.4.2

The Following User Says Thank You to Prm593 For This Useful Post: [ Click to Expand ]
 
Sahaab
Old
#10  
Sahaab's Avatar
Recognized Contributor
Thanks Meter 2886
Posts: 3,237
Join Date: May 2013
Location: Islamabad

 
DONATE TO ME
nice guide
btw to be able to install theme do we still need root (superuser mod etc???)????
My First APP : Muslim Zone : XDA Link
No SHARING Of My Work Is Allowed, Thank You


My Contributions

Tags
sony, theme, xperia, xperia theme, xperia themes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes