Prepare Your Nokia X2 for Battle with Nokia X2 Tools

Unveiled in June this year, the Nokia X2 is the Finnish companys second crack at an … more

Increase the Speaker Volume of Your Samsung Gear 2 with Tool and Tutorial

I think its pretty safe to say that any sound coming out of a … more

Unlock Hidden Camera Settings on Your Moto G

At one point in time or another, weve all gotten very fiddly with the camera settings on our … more

XDA Partners with LG for Developer Challenge

Many Android enthusiasts know the name LG. LG is the maker of some Google Nexus devices and some … more
Post Reply

[MOD] Adding an External Notification Light to the Optimus V

10th May 2011, 09:35 AM   |  #1  
OP Senior Member
Thanks Meter: 99
 
176 posts
Join Date:Joined: Apr 2011
Donate to Me
As you know, the LG Optimus line of phones doesn't have an external notification light for missed calls and other events. This mod will turn the backlight for your hard keys into a notification light. Since it uses Tasker, other notifications can be added easily. I then show you how to turn the backlight LED into an external LED.

This mod consists of two parts, the software mod and the hardware mod. You don't have to do the hardware mod, but it completes the the look and functionality of the mod.

Software Mod


Method 1 - No Flashing - The most efficient and least taxing on your battery

In method 2 (the original method), I will show you how to use Tasker and some scripts to make your button backlight flash for an incoming notification. One problem with that technique is that it requires a script to be run every time the lights are flashed. This resulted in a dramatic increase in battery drain since the phone was kept from going completely idle. I tried creating a script that runs perpetually and only flashes the lights when a setting is changed, but when the phone does go idle, it slows down or completely stops the script.

I decided to try a new approach to the lights. Instead of to flashing the lights, when a notification comes in, I would leave the lights permanently on until the screen is turned on again. This however required a modified kernel. The default action by all of the kernels is to turn off the key lights when the phone goes idle. Picasticks was kind enough to provide me with a modified version of his kernel that stopped the lights being turned off. With that in hand, I tested what happens when I leave the key lights on. It turns out that the LEDs consume very very very little energy. Over the course of a 20 hour test, my phone only lost 22% of its battery power. Until I can figure out a way to make the lights flash in an efficient way, or Picasticks can find a low level way to incorporate it into the kernel, this is the most efficient solution. You may think that flashing the lights has to be more efficient than leaving them on. If you wake the phone to do it, you are burning through a lot more juice than if you just keep the light on. Think of it the same way florescent lights work. There is a cost associated with turning it on. If you repeat the process of turning them on too often, you consume more juice than just leaving them on. In this case, waking the phone uses 25-60mA for a few seconds where as the LEDs consume less than 1mA. If you waked the phone every 10 seconds to flash the lights and the phone stayed out of idle for only one second, that would equal 25mA * 6 = 150mAs for the most conservative estimate of the amount of battery consumed in 1 min. If I leave the light on and use the most liberal estimate for battery consumption (1mA), then it would consume 60mAs, almost three times less. If we flash the lights every 3 seconds like I did in method 2, that would consume at least 500 mAs, over 8 times as much as leaving the lights on. If you still don't believe me, try both out and let me know how it goes.

Here is how to set this up to work on your phone with Tasker:
(If you already installed method 2, you can start at step 5.)
  1. Install tasker
  2. Install sl4a
  3. Download the KeylightsNoFlash_v2.rar and extract it.
  4. Place sush into /system/bin and change the permissions to "rwxr-xr-x"
    Code:
    adb remount
    adb push sush /system/bin/
    adb shell chmod 755 /system/bin/sush
    or through terminal emulator:
    Code:
    mount -o remount,rw -t yaffs2 /system /system 
    cp /sdcard/sush /system/bin/sush
    chmod 755 /system/bin/sush
  5. Place userbackup.xml in /sdcard/tasker
  6. Place the six script files into /sdcard/sl4a/scripts
  7. Open tasker, hit the menu, profile data, restore
  8. Press apply to exit Tasker, and Go to Settings>Accessibility> Enable Accessibility for Tasker
  9. Place Picasticks modified kernel (picasticks-07-led1.zip) onto your micro SD card.
  10. Reboot into recovery.
  11. Use the flash zip feature to install the modified kernel.

This will turn on the button backlight LEDs if you get a missed call, text, GV message, Gtalk message, Groove IP missed call, Sipdroid, missed call, cSipSimple missed call, new email, or new Gmail. If you want other notifications to trigger the lights, in Tasker hit New -> Event -> UI -> Notification -> Owner Application -> and select the app who's notifications you want to trigger the lights. When the Task Selection Menu pops up, select Togglekeylights. There is a 14 second delay built into the light to allow the phone to go back to sleep before turning on the light for missed calls.

If you don't want to use Picastick's kernel, then ask your kernel dev to be as kind as Picasticks and create you a kernel that disables the the sleep feature of the button backlights.

All credit goes to Picasticks for this one. Thank you!


Method 2 - Flash the LEDs - This consumes way more power than method one but some may find it more aesthetically pleasing.


I had been using an app called keylights to flash the blacklight on my hardware keys when I had missed texts. More info about that app here: KeyLights 0.2 - Capacitive Lights As Notification - Updated June 3, 2010 Here is a modified version I made with more options: http://www.mediafire.com/?8dwto2rk8jjed62

Unfortunately, that app refuses to install on some of the roms. Also, the app would only notify you of texts but not missed calls, missed voip calls, GV messages, Gtalk messages...etc.

So I did some digging and figured out how to toggle the backlight myself. The attached script will turn the lights on for a split second second and then turn them off. If you open the script, you'll see that there really is nothing hard about implementing this. Combine this with Tasker and disabling the lights when you press the hardware keys, and you have yourself a dedicated notification light.

Here is how to set this up to work on your phone with Tasker:
  1. Install tasker
  2. Install sl4a
  3. Download the Keylights.rar and extract it. (attached below)
  4. Place userbackup.xml in /sdcard/tasker
  5. Place sush into /system/bin and change the permissions to "rwxr-xr-x"
    Code:
    adb remount
    adb push sush /system/bin/
    adb shell chmod 755 /system/bin/sush
    or through terminal emulator:
    Code:
    mount -o remount,rw -t yaffs2 /system /system 
    cp /sdcard/sush /system/bin/sush
    chmod 755 /system/bin/sush
  6. Place the four script files into /sdcard/sl4a/scripts
  7. Open tasker, hit the menu, profile data, restore
  8. Press apply to exit Tasker, and Go to Settings>Accessibility> Enable Accessibility for Tasker
  9. Reboot!

This will flash the button backlight LEDs if you get a missed call, text, GV message, Gtalk message, or Groove IP missed call. If you want other notifications to trigger the lights, in Tasker hit New -> Event -> UI -> Notification -> Owner Application -> and select the app who's notifications you want to trigger the lights. When the Task Selection Menu pops up, select Togglekeylights.

If you want to change the interval of flashing, edit the task of the Keylights profile. Change all the wait values. That profile is setup in that way to minimize the number of loops Tasker has to do.

Here is an explanation of how the Tasker profiles are setup to flash the LED.


This mod stops the blacklight from turning on when you press the key. If you just want to do the same on your own without Tasker, run the following through adb shell or a script with root privileges:
Code:
chmod 0333 /sys/class/leds/button-backlight/brightness
echo 0 > /sys/class/leds/button-backlight/brightness
To reverse it:
Code:
chmod 0647 /sys/class/leds/button-backlight/brightness
or just reboot. You'll need to run the disable command after every boot if you want the backlight to not turn on with a press of the keys. With the backlight disabled, you will still be able to flash it using the script provided. You are merely locking out the system from turning on the backlight. To implement this using tasker, delete all of the Tasker profiles except "Boot".

If you do want your key backlight to function when you press the keys with this mod, delete the "Boot" profile, and reboot your phone.


Hardware Mod

I originally opened up my phone because I wanted to see if I could replace the LED used to backlight the hard key buttons with a brighter one and maybe change the color. I am using the backlight as a substitute for a notification light, but the keys are very dim. Well, it turned out that the LED for the backlight wasn't dim at all. It was super bright, and there were actually three of them. Because the buttons have their button circuitry directly under them, their backlight LED's are offset and the light that shines through is routed through a maze of rubber and plastic first. I decided that since the LED's were offset, I could just drill a hole directly over one of them and create my own notification light. The mod is very simple, but I'm going to purposely leave out pictures for some of the steps to scare away incompetent people that shouldn't be doing this to their electronic devices. If you can't figure out how to do this without the pictures, you shouldn't try this at all.

