Fully automated rooting script

Everything about rooting Toons 1 and 2.

Moderators: marcelr, TheHogNL, TerrorSource, Toonz

Re: Fully automated rooting script

Postby martenjacobs » Mon Feb 18, 2019 7:27 pm

TheHogNL wrote:For R8 you don't need jtag indeed. But if you want to use the auto rooter you need the Raspberry PI. The only difference between jtag and only serial is just a few dupont cables extra.
With R8 you only need 3 wires, or indeed a USB serial device.


The script should actually run fine on any Linux-based system that supports Python 2.7, especially if you don't need JTAG.
martenjacobs
Member
Member
 
Posts: 52
Joined: March 2018

Re: Fully automated rooting script

Postby TheHogNL » Mon Feb 18, 2019 7:36 pm

Ohw yes indeed, you are right :)
Member of the Toon Software Collective
User avatar
TheHogNL
Forum Moderator
Forum Moderator
 
Posts: 1173
Joined: August 2017

Re: Fully automated rooting script

Postby uibeltje » Mon Feb 18, 2019 9:54 pm

martenjacobs wrote:
uibeltje wrote:
martenjacobs wrote:
Testing with the Toon disconnected shouldn’t be an issue. I see you’re running Raspbian Jessie, which is pretty old. The version of python-cryptography is even older. Upgrading to Stretch will probably solve your problem.


Success :)

Used a fresh installation of Stretch and have SSH access
uibeltje
Starting Member
Starting Member
 
Posts: 4
Joined: February 2019

Re: Fully automated rooting script

Postby said0066 » Tue Feb 19, 2019 2:29 pm

martenjacobs wrote:
TheHogNL wrote:For R8 you don't need jtag indeed. But if you want to use the auto rooter you need the Raspberry PI. The only difference between jtag and only serial is just a few dupont cables extra.
With R8 you only need 3 wires, or indeed a USB serial device.


The script should actually run fine on any Linux-based system that supports Python 2.7, especially if you don't need JTAG.


Thanks,
So if i install Ubuntu 18.04 with Python 2.7, I can use the terminal inside Ubuntu to run the script?
So I attach the 3 serial cables to Toon and the USB-to-Serial adapter and connect to the (ubuntu) pc.
is the USB-to-serial supported by linux OS like Ubuntu, because on the website of Prolific, I only see the drivers for Windows based systems, not Linux based.
said0066
Starting Member
Starting Member
 
Posts: 13
Joined: February 2019

Re: Fully automated rooting script

Postby martenjacobs » Tue Feb 19, 2019 3:31 pm

said0066 wrote:Thanks,
So if i install Ubuntu 18.04 with Python 2.7, I can use the terminal inside Ubuntu to run the script?
So I attach the 3 serial cables to Toon and the USB-to-Serial adapter and connect to the (ubuntu) pc.
is the USB-to-serial supported by linux OS like Ubuntu, because on the website of Prolific, I only see the drivers for Windows based systems, not Linux based.


I think prolific USB serial adapters should be supported out of the box in Ubuntu. If not, you’ll have to find drivers somewhere. The adapter will probably show up as /dev/ttyUSB0 or something similar. Make sure to pass it to the script using the --serial-port argument.
martenjacobs
Member
Member
 
Posts: 52
Joined: March 2018

Re: Fully automated rooting script

Postby TheHogNL » Tue Feb 19, 2019 5:25 pm

Yes it is supported. Even better then in Windows. Those chinese adapters work in Linux better :-)
Member of the Toon Software Collective
User avatar
TheHogNL
Forum Moderator
Forum Moderator
 
Posts: 1173
Joined: August 2017

Re: Fully automated rooting script

Postby Erik007 » Wed Feb 20, 2019 6:19 pm

Hi

I did run succesfully the fully automated script to root a toon R10.

After that i tryed to change the passwd, but passwd appl is not implemented
So i tryed to install a new version of busybox --> I looked at rooting toon (manual)
I downloaded: http://files.domoticaforum.eu/uploads/T ... r4_qb2.ipk
and tryed to install it .......

Get an return error 255 and a not installed busybox.
What can i do.

I don't know the password for U-boot - does anybody know? (It is not the same as the root passwd!)
Please some help

Here is the output of the ssh-connection.
I still have an ssh-connection, but it is possible windows will break that, going to sleep-mode

eneco-001-361445:~# opkg install http://files.domoticaforum.eu/uploads/Toon/apps
/busybox-1.27.2-r4/busybox_1.27.2-r4_qb2.ipk
Downloading http://files.domoticaforum.eu/uploads/T ... r4_qb2.ipk.
Upgrading busybox on root from 1.27.2-r1 to 1.27.2-r4...
Installing libc6 (2.21-r0) to root...
Downloading http://feed.hae.int/feeds/qb2/oe/angeli ... armv5e.ipk.
Removing package glibc from root...
Removing package glibc-patch-dns from root...
Installing glibc (2.10.1-r37.1) to root...
Downloading http://feed.hae.int/feeds/qb2/oe/angeli ... .1_qb2.ipk.
Configuring dropbear.
Collected errors:
* pkg_run_script: package "glibc-patch-dns" postrm script returned status 255.
* opkg_install_pkg: Failed to verify the signature of /var/lib/opkg/oe-2.6.36-base-r17-splash2.
* opkg_install_cmd: Cannot install package busybox.
* pkg_run_script: package "dropbear" postinst script returned status 255.
* opkg_configure: dropbear.postinst returned 255.
eneco-001-361445:~# ls
-sh: /bin/ls: not found
Erik007
Starting Member
Starting Member
 
