Minimal way to always have screen on on Android? I'm preparing a bunch of tablets using a minimal android OS (https://slimroms.org/).  And was wondering if there's a way to always have the display on (i.e. disable Sleep and Auto Screen lock) without needing to use third party apps.  I've got full root access via SSH and ADB etc - hoping there's some setting in /proc or as a kernel boot argument that I can make.

These are intended to be "We would like your feedback" tablets which are out on public display - so the display should never dim or lock etc. They're always going to be plugged in so power saving etc isn't going to be an issue.
Set the 'keep awake while plugged in' setting
(Screen will never sleep while charging)  

Settings - Developer options - Stay awake: on  

or from terminal  

svc power stayon true


if the user can press the power button, set the screen lock to "none" (not even swipe) and
use Tasker/MacroDroid/Automate to watch the power button. or run a watchdog from shell  

the following example depends on three android binaries
/system/bin/toolbox
/system/bin/toybox
/system/bin/input  

# (replace first line with while 1)
until [ $(($(toybox cat /sys/class/power_supply/ac/online)+$(toybox cat /sys/class/power_supply/*usb/online))) -eq 0 ]
  do
    case "$(toolbox getevent -lc4 /dev/input/event2 | toybox head -n1)" in
      *KEY_POWER*)
        input keyevent KEYCODE_WAKEUP
      ;;
    esac
done  


the above code checks for charger is connected as entry point for the loop. the loop exit when charger is disconnected. /dev/input/event2 may vary for your device. you can check which input event has only 3x buttons [Vol+|Vol-|Pwr] from getevent -il (for more generic code look here)