[APP][2.3+] Lux Auto Brightness

Search This thread

BTG-XCELL

Member
Mar 8, 2011
30
6
Sorry if this has been answered, but I didn't see anything when searching. What is the status of a Nexus 5 Plugin?

Also, When using Lux in Night mode on nexus 5 4.4.2, my navbar ends up turning into more of a solid bar than the translucent bar that more seamlessly blended into the rest of the screen. It seems to be affected by the "color temperature" being more noticeable as you go to a lower value.


Nexus 5 Plugin will release soon after kernel color control is considered stable I think dev said a few pages back. Franco.Kernel should have it in the next release (r33).

Yeah, the night mode screen filter doesn't draw over the navbar. The Nexus 5 Plugin will allow to tint entire display through the kernel color control (I think that's how it works) instead of drawing a "screen filter" over your apps.
 
Last edited:

Cyb3rGlitch

Senior Member
Apr 12, 2011
599
663
For me great feature would be option to change brightness basing not on luma or lux sensor, but on some kind of mathematical function of them. For example:
a*luma + b*lux
Where a and b are constants.
I am proposing that because I noticed that indoor luma sensor (camera) have much better resolution than lux sensor. Otherwise outdoor lux is better than luma.
For example:
Indoor:
Lights on:
lux=1;
luma=132;
Lights off:
lux=0;
luma=10;
Outdoor:
Very bright:
lux = 2000;
luma = 255;
Not so bright:
lux=300;
luma=255;

This might work with on wake mode, but having the camera always on for other modes will drain a lot of power. I'll look into it.
 
  • Like
Reactions: jason600

RootTheMachine

Senior Member
Oct 4, 2011
2,088
533
Nexus 5 Plugin will release soon after kernel color control is considered stable I think dev said a few pages back. Franco.Kernel should have it in the next release (r33).

Yeah, the night mode screen filter doesn't draw over the navbar. The Nexus 5 Plugin will allow to tint entire display through the kernel color control (I think that's how it works) instead of drawing a "screen filter" over your apps.

I just got my n5, but franco kernel already seems to have color control.
 

demoncamber

Senior Member
Jan 20, 2012
1,214
245
I'm getting random reboots when using lux on my t989 s2, or any brightness control app for that matter. Does anyone here have an idea why? I'm on a touchwiz ROM and tweaked kernel (speedstock/Tiberius)

It will just freeze, show the boot splash screen, then sit at a black screen until I force reboot by holding power. It's random, but happens within ten minutes of using my phone.

diord ym morf tneS
 

530farm

Senior Member
Aug 3, 2012
613
149
Oakland
I am having an issue where the light sensor wasn't updating unless I pushed the refresh button, on dynamic mode. Ex. Would wake up in the middle of the night where lux should be zero, and the app was acting based on a lux of 4 or so until I pushed refresh.

Also, Can anyone explain the main differences between low pass filter and jitter control. Is it recommended to use low pass filter?
 

Westi01

Senior Member
Apr 1, 2010
426
98
Hey, just bought the app!
Seems to be very nice.

Got 2 Questions though,
Do I have to link lux and brightness or is it ok to just use the automatic profiles? How does lux determine which profile to set? For example in a Car.

I read somewhere that you will develop a plugin for the nexus 5, is that right? :)

Thank you

Edit: Got another Question - where do I have to set system brightness? Automatic or manual?
 
Last edited:

demoncamber

Senior Member
Jan 20, 2012
1,214
245
I am having an issue where the light sensor wasn't updating unless I pushed the refresh button, on dynamic mode. Ex. Would wake up in the middle of the night where lux should be zero, and the app was acting based on a lux of 4 or so until I pushed refresh.

Also, Can anyone explain the main differences between low pass filter and jitter control. Is it recommended to use low pass filter?

Low pass mode is for only when using the camera as a sensor.
Jitter is to smooth out brightness changes for over-active sensors.
 

jason600

Senior Member
Nov 26, 2009
195
157
For me great feature would be option to change brightness basing not on luma or lux sensor, but on some kind of mathematical function of them. For example:
a*luma + b*lux
Where a and b are constants.
I am proposing that because I noticed that indoor luma sensor (camera) have much better resolution than lux sensor. Otherwise outdoor lux is better than luma.
For example:
Indoor:
Lights on:
lux=1;
luma=132;
Lights off:
lux=0;
luma=10;
Outdoor:
Very bright:
lux = 2000;
luma = 255;
Not so bright:
lux=300;
luma=255;

Rather than combining both, a simple if/then test would work well, such as:

1. Set brightness with lux # this first as its faster than luma
2. If lux < 30 then
3. set brightness with luma # to fine tune on lowish light levels
4. Endif

