Code Monkey home page Code Monkey logo

webos-homebrew-channel's Introduction

webos-homebrew-channel

image

Features

  • Independent webOS package repository

    • Homebrew discovery, installation & updates
  • Support for multiple repositories (outside of official repo.webosbrew.org

  • (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

Updating

If you already have Homebrew Channel installed just launch Homebrew Channel and select "Homebrew Channel" on apps browser view. "Update" button should be clickable if an update is available for your installation.

If you need to reinstall any app for any reason press "5" button on app details screen and "Update" button should change to "Reinstall" (and get enabled if it wasn't before)

Automated (recommended)

Latest Homebrew Channel version is automatically installed when rooting a TV with https://rootmy.tv exploit.

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 (assuming running as root)
cp /media/developer/apps/usr/palm/services/org.webosbrew.hbchannel.service/startup.sh /var/lib/webosbrew/startup.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 /var/lib/webosbrew/startup.sh

Interfaces

Luna service

This application exposes a Luna service that may be used by other homebrew applications on Rooted devices:

luna://org.webosbrew.hbchannel.service/install

Download, verify and install an application.

Arguments:

  • ipkUrl [string] - HTTP(s) URL for ipk application to install
  • ipkHash [string] - SHA256 checksum of downloaded ipk application
  • subscribe [boolean] - subscribe for status updates

Returns:

  • finished [boolean] - returns true when application has been fully installed
  • statusText [string] - current status/progress message
  • progress [number] - percentage download progress

luna://org.webosbrew.hbchannel.service/exec

Root code execution - this may not execute as root, if a device is not rooted.

Arguments:

  • command [string] - command to execute

Returns:

  • error [string] - error that may have occured
  • stdoutString [string] - stdout as a unicode string representation
  • stdoutBytes [string] - stdout as a base64 representation
  • stderrString [string] - stderr as a unicode string representation
  • stderrBytes [string] - stderr as a base64 representation

luna://org.webosbrew.hbchannel.service/spawn

Root code execution, spawn a long-running process - this may not execute as root, if a device is not rooted.

Arguments:

  • command [string] - command to execute

Returns:

  • type [string] - one of stdoutData, stderrData, close, exit
    • stdoutData - data incoming on stdout pipe
      • stdoutString [string] - stdout as a unicode string representation
      • stdoutBytes [string] - stdout as a base64 representation
    • stderrData - data incoming on stderr pipe
      • stderrString [string] - stderr as a unicode string representation
      • stderrBytes [string] - stderr as a base64 representation
    • close - child process closed all its stdio streams
      • closeCode [number] - exit code
    • exit - child proess ended
      • exitCode [number] - exit code

luna://org.webosbrew.hbchannel.service/getAppInfo

luna://com.webos.applicationManager/getAppInfo call replicated using devmode-only endpoints.

Repository management

webOS application (or remote device, via SSAP) may request Homebrew Launcher to add an external repository, by launching it with the following launch params:

{
    "launchMode": "addRepository",
    "url": "https://url-to-repository.com"
}

This will automatically jump to Settings view and open up "Add repository" prompt with URL filled in.

This can be tested by using ares-launch as follows:

ares-launch org.webosbrew.hbchannel -p '{"launchMode":"addRepository","url":"https://google.com"}'

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)

Development TV setup

Configuring @webosose/ares-cli with Developer Mode App

This is partially based on: https://webostv.developer.lge.com/develop/app-test/using-devmode-app/

  • Install Developer Mode app from Content Store
  • Enable developer mode, enable keyserver
  • Download TV's private key: http://TV_IP:9991/webos_rsa
  • Configure the device using ares-setup-device (-a may need to be replaced with -m if device named webos is already configured)
    • PASSPHRASE is the 6-character passphrase printed on screen in developer mode app
ares-setup-device -a webos -i "username=prisoner" -i "privatekey=/path/to/downloaded/webos_rsa" -i "passphrase=PASSPHRASE" -i "host=TV_IP" -i "port=9922"

Configuring @webosose/ares-cli with rooted TV

  • Enable sshd in Homebrew Channel app
  • Generate ssh key on developer machine (ssh-keygen)
  • Copy the public key (id_rsa.pub) to /home/root/.ssh/authorized_keys on TV
  • Configure the device using ares-setup-device (-a may need to be replaced with -m if device named webos is already configured)
ares-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"

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 ...

Frontend development

EnyoJS is able to watch for frontend changes, but does not expose a HTTP server.

npm run build -- --watch

# ...in a separate terminal:
python -m http.server -d dist/

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] /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

Update startup.sh script

cp /media/developer/apps/usr/palm/services/org.webosbrew.hbchannel.service/startup.sh /var/lib/webosbrew/startup.sh

Release engineering

npm version minor
git push origin main --tags

Testing

Before every release following features should be verified:

  • Releases with startup.sh updates:

    • A single "/var/lib/webosbrew/startup.sh updated!" or "/media/cryptofs/apps/usr/palm/services/com.palmdts.devmode.service/start-devmode.sh updated!" notification should pop up on first Homebrew Channel launch once.
    • Further app launches should not show any other notifications (unless Homebrew Channel is rolled back to some older version)
  • Non-installed app info page:

    • Install button should be enabled
    • Launch button should be disabled
    • "Project page" and inline application description links should be clickable and should open system browser
    • After clikcing "Install" button should transform into a progress bar
    • Installation should finish with "Application installed: Application Name" - no other notifications should be shown.
    • After installation "Launch" button should be enabled, "Install" button should be disabled and called "Completed"
  • Installed app info page:

    • Update button should be disabled
    • Launch button should be enabled and should launch selected application
    • After pressing remote button 5 disabled "Update" button should transform to enabled "Reinstall" button. Clicking it should perform usual package installation.
    • Uninstall button should be enabled and should remove an application when pressed.
    • On Homebrew Channel app info page Launch and Uninstall buttons shoud always be disabled.
    • If an update is available for application "Version" should show eg. "0.1.2 (installed: 0.1.0)"
  • Homebrew Channel Self-update - reinstall/update can be force-enabled by pressing remote button 5 on Homebrew Channel app page.

    • Self-update should show the following notifications:
      • Performing self-update...
      • Performing self-update (inner)
      • Elevating...
      • Self-update finished!
    • "Package info fetch failed: ..." notification should not be shown.
  • Settings page:

    • Root status should show "ok"
    • "System reboot" button should perform a full system reboot
    • "Add repository" button should show an URL text prompt. Entering an invalid url "aaa" and going back to main page should show "An error occured while downloading some repositories: aaa (0)". Main page should still be navigatable and applications should be installable. Pressing on "aaa" repository in settings should remove it from the list.
    • Switching off all repositories (Default repository / Extra non-free software) and going back to main page should produce an empty page without any errors. Going back to settings and enabling these back again should populate main apps list page back again.
    • Switching "Root Configuration" options should not show any errors. "Root Configuration" option values should be saved immediately - after going back to main page, then going to settings again - these should show correct values, as last set on the settings page. (a second ago) After pressing "System reboot" apropriate configuration should get applied.
  • Root execution service:

    • Homebrew using /exec and other endpoints should work correctly. Good testing target is "Custom Screensaver" app since it uses plain /exec calls without going through its own service.
  • Autostart:

    • On TVs without persistent script boot hook (eg. crashd) Telnet/sshd should be accessible (when enabled) before launching Homebrew Channel itself.

webos-homebrew-channel's People

Contributors

davidbuchanan314 avatar informatic avatar kitsuned avatar kopiro avatar ledoge avatar mariotaku avatar rhinoswirl avatar ruthenic avatar stek29 avatar throwaway96 avatar tuxuser avatar zopieux avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

webos-homebrew-channel's Issues

Toast notification

Toast notification upon app installation would look more friendly if displays app title instead of id.
image

sshd support

We are currently only supporting unauthenticated telnet-based remote access. We should prefer some safer solution by default - like SSH.

  • Bundle static dropbear sshd binary with the app
  • Figure out emergency situations (do we fall back to enabling telnetd in case homebrew channel gets removed, or do we copy over required binaries to some known location outside of /media/developer?)
  • Authentication bootstraping problem
    • We have no way of overlaying /etc/shadow to set some default root password for a user (yet) - can we make dropbear accept unauthenticated users unless authorized_keys has been populated?
  • Ensure this works well enough with ares-install and other SDK tools

Homebrew updates notification

Currently only way of seeing that some homebrew package has a pending update is going to its details panel. It'd be nice to either have a separate view with pending updates, or have some sort of overlay icon on browser list items when there's an update available.

With current repository schema it is not trivial to achieve, as package version is only exposed in package manifest, so we'd need to download package manifests of all installed apps separately from a repository.

Package signing

Some system of signing .ipk's is an interesting addition.

ls-hubd crashes after patching permissions

@rhinoswirl noticed some weird behaviour after manually applying changes in #24 on a device running webOS 4.3.0-9703 / 20210107010305 / HE_DTV_W18A_AFADABAA

  • Likely ls-control scan-services run in start-devmode.sh on every boot was causing a bus crash
  • Changing sleep 2 back to sleep 3 sometimes helped (?)
  • After commenting out elevate-service call a factory reset screen popped up, but wasn't able to progress through the language/country selection screen (likely ls-hubd crash), telnetd was still up
  • After nuncommenting the elevate-service call and a reboot a factory reset screen was on again, but it was possible to progress further, telnetd was still up.
  • ares-install was causing a crash as well, if permissions were set to all

This needs some further investingation and testing on other webOS versions.

Startup script updates

Currently start-devmode.sh script is mostly used for early bootup. We want this to not be a symlink but a copy, in case homebrew channel gets accidentally removed. Currently this is (will be) manually deployed during exploit / first homebrew channel install, but there's no way of updating it.

This should be acomplished by comparing a sha256sum of app-bundled startup.sh to a checksum of start-devmode.sh script, and a popup should be shown on Homebrew Channel startup in case these don't match.

  • Script sha256sum verification on Homebrew Channel startup
  • UI popup with update confirmation
  • Testing

Question: Chrome or Firefox?

Shooting from the hip as this might be the wrong place to ask.
Is there any work to bring Chrome or Firefox to the repo?

I know the webos browser is based on Chrome, but its not very up to date and lack extension support.

what happen? channels is down

some minutes spacious post on tv - "Loading..." .
then error message at down:
An error occurred while downloading some repositories: https://repo. webosbrew. org/api/app. json(0)

All settings is default and never was changed.

Configurable repository URLs

Repository URL is hardcoded in application build. Some initial UI mockup is present in Settings screen, but this is uncompleted and disabled.

  • Multiple repository URLs configuration in Settings page
    • Default repository rendered as a toggle?
    • Question on first Homebrew Channel startup whether or not to enable default repository (privacy!)
  • Pulling in multiple repositories in views/BrowserPanel
  • Testing

stage2 fails on missing service com.webos.downloadmanager

I end up with this on the TV screen:

start-devmod.sh: Downloading from undefined...
start-devmod.sh: Luna call failed: {"returnValue": false, "errorCode":-1,"errorText":"Service does not exists: com.webos.service.downloadmanager."}
Original start-devmod.sh overwrite failed, attempting v2 exploit...
extra_conf.sh: Downloading from undefined...
extra_conf.sh: Luna call failed: {"returnValue": false, "errorCode":-1,"errorText":"Service does not exists: com.webos.service.downloadmanager."

software version: 04.06.40
automatic updates are off.

localhost:3000 in web OS browser shows Hello world

I remember having removed a few Apps. Is it possible that com.webos.service.downloadmanager comes with an app I've removed ? If yes, and someone can identify it, I could try to re-install it.

Doesn't work on webOS 1.x

  • Frontend seems to work just fine
  • Service fails due to incompatiblity with nodejs 0.10.15 (or to be precise, incompatiblity of core-js with nodejs 0.10) Below is a crash dump of a development build of 2f34f5a:
/media/developer/apps/usr/palm/services/org.webosbrew.hbchannel.service/service.js:10838
      throw TypeError('Incompatible receiver, ' + TYPE + ' required');
            ^
TypeError: Incompatible receiver, Symbol required
    at TypeError (<anonymous>)
    at /media/developer/apps/usr/palm/services/org.webosbrew.hbchannel.service/service.js:10838:13
    at _Symbol.toString (/media/developer/apps/usr/palm/services/org.webosbrew.hbchannel.service/service.js:19390:12)
    at String (<anonymous>)
    at __webpack_modules__../node_modules/core-js/internals/an-object.js.module.exports (/media/developer/apps/usr/palm/services/org.webosbrew.hbchannel.service/service.js:7708:21)
    at Object.defineProperty [as f] (/media/developer/apps/usr/palm/services/org.webosbrew.hbchannel.service/service.js:19292:3)
    at __webpack_modules__../node_modules/core-js/internals/create-non-enumerable-property.js.module.exports.object.(anonymous function) (/media/developer/apps/usr/palm/services/org.webosbrew.hbchannel.service/service.js:9492:31)
    at set (/media/developer/apps/usr/palm/services/org.webosbrew.hbchannel.service/service.js:10872:5)
    at wrap (/media/developer/apps/usr/palm/services/org.webosbrew.hbchannel.service/service.js:19275:3)
    at Object.__webpack_modules__../node_modules/core-js/modules/es.symbol.js.wrappedWellKnownSymbolModule.f (/media/developer/apps/usr/palm/services/org.webosbrew.hbchannel.service/service.js:19402:12)
  • Automatic service elevation script doesn't work due to different ls2 config paths:
# cat /var/palm/ls2-dev/services/pub/org.webosbrew.hbchannel.service.service
[D-BUS Service]
Name=org.webosbrew.hbchannel.service
Exec=/usr/bin/run-js-service -n /media/developer/apps/usr/palm/services/org.webosbrew.hbchannel.service
Type=dynamic
# cat /var/palm/ls2-dev/services/prv/org.webosbrew.hbchannel.service.service
[D-BUS Service]
Name=org.webosbrew.hbchannel.service
Exec=/usr/bin/run-js-service -n /media/developer/apps/usr/palm/services/org.webosbrew.hbchannel.service
Type=dynamic
# cat /var/palm/ls2-dev/roles/pub/org.webosbrew.hbchannel.service.json
{
    "role": {
    "exeName":"js",
    "type": "regular",
    "allowedNames": ["org.webosbrew.hbchannel.service"]
    },
    "permissions": [
        {
         "service":"org.webosbrew.hbchannel.service",
                 "inbound":["*"],
         "outbound":["*"]
        }
    ]
}
# cat /var/palm/ls2-dev/roles/prv/org.webosbrew.hbchannel.service.json
{
    "role": {
    "exeName":"js",
    "type": "regular",
    "allowedNames": ["org.webosbrew.hbchannel.service"]
    },
    "permissions": [
        {
         "service":"org.webosbrew.hbchannel.service",
                 "inbound":["*"],
         "outbound":[]
        }
    ]
}

/etc/shadow overlay not working on webOS 2.x

The /etc/shadow overlay code in startup.sh fails to enable login as root on webOS 2.x due to differences in the shadow and passwd files:

/etc/passwd

root:*:0:0:root:/home/root:/bin/sh

/etc/shadow

root::18395:0:99999:7:::

From my understanding, the code in startup.sh assumes that the root account is only disabled via the second field in the /etc/shadow file, which is empty here, so nothing actually gets replaced. Additionally I think the * in /etc/passwd needs to be replaced with a x for the password to be read from /etc/shadow.

Non-root mode via localhost ssh

We most likely can access nduid as an application - we could in theory pull ssh key off local keyserver and use that to access local sshd on non-rooted systems.

Startup user hooks

Users will most probably want to have some commands run on bootup. We should make some infrastructure to allow them to safely add some sort of extra startup scripts without manually patching system startup script (eg. start-devmode.sh)

  • Proper directory needs to be chosen
  • Functionality needs to be implemented in services/startup.sh (run-parts seems to be present on webOS 3.8 at least?)
  • Documentation needs to be written about this
  • Extra: an ability for apps to register their own hooks that'd be removed/ignored on app removal

What is the correct way to uninstall your app from TV?

What is the correct way to uninstall your app from TV? Removed by standard means - now problems. I get root, the TV reboots, I go telnet, everything seems to be fine, I give reboot - reboot and there is no tenlet access. Problem.

Splash image and icon

Some graphical assets can be created / redone / chosen.

  • homescreen icon
  • homescreen icon background color
  • splash screen image
  • browser panel header background image?
  • readme header image / screenshots

Software update lock

We should add an option to lock software updates - so far following domains seem to be related:

  • snu.lge.com, su-dev.lge.com (update servers)
  • su.lge.com, su-ssl.lge.com (cdn)

An overlay of /etc/hosts should be sufficient.

Cleanup documentation

We need to make a list of paths that need to be cleaned up in case one wants to remove homebrew / root-related stuff from their TV.

  • /var/luna/preferences/webosbrew_*
  • /var/luna/preferences/devmode_enabled
  • /var/lib/webosbrew/*
  • /media/cryptofs/apps/usr/palm/services/com.palmdts.devmode.service/start-devmode.sh
  • /home/root/.*_history
  • /home/root/.ssh
  • /home/root/unwritable
  • /media/developer (default app data paths itself should be removed properly by standard appInstallService/remove call)
  • /var/luna-service2-dev - this doesn't seem to be cleaned up automatically when devmode session expires

Also factory reset behaviour needs to be studied - maybe that's the best solution.

Required steps could also be bundled in a convenient script deployed together with homebrew channel.

erorr installing

ares-install --device tv /home/rares/Downloads/org.webosbrew.hbchannel_0.2.1_all.ipk
ares-install ERR! Error: connect ECONNREFUSED 192.168.1.104:22

Supported webOS versions testing

Currently this has been only tested on webOS 3.3 and webOS 3.8.

Theoretically enyo should support webOS since 1.x, and service we build should work on nodejs 0.10, however this has not been tested yet.

[IDEA] Installing Apps on your USB or Thumb/Flash Drive

Please read conditions below carefully, and don't delete this part. Invalid issues will be closed.

  • No apps related to piracy or intellectual property infringement is allowed.
  • We can't guarantee if the app will be developed by anyone.
  • We encourage you to develop the app by yourself. This would be a great contribution to webOS homebrew community.
  • I understand conditions above
  • (Optional) I'd like to develop this app by myself

Issue content starts below this line


Problems with apps installation

Please help! I installed webos homebrew through the rootmytv, installed the applications, everything was ok. Today, I can`t install any application, in any way: neither through the IDE, nor through the home brew, nor even ordinary applications with a LG content store. Writes FAILED_IPKG_INSTALL and that's it. Reboot doesn't help. At the same time, the root did not fly off, there is access through ssh, through winscp and through the IDE. Webos 4.9. What to do?

ZWFzdGVyIGVnZw==

VmVyc2lvbiBiYXIgb24gc2V0dGluZ3MgcGFnZSBpcyBjdXJyZW50bHkgd2lyZWQgdXAgZm9yIHNo
b3dpbmcgYSBwb3B1cC4gV2UgY2FuIGFkZCBzb21lIGludGVyZXN0aW5nIGVhc3RlciBlZ2cgb3Zl
ciB0aGVyZS4gKGhvbWVicmV3LWNoYW5uZWwgc3R5bGUgYnViYmxlcyBhbmltYXRpb24/KQ==

Add mirrors

What I mean, is if trying to fetch something from the highest priority mirror fails, try another mirror.
Would probably conflict with #50

Block Content Store

Add an option to block out REGION.lgtvsdp.com domain and remove /mnt/lg/cmn_data/var/palm/data/com.webos.appInstallService/updateInfo during bootup as well. (to allow launches of already installed non-updated apps)

scp not working

Rel #5 - scp doesn't seem to work when connecting to our custom-built dropbear sshd. Likely some extra binary is missing. Needs investigation. (I think this was also broken on devmode sshd, so not really a new bug, but something definitely nice to have fixed)

Quick fix in case anyone stumbles upon this and needs to quickly pull/push a file:

cat local-path | ssh root@tv 'cat > remote-path'
ssh root@tv cat remote-path > local-path

Proper self-update handling

Turns out webOS 4.x+ properly kills services when updating applications. (SIGKILL via luna://com.webos.service.bus/closeService) This breaks our assumptions about self-updating based on 3.x primary development machines and causes some major pain with somewhat considerable user-base already...

  • Run ls-control scan-services in elevate-service to fixup broken root permissions after a first reboot
    • On webOS 4.x+ scan-volatile-dirs doesn't reload service definitions so two reboots are needed.
    • We need to check if #33 will not bite us again... Possibly need to wait for boot finish via palm://com.webos.bootManager/getBootStatus
  • Add a tip to do a reboot when Error: Unable to exec luna-send-pub: Error: connect ECONNREFUSED error happens during install or app is unelevated, but 127.0.0.1:9922 TCP port (devmode ssh) is closed.
  • Self-update helper script that waits for install finish and runs elevate-service - nohup & to prevent it from being killed
  • Figure out why all system processes are killed/half-broken reboot is triggered on existing self-update sometimes... (caused by pstree+kill in /install call cancellation handler possibly?) So this is a fairly wicked story. Reboot was not in fact a kill signal on init, but it was caused by ls-hubd crashing. Seems like on systems with manifests.d support all referenced files should not be modified - in that case ls-hubd would crash when all role was rolled back to public... We need to create a separate client-permissions.d/api-permissions.d file and append it to relevant manifests.d file (when it is present - older versions would automatically pull in all the files in /var/luna-service2-dev/*.d directories). The more I think about it, #33 was likely related to this.
  • Add magic key on app details page to force-update already intalled application (to ease up homebrew channel self-update testing in the long term) - just un-disabling update button should suffice.
  • Figure out why getAppInfo fails with {"returnValue":false,"errorText":"[object Object]"} error on webOS 4.3 ?? It was missing permissions/elevation - fixed error reporting in that case.

Package browser list icon placeholders

Enyo has a notion of image placeholders, but that's incompatible with images with transparency (it's set as a background-image of a wrapper on an image) so that the placeholder leaks through the icons.

It'd be great to get some placeholder in case of missing/broken icons.

We could also potentially add iconColor attribute to package manifest, equivalent to the one used on homescreen, to make the rendering more familiar. A random thought.

"Block system updates" not working; still seeing update notifications

In installed webos homebrew channel two weeks ago and since 2 days I am getting notes for firmware update to 05.20.15 for my tv on every normal tv start, after the started one time in failsafe mode.

webosbrew version 0.4.0
block system updates is activated since first day in webos and webosbrew.
failsafe mode is deactivated.

"board_type": "M19_DVB",
"hardware_id": "HE_DTV_W19H_AFADABAA",
"product_id": "OLED65B97LA",
"core_os_release": "4.9.5-6",
"webos_manufacturing_version": "05.20.06",

why is it showing the "there is a new firmware update for your lg tv" on every tv start?

Dropbear ssh not working

I rooted my tv months ago, and couldnt do anything with it really, there is no actually much homebrew going on...
Recently saw this homebrew channel, installed it (manually) and noticed that ssh is not working anymore, diagnosing it saw that the dropbear daemon can't be executed in my tv at all, this is the error:

/media/developer/apps/usr/palm/services/org.webosbrew.hbchannel.service/bin # ./dropbear 
./dropbear: /lib/libc.so.6: version `GLIBC_2.15' not found (required by ./dropbear)
./dropbear: /lib/libc.so.6: version `GLIBC_2.17' not found (required by ./dropbear)

My tv has a really ancient version of WebOs 1.4.0 IIRC that only works with the GetMeIn exploit

Output of uname -a
Linux LGSmartTV 3.10.19-32.afro.6 #1 SMP PREEMPT Fri Jun 28 03:44:13 UTC 2019 armv7l GNU/Linux

libc.so.6 --version output:
imagen

So what Im really asking is, how can I compile dropbear for this device, or get a binary specific for this one at least?
Help would be much apreciated

Automated builds

Build steps are currently pretty well documented in README.md. We should make a github actions flow to automatically build and publish new releases.

Failsafe mode notification pops up

After a power outage this notification popped up:

Failsafe mode! Open telnet and remove
/var/luna/preferences/webosbrew_failsafe

I did remove that file using telnet, and after rebooting the TV the message keeps popping up, appearing and then disappearing after some seconds, and coming up again later. Looking into the preferences folder, the webosbrew_failsafe file is gone and did not reappear.

Limited access to luna://com.webos.appInstallService/dev/install

I just got a report of a webOS 4.3 device where access to install method from homebrew channel app gets denied.

{ returnValue: false,
  errorCode: -1,
  errorText: 'Denied method call "install" for category "/dev"' }

This breaks our somewhat accidental support of unrooted devices, as we'll need to patch some ls2 permission files in elevation script to let use use these APIs.

Failsafe is always set after "cold" start

I have a brand new LG OLED48C17LB with WebOS 6.2.2 which I rooted and installed the homebrew app.

I always shutdown my TV with its remote (standby mode is not set) and then cut it from the power (socket-outlet with a switch).
When I then switch it on again, it always starts in failsafe mode (with annoying message at TV screen) and I have to switch it off manually in the homebrew app and reboot the device.
After that the failsafe mode is gone until I cut the device completely from power again...

Web Video Caster (LG PF50KG Prj.)

hi,
I appreciate your work. I have a webOS 3.0.8 projector(LG PF50KG ). but there is no LG Store. your rootmy.tv i did it with root. youtube etc. i have installed applications such as. tell me how to install applications such as netflix,Amazon, Web Video caster.

Mock system version in `sdx`

The case is that LG prevents Content Store/app installs if firmware is too old. We should probably find a way of persuading sdx we are running an arbitrary version.

webpack build infrastructure

There seems to be a webpack plugin that implements quirks required to properly bundle enyo projects:
https://www.npmjs.com/package/enyo-webpack-plugin

Using webpack instead of enyo-dev would be appreciated, since we could also use babel to streamline used syntax, and have better handling of certain issues. (eg. inexistent requires are sometimes missed by enyo-dev?)

This needs to be tested on our codebase, and possibly ported to newer webpack versions.

Fixup .ssh/authorized_keys permissions on startup

We disable password when .ssh/authorized_keys exist. However, there are situations where, with correct contents, these will not work properly:

[5767] Jan 11 00:00:06 /home/root/.ssh/authorized_keys must be owned by user or root, and not writable by others

We probably should chown/chmod that file on startup.

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.