webosbrew / webos-homebrew-channel Goto Github PK
View Code? Open in Web Editor NEWUnofficial webOS TV homebrew store and root-related tooling
License: MIT License
Unofficial webOS TV homebrew store and root-related tooling
License: MIT License
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?
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.
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
Build steps are currently pretty well documented in README.md
. We should make a github actions flow to automatically build and publish new releases.
On the latest version - it was working fine and now I get an error loading repo message..... Tried reinstalling.
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
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.
A placeholder message is currently displayed in package details panel description box due. Description is not currently specified in repository schema.
/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)
# 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":[]
}
]
}
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.
What I mean, is if trying to fetch something from the highest priority mirror fails, try another mirror.
Would probably conflict with #50
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...
ls-control scan-services
in elevate-service
to fixup broken root permissions after a first reboot
scan-volatile-dirs
doesn't reload service definitions so two reboots are needed.palm://com.webos.bootManager/getBootStatus
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.elevate-service
- nohup &
to prevent it from being killedpstree+kill
in /install
call cancellation handler possibly?)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.getAppInfo
fails with {"returnValue":false,"errorText":"[object Object]"}
error on webOS 4.3 ??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
.
We need to build some infrastructure and rules for managing official webosbrew package repository.
Repository URL is hardcoded in application build. Some initial UI mockup is present in Settings screen, but this is uncompleted and disabled.
views/BrowserPanel
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
)
services/startup.sh
(run-parts
seems to be present on webOS 3.8 at least?)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?
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.
VmVyc2lvbiBiYXIgb24gc2V0dGluZ3MgcGFnZSBpcyBjdXJyZW50bHkgd2lyZWQgdXAgZm9yIHNo
b3dpbmcgYSBwb3B1cC4gV2UgY2FuIGFkZCBzb21lIGludGVyZXN0aW5nIGVhc3RlciBlZ2cgb3Zl
ciB0aGVyZS4gKGhvbWVicmV3LWNoYW5uZWwgc3R5bGUgYnViYmxlcyBhbmltYXRpb24/KQ==
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.
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.
Some system of signing .ipk
's is an interesting addition.
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 are my options if I want to get ahold of and/or install an "LG store app" from a different region?
We are currently only supporting unauthenticated telnet-based remote access. We should prefer some safer solution by default - like SSH.
/media/developer
?)/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?ares-install
and other SDK toolshi,
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.
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.
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.
Please add to your application the ability to install my ipk - unofficial app store for LG (Russia) - Dstore. The package is located http://msx.lh1.in/ipk/dstorevip.ipk
Logo http://webosapp.club/images/dstore.png
Currently /tmp/incoming.ipk
is hardcoded in service - this needs to be fixed before release.
Please read conditions below carefully, and don't delete this part. Invalid issues will be closed.
Issue content starts below this line
I switched on the flag to block system updates.
But the TV still told me that an update is available and should be installed - every time I switched it on...
LG OLED48C17LB with WebOS 6.2
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
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
https://developer.lge.com/secure/ResetDevModeSession.dev?sessionToken=${sessionToken}
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.
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.
Some graphical assets can be created / redone / chosen.
Older WebOS TVs have an expired root certificate for self signed Let'sEncrypt websites.
It would be nice if you could integrate this as a new feature switch to homebrew settings.
(A small change is needed as for now the bash script interferes with update blocking feature of homebrew).
Thx
Right now we support scp and rsync. winscp seems to require sftp to work properly. (also scp is slowly getting deprecated in openssh world...)
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.
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)
Please, check this url not working ---> https://dropbox.inf.re/retroarch-webos/
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 expiresAlso 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.
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.
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.
Make a file manager.
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...
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.
@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
ls-control scan-services
run in start-devmode.sh
on every boot was causing a bus crashsleep 2
back to sleep 3
sometimes helped (?)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 upelevate-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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.