FORUMS

[GUIDE/THEME/MOD] How to switch to Light theme [Maybe for all 4.1+ Android devices]

917 posts
Thanks Meter: 1,209
 
By Koulis2000, Senior Member on 4th April 2013, 03:25 PM
Post Reply Email Thread
2nd July 2013, 02:43 AM |#21  
Senior Member
Flag Bangalore
Thanks Meter: 32
 
More
Quote:
Originally Posted by pathuri97

Thanks for the reply!
As you can see from the enclosed screenshots - no problem with the compilation and signing.
VTS is taking care of the same.

What I'm trying to do is copy framework-res.apk, systemui.apk and settings.apk from different custom ROM to current ROM.
No problem in copying and overwriting the original files of current ROM.
TAB works fine.
NO FC's.

Only thing is I'm trying to change LIGHT theme of secsettings.apk to DARK theme.
Either I get APK n't installed or FC (SystemUI.apk etc).

Again If I replace secsettings.apk from CUSTOM ROM to current ROM - works fine. NO FC's.
Might be I need to dig deeper....

Screenshots enclosed....
Attached Thumbnails
Click image for larger version

Name:	ScreenShot2317.jpg
Views:	467
Size:	87.6 KB
ID:	2084844   Click image for larger version

Name:	ScreenShot2316.jpg
Views:	419
Size:	82.8 KB
ID:	2084845  
The Following User Says Thank You to pathuri97 For This Useful Post: [ View ] Gift pathuri97 Ad-Free
2nd July 2013, 03:54 AM |#22  
amitnv's Avatar
Senior Member
Flag bangalore
Thanks Meter: 699
 
Donate to Me
More
This guide doesn't apply for the stock video player....to change some special apps like the stock video player you have to edit colors.XML change default background to #ffffffff

Sent from my GT-I9500 using xda premium
The Following User Says Thank You to amitnv For This Useful Post: [ View ] Gift amitnv Ad-Free
22nd January 2014, 01:44 AM |#23  
Junior Member
Flag Paris-Mostaganem
Thanks Meter: 2
 
More
Quote:
Originally Posted by Koulis2000

Hello community!


Intro:

You may not know it, but Samsung(and maybe every popular Android phone manufacturers) has a ready-to-use Light theme "pre-installed" in our devices, not only the Galaxy S Advance of course, this theme probably exists in every latest firmware for Galaxies from Samsung, including Galaxy SIII, Galaxy S2 and many more I guess, the Galaxy S4 is not an exception, which also comes in the Light version already set. I found a way to switch in this light version, and it's VERY easy. Maybe newbie-friendly too. Ok maybe not so easy but it still is as simple as adding a word. Literally, it's only adding a word! Read the "Notes:" sections at the end of the post before doing anything.


Getting to the point:

These themes exist in the framework-res.apk, specifically, in the /res/values/styles.xml

You will find different themes in there including Google's "Holo(.Dark)" and "Holo.Light". These are the basic ones, which will be used by almost every application that does NOT have it's own skin, so these applications will use the either Holo(Dark) or Holo Light.

There are three(I think) more basic themes in there including the stock Android, this one is based on Gingerbread I guess.
The other two are the Device Default and Device Default Light. These two are the ones that a manufacturer, like Samsung, can edit to give it's devices a custom and unique style.

A stock application that comes pre-installed in the software(Like SecSettings.apk, MusicPlayer.apk e.t.c.) will probably use either the Device Default or Device Default Light. This is up to the manufacturer to choose. In our case, Samsung has set most of it's applications to use the Device Default.


A small "What I am talking about":





How to set the Light theme to an application:

Requirements:
  • The application which you want to change it's theme. (I will use SecSettings.apk as an example)
  • apk-tool (I use APK Multi-Tool because it's very easy to use)
  • Notepad++
  • Know how to decompile/recompile

Instructions:
  • Decompile the .apk.
  • Go to "/res/values/" folder and open the file "styles.xml" with Notepad++.
  • Click "Find" or press "Ctrl+F".
  • In the "Find What :" box enter "DeviceDefault" and hit next.
  • Check the first result you get, mine was this:




  • Now, copy this ".Light" (without the "), this is the magic word!
  • You will paste this exactly after every "[email protected]*android:style/blabla.DeviceDefault
  • Like the image below:




  • Even if there is something after the DeviceDefault like this:




  • You will still paste the ".Light" exactly after the DeviceDefault like the image below:




  • Make sure to paste it ONLY in "parent=" lines, and in EVERY "parent=" lines. There are exceptions though, based on the .app. But don't get confused, even if you make a mistake, will be able to find it and fix it later. For now just continue the "paste" process.
  • Once you have finished the "paste" process, save the file and overwrite the old one.
  • Recompile the .apk.
  • That's it! Copy the .apk on your phone, place it where it belongs and set the right permissions.
  • Reboot, open the application, and take a taste of a light UI that your phone's manufacturer had hidden from you.


Notes:

1. I don't even know if other manufacturers like Sony do this too. If yes, then this tutorial will work for these phones too, probably.
2. Don't try this on framework-res.apk. framework-res.apk can be used too for you to change your theme to Light, but it will probably cause many graphical errors. And it also requires a different way to change the theme. I have tried it and got both good and bad results, check the second post for more information.
3. If you tried and had any errors I could use a hand, just post your compile log and myself and maybe some other people will help you if we can.
4. Modifying the framework-res.apk in a proper way will allow every stock application to be themed without having someone to edit them. Again check the second post.
5. If you find something confusing you can freely ask by posting here.
6. I am not sure about everything that I say in the "Intro:" section. It's just my theory, excuse me if I'm wrong.
7. These themes are the main reason(probably ) for the apps to have both "holo_dark" and "holo_light" variants of .png files and colors. People who have edited SystemUI.apk's and framework-res.apk's "drawable-" folders will understand what I am saying.

Hi,

First, thank u for this tuto. It's very simple. And sorry for my english.

I've got a problem : I succeed to decompile and change the apk but when I want to recompile the apk, it doesn't work : "An error occured" with exactly in the log "no ressources found...".

So, I tried without changed the APK, and this is the same error.

Have you got an idea please ? I past 4 hours searching and nothing.

Windows 7, java SDK installed

Thanks
22nd January 2014, 06:37 AM |#24  
Koulis2000's Avatar
OP Senior Member
Flag Thessaloniki
Thanks Meter: 1,209
 
Donate to Me
More
Only reason I can think of is that you use the wrong framework-res for recompilation, and sometimes it's not your fault that this error exist, sometimes it just happens. If I can see the log I'll tell you a possible way to fix the error.

Sent from my GT-I8190 using Tapatalk
13th November 2015, 02:35 PM |#25  
rickberg's Avatar
Senior Member
Thanks Meter: 551
 
More
Removed by poster
24th March 2020, 08:09 PM |#26  
Junior Member
Thanks Meter: 2
 
More
pardon sir
you don't edit the line at the top that says holo dark and change it to holo light?
or so it is specifically only in parent lines with devicedefault in them?
thanks
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes