Fully automated rooting script

Everything about rooting Toons 1 and 2.

Moderators: marcelr, TheHogNL, TerrorSource, Toonz

Re: Fully automated rooting script

Postby TheHogNL » Thu Mar 21, 2019 3:55 pm

Factory reset isn't necessary. This will only disable your activation and remove all history. Activation can be forced enabled after rooting ofcourse but as it is not necessary just leave it as it is.
Member of the Toon Software Collective
User avatar
TheHogNL
Forum Moderator
Forum Moderator
 
Posts: 1027
Joined: August 2017

Re: Fully automated rooting script

Postby Plumifrons » Fri Mar 22, 2019 1:17 pm

Yesterday I've rooted my Toon with the script from @martenjacobs with a RPI-1. No errors, everything seemed fine.

However, I came across some issues that will probably related to my failure to do something first-time-right ;-)

1. I can only connect to my toon by issuing "sudo ssh -i id_rsa root@10.0.0.4" when I'm in exactly the correct folder where the ToonRooter-script is. I just want to be able to connect by ssh with just a (strong!) password, from any source within my network.

2. Connection from domoticz isn't working. At first I got a 403-error. After fidling around, I've installed the toonstore and that error is gone. However; next error a 404 - Not Found. Progress! But not the kind that is helpfull for me.

http://TOON_IP (the url is immediately rewritten to http://TOON_IP/qmf/www/, is that supposed to happen?)
404 - Not Found
http://TOON_IP/happ_thermstat?action=getThermostatInfo
404 - Not Found

Any hints? I've a 5.0.4-version in case that matters...
Plumifrons
Starting Member
Starting Member
 
Posts: 2
Joined: March 2019

Re: Fully automated rooting script

Postby TheHogNL » Fri Mar 22, 2019 1:43 pm

Generate a password for your Toon on this site:

https://unix4lyfe.org/crypt/

Fill in your plaintext password (twice) hit randomize for the DES Salt
and then hit Calculate next to DES crypt. This will generate a DES crypted
version of your password. Copy this DES crypt result and use it below.

Locate the password file /etc/passwd and edit the line:

root:DISABLED:0:0:root:/root:/bin/sh or root:SOME-OTHER-ENCRYPTED-PASSWORD:0:0:root:/root:/bin/sh

to read:

root:YOUR-DES-CRYPT-RESULT:0:0:root:/root:/bin/sh

and save. Otherwise you won't get in. This will set the root password to the
one you have generated. You can always change this later using the same method.
Member of the Toon Software Collective
User avatar
TheHogNL
Forum Moderator
Forum Moderator
 
Posts: 1027
Joined: August 2017

Re: Fully automated rooting script

Postby HenkDeTank » Wed Apr 03, 2019 8:36 am

Hi,

Perhaps I'm a total noob, but I'm trying to follow the instructions on the GitHub page. However, under the section 'How to use it?', how do I actually connect the Raspberry Pi to the debugging header on the Toon? Does anyone perhaps have a picture of their Raspberry Pi properly attached to the Toon?

Thanks :)
HenkDeTank
Starting Member
Starting Member
 
Posts: 3
Joined: April 2019

Re: Fully automated rooting script

Postby TheHogNL » Wed Apr 03, 2019 4:37 pm

You just need jumper wires (dupont wires) to connect the Pi to the Toon using the pin layout in the README (under how to use it). Not sure what is unclear about that :-)
Member of the Toon Software Collective
User avatar
TheHogNL
Forum Moderator
Forum Moderator
 
Posts: 1027
Joined: August 2017

Re: Fully automated rooting script

Postby RichardGorter » Mon Apr 15, 2019 7:14 am

I think ít's my stupidity, I rooted with this video https://www.youtube.com/watch?v=0ojFe4Q7vDs.
I used the USB Blaster, I could get in the Toon. And changed the parameters. Tested the toon, and had a lot of more applications/option.
But then I couldn't run the update script.

I have put back the Toon to all the standard parameters, now I'm trying to root the Toon with a raspberry PI 1.
With this automated rooting script. But I can't get connection with the Toon like the USB Blaster.

I'm not sure if i got the serial actived right on the raspberry.

So how do I activate this commando in de Toon? with the raspberry?

sudo apt install python-serial python-cryptography
git clone https://github.com/martenjacobs/ToonRooter.git
cd ToonRooter
sudo python . --jtag-available

I'm now just running the script on the raspberry, not on the Toon.


This is my U-Boot version - 2010.09-R8
RichardGorter
Starting Member
Starting Member
 
