After programmatically setting the resolution through an app, how can I make the device remember the new setting? So I'm setting the resolution by editing system files. This has been the only way that works for me. More preciesly I issue this command: 

echo 1080p60hz &gt; sys/class/display/mode 


to the device's termninal. This succesfully changes the resolution to 1080p60hz or to a different value if it's issued. However after restart the device returns to its previous resolution.    

Does nayone know how to make it remember the new resolution? Probably another file needs to be edited but I haven't found out which.
Several options:


modify the boot image accordingly, or
use init.d scripts if your device supports them (if not, there are some apps to achieve that). Or,
use an automation app to do that on BOOT_COMPLETED (e.g. tasker supports that, e.g. running a script on BOOT_COMPLETED – called "device start" there IIRC).