Change Kodi temp folder location

  • Hi,

    I am looking for changing temp folder location in Kodi to another folder.

    By default it is set to:

    /storage/.kodi/temp

    and I would like to move it to:

    /var/media/LOCAL_MEDIA/temp

    I understand this can't be done by advanced settings.xml as kodi needs temp folder before taking care of advanced settings.xlm (link to ref)

    This could eventually be done by editing

    /usr/lib/kodi/kodi.conf

    but it mounted in read-only mode.

    Any suggestion?