Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[TIP][Guide]Change Default Home Button Color

OP adulfo

19th August 2012, 06:07 PM   |  #1  
adulfo's Avatar
OP Senior Member
Flag Pagadian City
Thanks Meter: 757
 
1,142 posts
Join Date:Joined: Apr 2012
Donate to Me
More
Hi Guys.. I've been searching for ways to change the default color of Home Button of our Ray. Been on decompiling/compiling framework, settings... but got nothing or don't know exactly what xml/smali that controls the color of the buttons. So, by doing some trials-and-errors... Maybe this time I hit it.

First of all I want to thank:

JJDOCTOR for giving the hint to enable the light of Home button.
boy*racer*- max echo value is 20000
and all of you GUYS here on xda..

So here it is, navigate to system/etc/pre_hw_config.sh using ROOT EXplorer and find these lines:


echo 1000 > $dev/red/max_current
echo 1000 > $dev/green/max_current
echo 1000 > $dev/blue/max_current

and change to anything you want, I made it to


echo 1000 > $dev/red/max_current
echo 2000 > $dev/green/max_current
echo 9000 > $dev/blue/max_current

THE HIGHER THE VALUE, THE BRIGHTER THE LED.

Save changes....

For color preferences calculations: Go here. Thanks to Xtremy.

The above is nearly ICS Blue... You can put any values you want til 20000(?) except ZERO (0). By putting zero, that color will not be used by the system notifications ( I think)...

THIS WOULD NOT MAKE ALL OF THE NOTIFICATIONS COLOR TO THE COLOR YOU HAVE SET, ONLY THE DEFAULT HOME BUTTON COLOR IS AFFECTED. Sorry if the first flash of notification is not the COLOR you desired, only the succeeding flashes... I'm not a developer, I don't know how to do this correctly.

I THINK THIS WOULD NOT WORK ON CM-BASED ROM, BECAUSE THE HOME BUTTON LIGHT IS DISABLED (automaticbrightness is already set to FALSE). If somebody can make it to work, just apply it.

SOME DEFAULT COLOR WOULD NOT BE THE CORRECT APPEARANCE AFTER CHANGING THOSE LINES.. example, Violet is not violet when you use it as message notifications, still ICS Blue(?). Just raise the values.

REBOOT IS A MUST... Hope it won't bootloop...
Last edited by adulfo; 3rd September 2012 at 05:44 AM. Reason: lowering
The Following 16 Users Say Thank You to adulfo For This Useful Post: [ View ]
19th August 2012, 09:43 PM   |  #2  
Knight47's Avatar
Senior Member
Thanks Meter: 4,438
 
677 posts
Join Date:Joined: Mar 2012
More
Quote:
Originally Posted by adulfo

......................but got nothing or don't know exactly what xml/smali that controls the color of the buttons..........................:


XML is used to create user interface and the components used in app and java is used to create executable codes that will make apps functionality.
XML and smali are created automatically in app development.Though notepad++ is best to type XML.Best and easiest way to create a xml file is just write code in notepad++ and save it with extension of .xml.If you are developing an application of android then xmls are created by software itself. You will just need to specify name and add it to project as xml file...
The Following 2 Users Say Thank You to Knight47 For This Useful Post: [ View ]
19th August 2012, 09:58 PM   |  #3  
Member
Thanks Meter: 6
 
49 posts
Join Date:Joined: Apr 2012
thank you! i was just looking for this
20th August 2012, 12:48 AM   |  #4  
Xtremy's Avatar
Junior Member
Thanks Meter: 15
 
17 posts
Join Date:Joined: Dec 2011
More
This is a nice mod adulfo!

I wrote a little tutorial for finding your color value:

Go to this Color Wizard website.

Choose the color of your choice in de color bars.

In the #box you find the hex value for your color.

For this tut i use a nice orange E45F13 hex value.

Split de value in three pieces E4 5F 13.

1st byte E4 xx xx is for the Red value. (#FF0000)
2nd byte xx 5F xx is for the Green value. (#00FF00)
3rd byte xx xx 13 is for the Blue value. (#0000FF)

Open windows calculator set it in Scientific Mode.

1) Hit F5 to select HEX.
2) Type in your first hex (if HEX is 00, decimal is 0)
3) Hit F6 to convert to decimal.

Do this for all three hex values and write down the numbers...

1st byte E4 xx xx E4=228
2nd byte xx 5F xx 5F=95
3rd byte xx xx 13 13=19


As we know "max echo value is 20000" or 255 so:

20000 / 255 X 228 (your 1st above number)= 17882 for the Red Value
20000 / 255 X 95 (your 2nd above number)= 7450 for the Green Value
20000 / 255 X 19 (your 3rd above number)= 1490 for the Blue Value

Change the values in system/etc/pre_hw_config.sh for red, green and blue save & exit, reboot!

---------- Post added at 12:48 AM ---------- Previous post was at 12:37 AM ----------

I use the Tron Legacy Cyan color: 00DFFC

1000 for the Red Value.
17490 for the Green Value.
19764 for the Blue Value.

also note:
I set the first byte for Red to zero
after reboot it went to 1000 value,
so I think 1000 is the lowest value.
The Following 6 Users Say Thank You to Xtremy For This Useful Post: [ View ]
20th August 2012, 02:42 AM   |  #5  
adulfo's Avatar
OP Senior Member
Flag Pagadian City
Thanks Meter: 757
 
1,142 posts
Join Date:Joined: Apr 2012
Donate to Me
More
Thanks mate.. To those also having problems converting those values, you can google HEX to RBG converter.
Last edited by adulfo; 20th August 2012 at 03:01 AM.
21st August 2012, 08:48 AM   |  #6  
psp1987's Avatar
Senior Member
Flag Hong Kong
Thanks Meter: 14
 
109 posts
Join Date:Joined: May 2011
More
wow it is very great and i change it
works perfect
4.0.4 587
21st August 2012, 01:05 PM   |  #7  
adulfo's Avatar
OP Senior Member
Flag Pagadian City
Thanks Meter: 757
 
1,142 posts
Join Date:Joined: Apr 2012
Donate to Me
More
Quote:
Originally Posted by psp1987

wow it is very great and i change it
works perfect
4.0.4 587

Would be nice if you will read my signature...
21st August 2012, 01:12 PM   |  #8  
-Jesco-'s Avatar
Recognized Contributor
Thanks Meter: 2,777
 
2,674 posts
Join Date:Joined: Jun 2012
More
what does this change ? the light shown when the phone is switched on and had no notification ?
21st August 2012, 01:54 PM   |  #9  
adulfo's Avatar
OP Senior Member
Flag Pagadian City
Thanks Meter: 757
 
1,142 posts
Join Date:Joined: Apr 2012
Donate to Me
More
Quote:
Originally Posted by -Jesco-

what does this change ? the light shown when the phone is switched on and had no notification ?

This would only change the default color of your Home button ( if only it is enabled), hitting any of your physical keys.
21st August 2012, 04:08 PM   |  #10  
Member
Thanks Meter: 6
 
49 posts
Join Date:Joined: Apr 2012
i changed all the values to 10000, all the colors are the same but a lot brighter, default 1000 is too dim for me.

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes