Skip to content

Instantly share code, notes, and snippets.

@AkdM
Last active October 19, 2025 20:53
Show Gist options
  • Select an option

  • Save AkdM/c1571b2b0577f1bdb16011eb9b905803 to your computer and use it in GitHub Desktop.

Select an option

Save AkdM/c1571b2b0577f1bdb16011eb9b905803 to your computer and use it in GitHub Desktop.
LG webOS cheatsheet

Context

I have a LG OLED 65C1, now rooted with RootMyTV v2. I have been hacking around exploring all the possibilities, and this gist is thus a personal cheatsheet.

Commands

๐Ÿ”„ "Stealth" reboot

If ever your TV goes into servicing at LG for whatever reason, it would be better to have every chances to your sides by not allowing them seeing you made some "not covered" stuff to the TV. A reboot command can be detected, so there's an alternative. But it has to be confirmed yet if it's really stealth or not.

Please however note the following from @Informatic. But we don't know if LG can do something about it:

LG Content Store is periodically queried for software updates of all installed applications (including homebrew/developer and system apps, app ids and versions are transmitted)

luna-send -a webosbrew -f -n 1 luna://com.webos.service.sleep/shutdown/machineReboot '{"reason":"remoteKey"}'

๐Ÿ“ธ Make a screenshot (from here)

luna-send -n 1 -f 'luna://com.webos.service.capture/executeOneShot' '{"path":"/tmp/capture.png", "method": "DISPLAY", "format": "PNG"}'
  • Supported formats: BMP, JPG, PNG, RGB, RGBA, YUV422
  • Supported methods: SCREEN/DISPLAY (alias?), SCREEN_WITH_SOURCE_VIDEO, VIDEO, GRAPHIC, SOURCE/SCALER (alias?)
  • Defaults to 960x540, but you can provide width and height parameters: "height": 2160, "width": 3840
  • Note: com.webos.service.capture can also be com.webos.service.tv.capture on some devices, call signature is the same.
  • Note 2: this is also available over SSAP as: ssap://tv/executeOneShot - returns imageUri attribute with HTTP link)

With current date:

luna-send -n 1 -f 'luna://com.webos.service.capture/executeOneShot' "{\"path\":\"/home/root/capture_`date "+%d-%m-%y_%H-%M-%S"`.png\",\"method\":\"DISPLAY\",\"format\":\"PNG\",\"height\":2160,\"width\":3840}"

๐Ÿ“ Get logs from an app (from @TBSniller on Discord)

Replace hyperion-webos by the app you want to read the logs

$ luna-send -n 1 -f luna://com.webos.service.config/setConfigs '{"configs": {"system.collectDevLogs": true}}'
$ PmLogCtl set hyperion-webos debug
$ tail -F /var/log/messages | grep hyperion-webos

## After that start capture using PicCap and let it run for a few secounds. After that copy content from terminal in somewhere, or redirect directly using
$ tail -F /var/log/messages | grep hyperion-webos > /tmp/hyperion-webos.log

โžก๏ธ Add/remove application as input

Add:

luna-send-pub -n 1 'luna://com.webos.service.eim/addDevice' '{"appId":"app-id", "pigImage":""}'

Remove:

luna-send-pub -n 1 'luna://com.webos.service.eim/deleteDevice' '{"appId":"app-id", "pigImage":""}'

The app needs to have "supportGIP":true to its appinfo.json. If added later, you need to reboot the TV.


๐Ÿ‘ com.webos.app.home research (webOS 6.x)

  • Launch in half mode
luna-send -n 1 -f luna://com.webos.service.applicationmanager/launch '{"id": "com.webos.app.home", "params":{"activateType": "powerOn"}}'

โ„น๏ธ instart mode (not tested yet)


๐Ÿ”Š Power on optical audio

With a soundbar or similar that only has optical or AUX as input, there's no way to power on or off the device other than with sending an IR command. That command works only when the remote has been configured so it can power on the device with its IR, and when the remote is pointing at the device obviously.

luna-send -n 1 -f luna://com.webos.service.irdbmanager/sendIrCommand '{ "buttonState": "single", "deviceType": "audio", "keyCode": "IR_KEY_POWER" }'


Credits & references:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment