Fully automated rooting script

Everything about rooting Toons 1 and 2.

Moderators: marcelr, TheHogNL, Toonz

annebob
Starting Member
Starting Member
Posts: 6
Joined: Sun Feb 07, 2021 10:47 pm

Re: Fully automated rooting script

Post by annebob »

TheHogNL wrote:
annebob wrote:
TheHogNL wrote:Did you already try recompiling openocd?
Further I have no idea. This is just openocd failing and can be many things.
thanx for your response,

Sometimes you have those moments that everything seems to work against you.
just before i would give up for today i reinstalled the openocd en toonrooter after removing both folders.
and to my suprise it started and got right to the moment it was saying: INFO:rooter:Your Toon is now rooted. Please wait for it to boot up and try to log in using SSH

YES YES YES. i wanted to copy the whole screen of Putty so i could search back for the password. instead of "copy all" i hit "clear scrollback" NO NO NO.
so the first thing i did was copy the rsa keys to a different folder, just in case.....

without touchin anything i started the auto rooter script, and unfortunatly id stopt at the same error i showed above. and now 1,5 hour later i`am done.

i cant root the Toon, same error over and over, and SSH does not seems to work, i tryed the next command: ssh -i id_rsa root@192.168.2.66 and resulted in an error with the next line :
RSA key fingerprint is SHA256:oMoMRnxjjph6eJ0jI3gZTrzXNCSxPg+3VFp9OVkrDW8. and asking me to login but then i need the root password and that one has been deleted.

am i missing something? am i doing something wrong to login to SSH?
Next time, remember that when using putty and selecting text it is already put into your copy/paste buffer. You don't need to select copy in the context menu. So to make it even worse, after clearing scrollback you probably still had the password in your copy/paste buffer :-)

Are you sure you are pointing to the id_rsa (private key) of the attempt when it succeeded?

And you did try reinstalling again? I have never tried with a Pi4. Maybe the Pi4 is too fast or something. Not sure on this but must be a openocd issue.
As frustrated as it can be, just leave it for a day and start again.
After Dinner i hooked up everything to the rpi4 and as i walked by started the autorooter script, just to try.
Ofcourse i have googled alot, and i thought about the rpi being to fast. I saw something about a adapter speed in the rpi4.cfg.

I changed this first for 500 to 1000 no luck, turned it down to 400, no luck, down to 200. AND SUCCES. i don`t know if this was lucky or not.
The only thing i thought about was the root password. i i have got it.
I started te Toonrooter again just to see if it would run again. it came further with uploading the image (u-boot) but again a error.

Connected the toon back to the casing and screen to check SSH. YES YES YES i can logon.

Thanks for the support and now we can play futher.
sunlight
Starting Member
Starting Member
Posts: 3
Joined: Sun Oct 03, 2021 3:18 pm

Re: Fully automated rooting script

Post by sunlight »

Can someone help me after 3 days of trying?

Managed to root 1 toon but the second one no result.

pi@raspberrypi:~/ToonRooter $ sudo python . --jtag-available --output-level DEBUG
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
DEBUG:__main__:{"uboot_only": false, "has_jtag": true, "check_uboot": true, "boot_only": false, "reboot_after": true, "cleanup_payload": true, "port": "/dev/serial0", "jtag_hardware": "rpi1", "ssh_pubkey_data": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCwZddZEApTYyaVs6v9MzbIhQMXRZeMUOS8hVLRVTO1XrTNaCqqy5Ulrim6ERLo52EWmc+vpqqnE447Jc9umHLAhdRr6cuDXTYC3LPt8Ez55UWDliCHzvXLbjaEFret/XhZX1B6UX/2QTnZVAnh9GiAgg/mad6HPZdDRQ+XiRNPUIL+S04XM38Wbk8484n04LKg6s2nJZBnbWIc8nYachXySKZ7QHWFpXsi0dAX0InEJL1IP5NR8iXItoQEyDxqrMZUzpDYWGfH8mdDW66lycmaH+ryE/rhwRj8n6JwhjexFSoJ1muTyaj8Ni/1PIBeIe7tHzLd4RdqynfP8yBSjbZB"}
INFO:rooter:Waiting for Toon to restart
INFO:rooter:Toon has U-Boot version 2010.09-R10
INFO:rooter:Loading new bootloader
INFO:rooter:Starting openocd
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/pi/ToonRooter/__main__.py", line 187, in <module>
main()
File "/home/pi/ToonRooter/__main__.py", line 183, in main
rooter.Rooter(**params).run()
File "./rooter.py", line 76, in run
self.start_bootloader("assets/u-boot.bin")
File "./rooter.py", line 205, in start_bootloader
], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
TheHogNL
Forum Moderator
Forum Moderator
Posts: 2125
Joined: Sun Aug 20, 2017 8:53 pm

Re: Fully automated rooting script

Post by TheHogNL »

sunlight wrote:Can someone help me after 3 days of trying?

Managed to root 1 toon but the second one no result.

pi@raspberrypi:~/ToonRooter $ sudo python . --jtag-available --output-level DEBUG
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
DEBUG:__main__:{"uboot_only": false, "has_jtag": true, "check_uboot": true, "boot_only": false, "reboot_after": true, "cleanup_payload": true, "port": "/dev/serial0", "jtag_hardware": "rpi1", "ssh_pubkey_data": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCwZddZEApTYyaVs6v9MzbIhQMXRZeMUOS8hVLRVTO1XrTNaCqqy5Ulrim6ERLo52EWmc+vpqqnE447Jc9umHLAhdRr6cuDXTYC3LPt8Ez55UWDliCHzvXLbjaEFret/XhZX1B6UX/2QTnZVAnh9GiAgg/mad6HPZdDRQ+XiRNPUIL+S04XM38Wbk8484n04LKg6s2nJZBnbWIc8nYachXySKZ7QHWFpXsi0dAX0InEJL1IP5NR8iXItoQEyDxqrMZUzpDYWGfH8mdDW66lycmaH+ryE/rhwRj8n6JwhjexFSoJ1muTyaj8Ni/1PIBeIe7tHzLd4RdqynfP8yBSjbZB"}
INFO:rooter:Waiting for Toon to restart
INFO:rooter:Toon has U-Boot version 2010.09-R10
INFO:rooter:Loading new bootloader
INFO:rooter:Starting openocd
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/pi/ToonRooter/__main__.py", line 187, in <module>
main()
File "/home/pi/ToonRooter/__main__.py", line 183, in main
rooter.Rooter(**params).run()
File "./rooter.py", line 76, in run
self.start_bootloader("assets/u-boot.bin")
File "./rooter.py", line 205, in start_bootloader
], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
you are missing openocd... please read the readme
Member of the Toon Software Collective
toonnoot
Member
Member
Posts: 67
Joined: Mon Jun 15, 2020 11:22 am

Re: Fully automated rooting script

Post by toonnoot »

is it me or are there some problems with the rooting scripts.
At some point it progresses very slowly, especially here:

Downloading http://feed.hae.int/feeds/qb2/oe/angeli ... armv5e.ipk.
It seems to freeze here.

And then it continues, but I'm seeing these errors:
Installing libqt5websockets5 (5.11.2+git0+e71467cb56-r0) to root...
Downloading http://feed.hae.int/feeds/qb2/oe/angeli ... armv5e.ipk.
^[cCollected errors:
* opkg_download: Failed to download http://feed.hae.int/feeds/qb2/oe/angeli ... armv5e.ipk: Couldn't connect to server.
* opkg_install_pkg: Failed to download libqt5websockets5. Perhaps you need to run 'opkg update'?
* opkg_install_cmd: Cannot install package libqt5websockets5.
Upgrade done!
TheHogNL
Forum Moderator
Forum Moderator
Posts: 2125
Joined: Sun Aug 20, 2017 8:53 pm

Re: Fully automated rooting script

Post by TheHogNL »

toonnoot wrote:is it me or are there some problems with the rooting scripts.
At some point it progresses very slowly, especially here:

Downloading http://feed.hae.int/feeds/qb2/oe/angeli ... armv5e.ipk.
It seems to freeze here.

And then it continues, but I'm seeing these errors:
Installing libqt5websockets5 (5.11.2+git0+e71467cb56-r0) to root...
Downloading http://feed.hae.int/feeds/qb2/oe/angeli ... armv5e.ipk.
^[cCollected errors:
* opkg_download: Failed to download http://feed.hae.int/feeds/qb2/oe/angeli ... armv5e.ipk: Couldn't connect to server.
* opkg_install_pkg: Failed to download libqt5websockets5. Perhaps you need to run 'opkg update'?
* opkg_install_cmd: Cannot install package libqt5websockets5.
Upgrade done!
This happens if your toon, before rooting, is still busy doing a normal firmware update. So let the normal firmware update finish and then root again.
Member of the Toon Software Collective
ferryperry
Starting Member
Starting Member
Posts: 6
Joined: Sun Oct 17, 2021 5:09 pm

How long should you wait "Waiting for Toon to restart"

Post by ferryperry »

Hi everyone,

I've gotten my hands on a second-hand Toon1 (R10) and bought my first Pi3B+. :D
Im running the script now from Github/ToonRooter.https://github.com/martenjacobs/ToonRooter.

However, I was wondering how long does the complete script take?
Especially when prompted:

Code: Select all

INFO:rooter:Waiting for Toon to restart
I've been waiting for 20min now and nothing?

Is it because I have to activate the Toon1 with a code first or should that not matter, the README of Github does not specify about it being activated before running the script?

Anyone any experiance with this?
TheHogNL
Forum Moderator
Forum Moderator
Posts: 2125
Joined: Sun Aug 20, 2017 8:53 pm

Re: Fully automated rooting script

Post by TheHogNL »

Did you reset the toon at that point already? :)
Member of the Toon Software Collective
ferryperry
Starting Member
Starting Member
Posts: 6
Joined: Sun Oct 17, 2021 5:09 pm

Re: Fully automated rooting script

Post by ferryperry »

TheHogNL wrote:Did you reset the toon at that point already? :)
Yes, I came to find out I had the wires in wrong, rookie mistake.
But for my Toon, automated the script “activated” the root during/after the root process.
ferryperry
Starting Member
Starting Member
Posts: 6
Joined: Sun Oct 17, 2021 5:09 pm

Re: Fully automated rooting script

Post by ferryperry »

After my first successful use of the automatic script, I manage to root my Toon Uboot R8.

However when trying to root another Toon Uboot R6, i get the following error messages when using the automated script:

E: Pakket 'python-serial' does not have a candidate for install
E: Can't find packet python-cryptography n


Has anyone encountered these error messages and found a solution?

PS: I run the latest Raspberry Pi OS and have performed sudo apt upgrade & update before running the script
Attachments
error messages
error messages
Schermafbeelding 2022-03-18 091428.png (80.01 KiB) Viewed 3789 times
TheHogNL
Forum Moderator
Forum Moderator
Posts: 2125
Joined: Sun Aug 20, 2017 8:53 pm

Re: Fully automated rooting script

Post by TheHogNL »

ferryperry wrote:After my first successful use of the automatic script, I manage to root my Toon Uboot R8.

However when trying to root another Toon Uboot R6, i get the following error messages when using the automated script:

E: Pakket 'python-serial' does not have a candidate for install
E: Can't find packet python-cryptography n


Has anyone encountered these error messages and found a solution?

PS: I run the latest Raspberry Pi OS and have performed sudo apt upgrade & update before running the script

If it worked before it should still work. But maybe new installation of your Pi? If so, did you forgot 'sudo apt install python-serial python-cryptography' ?
Member of the Toon Software Collective
steffie
Starting Member
Starting Member
Posts: 10
Joined: Fri Apr 01, 2022 3:24 pm

Re: Fully automated rooting script

Post by steffie »

I am running into the same problem with the python-serial and python-cryptography.
Perhaps due to the fact that in the new Pi Images python3 is now default?

Any suggestions on how to get it fixed? :)
toonnoot
Member
Member
Posts: 67
Joined: Mon Jun 15, 2020 11:22 am

Re: Fully automated rooting script

Post by toonnoot »

the script seems to get stucked at starting the vpn tunnel. Am I the only one having these issues?

