This guide, inspired by this original post by Valkryst, has been updated with the latest instructions and improvements. It walks you through configuring Developer Mode on your LG TV and installing the Homebrew Channel, executed on an Ubuntu machine

Prerequisites

  1. Ensure your computer and TV are connected to the same network.
  2. Create an LG Developer Account.
  3. Install Node.js (version 16.20.2) to ensure compatibility, the tool doesn’t work with the latest versions on Node.js.
  4. Install the webOS CLI tools by running the following command:
    npm install -g @webos-tools/cli
  5. Download and configure the CLI (ares).
  6. Install and configure the Developer Mode app on your TV. Turn on the app and enable both Dev Mode and Key Server.

Configuring the CLI (ares)

  1. Open a terminal and run:

    ares --version

    If it outputs a version number, the CLI is installed and configured correctly.

  2. Add your TV as a device by running:

    ares-setup-device my-lg 192.168.1.12 9922 prisoner

    Replace 192.168.1.12 with your TV’s IP address (found in the Network settings).

  3. Test the connection:

    ares-device -i my-lg

    If the output includes your TV details, the setup is successful.

Installing the Homebrew Channel

  1. Download the latest .ipk file from the Homebrew Channel releases page.
  2. Install the app using the following command:
    ares-install -d my-lg --verbose "/path/to/org.webosbrew.hbchannel_x.x.x_all.ipk"
    Replace /path/to/ with the actual path to the downloaded .ipk file.

Session Time Renewal

The Developer Mode app has a session expiration time. If it expires, all 3rd-party apps (like the Homebrew Channel) will be uninstalled. To avoid this, you can:

Manual Renewal

  1. Open the Developer Mode app on your TV.
  2. Click Extend Session Time before the session expires.

Automating Renewal with a Cron Job

To automate session renewal:

  1. Enable the Key Server in the Developer Mode app.

  2. Run the following command to download the Identity File:

    ares-novacom --device my-lg --getkey
  3. SSH into the TV:

    ssh -p 9922 prisoner@192.168.1.12 -i "~/.ssh/my-lg_key"

    Replace 192.168.1.12 and the file path with your own values.

  4. Retrieve the session token:

    cat /var/luna/preferences/devmode_enabled

    Copy the output (alphanumeric characters only).

  5. Add a cron job on another Linux machine:

    crontab -e
  6. Add the following line:

    0 0 * * * curl https://developer.lge.com/secure/ResetDevModeSession.dev?sessionToken=yourSessionTokenHere