2.7 KiB
2.7 KiB
name, description
| name | description |
|---|---|
| sam-usage | use this skill whenever you need to work on webOS TV Board to launch,stop,list running/installed applications |
SAM (System Application Manager) — Usage
SAM is the webOS daemon responsible for running and installing/removing
applications. It exposes a Luna bus service named com.webos.applicationManager
(compat aliases: com.webos.service.applicationmanager,
com.webos.service.applicationManager).
Where things live
| Item | Location |
|---|---|
| Binary | /usr/sbin/sam |
| systemd unit | sam.service (starts after ls-hubd.service, surface-manager.service) |
| Luna service name | com.webos.applicationManager |
| Dev-only category | /dev (only when devmode enabled) |
Tooling
SAM is driven over the Luna bus. The standard CLI is luna-send / luna-send-pub
(shipped by the luna-service2 package). Use -pub to talk over the public bus
and -n 1 to wait for exactly one reply:
luna-send -n 1 <uri> '<json-payload>'
Uri starts with luna://
You should wait several seconds for the response performed with direct ssh exec
Basic commands
| Operation | Luna method | Example |
|---|---|---|
| Launch an app | launch |
luna-send -n 1 luna://com.webos.applicationManager/launch '{"id":"com.webos.app.enactbrowser"}' |
| Stop an app | close / closeByAppId |
luna-send -n 1 luna://com.webos.applicationManager/close '{"id":"com.webos.app.enactbrowser"}' |
| List running apps | running |
luna-send -n 1 luna://com.webos.applicationManager/running '{}' |
| List installed apps | listApps |
luna-send -n 1 luna://com.webos.applicationManager/listApps '{}' |
| App status | getAppStatus |
luna-send -n 1 luna://com.webos.applicationManager/getAppStatus '{"appId":"com.webos.app.enactbrowser"}' |
| App info | getAppInfo |
luna-send -n 1 luna://com.webos.applicationManager/getAppInfo '{"id":"com.webos.app.enactbrowser"}' |
| List launch points | listLaunchPoints |
luna-send -n 1 luna://com.webos.applicationManager/listLaunchPoints '{}' |
Notes
- Launch accepts
id(appId),launchPointId, orinstanceId(relaunch). Optional params:params,target,noSplash,keepAlive,preload, etc. - Stop (
close) identifies the app byid(appId) orinstanceId;closeByAppIdrequiresid. Both are equivalent toclose. - running returns an array under
running; supportssubscribe. - listApps returns an array under
apps; supportssubscribeand an optionalpropertiesarray to select fields. - The
/devcategory (com.webos.applicationManager/dev/...) exposesclose,closeByAppId,listApps,running,managerInfoand is only available when devmode is enabled.