Skip to content

Conversation

@speed47
Copy link

@speed47 speed47 commented Oct 6, 2025

This fixes the autostart for webOS 3.0, as explained in webosbrew/webos-homebrew-channel#124 (comment)

I also added a GitHub workflow to automatically build and produce an artifact (.ipk) for each pull request. This artifact can be used to test/verify, and also copied over to a public release if needed, when code is merged to main. Artifacts are only downloadable by accounts with rights on the repository. If you're not comfortable with using GitHub actions for this repo, I can re-make the PR without the workflow.

Under webOS 3.0, there were 2 issues:

- The call to addDevice didn't work, because mandatory parameters are missing (I suspect they are optional under other versions of webOS)

- The call to addDevice only worked once, and failed afterwards because the app is already registered, and the code considered it a fatal error, so didn't go through and stopped before actually launching the hbchannel autostart service. Maybe under different versions of webOS, adding a pre-existing app through addDevice is considered a no-op by luna service and doesn't return an error, but under webOS 3.0 at least, this fails. Modify the code to recognize this exact error and consider it a success.

Added some comments and more logs to help debugging potential future cases.
Version 0.1.3 (and previous versions) were not working accross more
than two reboots, at least under webOS 3.4. This is because we get
relaunched only on the reboot immediately following a successful
addDevice call, so this version now ensures that we remove/re-add
ourselves from the input app list every time, which guarantees that
it works for all next reboots.

The relaunch of the previous input app is now done as soon as possible,
because this is what gives back control to the user, while we can continue
our setup in the background.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant