Code Monkey home page Code Monkey logo

webos-homebrew-channel's Introduction

webos-homebrew-channel

Features

  • Independent webOS package repository

    • Homebrew discovery, installation & updates
  • (root) Root execution service that can be easily used by webOS homebrew developers without a need of separate privilege escalation handling (luna://org.webosbrew.hbchannel.service/exec)

  • (root) Disable some telemetry

  • (root) Startup user hooks (executable scripts present in /var/lib/webosbrew/init.d are run on bootup)

  • (root) Remote access

    • SSH - public key authenticated (with default alpine password until authorized keys are provisioned)
    • Telnet - unauthenticated, use sparingly
  • (root) Failsafe mode

    • In case a device crashes on boot only an emergency shell will be exposed via telnet. In order to disable it fix the original crash cause and remove /var/luna/preferences/webosbrew_failsafe flag file.

Installation

Automated

Execute the following snippet on target TV using SSH or Telnet:

curl -L https://raw.githubusercontent.com/webosbrew/webos-homebrew-channel/main/tools/install.sh | sh -

# Update startup script
cp /media/developer/apps/usr/palm/services/org.webosbrew.hbchannel.service/startup.sh /media/cryptofs/apps/usr/palm/services/com.palmdts.devmode.service/start-devmode.sh

Manual

  • Download latest release .ipk
  • Install it using ares-install SDK command or using the following command directly on a TV:
    luna-send-pub -i 'luna://com.webos.appInstallService/dev/install' '{"id":"com.ares.defaultName","ipkUrl":"/tmp/path/to/hbchannel.ipk","subscribe":true}'`
  • (root) Elevate privileges by running:
    /media/developer/apps/usr/palm/services/org.webosbrew.hbchannel.service/elevate-service
  • (root) Update startup script:
    cp /media/developer/apps/usr/palm/services/org.webosbrew.hbchannel.service/startup.sh /media/cryptofs/apps/usr/palm/services/com.palmdts.devmode.service/start-devmode.sh

Development

Environment

Some libraries used by this project are submodules of this repository. Use following command when cloning:

git clone --recursive https://github.com/webosbrew/webos-homebrew-channel

All required development packages are distributed via npm. In order to install them in a local directory run:

npm install

Technology stack

Frontend is based on last development version of enyo. (dated january 2017) While this definitely is not the cool and jazzy latest technology, it provides us with a sensible UI toolkit for TV-based application that seems to work pretty well with versions of webOS as old as 1.x. We are currently using enyo built-in enyo-dev packager. This requires us to write code that'll be run directly on target platforms (no babel/transpilation of newer ES dialects - no arrow functions, no const, no promises, etc.). In the future we may migrate to some webpack-based solution around that.

Service is packaged using webpack & babel, thus, with enough shims and patches, we can write and use some modern ES features (like Promises, arrow functions, async functions, const, etc.) while targeting NodeJS 0.10 (used on earliest webOS versions)

Production build

rm -rf dist && npm run build -- --production && npm run build-service -- --env production && npm run package

Full application testing / deployment

rm -rf dist && npm run build && npm run build-service && npm run package && npm run deploy && npm run launch
ssh [email protected] -p 9922 /media/developer/apps/usr/palm/services/org.webosbrew.hbchannel.service/elevate-service

Service testing

npm run build-service && \
    cat dist/services/service.js | ssh [email protected] -p 9922 sh -c 'cat > /media/developer/apps/usr/palm/services/org.webosbrew.hbchannel.service/service.js && pkill -f org.webosbrew.hbchannel.service'
ssh [email protected] -p 9922 /usr/bin/run-js-service -k -n /media/developer/apps/usr/palm/services/org.webosbrew.hbchannel.service

Update start-devmode.sh script

cp /media/developer/apps/usr/palm/services/org.webosbrew.hbchannel.service/startup.sh /media/cryptofs/apps/usr/palm/services/com.palmdts.devmode.service/start-devmode.sh

Release engineering

npm version minor
git push origin main --tags

webos-homebrew-channel's People

Contributors

informatic avatar mariotaku avatar davidbuchanan314 avatar zopieux avatar rhinoswirl avatar kopiro avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.