HeroLED: Working LEDs for all devices! [D:v5.0|F:v3.3.2] [17/8]

Charging LED and Button Backlights interfere with each other, which one to keep?

  • Charging LED

    Votes: 66 35.1%
  • Button Backlight

    Votes: 122 64.9%

  • Total voters
    188
Search This thread

senab

Senior Member
Apr 29, 2008
383
31
London, UK
www.senab.co.uk
This application is no longer available or being developed.

Hey everyone,

Since v5.0 of HeroLED Donate, the app has been able to enable LEDs for all devices which do not have working LEDs by default. If your ROM does not have working LEDs, this app is for you.

If your ROM does have working LEDs, this app will do nothing for you. YOU DO NOT NEED THIS!


One of the things stopping me from using the Eris port was not having LED notifications. Hunting around, the old threads about this problem with Cupcake Hero and the main fix for it was the HeroLED app from fictionless.

For the past couple of days I've painstakingly used a combination of smali and a decompiled versions of the APK to resurrect the code. This has resulted in a base for which I can start adding features. Therefore I introduce HeroLED.
Cookers: I've put this onto Market for easy distribution. It also allows me to see stats about the app, therefore please do not bundle it in ROMs.

It is available on the Market in two versions: Donate and Free. Just search for 'heroled' in the Market or scan the QR code below.

Donate / Free
chart
chart


The Donate version of the application has more features than the Free version. See the changelog below to see what. I may backport the features back later, haven't decided yet.
Donate Changelog - Donate version will now be v4.x
Code:
v5.0
- Ability to automatically find the paths to LEDs, not just use fixed paths.
   [B]This means that the app will work on "any" rooted device.[/B]

v4.4
- Correct LED Notification colours
- Ability to set period of time where the button backlight will trigger on/off
   (i.e. night-time). Should help with battery consumption.

v4.3
- Blinking functionality is now run in shell. Makes it all much more efficient.
   See [URL="http://forum.xda-developers.com/showpost.php?p=6469680&postcount=154"]here[/URL] for a detailed description.

v4.2.2
- Fix for Dream when using .33 Kernel

v4.2.1
- Fix Button Backlights
- Small bit of optimization

v4.2
- Change Charging Light LED so that it's more like stock (Red -> Orange -> Green)
- Make the icon optional when enabling the foreground service.

v4.1.1
- Fixes! Should be totally fixed now.
- Charging LED now works with screen on and off.

v4.1.0 Donate
- Fixes!!!!
- Everything should be working now, let me know though!

v3.0.8 Donate
- Add option to set the Service to run in the foreground. Will stop Android killing the Service
   when it's running short of memory.

v3.0.7 Donate
- Fixed FC caused by restarting the service too frequently/quickly (from Preferences).
- Add the functionality for me to manually specify application's notifications to flash LED
   (if they don't themselves). At the moment the only one is the phone which allows missed
   calls to flash the LED. (You can enable this in preferences).
- You can now change the default LED colour (used for notifications which don't specify
   their own colour).
- After a lot of fiddling, the charging light is back. Unfortunately it doesn't work when
   the screen is on. This is due to the something resetting the LEDs when the screen goes
   on/off for some reason. It will work when the screen is off though. If the charging
   light is enabled, it also means that notification LED's won't flash when you're charging
   (screen on/off).
Free Changelog - Free version is v3.x
Code:
v3.3.2
- Correct LED Notification colours

v3.3
- Blinking functionality is now run in shell. Makes it all much more efficient.
   See [URL="http://forum.xda-developers.com/showpost.php?p=6469680&postcount=154"]here[/URL] for a detailed description.

v3.2
- Fix for Dream when using .33 Kernel

v3.1.2
- Small bit of optimization

v3.1.1
- Fixes! Should be totally fixed now.

v3.1.0
- Fixes!!!!
- Everything should be working now, let me know though!

v3.0.7 Free
- Fixed FC caused by restarting the service too frequently/quickly (from Preferences).

v3.0.6
- Fixed FC caused by improper handling of notification flags.
- Removed unnecessary permissions.

v3.0.5
- Further optimisation! Made the actual blink code much quicker, will mean
you don't get the alternating lights when the colour isn't green.
- Fixed an FC.
- Fixed a bug where the LED wouldn't turn off after the notification removed
(mainly from GTalk).

V3.0.4
- Optimisation!
- Removed a lot of redundant calls and fixed other things.

V3.0.3
- Bug fix release.
- Revert the trackball light for Magic, seems to be something weird
going on in the kernel.
- Taken out the charging light code. The button light code was interfering
with it so I decided to just totally disable it. Doing this also means I can
start to slim down the application as it won't need to be constantly running.
This will be in v3.1

V3.0.2
- Jogball will now also turn on when screen turns on for Magic.
- Fixed LED Blinking randomness. Should now be just like stock.
- Other fixes.
- Please note, there is a bug with the charging led (when you turn the
screen on, the LED turns off). It's caused by the buttons backlight enabling
but I'm not quite sure why, needs investigation. They work when the screen
is off though so it's not a massive bug.

V3.0.1
- Button backlights now turn on when the screen turns on.
- Sapphire/MT3g/Magic should now work. (My bad! Sorry).

V3
- Working code-base.
- Now turns on the hardware keyboard backlights on/off automatically.
Loccy did great with his script, but this method is more practical and efficient.
- Should now be working for Sapphire/MT3g (let me know though).
- Notifications now show if plugged in and charging LEDs are turned off.
- No longer requires restart. Launch HeroLED application after install,
press Menu and select "Start Service".
- Various bug-fixes
Problems

Please don't just post comments like "It keeps f/c'ing for me" or "It caused my phone to crash" as it doesn't help me figure out what the cause of the problem is! Please add a logcat as it means I can fix it!


This has been testing on King's Droid Eris but should work on all Hero's (Legend, Cupcake Hero, Eclair Hero, Droid Eris).

It requires ROOT, press 'Always Allow' when it's prompts you.

If you find your device doesn't work, PM me the result of this command:
Code:
adb shell busybox find /sys -name brightness
 
Last edited:

domenukk

Senior Member
Jan 11, 2010
824
30
There is no LED notification? Didn't even recognize that :D
Oh and btw: try to get the LEDs on keyboard of G1 working... (if that's somehow possible.. IDK)
 

chunan93

Member
Feb 2, 2010
35
0
Hmmm, if you can send me a logcat it would be appreciated. I'm on a G1 so can't test. Best way would be to paste the logcat at Pastebin then PM the URL.

i post logcat for missed call, hope it helpful

Code:
D/CallNotifier(  189): - onDisconnect: cause = INCOMING_MISSED, incoming = true, date = 1271429652498
D/CallNotifier(  189): stopRing()... (onDisconnect)
D/Ringer  (  189): stopRing()...
D/Ringer  (  189): mRingHandler: STOP_RING...
I/AudioPolicyService(  111): stopOutput(): before lock
I/AudioFlinger(  111): setMode(0): before lock mHardwareLock
D/AudioHardwareInterface(  111): setMode(NORMAL)
I/AudioFlinger(  111): setMode: ready to unlock mHardwareLock
I/AudioPolicyService(  111): setPhoneState(): before lock
E/LED_DUAL(  128): open failed errno: 2
E/LED_DUAL(  128): open failed errno: 2
E/LED_DUAL(  128): open failed errno: 2
E/LED_DUAL(  128): open failed errno: 2
D/JOGBALL (  128): Jogball, + set_jogball_mode mode=0

btw, if i plug the phone into usb, incoming call LED won't work
 
Last edited:
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone