{"id":20163989,"url":"https://github.com/webosbrew/webos-homebrew-channel","last_synced_at":"2025-05-14T23:06:19.661Z","repository":{"id":37390009,"uuid":"349449792","full_name":"webosbrew/webos-homebrew-channel","owner":"webosbrew","description":"Unofficial webOS TV homebrew store and root-related tooling","archived":false,"fork":false,"pushed_at":"2025-02-26T09:40:30.000Z","size":2679,"stargazers_count":1001,"open_issues_count":21,"forks_count":52,"subscribers_count":35,"default_branch":"main","last_synced_at":"2025-04-13T20:39:13.984Z","etag":null,"topics":["enyo","webos"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/webosbrew.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["informatic","throwaway96"],"ko_fi":"throwaway96"}},"created_at":"2021-03-19T14:24:23.000Z","updated_at":"2025-04-13T19:09:31.000Z","dependencies_parsed_at":"2023-01-31T07:45:15.950Z","dependency_job_id":"33ac05c2-71b6-4fa4-8e4d-465c8cc295d5","html_url":"https://github.com/webosbrew/webos-homebrew-channel","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webosbrew%2Fwebos-homebrew-channel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webosbrew%2Fwebos-homebrew-channel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webosbrew%2Fwebos-homebrew-channel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webosbrew%2Fwebos-homebrew-channel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webosbrew","download_url":"https://codeload.github.com/webosbrew/webos-homebrew-channel/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254243360,"owners_count":22038046,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["enyo","webos"],"created_at":"2024-11-14T00:32:48.202Z","updated_at":"2025-05-14T23:06:14.649Z","avatar_url":"https://github.com/webosbrew.png","language":"JavaScript","funding_links":["https://github.com/sponsors/informatic","https://github.com/sponsors/throwaway96","https://ko-fi.com/throwaway96"],"categories":["others"],"sub_categories":[],"readme":"webos-homebrew-channel\n======================\n\n![image](https://user-images.githubusercontent.com/13520633/149569503-c9e13f40-ec44-43f0-b330-94a8a26081e5.png)\n\nFeatures\n--------\n\n* Independent webOS package repository\n    * Homebrew discovery, installation \u0026 updates\n* Support for multiple repositories (outside of official\n  [repo.webosbrew.org](https://repo.webosbrew.org)\n\n* (root) Root execution service that can be easily used by webOS homebrew\n  developers without a need of separate privilege escalation handling (`luna://org.webosbrew.hbchannel.service/exec`)\n* (root) Disable some telemetry\n* (root) Startup user hooks (executable scripts present in `/var/lib/webosbrew/init.d` are run on bootup)\n* (root) Remote access\n    * SSH - public key authenticated (with default `alpine` password until\n      authorized keys are provisioned)\n    * Telnet - unauthenticated, use sparingly\n* (root) Failsafe mode\n    * In case a device crashes on boot only an emergency shell will be exposed\n      via telnet. In order to disable it fix the original crash cause and remove\n      `/var/luna/preferences/webosbrew_failsafe` flag file.\n\nInstallation\n------------\n\n## Updating\n**If you already have Homebrew Channel installed** just launch Homebrew Channel\nand select \"Homebrew Channel\" on apps browser view. \"Update\" button should be\nclickable if an update is available for your installation.\n\nIf you need to reinstall any app for any reason press \"5\" button on app details\nscreen and \"Update\" button should change to \"Reinstall\" (and get enabled if it\nwasn't before)\n\n## Automated (recommended)\nLatest Homebrew Channel version is automatically installed when rooting a TV\nwith most of working exploits. See https://cani.rootmy.tv or https://www.webosbrew.org/rooting/ for compatability.\n\n## Automated\nExecute the following snippet on target TV using SSH or Telnet:\n```sh\ncurl -L https://raw.githubusercontent.com/webosbrew/webos-homebrew-channel/main/tools/install.sh | sh -\n\n# Update startup script (assuming running as root)\ncp /media/developer/apps/usr/palm/services/org.webosbrew.hbchannel.service/startup.sh /var/lib/webosbrew/startup.sh\n```\n\n## Manual\n* Download [latest release\n  `.ipk`](https://github.com/webosbrew/webos-homebrew-channel/releases/)\n* Install it using `ares-install` SDK command or using the following command\n  directly on a TV:\n  ```sh\n  luna-send-pub -i 'luna://com.webos.appInstallService/dev/install' '{\"id\":\"com.ares.defaultName\",\"ipkUrl\":\"/tmp/path/to/hbchannel.ipk\",\"subscribe\":true}'\n  ```\n* (root) Elevate privileges by running:\n  ```sh\n  /media/developer/apps/usr/palm/services/org.webosbrew.hbchannel.service/elevate-service\n  ```\n* (root) Update startup script:\n  ```sh\n  cp /media/developer/apps/usr/palm/services/org.webosbrew.hbchannel.service/startup.sh /var/lib/webosbrew/startup.sh\n  ```\n\nInterfaces\n----------\n\n## Luna service\n\nThis application exposes a Luna service that may be used by other homebrew\napplications on Rooted devices:\n\n### `luna://org.webosbrew.hbchannel.service/install`\nDownload, verify and install an application.\n\n**Arguments:**\n\n* `ipkUrl` [string] - HTTP(s) URL for `ipk` application to install\n* `ipkHash` [string] - SHA256 checksum of downloaded `ipk` application\n* `subscribe` [boolean] - subscribe for status updates\n\n**Returns:**\n\n* `finished` [boolean] - returns `true` when application has been fully\n  installed\n* `statusText` [string] - current status/progress message\n* `progress` [number] - percentage download progress\n\n### `luna://org.webosbrew.hbchannel.service/exec`\nRoot code execution - this *may* not execute as root, if a device is not rooted.\n\n**Arguments:**\n\n* `command` [string] - command to execute\n\n**Returns:**\n\n* `error` [string] - error that may have occured\n* `stdoutString` [string] - stdout as a unicode string representation\n* `stdoutBytes` [string] - stdout as a base64 representation\n* `stderrString` [string] - stderr as a unicode string representation\n* `stderrBytes` [string] - stderr as a base64 representation\n\n### `luna://org.webosbrew.hbchannel.service/spawn`\nRoot code execution, spawn a long-running process - this *may* not execute as\nroot, if a device is not rooted.\n\n**Arguments:**\n\n* `command` [string] - command to execute\n\n**Returns:**\n\n* `type` [string] - one of `stdoutData`, `stderrData`, `close`, `exit`\n    * `stdoutData` - data incoming on stdout pipe\n        * `stdoutString` [string] - stdout as a unicode string representation\n        * `stdoutBytes` [string] - stdout as a base64 representation\n    * `stderrData` - data incoming on stderr pipe\n        * `stderrString` [string] - stderr as a unicode string representation\n        * `stderrBytes` [string] - stderr as a base64 representation\n    * `close` - child process closed all its stdio streams\n        * `closeCode` [number] - exit code\n    * `exit` - child proess ended\n        * `exitCode` [number] - exit code\n\n### `luna://org.webosbrew.hbchannel.service/getAppInfo`\n`luna://com.webos.applicationManager/getAppInfo` call replicated using\ndevmode-only endpoints.\n\n## Repository management\n\nwebOS application (or remote device, via SSAP) may request Homebrew Launcher to\nadd an external repository, by launching it with the following launch params:\n\n```json\n{\n    \"launchMode\": \"addRepository\",\n    \"url\": \"https://url-to-repository.com\"\n}\n```\n\nThis will automatically jump to Settings view and open up \"Add repository\"\nprompt with URL filled in.\n\nThis can be tested by using `ares-launch` as follows:\n```sh\nares-launch org.webosbrew.hbchannel -p '{\"launchMode\":\"addRepository\",\"url\":\"https://google.com\"}'\n```\n\nDevelopment\n-----------\n\n### Environment\nSome libraries used by this project are submodules of this repository. Use\nfollowing command when cloning:\n```sh\ngit clone --recursive https://github.com/webosbrew/webos-homebrew-channel\n```\n\nAll required development packages are distributed via npm. In order to install\nthem in a local directory run:\n```sh\nnpm install\n```\n\n### Technology stack\nFrontend is based on last development version of [enyo](https://github.com/enyojs).\n(dated january 2017) While this definitely is not the cool and jazzy latest\ntechnology, it provides us with a sensible UI toolkit for TV-based application\nthat seems to work pretty well with versions of webOS as old as 1.x. We are\ncurrently using enyo built-in `enyo-dev` packager. This requires us to write\ncode that'll be run directly on target platforms (no babel/transpilation of newer\nES dialects - no arrow functions, no const, no promises, etc.). In the future\nwe may migrate to some webpack-based solution around that.\n\nService is packaged using webpack \u0026 babel, thus, with enough shims and patches,\nwe can write and use some modern ES features (like Promises, arrow functions,\nasync functions, const, etc.) while targeting NodeJS 0.10 (used on earliest\nwebOS versions)\n\n### Development TV setup\n\n#### Configuring @webosose/ares-cli with Developer Mode App\nThis is partially based on: https://webostv.developer.lge.com/develop/app-test/using-devmode-app/\n* Install Developer Mode app from Content Store\n* Enable developer mode, enable keyserver\n* Download TV's private key: `http://TV_IP:9991/webos_rsa`\n* Configure the device using `ares-setup-device` (`-a` may need to be replaced with `-m` if device named `webos` is already configured)\n  * `PASSPHRASE` is the 6-character passphrase printed on screen in developer mode app\n```sh\nares-setup-device -a webos -i \"username=prisoner\" -i \"privatekey=/path/to/downloaded/webos_rsa\" -i \"passphrase=PASSPHRASE\" -i \"host=TV_IP\" -i \"port=9922\"\n```\n\n#### Configuring @webosose/ares-cli with rooted TV\n* Enable sshd in Homebrew Channel app\n* Generate ssh key on developer machine (`ssh-keygen`)\n* Copy the public key (`id_rsa.pub`) to `/home/root/.ssh/authorized_keys` on TV\n* Configure the device using `ares-setup-device` (`-a` may need to be replaced with `-m` if device named `webos` is already configured)\n```sh\nares-setup-device -a webos -i \"username=root\" -i \"privatekey=/path/to/id_rsa\" -i \"passphrase=SSH_KEY_PASSPHRASE\" -i \"host=TV_IP\" -i \"port=22\"\n```\n\n**Note:** @webosose/ares-cli doesn't need to be installed globally - you can use a package installed locally after `npm install` in this repo by just prefixing above commands with local path, like so: `node_modules/.bin/ares-setup-device ...`\n\n### Frontend development\nEnyoJS is able to watch for frontend changes, but does not expose a HTTP server.\n\n```sh\nnpm run build -- --watch\n\n# ...in a separate terminal:\npython -m http.server -d dist/\n```\n\n### Production build\n```sh\nrm -rf dist \u0026\u0026 npm run build -- --production \u0026\u0026 npm run build-service -- --env production \u0026\u0026 npm run package\n```\n\n### Full application testing / deployment\n```sh\nrm -rf dist \u0026\u0026 npm run build \u0026\u0026 npm run build-service \u0026\u0026 npm run package \u0026\u0026 npm run deploy \u0026\u0026 npm run launch\nssh root@10.0.0.2 -p 9922 /media/developer/apps/usr/palm/services/org.webosbrew.hbchannel.service/elevate-service\n```\n\n### Service testing\n```sh\nnpm run build-service \u0026\u0026 \\\n    cat dist/services/service.js | ssh root@10.0.0.2 -p 9922 sh -c 'cat \u003e /media/developer/apps/usr/palm/services/org.webosbrew.hbchannel.service/service.js \u0026\u0026 pkill -f org.webosbrew.hbchannel.service'\nssh root@10.0.0.2 /media/developer/apps/usr/palm/services/org.webosbrew.hbchannel.service/run-js-service -k -n /media/developer/apps/usr/palm/services/org.webosbrew.hbchannel.service\n```\n\n### Update startup.sh script\n```sh\ncp /media/developer/apps/usr/palm/services/org.webosbrew.hbchannel.service/startup.sh /var/lib/webosbrew/startup.sh\n```\n\n### Release engineering\n```sh\nnpm version minor\ngit push origin main --tags\n```\n\n### Testing\nBefore every release following features should be verified:\n\n* Releases with startup.sh updates:\n  * A single \"/var/lib/webosbrew/startup.sh updated!\" or\n    \"/media/cryptofs/apps/usr/palm/services/com.palmdts.devmode.service/start-devmode.sh\n    updated!\" notification should pop up on first Homebrew Channel launch *once*.\n  * Further app launches should *not* show any other notifications (unless\n    Homebrew Channel is rolled back to some older version)\n\n* Non-installed app info page:\n  * Install button should be enabled\n  * Launch button should be disabled\n  * \"Project page\" and inline application description links should be clickable\n    and should open system browser\n  * After clikcing \"Install\" button should transform into a progress bar\n  * Installation should finish with \"Application installed: Application Name\" -\n    no other notifications should be shown.\n  * After installation \"Launch\" button should be enabled, \"Install\" button\n    should be disabled and called \"Completed\"\n\n* Installed app info page:\n  * Update button should be disabled\n  * Launch button should be enabled and should launch selected application\n  * After pressing remote button 5 disabled \"Update\" button should transform to\n    enabled \"Reinstall\" button. Clicking it should perform usual package\n    installation.\n  * Uninstall button should be enabled and should remove an application when\n    pressed.\n  * On Homebrew Channel app info page Launch and Uninstall buttons shoud always\n    be *disabled*.\n  * If an update is available for application \"Version\" should show eg. \"0.1.2\n    (installed: 0.1.0)\"\n\n* Homebrew Channel Self-update - reinstall/update can be force-enabled by\n  pressing remote button 5 on Homebrew Channel app page.\n  * Self-update should show the following notifications:\n    * Performing self-update...\n    * Performing self-update (inner)\n    * Elevating...\n    * Self-update finished!\n  * \"Package info fetch failed: ...\" notification should *not* be shown.\n\n* Settings page:\n  * Root status should show \"ok\"\n  * \"System reboot\" button should perform a full system reboot\n  * \"Add repository\" button should show an URL text prompt. Entering an invalid\n    url \"aaa\" and going back to main page should show \"An error occured while\n    downloading some repositories: aaa (0)\". Main page should still be\n    navigatable and applications should be installable. Pressing on \"aaa\"\n    repository in settings should remove it from the list.\n  * Switching off all repositories (Default repository / Extra non-free\n    software) and going back to main page should produce an empty page without\n    any errors. Going back to settings and enabling these back again should\n    populate main apps list page back again.\n  * Switching \"Root Configuration\" options should not show any errors. \"Root\n    Configuration\" option values should be saved immediately - after going back\n    to main page, then going to settings again - these should show correct\n    values, as last set on the settings page. (a second ago)\n    After pressing \"System reboot\" apropriate configuration should get applied.\n\n* Root execution service:\n  * Homebrew using `/exec` and other endpoints should work correctly. Good\n    testing target is \"Custom Screensaver\" app since it uses plain `/exec` calls\n    without going through its own service.\n\n* Autostart:\n  * On TVs without persistent script boot hook (eg. crashd) Telnet/sshd should\n    be accessible (when enabled) *before launching Homebrew Channel itself*.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebosbrew%2Fwebos-homebrew-channel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebosbrew%2Fwebos-homebrew-channel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebosbrew%2Fwebos-homebrew-channel/lists"}