Fully automated rooting script

Everything about rooting Toons 1 and 2.

Moderator: marcelr

Re: Fully automated rooting script

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

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


Perhaps at some time in the future, if I have time. However, a text password is now also enabled by default (thanks to IgorYbema). You should be able to use the randomly generated password that is shown during rooting to log in, without requiring the private key. If you want, you can remove the key that's in /root/.ssh/authorized_keys to disable public key access completely.
martenjacobs
Starting Member
Starting Member
 
Posts: 27
Joined: March 2018

Re: Fully automated rooting script

Postby hdok » Thu Jul 26, 2018 4:32 pm

Yesterday I rooted my 1000 year old :-) Toon with your software using a cable as you described... It worked like a charm. Just used toon store to add buienradar. Thanks for your great work!
hdok
Starting Member
Starting Member
 
Posts: 4
Joined: July 2018

Re: Fully automated rooting script

Postby mogwai » Fri Aug 10, 2018 9:46 pm

I succesfully rooted my Toon running SW version 4.16.8 using your toonrooter. Thanks!

I did have to modify "assets/raspberrypi.cfg" for my RasPI 1 B+. Maybe it's a good idea to include different versions of the config file for the different RasPI versions. According to the info I found (stackoverflow.com/questions/43612379/op ... 9#43777549), the configuration flavours are as mentioned below. I obviously used the settings for Raspi1 and that worked like a charm.

Code: Select all
# Raspi2 and Raspi3 peripheral_base address
bcm2835gpio_peripheral_base 0x3F000000

# Raspi1 peripheral_base address
bcm2835gpio_peripheral_base 0x20000000

# Raspi3 BCM2837 (1200Mhz):
bcm2835gpio_speed_coeffs 194938 48

# Raspi2 BCM2836 (900Mhz):
bcm2835gpio_speed_coeffs 146203 36

# Raspi1 BCM2835: (700Mhz)
bcm2835gpio_speed_coeffs 113714 28
mogwai
Starting Member
Starting Member
 
Posts: 12
Joined: August 2018

Re: Fully automated rooting script

Postby martenjacobs » Sat Aug 11, 2018 11:41 am

mogwai wrote:I succesfully rooted my Toon running SW version 4.16.8 using your toonrooter. Thanks!

I did have to modify "assets/raspberrypi.cfg" for my RasPI 1 B+. Maybe it's a good idea to include different versions of the config file for the different RasPI versions. According to the info I found (stackoverflow.com/questions/43612379/op ... 9#43777549), the configuration flavours are as mentioned below. I obviously used the settings for Raspi1 and that worked like a charm.


This is a good idea. It's even possible to autodetect the device version we're working on with the information here. I'm going to work on this now :D

EDIT: I've made some changes in a separate branch of the repo. I think everything should work as expected, but I did some refactoring to make life a little easier, which may have caused bugs. If anyone would be willing to do some tests, that would be very helpful.
martenjacobs
Starting Member
Starting Member
 
Posts: 27
Joined: March 2018

Re: Fully automated rooting script

Postby legalr » Sat Aug 18, 2018 12:03 pm

Hello

I started last week setting up a Raspberry Pi1 and used the tutorial as discribed on Github.