This will void your warranty in the most OBVIOUS way. Do not try this unless you are comfortable taking a drill to your phone.


Supplies:
  • Eye glass repair kit or equally tiny phillips head screw driver
  • A drill (drill press is preferred)
  • 1-2 mm drill bit (I used 1.5mm)
  • A strong tape (I used kapton tape for its strength and color)
  • Superglue
  • A small section of foam as a diffuser
  • A razor or scissors

Steps:

1. Turn off the phone (obviously). Remove the micro sd card, the back cover, and the battery.

2. You will see seven screws. Six are around the perimeter and one is where the battery would be.

3. Remove them all while taking note that the one in the battery compartment is much shorter than the others. You may need to place the phone on a flat surface and press very hard to get the screws started. They all have thread locking fluid on them. Take care to not strip the screw heads. I love the fact that for once the screws are not the stared security screws. Yay open systems!

4. Once the screws are removed, separate the silver back plate from the front plate and phone circuitry. There are small plastic tabs keeping the two connected. Using a finger nail, work your way around the phone until they all pop out. The back plate should come off with zero effort if all the tabs have been unlatched. All of the plastic side buttons will come off too. Don't lose them.

5. Remove the two screws and cover plate located over the micro usb plug. This might also take some muscle. These screws are different from the rest. Don't mix them up.

6. Carefully pop the PCB up. It should only be held down by two small plastics tabs on either side of the phone. The PCB will still be attached to the screen by a ribbon cable. We don't want to remove the PCB or the screen. We just want to get at the front row of buttons to slide them out. With the PCB moved up a bit, you should be able to remove the four buttons that are actually attached to one another.

Here is what it should look like:


Notice the three LED's marked by arrows?

Here is a top-down view:


The white ovals represent where the LED's are relative to the buttons. As you can see, the LED's are covered by both the webbing between the keys and the outer case of the phone.

I chose to use the LED on the left as the notification LED. This is because it is located a little bit higher on the phone than the other two. That made the drilling easier as I wasn't afraid of cracking that small plastic bridge. It was also a lot easier to tape up once I was done. It is up to you to decide which you want to use. The backlight for all your keys will still work no matter which one you pick.

7. The blue lines are where I cut the webbing between the keys. I had to even remove part of the menu button. That did not change the way the button worked.

8. Now for the drilling. Here I am about to drill my phone:


The boys in the machine shop were fascinated with what I was doing.

"Don't mind me. I'm just using an industrial drill press on my $200 phone."

As you can see, I taped the battery cover back on the phone to protect the PCB while drilling. Place a piece of cardboard on the inside to protect the PCB in case you drill too far down!

Here is the after picture:


I had to drill again with a larger bit (1.5mm), because my initial hole was a little too high. You can see the LED through the hole now. You could probably drill even further down on the phone, but the hole I made works fine with the diffuser.

Here I am manually holding the battery in place to see how the LED shines through the button webbing and the hole:


As you can see, that single LED is super bright.

9. Finally, cut out a piece of tape that will patch up the hole from the inside of the phone. In the center of the tape place a very small sliver of foam. You are making a super tiny band-aid. I used the kind of foam that is used to wrap around merchandise for shipping to prevent scratches. The foam will act as a diffuser for the light and make a secure seal around the hole. If we just used tape, the sticky side would be pointed toward the outside world and would most likely collect dust.

You want to make the tape as small as possible so that it doesn't interfere with the keys on either side but large enough so that it will secure the foam over the hole you just drilled. It will take a lot of trial and error to get it right. Once you have your band-aid in place, use the tip of a toothpick or needle to apply a very minute amount of superglue around the perimeter of the tape. This will ensure that it stays in place. Give the glue ample time to set before continuing.

10. Put your phone back together using the correct screws in the correct holes. Remove any dust from the silver back plate before screwing it on to ensure that dust doesn't settle on your camera. You don't have to worry about dust getting under your screen cover because we never broke the seal for that. After you are satisfied with how the mod came out, you can add a small amount of superglue from the outside into the hole, and allow it time to set before moving it again. This will completely seal the hole and further strengthen the band-aid.

