Spoofing sensor values - Android Q&A, Help & Troubleshooting

Hi guys,
I'm looking for a way to spoof android sensor's values, especially the light sensor's readings.
I'm trying to do that in order to trick samsungs to enable their ultra bright screen mode by setting the brightness reading high enough.
Any input on how to do that is helpful.
Thanks.

Related

[Q] How to read ambient light level sensor

Ok Ive drawn a blank.
I want to measure the ambient light level; it seems that SE must have used a non-standard (surprised?) implementation, as various apps that can read the sensor on other phones cant read the light level on the X10.
I can find no help in the XDA forums or through google.
I have searched through /sys/devices for anything looking hopeful but no luck. I was hoping a file would hold the sensor value, just as http://forum.xda-developers.com/showthread.php?t=1284938 shows how to measure charging current by reading a file deep in /sys/devices.
I want ideally to use light readings with Tasker to control the phone, but also it would be great if Juicedefender could control screen brightness for us as the screen is my main battery drain.
Pointers, hints or even the answer all welcome!
Thanks in advance
Chris

[Q] Change light lv setting for lowest brightness.

Is there a way to change where the light sensor readings trigger a change in brightness level?
Currently the phone change from lowest brightness to higher when reads 30lux and change to lowest brightness when reads 10lux.
It's annoying for the phone to change to lowest brightness when i still in a light up room but just pointed away from light sources. And also it's also not switching to higher brightness when i need it in a dim environment.
So, anyone know of some app that can adjust these values? Or point me some direction to work on it.
Light Sensor is Ok, but...
Using z-device test I compared the light sensor readings between SGS2 and the NS. The light sensor seems to be correct. Still, at 10 lux, the SGS2 is setting the brightness value to its lowest and the NS, not.
I'm starting to believe that there is a a problem between the mapping from the light sensor and the brightness level. If I'm not mistaken this can only be fixed/adapted within the ROM.
DoomFragger said:
Using z-device test I compared the light sensor readings between SGS2 and the NS. The light sensor seems to be correct. Still, at 10 lux, the SGS2 is setting the brightness value to its lowest and the NS, not.
I'm starting to believe that there is a a problem between the mapping from the light sensor and the brightness level. If I'm not mistaken this can only be fixed/adapted within the ROM.
Click to expand...
Click to collapse
As from what i read, S2 seems to divide the screen brightness into 5 level
http://forum.xda-developers.com/showthread.php?t=1235212&highlight=auto+brightness
However, the mapping of these five level to it's correspondence light sensors reading seems to be odd.
let's just call lowest brightness as lv1 and highest as lv5,
The phone will stay on lv1 whenever the sensors read from 0-30lux
The phone will drop to lv1 whenever the sensors read 10lux.
The gaps is just too wide to give a pleasant viewing experiences, often stay on lv1 brightness while i'm no longer in pitch black area.
if there is a way to change this, i would prefer to set it as
stay on lv1 whenever sensors read 0-5lux
drop to lv1 whenever sensors read 2lux (the lowest brightness lv is only feasible for me when inside a pitch black environment)
Since there is a file determine it's brightness value for each lv, so i'm thinking there should also one for it's mapping.

light sensor

