[APP][2.3+] Lux Auto Brightness

Search This thread

marlowe310

Senior Member
Nov 20, 2012
149
22
Do you have the persistent notification enabled? Sounds like Android is killing and restarting Lux.

I do have the persistent notification enabled. It wasn't at the Highest Priority setting, so I tried that -- same issue. The night overlay vanishes, and then reappears about a second or two later.

Thanks for sticking with me on this. I know it's minor, but I figure why not give fixing it a shot?
 

beezar

Senior Member
Oct 29, 2011
663
225
making Lux a system app

I'm trying to make Lux a system app so it won't be killed and I won't need a persistent notification. I'm not sure which files to move... there's no .apk file with the name lux in it in the /data/app folder. There are some folders entitled com.vito.lux or something. Are you able to tell me which files I need to move to /system/app?

I tried using Titanium Backup to make it a system app and that was a BAD idea.

Fantastic app by the way, well worth the money.
 

eejee

Senior Member
Mar 16, 2009
929
351
Utrecht
I'm trying to make Lux a system app so it won't be killed and I won't need a persistent notification. I'm not sure which files to move... there's no .apk file with the name lux in it in the /data/app folder. There are some folders entitled com.vito.lux or something. Are you able to tell me which files I need to move to /system/app?

I tried using Titanium Backup to make it a system app and that was a BAD idea.

Fantastic app by the way, well worth the money.
In case you are rooted and not using ART runtime: you could use Xposed and the Notifyclean module instead. Cleans notifications without the risk of losing the app from memory.

Sent from my GT-I9505 using XDA Premium 4 mobile app
 
  • Like
Reactions: beezar

sirovai

Senior Member
Jan 10, 2014
860
251
Rome
Sorry but I don't understand it very well...if I remove the persistent notification, Lux will be killed? I removed it but lux seems to work properly.

The only problem I've noticed is that sometimes the widget is broken, when I tap on it the dashboard will not open... Don't know if maybe it's a nova launcher bug...

Hammerhead - Purity - franco r33
 

eejee

Senior Member
Mar 16, 2009
929
351
Utrecht
Sorry but I don't understand it very well...if I remove the persistent notification, Lux will be killed? I removed it but lux seems to work properly.

The only problem I've noticed is that sometimes the widget is broken, when I tap on it the dashboard will not open... Don't know if maybe it's a nova launcher bug...

Hammerhead - Purity - franco r33
If you remove the notification from within the app, in this case Lux, the app can be killed when all memory is in use. So it depends on your device and your usage whether it will happen or not. In my case (2 GB ram) such an app was killed once or twice a week. Using the Xposed module that I mentioned solved it. I like the Lux notification, so I keep it, but I use this solution to remove lots of other unnecessary notifications.

Sent from my GT-P5100 using XDA Premium 4 mobile app
 
  • Like
Reactions: sirovai

Ci-Fi

Senior Member
Sep 11, 2012
316
121
I have the paid version with persistent notification and the highest notification priority, but sometimes when I turn on my phone, Lux is not on. Is there anything more I can do to make sure it is always on?

EDIT: It also gets killed a lot when I'm watching YouTube videos.
 
Last edited:

beezar

Senior Member
Oct 29, 2011
663
225
In case you are rooted and not using ART runtime: you could use Xposed and the Notifyclean module instead. Cleans notifications without the risk of losing the app from memory.

Sent from my GT-I9505 using XDA Premium 4 mobile app

Awesome, will try it out.

---------- Post added at 10:47 PM ---------- Previous post was at 10:45 PM ----------

Can you explain why was it a bad idea?

Got caught in a loop that prevented me from using my phone even with normal reboot. Had to boot into recovery and restore from a nandroid in order to use the phone again. Don't try it...
 
  • Like
Reactions: Ci-Fi

Cyb3rGlitch

Senior Member
Apr 12, 2011
599
663
I have the paid version with persistent notification and the highest notification priority, but sometimes when I turn on my phone, Lux is not on. Is there anything more I can do to make sure it is always on?

EDIT: It also gets killed a lot when I'm watching YouTube videos.

The Galaxy Nexus seems to struggle with memory, causing Lux to get killed often. I'm not sure how to solve this since running memory profilers on Lux show nothing out of the ordinary. Hopefully Lux v2.0 will work better after re-factoring.
 
  • Like