Posts: 16
Joined: February 2019

Re: Fully automated rooting script

Postby TheHogNL » Wed Feb 20, 2019 8:30 pm

And another broken toon due to libc6 being updated... people please shutdown your VPNs before running OPKG commands...
Or make sure you are already on 5.0.4

You need to recover your toon using the NFS and TFTPD recovery as a lot of others did lately.
Member of the Toon Software Collective
User avatar
TheHogNL
Forum Moderator
Forum Moderator
 
Posts: 1173
Joined: August 2017

Re: Fully automated rooting script

Postby TheHogNL » Wed Feb 20, 2019 8:34 pm

The R10 uboot password is unknown. Therefore you need the auto rooter python script to get into uboot or use openocd as the manual states.
Member of the Toon Software Collective
User avatar
TheHogNL
Forum Moderator
Forum Moderator
 
Posts: 1173
Joined: August 2017

Re: Fully automated rooting script

Postby martenjacobs » Wed Feb 20, 2019 9:01 pm

I just merged TheHogNL's pull request which automatically disables the VPN after rooting. This should keep many users from bricking their Toon.
martenjacobs
Member
Member
 
Posts: 52
Joined: March 2018

Re: Fully automated rooting script

Postby ruchikadmore » Thu Feb 21, 2019 7:30 am

Excellent information here. Thank you.
ruchikadmore
Starting Member
Starting Member
 
Posts: 1
Joined: February 2019

Re: Fully automated rooting script

Postby said0066 » Thu Feb 21, 2019 11:43 am

Thanks for your support.

I managed to root my toon using the manual method.
I get a blue screen of death (BSOD) on Windows 10 because of the cheap China USB-to-serial adapter which is installed using the old Vista driver.
A workaround that worked for me is installing VM Virtualbox and installing a Vista OS on a VM, installing the old Prolific USB driver, and USB passthrough, and rooting if from there, worked perfect!
said0066
Starting Member
Starting Member
 
Posts: 13
Joined: February 2019

Re: Fully automated rooting script

Postby martenjacobs » Thu Feb 21, 2019 1:31 pm

said0066 wrote:Thanks for your support.

I managed to root my toon using the manual method.
I get a blue screen of death (BSOD) on Windows 10 because of the cheap China USB-to-serial adapter which is installed using the old Vista driver.
A workaround that worked for me is installing VM Virtualbox and installing a Vista OS on a VM, installing the old Prolific USB driver, and USB passthrough, and rooting if from there, worked perfect!


Even better is to use Linux :wink:
martenjacobs
Member
Member
 
Posts: 52
Joined: March 2018

Re: Fully automated rooting script

Postby bvlet » Fri Mar 01, 2019 11:55 pm

Hello everyone,

The last two days I tried rooting my TOon. First manually, but I got stuck on the whole busybox thing. Then I found the autorouter. I reverted everything and I tried to Autoroot the Toon.
No matter what I tried, including switching PI's, reinstalling OpenOCD, checking all the wiring many times, I still get this behaviour (here I killed it). I am on firmware 5.0.4 with bootloader 2010-R10, by the way.

Code: Select all
pi@raspberrypi:~/ToonRooter $ sudo python . --jtag-available --dont-check-uboot
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:Loading new bootloader
INFO:rooter:Starting openocd
INFO:rooter:Waiting for 10 seconds
INFO:rooter:Halting CPU
INFO:rooter:Loading new image to RAM
INFO:rooter:Starting up new image
INFO:rooter:Waiting for Toon to restart
^CTraceback (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 175, in <module>
    main()
  File "/home/pi/ToonRooter/__main__.py", line 171, in main
    rooter.Rooter(**params).run()
  File "./rooter.py", line 80, in run
    self.run()
  File "./rooter.py", line 54, in run
    uboot_version=self.read_uboot_version()
  File "./rooter.py", line 88, in read_uboot_version
    line = self._port.readline().strip()
  File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 472, in read
    ready, _, _ = select.select([self.fd, self.pipe_abort_read_r], [], [], timeout.time_left())
KeyboardInterrupt


The new file gets written OK, in the serial terminal I see the new "password is toon" and I can even type this via serial to go to U-boot, but the Toonrooter script never finishes. It always gets stuck at "Waiting for Toon to reboot".

Can anyone point me in the right direction to solve this?

Thanks in advance for your help!

BR,
Bart
bvlet
Starting Member
Starting Member
 
Posts: 8
Joined: March 2019

Re: Fully automated rooting script

Postby TheHogNL » Sun Mar 03, 2019 10:07 am

Why are you using --don't-check-uboot?
And please try with --output-level DEBUG before posting any issue to the forum.
Member of the Toon Software Collective
User avatar
TheHogNL
Forum Moderator
Forum Moderator
 
Posts: 1173
Joined: August 2017

PreviousNext

Return to Toon Rooting

Who is online

Users browsing this forum: No registered users and 1 guest

cron