View Poll Results: IS MY GUIDE HELPFUL?
YES 96 97.96%
NO 2 2.04%
Voters: 98. You may not vote on this poll

Post Reply

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

12th April 2014, 01:51 PM   |  #1  
SArnab©®'s Avatar
OP Senior Member
Flag Asansol
Thanks Meter: 1,755
 
1,938 posts
Join Date:Joined: Dec 2012
Donate to Me
More
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.

FOR FAQ'S PLEASE READ POST #3 BEFORE ASKING THE ALREADY ANSWERED QUESTIONS AGAIN.

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
  • Left Click in between the texts underlined with red, then Right Click and press "Quick Fix" in the pop-up menu. Then You will see a new pop-up menu as in the pic below. Then click on "Disable Check in This Project"

  • To correct the errors in Application node move Wallpaper and icon pictures to drawable-xxdpi according to your need.
  • Now download "XperiaThemesApktoolbySArnab©®" zip file from the attachments below and extract it at your desired location.
  • I specially made this Apktool set folder for Xperia™ Themes.
  • Inside the extracted folder you will find Apktool files for Windows OS[Linux and MAC users you need to replace Windows specific files with your OS's files.] along with Xperia™ Apps specific folders for making Xperia™ Themes.
  • All you need to do is add assets to this folders and use provided Apktool to recompile them. They will be automatically get compiled as .zip file instead of .apk file as .zip file is needed for Xperia™ Themes.
  • 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
  • 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, com.sonyericsson.uxp and all other app specific folders from "XperiaThemesApktoolbySArnab©®".
[*]Now Move all the zip files from specific folders to the assets folder of your project.[/LIST]
  • 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.

Update 1 : I have updated the guide at places where users were having problem following it.
I have also added special Xperia Themes ready apktool folder with app specific folders to make it easier to create Xperia Themes.

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.
Last edited by SArnab©®; 23rd August 2014 at 01:30 AM. Reason: Updated Guide, Added new attachment.
The Following 85 Users Say Thank You to SArnab©® For This Useful Post: [ View ]
12th April 2014, 01:52 PM   |  #2  
SArnab©®'s Avatar
OP Senior Member
Flag Asansol
Thanks Meter: 1,755
 
1,938 posts
Join Date:Joined: Dec 2012
Donate to Me
More
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:	16231
Size:	187.5 KB
ID:	2724400   Click image for larger version

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

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

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

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

Click image for larger version

Name:	guide6.jpg
Views:	232
Size:	166.9 KB
ID:	2724405  
Last edited by SArnab©®; 4th May 2014 at 04:44 AM. Reason: Updated and added new guide
The Following 35 Users Say Thank You to SArnab©® For This Useful Post: [ View ]
12th April 2014, 01:53 PM   |  #3  
SArnab©®'s Avatar
OP Senior Member
Flag Asansol
Thanks Meter: 1,755
 
1,938 posts
Join Date:Joined: Dec 2012
Donate to Me
More
FAQ'S :

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

Download and extract "XperiaThemesApktoolbySArnab©®" zip file from the attachments in 1st post [You don't need to do it again if you have already done so while following Post #1.].
Open com.android.systemui folder.
Add your desired resources in res/drawable-yourdevicedpifolder.
If you want to change colour then add values folder inside res folder. Create colors.xml file and add color code.

Recompile and copy paste the newly created .zip file from "XperiaThemesApktoolbySArnab©®/com.android.systemui/dist/here" to the assets folder of your Theme Project.

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

I have added options to theme other system apps in my new attachment named "XperiaThemesApktoolbySArnab©®.zip" in 1st post.

Q. HOW TO ADD SUPPORT FOR DIFFERENT APPS THEMEING?
ANS. YOU CAN THEME ALL THE APPS INSTALLED IN YOUR DEVICE. TO DO THAT YOU NEED TO PERFORM 2 ACTIONS.
1. ADD THIS BLOCK OF CODE TO THE MANIFEST FILE SO THAT THE THEME MANAGER KNOWS WHICH APPS ARE SUPPORTED BY YOUR THEME APP :

Code:
<asset path="com.android.systemui.zip" target="com.android.systemui">
            <laf-version-filter from="1" to="1" />
        </asset>
THE ABOVE CODE ADDS SUPPORT FOR SYSTEMUI THEMEING.
TO SUPPORT OTHER APPS JUST CHANGE THE TEXTS IN RED.
FOR EXAMPLE FOR SETTINGS APP :
Code:
<asset path="com.android.settings.zip" target="com.android.settings">
            <laf-version-filter from="1" to="1" />
        </asset>
FOR THIS YOU NEED TO KNOW THE PACKAGE NAME OF THE APP YOU WANT TO THEME.

2. YOU NEED TO CREATE A APP.PACKGANE.NAME.ZIP FILE WITHH ALL THEME RESOURCES FOR THAT CONCERNED APP AND MOVE THE ZIP FILE TO ASSETS FOLDER OF YOUR PROJECT.
PLEASE NOTE THE NAME OF ZIP FILE MUST BE SAME AS STATED IN MANIFEST.
Last edited by SArnab©®; 23rd August 2014 at 01:29 AM.
The Following 19 Users Say Thank You to SArnab©® For This Useful Post: [ View ]
12th April 2014, 03:56 PM   |  #4  
dipesh1502's Avatar
Recognized Themer
Flag MUMbai
Thanks Meter: 3,682
 
2,359 posts
Join Date:Joined: Sep 2013
Donate to Me
More
Well done bro
Going to try it asap
The Following User Says Thank You to dipesh1502 For This Useful Post: [ View ]
12th April 2014, 03:58 PM   |  #5  
SArnab©®'s Avatar
OP Senior Member
Flag Asansol
Thanks Meter: 1,755
 
1,938 posts
Join Date:Joined: Dec 2012
Donate to Me
More
Quote:
Originally Posted by dipesh1502

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
The Following 2 Users Say Thank You to SArnab©® For This Useful Post: [ View ]
14th April 2014, 07:58 AM   |  #7  
Faiyaz5yaz's Avatar
Senior Member
Thanks Meter: 27
 
156 posts
Join Date:Joined: Jan 2014
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
Last edited by Faiyaz5yaz; 14th April 2014 at 07:55 AM.
The Following User Says Thank You to Faiyaz5yaz For This Useful Post: [ View ]
14th April 2014, 09:47 AM   |  #8  
Daniel D.'s Avatar
Senior Member
Thanks Meter: 299
 
871 posts
Join Date:Joined: Apr 2012
Donate to Me
Wow, THIS is a guide, many thanks for that. I downloaded the theme for my wife - she loves pink.
The Following User Says Thank You to Daniel D. For This Useful Post: [ View ]
14th April 2014, 11:36 AM   |  #9  
Prm593's Avatar
Senior Member
Flag jaipur
Thanks Meter: 75
 
221 posts
Join Date:Joined: Jun 2013
More
Thumbs up
Awsm work arnab!! thanks for creating such a comprehensive guide.
The Following User Says Thank You to Prm593 For This Useful Post: [ View ]
14th April 2014, 10:29 PM   |  #10  
Sahaab's Avatar
Recognized Contributor / Themer
Flag London ON
Thanks Meter: 3,243
 
3,541 posts
Join Date:Joined: May 2013
Donate to Me
More
nice guide
btw to be able to install theme do we still need root (superuser mod etc???)????

Post Reply Subscribe to Thread

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

Advanced Search
Display Modes


Top Threads in Sony Cross-Device Development General by ThreadRank