Last active
August 14, 2026 17:36
-
-
Save maatthc/792471812150010c935aedd34c93aedf to your computer and use it in GitHub Desktop.
LG WebOStv - Play games on RetroArch from USB drive
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # === For rooted LG TVs with WebOsBrew installed only === | |
| # | |
| # On LG WebOStv, RetroArch only have access to a few jailed folders so to run games on a usb drive, | |
| # we need to 'merge' the USB mounting point with one of those jailed folders using OverlayFS. | |
| # The scripts on folder '/var/lib/webosbrew/init.d/' will run after every tv boot. | |
| # Remove the $STARTUP_FOLDER/$SCRIPT_TO_RUN_AFTER_BOOT and reboot to revert the change. | |
| # | |
| # Tested on 7.3.0-03.30.72 | |
| # | |
| # Steps: | |
| # - Copy this script to a pen drive and insert it to the TV | |
| # - Check if the folder '/tmp/usb/sda/sda1/' exists and have the content of your pen drive. | |
| # - Run the script | |
| # | |
| # The folder structure might be different depending of your TV version | |
| set -euo pipefail | |
| JAILED_FOLDER=/var/palm/jail/com.retroarch/media/internal | |
| USB_MOUTING_POINT1=/tmp/usb/sda/sda1/ | |
| USB_MOUTING_POINT2=/tmp/usb/sdb/sdb1/ | |
| USB_MOUTING_POINT3=/tmp/usb/sdc/sdc1/ | |
| SCRIPT_TO_RUN_AFTER_BOOT=add_usb_drive_to_retroarch_media_folder | |
| STARTUP_FOLDER=/var/lib/webosbrew/init.d | |
| echo -e "#!/bin/bash \nmount -t overlay -olowerdir=${JAILED_FOLDER}:${USB_MOUTING_POINT1},nofail overlay ${JAILED_FOLDER}" > $STARTUP_FOLDER/$SCRIPT_TO_RUN_AFTER_BOOT | |
| echo -e "\nmount -t overlay -olowerdir=${JAILED_FOLDER}:${USB_MOUTING_POINT2},nofail overlay ${JAILED_FOLDER}" > $STARTUP_FOLDER/$SCRIPT_TO_RUN_AFTER_BOOT | |
| echo -e "\nmount -t overlay -olowerdir=${JAILED_FOLDER}:${USB_MOUTING_POINT3},nofail overlay ${JAILED_FOLDER}" > $STARTUP_FOLDER/$SCRIPT_TO_RUN_AFTER_BOOT | |
| chmod +x $STARTUP_FOLDER/$SCRIPT_TO_RUN_AFTER_BOOT | |
| echo "Script ${STARTUP_FOLDER}/${SCRIPT_TO_RUN_AFTER_BOOT} created." | |
| echo "Press any key to reboot and activate changes or CRTL+C to quit." | |
| read -n 1 | |
| reboot |
Author
Eu não sei como acessa esse script, como eu faço, pode me ensinar, e pode me ajudar como eu colocar FTP na tv lg
For rooted LG TVs with WebOsBrew installed only
A sua tv esta assim?
@maatthc I found two issues running the script on an updated environment:
- The first, the USB was mounted in /tmp/usb/sda/sda1 and the he script it created (add_usb_drive_to_retroarch_media_folder) inside /var/lib/webosbrew/init.d was mounting sdc instead sda. I had to fix it manually through SSH;
- The current RetroArch package available in the Homebre Channel is named com.retroarch.webos and not com.retroarch, which changed the jailed folder name inside /var/palm/jail/
Author
Thanks for the report.. I will try again tmrw? Btw, what is your tv os version?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Eu não sei como acessa esse script, como eu faço, pode me ensinar, e pode me ajudar como eu colocar FTP na tv lg