Posts: 9
Joined: April 2019

Re: Fully automated rooting script

Postby TerrorSource » Mon Apr 15, 2019 8:23 am

RichardGorter wrote:I think ít's my stupidity, I rooted with this video https://www.youtube.com/watch?v=0ojFe4Q7vDs.
I used the USB Blaster, I could get in the Toon. And changed the parameters. Tested the toon, and had a lot of more applications/option.
But then I couldn't run the update script.

I have put back the Toon to all the standard parameters, now I'm trying to root the Toon with a raspberry PI 1.
With this automated rooting script. But I can't get connection with the Toon like the USB Blaster.

I'm not sure if i got the serial actived right on the raspberry.

So how do I activate this commando in de Toon? with the raspberry?

sudo apt install python-serial python-cryptography
git clone https://github.com/martenjacobs/ToonRooter.git
cd ToonRooter
sudo python . --jtag-available

I'm now just running the script on the raspberry, not on the Toon.


This is my U-Boot version - 2010.09-R8


Well, the steps on the github page and here in the topic should be enough.
Rooting script should run on the Pi.
TerrorSource
Member
Member
 
Posts: 274
Joined: May 2017

Re: Fully automated rooting script

Postby RichardGorter » Tue Apr 16, 2019 7:33 pm

Okay I figured out the problem, the serial output of the raspberry wasn't right. After checking the connection 3 times and setting the raspberry in the right configuration I could run the script.

pi@raspberrypi:~ $
pi@raspberrypi:~ $
pi@raspberrypi:~ $ sudo apt install python-serial python-cryptography
Pakketlijsten worden ingelezen... Klaar
Boom van vereisten wordt opgebouwd
De statusinformatie wordt gelezen... Klaar
python-cryptography is reeds de nieuwste versie (1.7.1-3+b2).
python-serial is reeds de nieuwste versie (3.2.1-1).
0 opgewaardeerd, 0 nieuw geïnstalleerd, 0 te verwijderen en 13 niet opgewaardeerd.
pi@raspberrypi:~ $ git clone https://github.com/martenjacobs/ToonRooter.git
fatal: destination path 'ToonRooter' already exists and is not an empty directory.
pi@raspberrypi:~ $ cd ToonRooter
pi@raspberrypi:~/ToonRooter $ sudo python . --jtag-available
INFO:__main__:Starting up...
INFO:__main__:Detected JTAG hardware 'rpi1'
INFO:__main__:Written private and public key pair to ./id_rsa and ./id_rsa.pub, respectively
INFO:rooter:Waiting for Toon to restart
INFO:rooter:Toon has U-Boot version 2010.09-R8
INFO:rooter:Using password to log in
INFO:rooter:Logging in to U-Boot
INFO:rooter:Patching U-Boot
INFO:rooter:Waiting for boot up
INFO:rooter:Transferring payload
INFO:rooter:Patching Toon
INFO:rooter:>>> Enabling root user. Your root password is: 57N2SE0L
INFO:rooter:>>> Opening ports 22, 80 and 10080 on firewall
INFO:rooter:>>> Disable VPN on boot
INFO:rooter:>>> Installing dropbear
INFO:rooter:>>> Installing openssh-sftp-server
INFO:rooter:Cleaning up
INFO:rooter:Rebooting
INFO:rooter:Your Toon is now rooted. Please wait for it to boot up and try to log in using SSH

I tried o log in with.

pi@raspberrypi:~ $ ssh root@192.168.178.234
ssh: connect to host 192.168.178.234 port 22: No route to host

Put back the screen on the Toon put it wasn't rooted. What should I try? Run the update script?
RichardGorter
Starting Member
Starting Member
 
Posts: 9
Joined: April 2019

Re: Fully automated rooting script

Postby TheHogNL » Tue Apr 16, 2019 9:04 pm

No route to host? That means that your PI can't even get any ARP response from your Toon. Check your wifi connection.
With a non rooted Toon you will get connection timed out.
Member of the Toon Software Collective
User avatar
TheHogNL
Forum Moderator
Forum Moderator
 
Posts: 1027
Joined: August 2017

Re: Fully automated rooting script

Postby RichardGorter » Wed Apr 17, 2019 6:03 pm

Alright I'm getting further every day. But today I made a mistake.

So I let te script run again, this time the Toon connected to the router.

This was the result:

