Developer mode extend session time

Search This thread

badgerabroad

New member
Dec 1, 2019
1
1
Ive used developer mode to install my own custom app, however, the session time runs for 50 hours then removes my app, I can if I remember try to go back to dev mode and click extend but is there any way to leave this on permanently so that I can us my app without having to constantly extend the session? TV Software version is 03.01.06, thanks in advance.

Badger
 
  • Like
Reactions: dilkhus

schnills

Member
Dec 17, 2021
6
4
Hey,
old question, but someone may still need this.
This is for LG TVs with WebOS. Luckily, extending Dev Mode it's fairly easy and won't require root (which I preferred).
I spent some hours now trying to identify such a way and thanks to Neur0toxine I found an URL you can call periodically to reset the timer.
First of all, you need your session token. When you have enabled the developer mode, you have the passphrase, generated the ssh keys, etc.
Connect to your TV via ssh using

Code:
ssh -p 9922 -i ~/.ssh/{your_webos_key_file} [email protected]{ip_of_tv} -T

You need to set the port to 9922. -i references the ssh key. -T skips a "PTY allocation request failed on channel 0" error which might be confusing.
Enter the passphrase, when asked.
Now it probably seems that nothing has happened, as you're just in a new line and no location of execution is displayed like we're used to (maybe due to the PTY? dunno), but you can type commands. Try the ls command to check connection if you're not sure.
When connected, get the session token using:

cat /var/luna/preferences/devmode_enabled

From Neur0toxines repo I extracted two URLs.
This will check the time left in dev mode:
https://developer.lge.com/secure/CheckDevModeSession.dev?sessionToken={your_token}

This will reset the dev mode timer:
https://developer.lge.com/secure/ResetDevModeSession.dev?sessionToken={your_token}

So to keep your dev mode active, call the second URL within the 50 hours. I do so periodically using crontab on my raspberry. If you do not have a raspberry or another server, you may find a free online cronjob service for this purpose.

To call the URL every day at 3 AM I got into my raspberry, opened cronjobs using "crontab -e" and added the following line

0 3 * * * /usr/bin/curl --silent https://developer.lge.com/secure/ResetDevModeSession.dev?sessionToken={your_token} &>/dev/null

The first five symbols are minutes, hours, day of month, month, day of week. * = any.

I verified this workflow using my browser, but I just now finished setting everything up. So tomorrow I will see if it all worked automatically using crontab, but in general this should work. Any way to periodically call the URL should (unless there's something else to think of like a change in the token at some point but currently I won't assume that).

Then install the best app: YouTube Extend for WebOS and never see ads, in video sponsors and so on.
YouTube ads you made me do this. Spending all this evening to get this running. It has become unbearable :D
 
Last edited:

schnills

Member
Dec 17, 2021
6
4
Another option, if they should ever close the possibility to extend dev mode via this URL, would be installing their CLI to a raspberry and periodically execute the ares-extend command.
Till now I have not found any option to just permanently activate dev mode when connected via SSH for example by disabling the counter or whatever. This would be best for everyone not having a raspberry or else.
But as I'm quite happy with my current solution I have no motivation looking any deeper :D
 

Knausepeter

Member
Oct 18, 2016
8
2
Thank you very much! I
can confirm that your solution works. I have set up a cron job on my PiHole and can now enjoy YouTube ad-free without manually resetting the devmode time every day.🥳
 
  • Like
Reactions: schnills

ns6000

Member
Jun 9, 2018
9
1
When I call Check URL I see 38 hours remaining like in DevApp, so I call Reset URL and after that Check URL again and I get back 59 hours remaining, but I still see 38 hours remaining in DevApp even after killing the app and restarting TV. Does it work then?
 

ns6000

Member
Jun 9, 2018
9
1
So apparently, the timeout in the DevApp won't get updated, but as long as it's updated on LG's backend its ok and dev session won't timeout even if the app shows 00:00:00 time remaining...
 

schnills

Member
Dec 17, 2021
6
4
So apparently, the timeout in the DevApp won't get updated, but as long as it's updated on LG's backend its ok and dev session won't timeout even if the app shows 00:00:00 time remaining...
Ok good to hear. Was a bit confused when I realized it's not updated in the DevApp though backend is updated and wanted to dig deeper. So maybe it's a bug in the DevApp after an update because some time ago it reflected the time correctly.
 

inugoliath91

New member
Feb 6, 2022
4
0
Hello,

I have an old LG TV with WebOS 3.5.5. Is there a way to extend the Developer Mode while the TV is off ?

For example, the Developer Mode is on for 50h, and from time to time I will leave my TV off for more than 2 days. When I' turn it on, the Developer Mode is disabled.

It works by calling "ares-extend-dev" command while the TV is on, it brings up the DeveloperMode app and extends the time, which is fine..
 

schnills

Member
Dec 17, 2021
6
4
Hello,

I have an old LG TV with WebOS 3.5.5. Is there a way to extend the Developer Mode while the TV is off ?

For example, the Developer Mode is on for 50h, and from time to time I will leave my TV off for more than 2 days. When I' turn it on, the Developer Mode is disabled.

It works by calling "ares-extend-dev" command while the TV is on, it brings up the DeveloperMode app and extends the time, which is fine..

Well, yes. The way described above should work just fine. It calls the web-api on the lge server to extend the the time which seems to be checked by the developer app.
So I was away for like several weeks last year and had my rasperberry cronjob resetting session time each day and it was still active when I came back.
I think when I got my LG tv it also had some WebOS 3.xx Version at the beginning.
 
  • Like
Reactions: inugoliath91

inugoliath91

New member
Feb 6, 2022
4
0
Well, yes. The way described above should work just fine. It calls the web-api on the lge server to extend the the time which seems to be checked by the developer app.
So I was away for like several weeks last year and had my rasperberry cronjob resetting session time each day and it was still active when I came back.
I think when I got my LG tv it also had some WebOS 3.xx Version at the beginning.
It works perfect! Thank you for your quick response!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Hello,

    I have an old LG TV with WebOS 3.5.5. Is there a way to extend the Developer Mode while the TV is off ?

    For example, the Developer Mode is on for 50h, and from time to time I will leave my TV off for more than 2 days. When I' turn it on, the Developer Mode is disabled.

    It works by calling "ares-extend-dev" command while the TV is on, it brings up the DeveloperMode app and extends the time, which is fine..

    Well, yes. The way described above should work just fine. It calls the web-api on the lge server to extend the the time which seems to be checked by the developer app.
    So I was away for like several weeks last year and had my rasperberry cronjob resetting session time each day and it was still active when I came back.
    I think when I got my LG tv it also had some WebOS 3.xx Version at the beginning.
  • 3
    Hey,
    old question, but someone may still need this.
    This is for LG TVs with WebOS. Luckily, extending Dev Mode it's fairly easy and won't require root (which I preferred).
    I spent some hours now trying to identify such a way and thanks to Neur0toxine I found an URL you can call periodically to reset the timer.
    First of all, you need your session token. When you have enabled the developer mode, you have the passphrase, generated the ssh keys, etc.
    Connect to your TV via ssh using

    Code:
    ssh -p 9922 -i ~/.ssh/{your_webos_key_file} prison[email protected]{ip_of_tv} -T

    You need to set the port to 9922. -i references the ssh key. -T skips a "PTY allocation request failed on channel 0" error which might be confusing.
    Enter the passphrase, when asked.
    Now it probably seems that nothing has happened, as you're just in a new line and no location of execution is displayed like we're used to (maybe due to the PTY? dunno), but you can type commands. Try the ls command to check connection if you're not sure.
    When connected, get the session token using:

    cat /var/luna/preferences/devmode_enabled

    From Neur0toxines repo I extracted two URLs.
    This will check the time left in dev mode:
    https://developer.lge.com/secure/CheckDevModeSession.dev?sessionToken={your_token}

    This will reset the dev mode timer:
    https://developer.lge.com/secure/ResetDevModeSession.dev?sessionToken={your_token}

    So to keep your dev mode active, call the second URL within the 50 hours. I do so periodically using crontab on my raspberry. If you do not have a raspberry or another server, you may find a free online cronjob service for this purpose.

    To call the URL every day at 3 AM I got into my raspberry, opened cronjobs using "crontab -e" and added the following line

    0 3 * * * /usr/bin/curl --silent https://developer.lge.com/secure/ResetDevModeSession.dev?sessionToken={your_token} &>/dev/null

    The first five symbols are minutes, hours, day of month, month, day of week. * = any.

    I verified this workflow using my browser, but I just now finished setting everything up. So tomorrow I will see if it all worked automatically using crontab, but in general this should work. Any way to periodically call the URL should (unless there's something else to think of like a change in the token at some point but currently I won't assume that).

    Then install the best app: YouTube Extend for WebOS and never see ads, in video sponsors and so on.
    YouTube ads you made me do this. Spending all this evening to get this running. It has become unbearable :D
    1
    Ive used developer mode to install my own custom app, however, the session time runs for 50 hours then removes my app, I can if I remember try to go back to dev mode and click extend but is there any way to leave this on permanently so that I can us my app without having to constantly extend the session? TV Software version is 03.01.06, thanks in advance.

    Badger
    1
    Thank you very much! I
    can confirm that your solution works. I have set up a cron job on my PiHole and can now enjoy YouTube ad-free without manually resetting the devmode time every day.🥳
    1
    Hello,

    I have an old LG TV with WebOS 3.5.5. Is there a way to extend the Developer Mode while the TV is off ?

    For example, the Developer Mode is on for 50h, and from time to time I will leave my TV off for more than 2 days. When I' turn it on, the Developer Mode is disabled.

    It works by calling "ares-extend-dev" command while the TV is on, it brings up the DeveloperMode app and extends the time, which is fine..

    Well, yes. The way described above should work just fine. It calls the web-api on the lge server to extend the the time which seems to be checked by the developer app.
    So I was away for like several weeks last year and had my rasperberry cronjob resetting session time each day and it was still active when I came back.
    I think when I got my LG tv it also had some WebOS 3.xx Version at the beginning.