Fully automated rooting script

Everything about rooting Toons 1 and 2.

Moderator: marcelr

Re: Fully automated rooting script

Postby Markie13 » Thu May 10, 2018 7:54 am

marcelr wrote:It's not a JTAG problem. How do you load the custom bootloader through JTAG if you can't type anything in your serial console?


I open one console via Putty serial baud 115200
Other one via telnet 4444
And the last one an openocd console. So i have 3 consoles open.

The serial console is where i can see the password ect but cannot add some characters
Markie13
Starting Member
Starting Member
 
Posts: 11
Joined: May 2018

Re: Fully automated rooting script

Postby TheHogNL » Thu May 10, 2018 8:06 am

martenjacobs wrote:Hi everyone,

Over the last few days I've been busy working on a Python application that will automate the rooting process of Toon from a Raspberry Pi.
It supports rooting using just the serial port on Toons with U-Boot versions with a known password, and will use JTAG on any other Toon.

If you want to check it out, it's on GitHub.


Just posted a pull request for a modified version of your patching script so it will include a root password (which is 'password') instead of defaulting to no password.
TheHogNL
Member
Member
 
Posts: 441
Joined: August 2017

Re: Fully automated rooting script

Postby marcelr » Thu May 10, 2018 12:16 pm

@Markie13:

Sounds like a serial IO issue. Are you sure RxD and TxD are in the right place? Is your serial converter working properly with other hardware?
marcelr
Advanced Member
Advanced Member
 
Posts: 925
Joined: May 2012
Location: Ehv

Re: Fully automated rooting script

Postby Markie13 » Thu May 10, 2018 1:14 pm

marcelr wrote:@Markie13:

Sounds like a serial IO issue. Are you sure RxD and TxD are in the right place? Is your serial converter working properly with other hardware?


I will answer this in your topic Marcel
Markie13
Starting Member
Starting Member
 
Posts: 11
Joined: May 2018

Re: Fully automated rooting script

Postby RoadXY » Thu May 10, 2018 8:26 pm

I had the same problem. Turns out you have to connect ground in order to be able to send data to your Toon
RoadXY
Starting Member
Starting Member
 
Posts: 9
Joined: October 2015

Re: Fully automated rooting script

Postby martenjacobs » Fri May 11, 2018 10:33 am

Just posted a pull request for a modified version of your patching script so it will include a root password (which is 'password') instead of defaulting to no password.


After a minor change (password is now randomly generated on the fly due to security reasons) this is now merged. I'll try to make some time in the coming weeks to change the generation of an SSH key pair to an option. For most users, it's easier to use a password. Maybe I'll add an option to let the user specify the password as well.
martenjacobs
Starting Member
Starting Member
 
Posts: 25
Joined: March 2018

Re: Fully automated rooting script

Postby martenjacobs » Fri May 11, 2018 10:37 am

Markie13 wrote:
marcelr wrote:It's not a JTAG problem. How do you load the custom bootloader through JTAG if you can't type anything in your serial console?


I open one console via Putty serial baud 115200
Other one via telnet 4444
And the last one an openocd console. So i have 3 consoles open.

The serial console is where i can see the password ect but cannot add some characters


A thought: you're not leaving the consoles open while running the script, right? If the socket is in use while the script tries to write data to it, it'll probably cause I/O errors much like the ones you're experiencing.
martenjacobs
Starting Member
Starting Member
 
Posts: 25
Joined: March 2018

Re: Fully automated rooting script

Postby rickvnl » Tue May 15, 2018 9:16 pm

Ran this script a while ago when I bought a second hand Toon. Was perfect and had a rooted toon... since yesterday I guess.

There was an update said Toon and my girlfriend had hit the update button. Now my apps are gone. Is it unrooted now?
rickvnl
Starting Member
Starting Member
 
Posts: 8
Joined: April 2018

Re: Fully automated rooting script

Postby marcelr » Tue May 15, 2018 9:19 pm

Nope.

But you will have to add the apps manually to /qmf/qml/qb/base/Globals.qml again.
marcelr
Advanced Member
Advanced Member
 
Posts: 925
Joined: May 2012
Location: Ehv

Re: Fully automated rooting script

Postby Toonz » Tue May 15, 2018 9:57 pm

marcelr wrote:Nope.

But you will have to add the apps manually to /qmf/qml/qb/base/Globals.qml again.

But he cannot do this if the iptables config has been reset by the official update. I guess he will have to root again
Toonz
Advanced Member
Advanced Member
 
Posts: 716
Joined: December 2016

Re: Fully automated rooting script

Postby marcelr » Wed May 16, 2018 7:28 am

Toonz wrote:.. he cannot do this if the iptables config has been reset by the official update. I guess he will have to root again

Right. Forgot about that one...
marcelr
Advanced Member
Advanced Member
 
Posts: 925
Joined: May 2012
Location: Ehv

Re: Fully automated rooting script

Postby Prutzer » Sun Jun 24, 2018 6:05 pm

When is the new version with the option to disable the SSH key pair going to be released?

I tried the auto root with a raspberry pi 1 rev 2. I failed:

pi@raspberrypi:~/ToonRooter $ sudo python . --jtag-available
INFO:__main__:Starting up...
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: XXXXXX
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

But when i try to connect:
pi@raspberrypi:~/ToonRooter $ ssh -i id_rsa root@192.168.1.18
ssh: connect to host 192.168.1.18 port 22: Connection timed out

What am I doing wrong?
Prutzer
Starting Member
Starting Member
 
Posts: 7
Joined: February 2018

Re: Fully automated rooting script

Postby Prutzer » Sun Jun 24, 2018 7:15 pm

Fixed it.

When i use this pin layout it worked.

JTAG connector Toon --> Rapberry Pi GPIO (signal name)

1 --> NC (RTCK)
2 --> 24 (TRST)
3 --> 20 (GND)
4 --> 23 (TCK)
5 --> 6 or 25 (GND)
6 --> 22 (TMS)
7 --> 18 (SRST)
8 --> 19 (TDI)
9 --> NC (Vt)
10 --> 21 (TDO)

pi@raspberrypi:~/ToonRooter $ sudo python . --jtag-available
INFO:__main__:Starting up...
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: XXXXXXX
INFO:rooter:>>> Opening ports 22, 80 and 10080 on firewall
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

Thanks a lot! Nice script!
Last edited by Prutzer on Mon Jun 25, 2018 6:58 pm, edited 1 time in total.
Prutzer
Starting Member
Starting Member
 
Posts: 7
Joined: February 2018

Re: Fully automated rooting script

Postby marcelr » Mon Jun 25, 2018 7:49 am

Congrats, and thank you.

Good to see that people actually start reading when things don't work, instead of freaking out immediately.
There's many a forum that will envy us for that :mrgreen:
marcelr
Advanced Member
Advanced Member
 
Posts: 925
Joined: May 2012
Location: Ehv

Re: Fully automated rooting script

Postby martenjacobs » Tue Jun 26, 2018 7:48 am

Prutzer wrote:Fixed it.

When i use this pin layout it worked.
(...)


Isn't that the same pin layout as described everywhere :D ?
What did you use before and where did you get it from?
martenjacobs
Starting Member
Starting Member
 
Posts: 25
Joined: March 2018

PreviousNext

Return to Toon Rooting

Who is online

Users browsing this forum: No registered users and 1 guest