pi@raspberrypi:~ $ sudo apt install python-serial python-cryptography
Pakketlijsten worden ingelezen... Klaar
Boom van vereisten wordt opgebouwd
De statusinformatie wordt gelezen... Klaar
python-cryptography is reeds de nieuwste versie (1.7.1-3+b2).
python-serial is reeds de nieuwste versie (3.2.1-1).
0 opgewaardeerd, 0 nieuw geïnstalleerd, 0 te verwijderen en 13 niet opgewaardeerd.
pi@raspberrypi:~ $ git clone https://github.com/martenjacobs/ToonRooter.git
fatal: destination path 'ToonRooter' already exists and is not an empty directory.
pi@raspberrypi:~ $ cd ToonRooter
pi@raspberrypi:~/ToonRooter $ sudo python . --jtag-available
INFO:__main__:Starting up...
INFO:__main__:Detected JTAG hardware 'rpi1'
INFO:__main__:Written private and public key pair to ./id_rsa and ./id_rsa.pub, respectively
INFO:rooter:Waiting for Toon to restart
INFO:rooter:Toon has U-Boot version 2010.09-R8
INFO:rooter:Using password to log in
INFO:rooter:Logging in to U-Boot
INFO:rooter:Patching U-Boot
INFO:rooter:Waiting for boot up
INFO:rooter:Transferring payload
INFO:rooter:Patching Toon
INFO:rooter:>>> Enabling root user. Your root password is: PNZRWZCG
INFO:rooter:>>> Opening ports 22, 80 and 10080 on firewall
INFO:rooter:>>> Disable VPN on boot
INFO:rooter:>>> Installing dropbear
INFO:rooter:>>> Installing openssh-sftp-server
INFO:rooter:Cleaning up
INFO:rooter:Rebooting
INFO:rooter:Your Toon is now rooted. Please wait for it to boot up and try to log in using SSH
pi@raspberrypi:~/ToonRooter $ ssh root@192.168.178.234
ssh: connect to host 192.168.178.234 port 22: No route to host
pi@raspberrypi:~/ToonRooter $ ssh root@192.168.178.234
ssh: connect to host 192.168.178.234 port 22: No route to host
pi@raspberrypi:~/ToonRooter $ ssh root@192.168.178.234
ssh: connect to host 192.168.178.234 port 22: No route to host
pi@raspberrypi:~/ToonRooter $ ssh root@192.168.0.102
The authenticity of host '192.168.0.102 (192.168.0.102)' can't be established.
RSA key fingerprint is SHA256:I+DcNE5XYtSjmVaAIvT1y2ygYaYHI+Q8in+S71PI4+o.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.0.102' (RSA) to the list of known hosts.
root@192.168.0.102's password:
eneco-001-171151:~#

Started the Toon with the screen on, no result. So I thought maybe a factory reset. (Stupid idea).

When I start the Toon i'm stuck at STAP 2.1 Internet. I cannot connect to Toon to the wifi anymore :(

Do you guys have another idea?
RichardGorter
Starting Member
Starting Member
 
Posts: 9
Joined: April 2019

Re: Fully automated rooting script

Postby TheHogNL » Wed Apr 17, 2019 7:35 pm

Did you connect the wifi cables correctly?
You can also try with a UTP cable
Member of the Toon Software Collective
User avatar
TheHogNL
Forum Moderator
Forum Moderator
 
Posts: 1027
Joined: August 2017

Re: Fully automated rooting script

Postby RichardGorter » Wed Apr 17, 2019 9:13 pm

There is no option in the screen for UTP.
RichardGorter
Starting Member
Starting Member
 
Posts: 9
Joined: April 2019

Re: Fully automated rooting script

Postby marcelr » Wed Apr 17, 2019 9:39 pm

Just plug it in at the bottom of your toon and connect to a router.
marcelr
Global Moderator
Global Moderator
 
Posts: 1061
Joined: May 2012
Location: Ehv

Re: Fully automated rooting script

Postby RichardGorter » Thu Apr 18, 2019 5:26 am

Yes i did that, then I booted the Toon. I get the startup screen and have to select a wifi network I cant select UTP.
RichardGorter
Starting Member
Starting Member
 
Posts: 9
Joined: April 2019

Re: Fully automated rooting script

Postby TheHogNL » Thu Apr 18, 2019 6:47 am

You can't select a WIFI or it just does not connect?

Just plugin a UTP, it will automatically overrule the WIFI
Member of the Toon Software Collective
User avatar
TheHogNL
Forum Moderator
Forum Moderator
 
Posts: 1027
Joined: August 2017

PreviousNext

Return to Toon Rooting

Who is online

Users browsing this forum: No registered users and 1 guest

cron