Would be great to implement this.
 

mbze430

Senior Member
Feb 28, 2007
1,556
180
Southeast Missouri
I have been using Lux for over 1.5years or more now. And I love the program. But I was wondering if there is a way or maybe even add this feature.

I use my phone a lot in the car. Because the phone's light sensor is facing the rear window it doesn't quite work. Is there a way to disable Lux (sleep) when the phone goes to Car Mode; a way for Lux to detect Car Mode on/off? Or a feature where it automatically disable Lux when a MAC address is detected that is connected; so let say I conncet my phone to my car's bluetooth then it knows to turn off Lux?

When I use my phone in the car, I use Car Home Ultra. I have that program in sleep mode, that works.. but if I launch another app, Lux goes back to it's normal mode. So for example. While in Car Home Ultra home screen it's asleep.. great... but as soon as I launch Pandora, Lux comes back on and it lower the settings, but now i can't see the screen while in the car. If I put Pandora app in the sleep, Lux will do it, but then when I am not in the car it's just bright as hell.
 

kantjer

Inactive Recognized Contributor
Dec 11, 2010
12,393
29,850
www.androidfilehost.com
I have been using Lux for over 1.5years or more now. And I love the program. But I was wondering if there is a way or maybe even add this feature.

I use my phone a lot in the car. Because the phone's light sensor is facing the rear window it doesn't quite work. Is there a way to disable Lux (sleep) when the phone goes to Car Mode; a way for Lux to detect Car Mode on/off? Or a feature where it automatically disable Lux when a MAC address is detected that is connected; so let say I conncet my phone to my car's bluetooth then it knows to turn off Lux?

When I use my phone in the car, I use Car Home Ultra. I have that program in sleep mode, that works.. but if I launch another app, Lux goes back to it's normal mode. So for example. While in Car Home Ultra home screen it's asleep.. great... but as soon as I launch Pandora, Lux comes back on and it lower the settings, but now i can't see the screen while in the car. If I put Pandora app in the sleep, Lux will do it, but then when I am not in the car it's just bright as hell.

You can do all of that with Tasker
 

mbze430

Senior Member
Feb 28, 2007
1,556
180
Southeast Missouri
You can do all of that with Tasker

yes there are a lot of things you can do with Tasker... but

1) I don't want to have another app running in memory, because I already having a bunch (specially in car mode) and android starts to kill apps in the background
2) I don't know and not willing to learn the Tasker's scripting.
3) I don't want to pay for another app

However I do use a NFC Tasker (NFC Trigger), but for some reason it is not able to kill Lux.
 
Last edited:

kantjer

Inactive Recognized Contributor
Dec 11, 2010
12,393
29,850
www.androidfilehost.com
yes there are a lot of things you can do with Tasker... but

1) I don't want to have another app running in memory, because I already having a bunch (specially in car mode) and android starts to kill apps in the background
2) I don't know and not willing to learn the Tasker's scripting.
3) I don't want to pay for another app

But you do want the developer spent days on your specific requirements :rolleyes:
 

mbze430

Senior Member
Feb 28, 2007
1,556
180
Southeast Missouri
its only a suggestion... the developer can take it or leave it. I am not sticking a gun to his head to say he must do it.

Besides, I am sure it will benefit others that do not want to deal with Tasker scripting.

In the end it's up to the developer... somehow you seems to be answering for him to that regards...so same to YOU:eek:
 

sirovai

Senior Member
Jan 10, 2014
860
251
Rome
Hi guys, I bought this amazing app and I have a question: how does work the sub zero mode? It simply changes the display contrast value or the display brightness?

Inviato dal mio Nexus 5 utilizzando Tapatalk
 
So it doesn't affect the battery usage.
How can I modify the min brightness value?

i can tell you that it DOES affect the battery (saving lots of it, that is). This app is the perfect balance between saving your battery and being able to see your screen even in direct sunlight. You can try adding the following settings in the app's profile editor and see if it works for you :

Day
Luma Brightness
20 -50
120 -30
230 45

Night
Luma Brightness
1 -50
45 -35
100 -15

I didn't bother to edit the Car and Cinema modes, 'cause i don't use 'em :D

This is just an example for you to try. You can always edit the above values to your liking :)
 

kantjer

Inactive Recognized Contributor
Dec 11, 2010
12,393
29,850
www.androidfilehost.com
i can tell you that it DOES affect the battery (saving lots of it, that is). This app is the perfect balance between saving your battery and being able to see your screen even in direct sunlight. You can try adding the following settings in the app's profile editor and see if it works for you :

For me the question is now is going sub zero effecting battery life in a positive way.
Since it's an overlay I guess not, but I hope I'm wrong.
 
For me the question is now is going sub zero effecting battery life in a positive way.
Since it's an overlay I guess not, but I hope I'm wrong.

Depends. If your phone has AMOLED or Super AMOLED screen (like mine), then it definitely saves up battery, but if your display is LCD then it has no effect.
 
  • Like
Reactions: kantjer

Top Liked Posts

  • There are no posts matching your filters.
  • 160
    unnamed.png


    Lux - The Original Android Auto-Brightness App

    So I thought I should make an XDA thread for Lux, over a year after releasing it to the Play Store!

    FULL or FREE


    Issues/Suggestions

    If you have any issues or suggestions, please add them to the public issue tracker found here. Be sure to search first, duplicated issues will not work in your favour.


    News
    • Update to 1.51 released to Play Store!
      - Profiles. Have different behaviour for day and night!
      - Root plug-ins. Custom kernel with RGB control? Make a plug-in to utilise it!
      - Improved notification
      - Low pass filter
      - Cubic interpolation
      - Polish/French/Russian/German/Italian translation
      - Manual sunrise location input
      - Control Dashboard slider with vol. keys
      - Fade duration/step
      - Reduced battery usage
      - Fixes

    • Update to 1.06 released to Play Store!
      - Automatic night mode (uses location for sunset/sunrise).
      - Notification priority
      - Enhanced dashboard and notification UI
      - Enable/disable and refresh Lux via Tasker
      - Bug fixes

    • Update to 0.76 released to Play Store!
      - Fixed brightness issues after call

    • Update to 0.74 released to Play Store!
      - Fixed max/phone brightness preferences swapped
      - Added ignore 0 lux option
      - Made static phone brightness optional

    • Update to 0.70 released to Play Store!
      - New 'ascending' automatic mode for zero jitter!
      - Expandable notification for added control (Android 4.1+)
      - Improved efficiency
      - Install to OS functionality
      - Set min/max brightness bounds
      - Adjustable night mode
      - Improved persistence (Android won't kill it!)
      - Fixed Nexus 7 255 luma bug
      - Fixed Tasker 'on wake' revert bug
      - Compat. mode is now known as 'sleep mode'
      - Night Mode now default Dashboard action (hold for Astro. mode)
      - Misc. tweaks and fixes.

    App Description

    Lux isn't your ordinary brightness app. It intelligently adjusts the brightness of your display based on the environment you're in. If, for example, you step into a dimly lit room, Lux will automatically lower the brightness of your display to make it not only comfortable to read, but to also preserve battery power.
    Lux provides the option to automatically adjust the backlight at fixed intervals (periodic mode), when a change in environment is detected (dynamic mode), or when the phone wakes from sleep. It's also possible to adjust the backlight manually. Simply disable automatic mode and you can use it like a traditional brightness tool!
    Perhaps the best thing about Lux is that you can teach it how to behave. If the backlight is too bright or dim for your liking, simply open the provided Dashboard, adjust the brightness slider to the level you desire, then hold the link button. Lux will use this new 'link' as a reference in future.

    Give it a go! I want you to test Lux for more than the 15 minute refund period offered by Google. I understand that some devices may not have the best quality light sensor, and that you may need more time to play around with settings. If you find that Lux doesn't suit you after the 15 minutes is up, you can request a refund at any time via e-mail - no questions asked.

    ★FEATURES★
    ■ Custom auto brightness.
    ■ Sub-zero brightness to make reading in the dark significantly less irritating.
    ■ Battery efficient
    ■ Handy brightness widget
    ■ Option to use the camera to read in ambient light.
    ■ Power-user settings such as choice of interpolation, sensor debugging, and linked sample editing.
    ■ Backup to SD.
    ■ 'Ascending' auto mode for phones with inaccurate light sensors.
    ■ Gradual fade for backlight adjustments.
    ■ Astronomer mode adds a red filter to the screen to preserve the eyesight of stargazers.
    ■ Jitter control to prevent constant small changes to the backlight.
    ■ Automatic night mode, to change the colour temperature of the display for comfortable night time viewing.
    ■ Add app specific exceptions via sleep mode
    ■ No ads, or other nuisances.
    ■ Tasker and Locale support!
    Note: Please disable other brightness apps before using Lux. The author is not liable for any issues caused when using this app.

    ★PERMISSIONS★
    TAKE PICTURES AND VIDEOS: Used to read in luma values, if camera input is selected.
    DRAW OVER OTHER APPS: Required for night/astro mode.
    READ PHONE STATE: Required to prevent Lux from interfering with phone controls in Android 4.1.
    MODIFY SYSTEM SETTINGS: Brightness is a system setting, as is toggling the default auto brightness.
    RETRIEVE RUNNING APPS: Required to make the 'sleep list' functionality work, so Lux can disable itself when certain apps are in the foreground.
    COARSE LOCATION: Required to automatically calculate sunrise/sunset times.
    IN APP BILLING: Required for purchasing future device specific root only plug-ins, to enhance functionality.
    14
    Lux Low-Level Plug-ins

    Soon Lux will support plug-ins to bypass Android API limitations. These plug-ins serve to replace the overlay system Lux uses to make adjustments for Night/Astronomer modes and brightness in general. The plug-in library is free to use for non-commercial development, and can be found here:

    Lux Plug-in Library | Nexus 4 Sample Plug-in Code

    How to make a plug-in

    There are two approaches to making a plug-in for Lux. The passive and the active method. The former is as easy as providing a set of superuser commands for Lux to interpret and apply. These command correlate to functions such as setting pixel RGB or brightness levels. This is the type of plug-in the Nexus 4 sample linked above takes.
    The active method requires you produce your own code to perform RGB/brightness adjustments. This might include importing a device specific library to do the heavy lifting, and then returning empty superuser commands back to Lux.


    Getting Started

    Simply import the Lux Plug-in Library source into your IDE as an Android Library Project, and then create a new Android app which extends PassiveDisplay.java.

    PassiveDisplay provides hooks into Lux's plug-in framework, which you can use to provide superuser commands for Lux to execute. These commands correlate to functions such as setting RGB values. Take a look at the sample Nexus 4 project to see how it's all done.
    Finally, in your new project's AndroidManifest.xml file, add the following:

    Code:
        <activity
            android:name="com.vitocassisi.lux.plugin.MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
    
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    
        <receiver
            android:name="com.vitocassisi.lux.plugin.LuxBroadcastReceiver"
            android:exported="true" >
            <intent-filter>
                <action android:name="com.vitocassisi.lux.plugin.search" />
            </intent-filter>
        </receiver>
    
        <service
            android:name=".[B]MY_PLUGIN[/B]"
            android:exported="true" >
            <intent-filter>
                <action android:name="[B]YOUR_PACKAGE_NAME_HERE[/B]" />
            </intent-filter>
        </service>

    Be sure to replace YOUR_PACKAGE_NAME_HERE with the name of your plug-in's package, and MY_PLUGIN with your extended PassiveDisplay class.

    And that's it! Now you're ready to test!


    Enabling Plug-In support within Lux

    To enable plug-in support, you must check 'Enable plug-in support' in the Advanced section of Lux settings. Enabling this option forfeits all responsibility of mine for any issues caused while using Lux. Plug-in's can cause very real damage to your device if they're written incorrectly - don't use plug-ins from sources you don't trust!
    Testing your plug-in
    Testing is critical for creating a good plug-in. You are dealing directly with system files, and can easily cause damage if you do not know what you're doing.

    DO NOT RELEASE A PLUG-IN WITHOUT TESTING IT ON THE TARGET DEVICE FIRST!

    Ensure that the following work with your plug-in installed:
    • Astronomer Mode
    • Night Mode
    • General brightness adjustment
    • Lux readings functional

    BE METICULOUS WITH YOUR IMPLEMENTATION OF isSupportedDevice()!
    Modifying system files on the wrong model/kernel may cause irreversible issues!


    Licence
    Code:
    Copyright © 2013 Vito Cassisi
    
    You may not use this library except in compliance with the following:
        - It cannot be used for commercial purposes under any circumstances, unless explicit permission is granted in writing from the author.
        - Modifications to this library may not be distributed.
    
    Unless required by applicable law or agreed to in writing, software
    distributed under this licence is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    11
    Lux v1.99.8 released (staged rollout)

    - Added CF.lumen support (don't need CF.lumen active, just install the driver). Acts as a plug-in for all Android 4.4+ devices. Please buy the pro version to support his work.
    - System autobrightness enabled during calls
    - Option to shake at lockscreen to increase brightness
    - Option to prevent drop in brightness in landscape
    - Enforced persistent notification, added system removal method
    - Fixed dashboard width issue
    - Fixed notification priority resetting at boot
    - Misc. fixes
    11
    Hey everyone. Sorry to hear that people are having issues with the paid version. I'm working on hotfixes at the moment. A lot of these bugs don't appear on my test devices, which is why regressions happen seemingly randomly. I'm working hard on finding a reliable way to reproduce and test these issues to prevent this happening again.
    9
    Apologies to everyone for not being around lately. I've been answering support via email.

    A new release is rolling out on the market to 5% of users. Please use the 'Send Feedback' button in Lux preferences if you experience issues. Also, feel free to email me with any questions or concerns.