In a nutshell, I'm trying to replace some image resources in one of the apps. Overwriting the files manually does the job, but every time the app updates, all my changed files are replaced by the original ones. I'm not sure if the resource files are overridden by dpkg or by the app itself when it first runs after updating. Setting the files as Read-Only doesn't seem to help as the app or dpkg manages to remove the readonly flag and replace the files anyway.
To be more specific, the app I'm trying to customise is "Plex Media Server" which doesn't have any official way of changing the DLNA icons. The icon though can be found under "/usr/lib/plexmediaserver/Resources/Graphics/dlna-icon-260.png", and when manually replaced is shown correctly in Plex and all devices that connect to it. But when I update the Plex software all my changes are replaced again by the original files.
So one way I can think of working around this, is to just to write a small shell script that replaces the resources again to my custom ones, and I can run it after each update. But I'm trying to find out if there is some better, proper or more automatised way to do this.
Being as best "hypotetic" case a way to make the linux system to return always my content when the file is read, while still allowing the file to be virtually written, deleted or created, but always return my content no matter what.
So my question is: Is my "best hypothetic case" possible to be implemented in Linux? Or how to prevent the files to be overwritten by dpkg?
Greetings and thanks.