I don’t think this needed unlisting. One would have to be fairly technical to 1/ root their phone (yes, even an open Fairphone) and 2/ realize this is a shell script and set it up.
In short, whoever manages to implement this workaround knows perfectly well what they’re doing and what the risks are. It’s not like your average clueless Joe could try it and set their phone on fire
Since you are already making it in Automate, you can use the “Display on?” block to prevent it from running all the time. Possibly also the Delay block to replace the while loop and the sleep command.
As Ingo said, it only overrides the screen dimming, all other cooling devices are still available.
Running an echo every half second does nothing at all to the battery life as it’s such a short burst. It adds maybe 0.1% of active CPU time.
The sleep command is a minimum sleep, not an exact sleep, thus requireing no CPU resources.
But if you are worried, you can easily scale it down to run once every 10 seconds or so and it will still work fine.
If the phone does get hot, you can always manually decrease the screen brightness if you want to.
The reason why I don’t use Automate completely (including a screen on check) is because it would show a toast every time the “Shell superuser block” is called.
But yeah, you could also use a screen on check block, then a non-superuser block to check the state of the file and only write to the file if it’s not 0, but that’s just a waste of blocks and will not give you more performance/battery life, since the current shell script is about as light-weight as possible.
An echo to a kernel file (meaning it’s not stored on disk but just in RAM) is about as light-weight as it gets.
Is the cooling device associated with the display guaranteed to get index 16? Perhaps it’d be more robust to loop through all device directories and choose the one with the appropriate type?
I’ve uploaded Workaround screen dimming after A12 update - #12 by Dakkaron to it, and I’ll try to keep it updated with changes so that if any of this becomes unavailable, you can use the commit log to get the version you want, should that be desirable.