In the end, I redid the hole using the far right led and filling it in with epoxy. Here is my final product:



But there you have it. A notification light in less than 30 mins of work.

With the flashing led script, disabling the led with key presses, and finally adding an external spot for the led, you'll have a fully functional and dedicated notification led.

Enjoy!
Attached Files
File Type: rar Keylights.rar - [Click for QR Code] (1.8 KB, 163 views)
File Type: rar KeylightsNoFlash_v2.rar - [Click for QR Code] (2.78 MB, 93 views)
Last edited by mmarz; 12th June 2011 at 03:32 PM.
The Following 9 Users Say Thank You to mmarz For This Useful Post: [ View ]
10th May 2011, 08:09 PM   |  #2  
JerryScript's Avatar
Senior Member
Flag Las Vegas
Thanks Meter: 567
 
737 posts
Join Date:Joined: Mar 2011
More
Excellent work, thank you for posting this!

How do things look internally below the buttons? As bright as the LEDs appear to be, I'm thinking I could make a slit below the bars and use a small piece of plastic taken from something like a clear lego to create a led display bar. Something like this:

[menu][home][back][search]
----[plastic piece here]----

I realize the led's are more above and between, but it seems they are bright enough for the light to bleed below and work with my idea. Your thoughts?
10th May 2011, 08:34 PM   |  #3  
OP Senior Member
Thanks Meter: 99
 
176 posts
Join Date:Joined: Apr 2011
Donate to Me
That would probably work, but i'm not skillful enough to anything that would turn out remotely good. You'll have to place the plastic strip above the buttons though because the usb connector supports are directly under the buttons. Above the buttons, you have ~2mm to play with before you hit the circuitry for the scree. My hole is pretty much at the highest point it can possibly be.
10th May 2011, 08:39 PM   |  #4  
Mattix724's Avatar
Senior Member
Flag Phoenix, Arizona
Thanks Meter: 2,514
 
4,246 posts
Join Date:Joined: Sep 2010
More
Good concept, but why not just have the keys flash with notification. If you can find a way to make the light blink without the keys I would say awesome.

Sent from my Zio using XDA Premium App
10th May 2011, 09:03 PM   |  #5  
JerryScript's Avatar
Senior Member
Flag Las Vegas
Thanks Meter: 567
 
737 posts
Join Date:Joined: Mar 2011
More
The OP mentioned at the begining of the hardware mod that the keylights are very dim. The problem for alot of us is we can't see the keylights flashing in bright environments. This mod gives you a light bright enough to be seen under most lighting conditions. You could probably just mod the buttons themselves if you wanted to to allow more light to bleed through.

You can tape/paint over the inside of the keys and perform this mod if you want a completely seperate light.
11th May 2011, 01:46 AM   |  #6  
majikfox's Avatar
Senior Member
Thanks Meter: 28
 
156 posts
Join Date:Joined: Oct 2010
Any way to do this that doesn't cost $7USD?
11th May 2011, 01:48 AM   |  #7  
OP Senior Member
Thanks Meter: 99
 
176 posts
Join Date:Joined: Apr 2011
Donate to Me
Yeah, use the keylights app I linked to at the very beginning. But it only works for texts and calls. No way to customize it to your needs. Or develop your own app and sell it for $6. I'd buy it!
11th May 2011, 01:49 AM   |  #8  
majikfox's Avatar
Senior Member
Thanks Meter: 28
 
156 posts
Join Date:Joined: Oct 2010
Are you sure it's safe to have a binary in /system/bin set world read-execute?
Last edited by majikfox; 11th May 2011 at 02:46 AM.
12th May 2011, 02:57 AM   |  #9  
Senior Member
Thanks Meter: 5
 
114 posts
Join Date:Joined: Aug 2010
You sir are the man!

I cannot believe I am considering doing this.
12th May 2011, 08:44 AM   |  #10  
ajones23's Avatar
Senior Member
Flag New Braunfels,Tx
Thanks Meter: 88
 
461 posts
Join Date:Joined: Apr 2011
Okay guys i cant get sush into system/bin/ says no such file or directory. Iam using file expert can someone help me out. Thanks.

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

Advanced Search
Display Modes


Top Threads in Optimus V Android Development by ThreadRank