we starting te script i get the following message, can someone help me?

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
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
INFO:rooter:Toon has U-Boot version 2010.09-R10
ERROR:rooter:Unable to log in using password (need JTAG, but it's disabled)
legalr
Starting Member
Starting Member
 
Posts: 12
Joined: August 2018

Re: Fully automated rooting script

Postby martenjacobs » Sat Aug 18, 2018 3:34 pm

legalr wrote:Hello

I started last week setting up a Raspberry Pi1 and used the tutorial as discribed on Github.

we starting te script i get the following message, can someone help me?
[...]


This probably means that loading the modified version of U-Boot through JTAG has failed. Could you try again with --output-level DEBUG?

EDIT: I just saw you’re using a pi 1. This doesn’t work with the current version because it needs a different configuration for JTAG. I have a new version which should work in the dev branch of my github repo. You can switch to it by calling ‘git checkout dev’ while in the ToonRooter directory. It should detect you’re running a Pi 1 and use the correct config. Please let me know if it works, so I can move it to the master branch
martenjacobs
Starting Member
Starting Member
 
Posts: 27
Joined: March 2018

Re: Fully automated rooting script

Postby legalr » Sat Aug 18, 2018 6:54 pm

martenjacobs wrote:
legalr wrote:Hello

I started last week setting up a Raspberry Pi1 and used the tutorial as discribed on Github.

we starting te script i get the following message, can someone help me?
[...]


This probably means that loading the modified version of U-Boot through JTAG has failed. Could you try again with --output-level DEBUG?

EDIT: I just saw you’re using a pi 1. This doesn’t work with the current version because it needs a different configuration for JTAG. I have a new version which should work in the dev branch of my github repo. You can switch to it by calling ‘git checkout dev’ while in the ToonRooter directory. It should detect you’re running a Pi 1 and use the correct config. Please let me know if it works, so I can move it to the master branch



I learning to work with github, 'git checkout dev' dit not work, git checkout -b dev work, and indicates i am in the dev,

pi@raspberrypi:~/ToonRooter $ git checkout -b dev
Switched to a new branch 'dev'


what do i have to do to load the dev part?
legalr
Starting Member
Starting Member
 
Posts: 12
Joined: August 2018

Re: Fully automated rooting script

Postby martenjacobs » Sun Aug 19, 2018 6:51 am

legalr wrote:I learning to work with github, 'git checkout dev' dit not work, git checkout -b dev work, and indicates i am in the dev,

pi@raspberrypi:~/ToonRooter $ git checkout -b dev
Switched to a new branch 'dev'


what do i have to do to load the dev part?


That's weird, '-b' is supposed to be implied. It should also have told you it was tracking origin/dev. Maybe there were some local changes or something. Could you remove the directory and try again using these commands:
Code: Select all
git clone --single-branch -b dev https://github.com/martenjacobs/ToonRooter.git
cd ToonRooter/
git log -n1


The last command should show the latest commit id starts with '5a7d1f'. If this is what you see, you're on the correct branch and you can try running the application.
martenjacobs
Starting Member
Starting Member
 
Posts: 27
Joined: March 2018

Re: Fully automated rooting script

Postby legalr » Sun Aug 19, 2018 7:42 am

martenjacobs wrote:
legalr wrote:I learning to work with github, 'git checkout dev' dit not work, git checkout -b dev work, and indicates i am in the dev,

pi@raspberrypi:~/ToonRooter $ git checkout -b dev
Switched to a new branch 'dev'


what do i have to do to load the dev part?


That's weird, '-b' is supposed to be implied. It should also have told you it was tracking origin/dev. Maybe there were some local changes or something. Could you remove the directory and try again using these commands:
Code: Select all
git clone --single-branch -b dev https://github.com/martenjacobs/ToonRooter.git
cd ToonRooter/
git log -n1


The last command should show the latest commit id starts with '5a7d1f'. If this is what you see, you're on the correct branch and you can try running the application.



Did the steps discribed as above, with the following result.


pi@raspberrypi:~ $ rm -rf ToonRooter
pi@raspberrypi:~ $ ls
openocd
pi@raspberrypi:~ $ git clone --single-branch -b dev https://github.com/martenjacobs/ToonRooter.git
Cloning into 'ToonRooter'...
remote: Counting objects: 123, done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 123 (delta 3), reused 13 (delta 3), pack-reused 110
Receiving objects: 100% (123/123), 289.50 KiB | 0 bytes/s, done.
Resolving deltas: 100% (58/58), done.
pi@raspberrypi:~ $ cd ToonRooter/
pi@raspberrypi:~/ToonRooter $ git log -n1
commit 5a7d1f7d4ec924e08506b72144fc223cc57ea7f2
Author: Marten Jacobs <mail@vanmarten.nl>
Date: Sat Aug 11 15:15:56 2018 +0200

Added new functions to README
pi@raspberrypi:~/ToonRooter $ sudo python . --jtag-available
INFO:__main__:Starting up...
CRITICAL:__main__:Cannot autodetect jtag hardware
pi@raspberrypi:~/ToonRooter $ sudo python . --output-level DEBUG
INFO:__main__:Starting up...
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 173, in <module>
main()
File "/home/pi/ToonRooter/__main__.py", line 138, in main
jtag_hardware = detect_jtag_hardware()
File "/home/pi/ToonRooter/__main__.py", line 120, in detect_jtag_hardware
raise Exception("Cannot autodetect jtag hardware")
Exception: Cannot autodetect jtag hardware
pi@raspberrypi:~/ToonRooter $
legalr
Starting Member
Starting Member
 
Posts: 12
Joined: August 2018

Re: Fully automated rooting script

Postby martenjacobs » Sun Aug 19, 2018 10:31 am

Autodetection seems to be failing on your Pi. There’s a jtag-hardware parameter you can use to skip autodetection. I’m on my phone now so I don’t know the exact usage at the moment, but you can see it by running the script with the --help parameter. Could you also PM me the output of ‘cat /proc/cpuinfo’? I may be able to use that to determine why detection is failing. Are you running Raspbian on the Pi? Which version?
martenjacobs
Starting Member
Starting Member
 
Posts: 27
Joined: March 2018

Re: Fully automated rooting script

Postby legalr » Sun Aug 19, 2018 1:38 pm

martenjacobs wrote:Autodetection seems to be failing on your Pi. There’s a jtag-hardware parameter you can use to skip autodetection. I’m on my phone now so I don’t know the exact usage at the moment, but you can see it by running the script with the --help parameter. Could you also PM me the output of ‘cat /proc/cpuinfo’? I may be able to use that to determine why detection is failing. Are you running Raspbian on the Pi? Which version?


-- jtag-hardware auto result:

pi@raspberrypi:~/ToonRooter/ToonRooter $ sudo python . --jtag-hardware auto
INFO:__main__:Starting up...
CRITICAL:__main__:Cannot autodetect jtag hardware

-- jtag-hardware rpi1 result:

pi@raspberrypi:~/ToonRooter/ToonRooter $ sudo python . --jtag-hardware rpi1 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
ERROR:rooter:Unable to log in using password (need JTAG, but it's disabled)

i am running raspbian on my Pi,

i@raspberrypi:~/ToonRooter/ToonRooter $ cat /etc/os-release PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

i send you a PM with the output of the CPU info.\
legalr
Starting Member
Starting Member
 
Posts: 12
Joined: August 2018

Re: Fully automated rooting script

Postby martenjacobs » Thu Aug 23, 2018 2:57 pm

I've just merged the latest changes from the dev branch into master, thanks to legalr for testing.

Support has been added for all types of Pi's, and its now easier to add support for other JTAG debuggers by adding the correct config to the assets/adapters/ directory (if you've added support for one, please send me a PR).
martenjacobs
Starting Member
Starting Member
 
Posts: 27
Joined: March 2018

Re: Fully automated rooting script

Postby TerrorSource » Sun Oct 07, 2018 3:49 pm

martenjacobs wrote:I've just merged the latest changes from the dev branch into master, thanks to legalr for testing.

Support has been added for all types of Pi's, and its now easier to add support for other JTAG debuggers by adding the correct config to the assets/adapters/ directory (if you've added support for one, please send me a PR).


Im not using the latest version but i noticed this issue:

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
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

Nothing happens after that. Toon boots up normally but the script is still paused.
TerrorSource
Member
Member
 
Posts: 164
Joined: May 2017

Re: Fully automated rooting script

Postby martenjacobs » Mon Oct 08, 2018 10:10 am

TerrorSource wrote:Im not using the latest version but i noticed this issue:


This is a known issue, due to the very limited (read: virtually non-existent) amount of checking the script does on the outputs of subprocesses. I’d like to fix it if I have the time, but I don’t see that happening in the near future. Something has probably gone wrong with OpenOCD. Running with output level set to debug may give you more insight into the actual problem.
martenjacobs
Starting Member
Starting Member
 
Posts: 27
Joined: March 2018

Re: Fully automated rooting script

Postby Maanbaviaan » Thu Oct 18, 2018 9:46 pm

I've tried rooting my toon with the ToonRooter script. Everything seems fine, no errors.
But when booting Toon it still asks for an activation code.
Bootloader 2010-09 and software version 3.9.2.

Am I doing it wrong?
Maanbaviaan
Starting Member
Starting Member
 
Posts: 2
Joined: October 2018

PreviousNext

Return to Toon Rooting

Who is online

Users browsing this forum: No registered users and 1 guest