I would like to change the output resolution (hdmi) programmatically. I understand that we can change the hdmi resolution by changing the value of the file /sys/class/display/mode. When connecting to the device with adb shell, I have access to file /sys/class/display/mode. But only the system user can write into it : -rw-r--r-- 1 system system 4096 2023-01-02 14:53 mode
When I try to write to the file /sys/class/display/mode I have no permission because I need to be system user command use : [echo 2160p60hz > /sys/class/display/mode]
How can I change the value of the file /sys/class/display/mode ?
ps.
With command [wm size] in the shell I can change the resolution of the screen, but not the resolution of the hdmi