Sunday, September 22, 2019

How to turn off screen without affecting anything else?


When I press power button, it not just turns off the screen, but also locks the screen. I use WidgetLocker Lockscreen which is somewhat heavy. So, many apps stop working. For example, an in-app download is stopped after screen lock. The heavy foreground apps are unloaded from memory after screen lock.


When I need to run such apps for long, I make screen timeout period infinite. But, it consumes a lot of battery juice. So, I want to turn off screen and only screen. How to do this?


Please, don't suggest me to ditch WidgetLocker Lockscreen.


My device is Galaxy S which is rooted (ICS).



Answer



Depending on your kernel it might be possible to turn the brightness off your screen to 0 via t he appropriate sysfs file.


On a Sony Xperia Acro S currently running a custom AOSP-Based 4.2.2 ROM (SlimBean 6.2) i found the following:



130|shell@android:/ # find /sys/ -name brightness
...
/sys/devices/i2c-3/3-0040/leds/lcd-backlight/brightness
...

the following command turns my screen off but keeps the apps running:


echo 0 > /sys/devices/i2c-3/3-0040/leds/lcd-backlight/brightness

if you combine this with an app which keeps the wakelock for your device, you should be fine.


No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...