How can I make changes in the usr/bin folder?

    • Official Post

    It is not possible to edit or add files to /usr/bin as that path is inside a read-only squashfs file (that expands into a virtual filesystem on boot). Any changes there need to be made a image compile time; with a small number of exceptions where we support boot-time override of embedded files with content in /storage/.config/

    What exact file are you attempting to modify?

  • ozkaradag It's not impossible to change the read-only: For instance with mount --bind or overlayfs but it's usually not worth the trouble. You can put your binaries anyway in /storage and adding that location to your PATH variable. Following should work but is untested:

    Code
    mkdir /storage/bin/
    cp /etc/profile /storage/.profile
    echo "export PATH=/storage/bin/:$PATH" >> /storage/.profile

    Then you can drop your bins in /storage/bin

  • Yes, I think I worked out that plan for myself already.

    What is the grand plan? Why are changes needed?

    It is not possible to edit or add files to /usr/bin as that path is inside a read-only squashfs file (that expands into a virtual filesystem on boot). Any changes there need to be made a image compile time; with a small number of exceptions where we support boot-time override of embedded files with content in /storage/.config/

    What exact file are you attempting to modify?

    Some developers have modified the bin file of some extensions (o * s- * m, TVHeadend, etc etc) and pasted it there.

    When it's new, I want to take it and put it in another image and test it.


    ozkaradag It's not impossible to change the read-only: For instance with mount --bind or overlayfs but it's usually not worth the trouble. You can put your binaries anyway in /storage and adding that location to your PATH variable. Following should work but is untested:

    Code
    mkdir /storage/bin/
    cp /etc/profile /storage/.profile
    echo "export PATH=/storage/bin/:$PATH" >> /storage/.profile

    Then you can drop your bins in /storage/bin

    I will give it a try at night.

    Thanks to everyone.

    Best regards...

  • ozkaradag

    OK now I get what you want. You don't need to edit anything in /usr/bin

    You need to change the bins in . kodi/addons/......

    But I doubt your plan will work. ABI/API might change and it depends how your third party bins have been build.

  • Code
    mkdir /storage/bin/
    cp /etc/profile /storage/.profile
    echo "export PATH=/storage/bin/:$PATH" >> /storage/.profile

    Greetings,

    This did not happen.


    I understand you very well, but there are no bin file in .kodi/addons folder.

    So, the developer has buried it in the usr/bin folder.


    Best regards...

  • Code
    mkdir /storage/bin/
    cp /etc/profile /storage/.profile
    echo "export PATH=/storage/bin/:$PATH" >> /storage/.profile

    Greetings,

    This did not happen.


    I understand you very well, but there are no bin file in .kodi/addons folder.

    So, the developer has buried it in the usr/bin folder.


    Best regards...

    I understand but LE has bin files for the addons there. If you put it in /usr/bin it won't work. But I'm afraid your idea won't work anyway because of ABI/API breakage. I would suggest you compile using LE buildsystem. It's kinda hard for beginners to understand how to work with but it's worth learning.