Unattended mode
Forcing version: 5.49.19
This toon does not contain old VPN certficates. Not necessary to update VPN certificates.
iptables: Chain already exists.
Now starting the VPN tunnel and waiting for it to be alive and configured...
Now starting the VPN tunnel and waiting for it to be alive and configured...
Now starting the VPN tunnel and waiting for it to be alive and configured...
Now starting the VPN tunnel and waiting for it to be alive and configured...
Now starting the VPN tunnel and waiting for it to be alive and configured...
Now starting the VPN tunnel and waiting for it to be alive and configured...
Now starting the VPN tunnel and waiting for it to be alive and configured...
Now starting the VPN tunnel and waiting for it to be alive and configured...
Now starting the VPN tunnel and waiting for it to be alive and configured...
Now starting the VPN tunnel and waiting for it to be alive and configured...
Now starting the VPN tunnel and waiting for it to be alive and configured...
Could not enable VPN in a normal reasonable time!
DEBUG information:
192.168.50.0/24 dev eth0 scope link src 192.168.50.238
default via 192.168.50.1 dev eth0 metric 10
# <persistent /etc/hosts content can be added to /etc/hosts.template file>
127.0.0.1 localhost.localdomain localhost eneco-001-221155
172.30.80.1 feed.hae.int feed
END DEBUG information
Quitting the upgrade. It was a nice try tho...
killall: openvpn: no process killed
TheHogNL
Forum Moderator
Forum Moderator
Posts: 2125
Joined: Sun Aug 20, 2017 8:53 pm

Re: Fully automated rooting script

Post by TheHogNL »

You are showing the update script, not de rooting script.
It seems to not be able to start the VPN.
Try later, maybe the service is down currently.
If not try to manually start the vpn and paste the error

Code: Select all

/usr/sbin/openvpn --config /etc/openvpn/vpn.conf 
Member of the Toon Software Collective
oepi-loepi
Advanced Member
Advanced Member
Posts: 628
Joined: Sat Feb 09, 2019 7:18 pm

Re: Fully automated rooting script

Post by oepi-loepi »

Controleer deze file even. /etc/openvpn/vpn.conf . Soms is die leeg op een toon 1 en dan is geen vpn verbinding mogelijk.
toonnoot
Member
Member
Posts: 67
Joined: Mon Jun 15, 2020 11:22 am

Re: Fully automated rooting script

Post by toonnoot »

Nog steeds dezelfde error met de VPN.

Gebeurt bij alle Toon1's volgens mij.
Toon2's lijkt het wel goed te werken.

Hebben jullie hier geen last van?
Na 10 pogingen volgt wederom de error en kapt de script.

Ik kan wel een run doen met de -f modifier.
Komt het doordat wellicht eneco iets heeft gedaan met de addressen ofzo?


Forcing version: 5.49.19
Unattended mode
This toon does not contain old VPN certficates. Not necessary to update VPN certificates.
Now starting the VPN tunnel and waiting for it to be alive and configured...
Now starting the VPN tunnel and waiting for it to be alive and configured...
Now starting the VPN tunnel and waiting for it to be alive and configured...
Now starting the VPN tunnel and waiting for it to be alive and configured...
Now starting the VPN tunnel and waiting for it to be alive and configured...
Now starting the VPN tunnel and waiting for it to be alive and configured...
Now starting the VPN tunnel and waiting for it to be alive and configured...
Now starting the VPN tunnel and waiting for it to be alive and configured...
Now starting the VPN tunnel and waiting for it to be alive and configured...
Now starting the VPN tunnel and waiting for it to be alive and configured...
Now starting the VPN tunnel and waiting for it to be alive and configured...
Could not enable VPN in a normal reasonable time!
DEBUG information:
192.168.50.0/24 dev eth0 scope link src 192.168.50.196
default via 192.168.50.1 dev eth0 metric 10
# <persistent /etc/hosts content can be added to /etc/hosts.template file>
127.0.0.1 localhost.localdomain localhost eneco-001-396240
172.18.16.1 feed.hae.int feed
END DEBUG information
Quitting the upgrade. It was a nice try tho...
killall: openvpn: no process killed
Post Reply

Return to “Toon Rooting”