hi all, I noticed that light sensor doesnt work properly, when I go from dark to light area, the brightness increases but when I go from light to dark area the brightness wont decrease, on honeycomb it worked properly, anybody else experiences this problem?
Same here, it goes bright but does not decrease.
I use the app https://play.google.com/store/apps/details?id=rubberbigpepper.DisplayBrightness&feature=search_result#?t=W251bGwsMSwxLDEsInJ1YmJlcmJpZ3BlcHBlci5EaXNwbGF5QnJpZ2h0bmVzcyJd
make an invisible slider on the edge of screen to adjust brightness.
is there any way to make it work properly?
Don't think so. Its pretty much unusable now.
Sent from my HUAWEI MediaPad using Tapatalk 2
There are lots of negative comments about light sensor, but i have to say it works well to me on ICS. Could be possibly massive amount of defected devices.
Lightsensor doesn't work for me either - too bad, hope it will be corrected.
Perhaps it's because I'm running ICS "General Channel".
HUAWEI MediaPad FIRMWARE(S7-301u,android4.0,C232B002,General Channel)
Do the sensor dim the light in the same session for you?
Here it turns up the light but not down again.
Sent from my U8800 using Tapatalk 2
Same here, adjusting upwards works fine, but it doesn't adjust downwards in low light conditions.
I have tried two apps that turns the light down again, custom auto brightness and lux auto brightness.
One small problem. The pad will crash on pattern unlock after sleep. I Also the light sensor will not work s after wake up sometimes.
Sent from my HUAWEI MediaPad using Tapatalk 2
mangoman said:
I have tried two apps that turns the light down again, custom auto brightness and lux auto brightness.
One small problem. The pad will crash on pattern unlock after sleep. I Also the light sensor will not work s after wake up sometimes.
Sent from my HUAWEI MediaPad using Tapatalk 2
Click to expand...
Click to collapse
I'm guessing no one has had any luck with this issue but I figure I'd necro the thread anyways. My light sensor sucks also. I used 'Android Sensor Box' to get the values coming out of the sensor. It only displays either 40 lux or 280 lux which is obviously not right. This is on Cyanogen 9, stock t-mobile ICS and the rooted international gingerbread(can't remember which one exactly).
So I was wondering if anyone who owns one of these has ever gotten a sensor value that makes any sense.
thanks
nope,
I use instead display brightness https://play.google.com/store/apps/details?id=rubberbigpepper.DisplayBrightness&hl=no
create an invisible brightness slider on theedge of the screen.
Try using custom auto brightness with the auto brightness on (there's a setting in that app that disabled the system auto brightness at screen on. Turn it off).
The original kernel only recognized 3 light levels. If you use bart's kernel it will recognize 6 levels.
Yes, I think there's a software problem because both app (lux and cua) crash hard in HMP, but I don't think fixing it is a priority.
Sent from my HTC Glacier using Tapatalk 2
How to use custom auto brightness without crashing the tablet.
There are 2 options that should be followed, other settings can be adjusted to your liking.
1. In preferences, Check Use pulsed sensor mode. Basically this option will make the app read the sensor itself instead of listening the sensor value given from the system.
2. In advanced preferences, set the sensor update speed to either half sec or 1 sec. I tried normal, but the app won't read the sensor value, so probably the slow normal maximum setting only works if you get the sensor value from the system.
You can set disable system auto brightness. I recommend it before because the setting was a "hack" which was making the system read the brightness value thus the app can get that value. Right now it's recommended that you check the disable system auto brightness.

Ambient Light Sensor Values

I find that the default brightness is too low for my liking when on automatic, although I like the idea of dynamically changing the brightness so I don't want to manually set a brightness level. Instead, I am trying to figure out where and how to change the light values for different situations.
Thanks!

Minimum Brightness too bright?

The minimum brightness level on this phone is quite a bit higher than other phones with OLED panels. Is there any way to change this? Using power saving mode with the screen at minimum brightness makes the screen a bit dimmer and so does inactivity so we know the screen definitely has the capability to go darker. Anyone know how we can make the brightness darker?
P.S no screen filter suggestions pls
I use Lux Auto Brightness, screen can go significantly darker
Out Of Code said:
I use Lux Auto Brightness, screen can go significantly darker
Click to expand...
Click to collapse
And that would work for me but the only issue is the software buttons at the bottom don't dim with the screen and it's really weird looking. That's why I said no screen filters, please.
ethanscooter said:
And that would work for me but the only issue is the software buttons at the bottom don't dim with the screen and it's really weird looking. That's why I said no screen filters, please.
Click to expand...
Click to collapse
It's not a screen filter, what would even make you think that? Plus it does dim the software buttons. Maybe it's because you don't have root?
If you on 7.0, try "Night Mode Enabler" from the PlayStore.
On my Z Play, the Lux app does not dim the buttons either. I don't have root. OTOH I don't recall seeing in the Lux documentation that it uses root for anything?
Also, I'm 90%+ certain that Lux *is* a screen filter. I say that because it differentiates between two ranges of brightness: "above zero" and "below zero". It seems likely that the "below zero" settings (which are necessary to get the display very dim at all) are modifying the display data rather than the system brightness setting. Of course, on an AMOLED screen this should be just as good... except for those darn buttons!!
BTW, all of this "night mode" stuff has, unfortunately, just confused the issue for those of us who need to preserve our night vision while using our phones. "Night mode" has come to mean "make the color temperature redder" because that seems to avoid some of the ill health effects of blue light at night. But it doesn't do squat to preserve night vision---for that you need to get the brightness way, way down. If you're trying to use your phone at the telescope, you're just as screwed as before, only now, the google search terms are more polluted, making it harder to find an actual solution.

Categories

Resources