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.
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.
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.
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.
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
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 7:58 pm, edited 1 time in total.
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