
Fully automated rooting script
Moderators: marcelr, TheHogNL, Toonz
Re: Fully automated rooting script
Nice cable, I guess there is a market for it... 

member of the Toon Software Collective
Re: Fully automated rooting script
Like that cable also! Nice job.
Couldn't we build a getty outside of busybox (maybe 'agetty') and put that in inittab as the getty for rooted Toons? By doing this we never touch the native busybox so we can't break other important stuff. If we have the agetty there would be no reason anymore to not add it to the the script.
Couldn't we build a getty outside of busybox (maybe 'agetty') and put that in inittab as the getty for rooted Toons? By doing this we never touch the native busybox so we can't break other important stuff. If we have the agetty there would be no reason anymore to not add it to the the script.
Member of the Toon Software Collective
Re: Fully automated rooting script
The custom busybox doesn't break anything. If you are really worried about installation failures, you can always back-up the original busybox and then install the new one. After successful completion of the installation, just remove the backup.
Re: Fully automated rooting script
It is not the custom busybox but the possible cause that during the installation of the custom busybox some important files are lost during a power failure or unforseen reboot.
However, the possibility of this to happen is not that high. And Eneco also updates the busybox somewhere in 4.10 (could be earlier) and that didn't result in a lot of broken Toon also (we don't know the figures, but there is no mention about that in the Eneco forum). So installing the custom busybox using a script with opkg should be no problem. All busybox related issue's in this forum where caused by users making a error during thet ascii-transfer or trying to manually overwrite the buybox binary.
When I have some more time I'm also adding some installations of important packages in the update-script. Installing the custom busybox is one of them along with toonstore update.
However, the possibility of this to happen is not that high. And Eneco also updates the busybox somewhere in 4.10 (could be earlier) and that didn't result in a lot of broken Toon also (we don't know the figures, but there is no mention about that in the Eneco forum). So installing the custom busybox using a script with opkg should be no problem. All busybox related issue's in this forum where caused by users making a error during thet ascii-transfer or trying to manually overwrite the buybox binary.
When I have some more time I'm also adding some installations of important packages in the update-script. Installing the custom busybox is one of them along with toonstore update.
Member of the Toon Software Collective
Re: Fully automated rooting script
That's a non-issue. As said earlier, just back-up your busybox:
and do the install. If that fails you can repair by reinstating busybox:
and you're good to go again for the next try.
Code: Select all
cp /bin/busybox /bin/busybox-1.27.2-r1
Code: Select all
/bin/busybox-1.27.2-r1 cp /bin/busybox-1.27.2-r1 /bin/busybox
Re: Fully automated rooting script
As an alternative the script could copy the fixed busybox and create symlinks for just the missing applets.
-
- Member
- Posts: 53
- Joined: Fri Mar 09, 2018 4:13 pm
Re: Fully automated rooting script
@Rudolf that could be a nice compromise. I'll see if I find the time to script that somewhere in the coming weeks. If someone else has some time, I'm open to pull requests 

Re: Fully automated rooting script
Tried your script, but without using the PI's connectors. I was using a usb serial device (/dev/ttyUSB0).
With the extra command --serial /dev/ttyUSB0 it didn't detect the toon (while rebooting the toon).
I didn't take much time to figure out why. Just used 'screen /dev/ttyS0 115200' to connect to the toon and root it myself. Just as fast for me as this toon didn't need JTAG.
But maybe you can look into this. If it should have worked, don't take too much time. Probably my mistake then
With the extra command --serial /dev/ttyUSB0 it didn't detect the toon (while rebooting the toon).
I didn't take much time to figure out why. Just used 'screen /dev/ttyS0 115200' to connect to the toon and root it myself. Just as fast for me as this toon didn't need JTAG.
But maybe you can look into this. If it should have worked, don't take too much time. Probably my mistake then

Member of the Toon Software Collective
Re: Fully automated rooting script
The links are only removed at the far end of the install. If it fails, they will stay as they are.Rudolf wrote:As an alternative the script could copy the fixed busybox and create symlinks for just the missing applets.
-
- Member
- Posts: 53
- Joined: Fri Mar 09, 2018 4:13 pm
Re: Fully automated rooting script
The correct argument is --serial-portTheHogNL wrote:Tried your script, but without using the PI's connectors. I was using a usb serial device (/dev/ttyUSB0).
With the extra command --serial /dev/ttyUSB0 it didn't detect the toon (while rebooting the toon).
I didn't take much time to figure out why. Just used 'screen /dev/ttyS0 115200' to connect to the toon and root it myself. Just as fast for me as this toon didn't need JTAG.
But maybe you can look into this. If it should have worked, don't take too much time. Probably my mistake then
Re: Fully automated rooting script
Pretty sure I did that (after reading the help) but i'll check tonightmartenjacobs wrote: The correct argument is --serial-port

Member of the Toon Software Collective
Re: Fully automated rooting script
I ran the script tonight but got an error.
Can someone tell me what I'm doing wrong? Thank you for a reply and for the great work!
Code: Select all
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-R10
INFO:rooter:Loading new bootloader
INFO:rooter:Starting openocd
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, 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 91, in <module>
boot_only = boot_only)
File "./rooter.py", line 22, in root
do_root(port, ssh_pubkey_data, has_jtag, check_uboot, cleanup_payload, reboot_after, boot_only)
File "./rooter.py", line 52, in do_root
start_bootloader("assets/u-boot.bin")
File "./rooter.py", line 177, in start_bootloader
], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 390, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1024, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Re: Fully automated rooting script
Do you have openocd installed? At that point of the script it starts the openocd and I think it is missing. Read the readme of the tool
Member of the Toon Software Collective
Re: Fully automated rooting script
Yes, I just followed the readme but I constanly get this errorTheHogNL wrote:Do you have openocd installed? At that point of the script it starts the openocd and I think it is missing. Read the readme of the tool
Re: Fully automated rooting script
Got in! Rooted... I guessTheHogNL wrote:Do you have openocd installed? At that point of the script it starts the openocd and I think it is missing. Read the readme of the tool

How do I login with SSH? ssh root@<IP> works, ssh key is generated but root user asks for password.