Sample Header Ad - 728x90

How to enable the light sensor with ADB while the screen is off?

2 votes
0 answers
444 views
how to enable the light sensor with ADB while the screen is off? I want to check the values of /sys/class/sensors/light_sensor/lux, but it changes only when the screen is on. What I have tried, but did not work: 1. https://stackoverflow.com/a/39215746/21702461 There is no file called "enable" in that directory. 2. Tried to find a light sensor service, while the screen is on. But it seems there is none.
activity services | grep light
list | grep light
My phone: Samsung Galaxy S4 with LineageOS and root enabled.
Asked by mc1 (21 rep)
Apr 21, 2023, 07:10 PM