Toon firmware - update script

Forum about the Toon firmware, and its extensions

Moderators: marcelr, TheHogNL, Toonz

Post Reply
TheHogNL
Forum Moderator
Forum Moderator
Posts: 2125
Joined: Sun Aug 20, 2017 8:53 pm

Toon firmware - update script

Post by TheHogNL »

Hi all,
This post is all about the update script. Please post all your questions here.

This script upgrades a rooted Toon using the original Eneco sources.
A valid openvpn config is necessary for this (on most Toons there is one, only broken Toons are missing this).

It will restore the iptables/passwd files for you after the update. And it will block any other Eneco traffic so the modifications made in the scsync file (for the subscriptions) will not be overwritten.

Put the file somewhere on your toon and run it. It will be asking you to which version you want to update. The available versions are checked at the link
https://raw.githubusercontent.com/ToonS ... onversions

Also after upgrading you need to fix a few things on your Toon to see your rooted-Toon-apps again. For example reinstall Toonstore to fix the Project file and edit the Globals file to see your apps. This new version will try to do this for you but please check everything before rebooting after the upgrade!

Big disclaimer, the script has been tested only on a fewToons. I am not responsible for any bricked Toons if you use the script. :twisted:

Most recent version of the script is now at: https://github.com/ToonSoftwareCollective/update-rooted
Or the direct raw download from: https://raw.githubusercontent.com/ToonS ... -rooted.sh
Last edited by TheHogNL on Tue Sep 04, 2018 9:57 pm, edited 7 times in total.
Member of the Toon Software Collective
jozg
Member
Member
Posts: 56
Joined: Wed Nov 15, 2017 1:13 pm

Re: Toon firmware - update script

Post by jozg »

Hello Thehog,

Good work!.
I managed to update my both toons (my live and test toon) to 4.13.6 with your script version 1.2.
But when i try to use the 1.4 version of your script, i receive the following error debug information:

Unable to determine your current running version!
DEBUG information:
base-qb2-uni - 4.13.6-1214-0
END DEBUG information

I start the script with the sh update-rooted.sh command.

Thanks.

Regards,
michel30
Member
Member
Posts: 286
Joined: Fri Aug 25, 2017 4:42 pm

Re: Toon firmware - update script

Post by michel30 »

Hello,

I think that you have this issue is that you already running 4.13.6 on your two Toons.

But lets wait for TheHogNL who create this nice scrip.
TheHogNL
Forum Moderator
Forum Moderator
Posts: 2125
Joined: Sun Aug 20, 2017 8:53 pm

Re: Toon firmware - update script

Post by TheHogNL »

Could you try this one? Contains more debug information and a fallback avaliable versions list if the online source is unavailable for your Toon.

My guess is that your Toon can not download the list somehow.

Try to run this part of the script manually.

Code: Select all

/usr/bin/curl -Ns "http://pasted.co/d2a9b1dc/fullscreen.php?hash=7f3c5519bc393541f90eef84a46b85f8&toolbar=true&linenum=false" | /usr/bin/tr '\n\r' ' ' | /bin/sed 's/.*STARTTOONVERSIONS//' | /bin/sed 's/#ENDTOONVERSIONS.*//'
and if the result is empty, run

Code: Select all

/usr/bin/curl -Ns "http://pasted.co/d2a9b1dc/fullscreen.php?hash=7f3c5519bc393541f90eef84a46b85f8&toolbar=true&linenum=false"
also try another source which I'm looking to use in the script:

Code: Select all

/usr/bin/curl -Nks "https://notepad.pw/raw/6fmm2o8ev"
edit: version deleted
Last edited by TheHogNL on Thu Mar 08, 2018 9:34 pm, edited 2 times in total.
Member of the Toon Software Collective
jozg
Member
Member
Posts: 56
Joined: Wed Nov 15, 2017 1:13 pm

Re: Toon firmware - update script

Post by jozg »

Hello TheHog,

Thanks for reply.
Here is the output:

Code: Select all

/usr/bin/curl -Ns "http://pasted.co/d2a9b1dc/fullscreen.php?hash=7f3c5519bc393541f90eef84a46b85f8&toolbar=true&linenum=false" | /usr/bin/tr '\n\r' ' ' | /bin/sed 's/.*STARTTOONVERSIONS//' | /bin/sed 's/#ENDTOONVERSIONS.*//'
Output:<script type='text/javascript'>if(parent) { parent.location = "http://pasted.co/d2a9b1dc"; } else { window.location = "http://pasted.co/d2a9b1dc"; }</script>

Code: Select all

/usr/bin/curl -Ns "http://pasted.co/d2a9b1dc/fullscreen.php?hash=7f3c5519bc393541f90eef84a46b85f8&toolbar=true&linenum=false"
Output: <script type='text/javascript'>if(parent) { parent.location = "http://pasted.co/d2a9b1dc"; } else { window.location = "http://pasted.co/d2a9b1dc"; }</script>

Code: Select all

/usr/bin/curl -Nks "https://notepad.pw/raw/6fmm2o8ev"
[/quote]

Output: <pre style="word-wrap: break-word;white-space: pre-wrap;">#STARTTOONVERSIONS
1.9.10
2.1.0
2.2.24
2.3.17
2.3.29
2.3.36
2.4.12
2.5.11
2.5.14
2.5.18
2.6.24
2.6.33
2.8.16
2.8.21
2.9.15
2.9.26
3.0.29
3.0.32
3.1.22
3.2.14
3.2.18
3.3.8
3.4.4
3.5.4
3.6.3
3.7.8
3.7.9
4.3.20
4.4.21
4.7.23
4.8.25
4.9.23
4.10.6
4.11.6
4.12.0
4.13.6
4.13.7

