Nexus 5 Light Sensor fix

Sometimes Nexus 5 light sensor goes crazy and reports 30000 lux even in a dim light because of what auto-brightness attempts to blind you in a moment. This happens when you hold a phone at certain angles and depends on light bulbs used in a room.

This mod is a filter inserted near a point where native HAL communicates to Android framework. It intercepts all sensor readings and replaces abnormal 30k lux (and 0 lux following 30k) with an averaged value from a sliding window. This affects any process that use Android sensors interface including system_process, so that default Android auto-brightness works fine too (no need to use apps like Lux Dash to workaround the issue).

Author(s): 
Package: 
ru.abusalimov.xposed.lightsensorfilter
Version name: 
1.2.1
Release type: 
Stable (low risk of bugs)
Number of downloads: 
32,028 in total · 1 in the last 24 hours
MD5 checksum: 
5c5c8e050185643b322fa37535dc36cd
Uploaded on: 
Friday, May 16, 2014 - 03:45
Changes: 

Revert unconditional 0 lux to 1 lux replacement introduced in v1.2

Version name: 
1.2
Release type: 
Stable (low risk of bugs)
Number of downloads: 
3,661 in total · 0 in the last 24 hours
MD5 checksum: 
24dfe9912ed27bb885c77d889d834769
Uploaded on: 
Thursday, May 8, 2014 - 00:56
Changes: 

- Always replace 0 lux with 1 lux to prevent auto-brightness changing hither and thither in a very low light environment
- Do not feed replaced values back to EMA filter (makes it more responsive to newly coming proper readings)
- Filter out 10000 lux as well (reported by zbloh on xda-developers)

Version name: 
1.1
Release type: 
Stable (low risk of bugs)
Number of downloads: 
7,022 in total · 0 in the last 24 hours
MD5 checksum: 
5971a42ea7b0e5d4aebd6b3aea496173
Uploaded on: 
Friday, April 11, 2014 - 06:17
Changes: 

- Fix method hook being installed in system_process twice
- Use weighted time-aware EMA filter which provides more confident average calculation

Version name: 
1.0.1
Release type: 
Stable (low risk of bugs)
Number of downloads: 
401 in total · 0 in the last 24 hours
MD5 checksum: 
f250effb4ea89077d5b57449abafc866
Uploaded on: 
Saturday, April 12, 2014 - 22:18
Changes: 

APK is properly signed now.

Upgrading from 1.0:
Because of using development signature for 1.0 Android will forbid you to install an update over it. Please uninstall 1.0 first and then install a new version as usual.