# webOS

Since there's 2 LG TVs in the household, I figured I might as well make a separate page for them.

1. 55UH605V-ZC - 3.10.19-p.45.dharug.k2lp.2 - FW 05.30.60 - webOS 3.3.4
2. 55UK6200PLA - 4.4.84-p.84.gomolsha.lm18a.1 - OTA ID HE_DTV_W18A_AFADABAA - FW 05.50.15 - webOS 4.4.2

There's some ways to jailbreak some LG TVs - [XDA](https://forum.xda-developers.com/web-os/general/getmein-one-time-rooting-jailbreaking-t3887904), [RU forum](http://webos-forums.ru/post23624.html)

You can get SSH access by [following instructions here](https://forum.xda-developers.com/showpost.php?p=78753577&postcount=32).


cat /var/run/nyx/device_info.json - has mac addresses and TV model name among other things

cat /var/run/nyx/os_info.json - webOS version. The version the TV displays is FW version, not webOS version!

Code this as Base64 file called 'query" and execute the curl command to test connection to the update server
```XML
<REQUEST>
<PRODUCT_NM>webOSTV 4.0</PRODUCT_NM>
<MODEL_NM>HE_DTV_W18A_AFADABAA</MODEL_NM>
<SW_TYPE>FIRMWARE</SW_TYPE>
<MAJOR_VER>04</MAJOR_VER>
<MINOR_VER>10.45</MINOR_VER>
<COUNTRY>GB</COUNTRY>
<COUNTRY_GROUP>EU</COUNTRY_GROUP>
<DEVICE_ID>20:17:42:14:b7:43</DEVICE_ID>
<AUTH_FLAG>N</AUTH_FLAG>
<IGNORE_DISABLE>N</IGNORE_DISABLE>
<ECO_INFO>01</ECO_INFO>
<CONFIG_KEY>00</CONFIG_KEY>
<LANGUAGE_CODE>en-GB</LANGUAGE_CODE></REQUEST>
```

```bash
curl -X POST -A "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)" -d @query http://snu.lge.com/CheckSWAutoUpdate.laf
```

If query is wrong, server cuts connection - curl: (56) Recv failure: Connection reset by peer

Server also times out very often.

Queries and responses are Base64 encoded.


```bash
# Force ezAdjust menu open as per https://gist.github.com/Informatic/1983f2e501444cf1cbd182e50820d6c1#factory-mode--instart--instop
# Password is 0413
luna-send -n 1 -f luna://com.webos.service.applicationManager/launch '{"id":"com.webos.app.factorywin","params":{"id":"executeFactory","irKey":"ezAdjust"}}'
```