i have just tried the 1.6 version of the script, and now i receive this error:

Unable to determine your current running version!
DEBUG information:
Detected: 4.13.6
Available: <script type='text/javascript'>if(parent) { parent.location = "http://pasted.co/d2a9b1dc"; } else { window.location = "http://pasted.co/d2a9b1dc"; }</script>
base-qb2-uni - 4.13.6-1214-0
END DEBUG information


Thanks for helping!.

Regards,
TheHogNL
Forum Moderator
Forum Moderator
Posts: 2125
Joined: Sun Aug 20, 2017 8:53 pm

Re: Toon firmware - update script

Post by TheHogNL »

Ok, somehow the pasted.co url doesn't work for you. The other one works.

Try this versions which uses the other url.
Attachments
update-rooted-v1.7.zip
(3.15 KiB) Downloaded 750 times
Member of the Toon Software Collective
jozg
Member
Member
Posts: 56
Joined: Wed Nov 15, 2017 1:13 pm

Re: Toon firmware - update script

Post by jozg »

Hmmm strange.

I get this:
sh update-rooted.sh
=================================================================================================================================-=================================
Welcome to the rooted Toon upgrade script. This script will try to upgrade your Toon using your original connection with Eneco. It will start the VPN if necessary.
Please be advised that running this script is to your own risk!

Version: 1.7 - ThehogNL - 8-3-2018

===================================================================================================================================================================

You are currently running version 4.13.6

Which version do you want to upgrade to? You can look at the list of currently known Toon versions at http://pasted.co/d2a9b1dc
4.13.7
Alright, I will try to upgrade to 4.13.7
Tunnel is alive and configured. Now trying to download upgrade script...
Upgrade script downloaded. Ready for upgrade process.

So i've manually browse to http://pasted.co/d2a9b1dc on my pc, and gave manually the 4.13.7 in the script, as a input, and then the script (directly) stops and i get back the prompt.
TheHogNL
Forum Moderator
Forum Moderator
Posts: 2125
Joined: Sun Aug 20, 2017 8:53 pm

Re: Toon firmware - update script

Post by TheHogNL »

Owh my bad.. from there on the script exits because I was working on another change and didn't want my own Toon to upgrade yet :lol:

A new version 1.8 is now in the first post.
Member of the Toon Software Collective
jozg
Member
Member
Posts: 56
Joined: Wed Nov 15, 2017 1:13 pm

Re: Toon firmware - update script

Post by jozg »

Hello TheoHog,

Yesss, this one is working well on my test-toon.
Thanks for your patience.

Regards,
TheHogNL
Forum Moderator
Forum Moderator
Posts: 2125
Joined: Sun Aug 20, 2017 8:53 pm

Re: Toon firmware - update script

Post by TheHogNL »

I'm not the only one having patience :lol: good luck upgrading
Member of the Toon Software Collective
atlantica
Starting Member
Starting Member
Posts: 34
Joined: Fri Mar 02, 2018 10:46 am

Re: Toon firmware - update script

Post by atlantica »

Can you add the following at the and of your script?

Code: Select all

Bij een toon met sw versie 3.0.29 en hoger kun je deze waarschuwingen 
onderdrukken door de volgende file te editen:

/HCBv2/qml/apps/internetSettings/InternetSettingsApp.qml

Lokaliseer de volgende regels (regel 365 of daar in de buurt):


                onNotificationReceived : {
                        var statemachine = message.getArgument("statemachine");
                        if (statemachine) {
                                var prevSmStatus = smStatus;     
                                smStatus = parseInt(statemachine);
// voeg de volgende twee regels toe:
// al_n (20151220):                 
                                if(smStatus == _ST_INTERNET) {
                                    smStatus = _ST_TUNNEL;
                                }
//
// vervolg van het originele bestand:
                               // Trigger the internetStateChange signal, used by the internet settings overview screen
                                internetStateChange(smStatus);
It resolves the message of no connection to the servicecentre
Regards

David
michel30
Member
Member
Posts: 286
Joined: Fri Aug 25, 2017 4:42 pm

Re: Toon firmware - update script

Post by michel30 »

@atlantica
You will receive this message one time, if you click on it than it will close and you don't see the message no connection to the service centre.

This was fix by Toon with the two latest firmware versions.
RomMon
Starting Member
Starting Member
Posts: 44
Joined: Mon Aug 29, 2016 9:05 pm

Re: Toon firmware - update script

Post by RomMon »

@TheHogNL

Doesn't it make sense to add a md5sum check on the downloaded upgrade-qb2.sh file?
TheHogNL
Forum Moderator
Forum Moderator
Posts: 2125
Joined: Sun Aug 20, 2017 8:53 pm

Re: Toon firmware - update script

Post by TheHogNL »

I am indeed thinking of adding some fixes after a succesfull upgrade. Like fixing the Globals file, the ST_TUNNEL and some more.

Checking the md5sum with a hardcoded hash in the script doesn't work as it would break if Eneco changes the script a bit.
There is a gpg signature on the same server where the script is downloaded from so I could use that.
However, I think it is very unlikely that the script will be downloaded incorrectly or modified by a malicious user. So putting effort into the script to check this has no real value to me.
Member of the Toon Software Collective
atlantica
Starting Member
Starting Member
Posts: 34
Joined: Fri Mar 02, 2018 10:46 am

Re: Toon firmware - update script

Post by atlantica »

@michel30
When i upgrade to the latest firmware I had to add these lines manualy. The upgrade removes these lines...
Regards

David
Post Reply

Return to “Toon Firmware”