Reactions: Ci-Fi

Punkiderma

Senior Member
Oct 15, 2010
610
236
31
Turin
Hello! I'm a paid Lux user, and I've got a strange problem with my phone (galaxy nexus, kit kat slim roms).

I've always used Lux auto brightness app together with the Galaxy Nexus plug in. Never had a problem.
Then, I started to have some problems: after waking my phone from sleep, lots of purple lines appears on the screen, followed by a reboot.
I discovered there was a conflict with content Adaptive brightness. Disabled, and everything seems ok.

Then, my phone started having random reboots while sleeping but(and this is strange) only while in my pocket. It went all good until I put it in my pocket and took it out. Tried several times.
I also use gravity screen to turn my screen on and off, but I never had a problem with this setup.

What could it be? What can I try?

Here a last_kmsg

https://www.dropbox.com/s/o7bday1cj6...3367568687.txt

Like I said, lux always worked flawlessly for me.

Thanks!
 

kantjer

Inactive Recognized Contributor
Dec 11, 2010
12,393
29,850
www.androidfilehost.com
Hello! I'm a paid Lux user, and I've got a strange problem with my phone (galaxy nexus, kit kat slim roms).

I've always used Lux auto brightness app together with the Galaxy Nexus plug in. Never had a problem.
Then, I started to have some problems: after waking my phone from sleep, lots of purple lines appears on the screen, followed by a reboot.
I discovered there was a conflict with content Adaptive brightness. Disabled, and everything seems ok.

Then, my phone started having random reboots while sleeping but(and this is strange) only while in my pocket. It went all good until I put it in my pocket and took it out. Tried several times.
I also use gravity screen to turn my screen on and off, but I never had a problem with this setup.

What could it be? What can I try?

Here a last_kmsg

https://www.dropbox.com/s/o7bday1cj6...3367568687.txt

Like I said, lux always worked flawlessly for me.

Thanks!

I used to have this problem on my S4 (also running SlimKat and using Lux and Gravity) with stock kernel, no plugin in use)
After changing kernel it's almost gone, never thought of turning off CABC.
 
Last edited:

Punkiderma

Senior Member
Oct 15, 2010
610
236
31
Turin
Last edited:

Punkiderma

Senior Member
Oct 15, 2010
610
236
31
Turin
Does it do this without the plugin?

Without the plugin seems to work.

It's strange because on previous kitkat version everything was fine.

I know nothing about how to read a last_kmsg, but from the one I posted and from others seems that, at a certain time, the phone starts to change multipliers lots of time, like "set multiplier to xxx, factory wants yyy".

Do you think this can be solved?

Inviato dal mio Galaxy Nexus utilizzando Tapatalk
 

3DSammy

Senior Member
May 5, 2011
1,252
617
Toronto
Is there a way for Lux to set the brightness level for the apps in the "Sleep List" before it goes to sleep?

To conserve battery I set the Lux profiles as low as is practicle but for viewing videos I need brighter values (e.g. YouTube, NetFlix ... etc). It seems that with a "set brightness" option for an app in the "Sleep List" this feature could be achieved. MX Player has a built-in feature to make a brightness adjustment so I am trying to get the same feature for other video players.

Thanks
 
Last edited:

Cyb3rGlitch

Senior Member
Apr 12, 2011
599
663
Is there a way for Lux to set the brightness level for the apps in the "Sleep List" before it goes to sleep?

To conserve battery I set the Lux profiles as low as is practicle but for viewing videos I need brighter values (e.g. YouTube, NetFlix ... etc). It seems that with a "set brightness" option for an app in the "Sleep List" this feature could be achieved. MX Player has a built-in feature to make a brightness adjustment so I am trying to get the same feature for other video players.

Thanks
This may be possible with Tasker, but not yet as a native feature of Lux.

Tried with another kernel, crashes anyway. It just takes more hours to reboot. Last_kmsg says the same things I wrote previously.

Inviato dal mio Galaxy Nexus utilizzando Tapatalk
If the device is crashing without the plug-in then there's an issue with your ROM or kernel. The standard Android API should not cause the OS to crash.
 
  • Like
Reactions: 3DSammy and Ci-Fi

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.