Fully automated rooting script

Everything about rooting Toons 1 and 2.

Moderators: marcelr, TheHogNL, Toonz

CarlvO
Starting Member
Starting Member
Posts: 2
Joined: Sat Jan 06, 2018 11:28 pm

Re: Fully automated rooting script

Post by CarlvO »

Is it possible to use the automated script without the jtag cables? It's a U-boot version with a known password.

Why? I don't have enough jumper cables lying around.. And ordering them takes a while :D
martenjacobs
Member
Member
Posts: 53
Joined: Fri Mar 09, 2018 4:13 pm

Re: Fully automated rooting script

Post by martenjacobs »

CarlvO wrote:Is it possible to use the automated script without the jtag cables? It's a U-boot version with a known password.

Why? I don't have enough jumper cables lying around.. And ordering them takes a while :D
Yes this is possible, just follow the same steps, but you can omit installing OpenOCD
alcomys
Starting Member
Starting Member
Posts: 29
Joined: Sat Dec 15, 2018 9:37 pm
Location: Arnhem,Netherlands

Re: Fully automated rooting script

Post by alcomys »

Question.
i did read the manual for rooting toon but there are some issues i don't understand.
i don't use an raspberry pi but instead i use a Segger basic jtagger/debugger with Openocd on Ubuntu linux.
the questions i have are , where do i have to put the modified u-boot.bin ? is it the Openocd dir ? it is nowhere described !
the rest of the manual is clear.
i become at the point of flashing the u-boot, but stuck at the Bootloader upload procedure because Openocd with telnet connection 3333 cannot find the specified u-boot.bin.
hope someone can help me with this issue.

best regards,trey
alcomys
Starting Member
Starting Member
Posts: 29
Joined: Sat Dec 15, 2018 9:37 pm
Location: Arnhem,Netherlands

Re: Fully automated rooting script

Post by alcomys »

hi guys,

can someone help me out ?
i use a segger j-tag device but the auto script to root wont work for me.
when i put the jlink.cfg in the assets/adapter dir i got the failure that the j-tag cannot be autodetected.
when i use the j-link without the autorootscript i can flash the new bootloader without any problems.
but the rest of the script with that method is not posible.

best regards,trey
TheHogNL
Forum Moderator
Forum Moderator
Posts: 2125
Joined: Sun Aug 20, 2017 8:53 pm

Re: Fully automated rooting script

Post by TheHogNL »

Just point to the right location (full path for example) Best is to put it all in the same dir.
Member of the Toon Software Collective
alcomys
Starting Member
Starting Member
Posts: 29
Joined: Sat Dec 15, 2018 9:37 pm
Location: Arnhem,Netherlands

Re: Fully automated rooting script

Post by alcomys »

CarlvO wrote:Is it possible to use the automated script without the jtag cables? It's a U-boot version with a known password.

Why? I don't have enough jumper cables lying around.. And ordering them takes a while :D
i have almost the same problem.
i used segger j-link to upload the older bootloader with a known password, but now when i use the autoroot script it is stil based on the j-tag but that does not work for me because my j-link is not auto detected by the autoroot script an so i cannot continue to root the toon.
i can do the root by hand to edit the boot options in toon but you have to edit the inittab with the vi command thats okay but save the file is not working so again am stuck here :( .
TheHogNL
Forum Moderator
Forum Moderator
Posts: 2125
Joined: Sun Aug 20, 2017 8:53 pm

Re: Fully automated rooting script

Post by TheHogNL »

This oneliner will add the getty line to inittab without using vi:

Code: Select all

sed -i '/qtqt:245/a\# add serial console access:\ngett:235:respawn:/sbin/getty -L 115200 ttymxc0 vt102' /etc/inittab
Member of the Toon Software Collective
alcomys
Starting Member
Starting Member
Posts: 29
Joined: Sat Dec 15, 2018 9:37 pm
Location: Arnhem,Netherlands

Re: Fully automated rooting script

Post by alcomys »

TheHogNL wrote:This oneliner will add the getty line to inittab without using vi:

Code: Select all

sed -i '/qtqt:245/a\# add serial console access:\ngett:235:respawn:/sbin/getty -L 115200 ttymxc0 vt102' /etc/inittab
Thanks man that works .
but now i have to change the password en also i have to edit the file.
can u explane how to saved that file in bussybox vi ?

best regards,trey
martenjacobs
Member
Member
Posts: 53
Joined: Fri Mar 09, 2018 4:13 pm

Re: Fully automated rooting script

Post by martenjacobs »

alcomys wrote:hi guys,

can someone help me out ?
i use a segger j-tag device but the auto script to root wont work for me.
when i put the jlink.cfg in the assets/adapter dir i got the failure that the j-tag cannot be autodetected.
when i use the j-link without the autorootscript i can flash the new bootloader without any problems.
but the rest of the script with that method is not posible.

best regards,trey
Please read the docs. It's clearly stated that when using different JTAG hardware you should use the '--jtag-hardware' argument. If that doesn't work, please open an issue on Github.
alcomys
Starting Member
Starting Member
Posts: 29
Joined: Sat Dec 15, 2018 9:37 pm
Location: Arnhem,Netherlands

Re: Fully automated rooting script

Post by alcomys »

martenjacobs wrote:
alcomys wrote:hi guys,

can someone help me out ?
i use a segger j-tag device but the auto script to root wont work for me.
when i put the jlink.cfg in the assets/adapter dir i got the failure that the j-tag cannot be autodetected.
when i use the j-link without the autorootscript i can flash the new bootloader without any problems.
but the rest of the script with that method is not posible.

best regards,trey
Please read the docs. It's clearly stated that when using different JTAG hardware you should use the '--jtag-hardware' argument. If that doesn't work, please open an issue on Github.
Okay thanks,
i did used an old raspberry pi 1 and id did do the rooting process.
but now i have an other problem.
the root process did install dropbear and ssh, but when i want to login with ssh root i don't have a password to login.
the only login i can do is with the u-boot method.
i did read the whole manual but that manual is different than the auto rooting script usage.
some things are the same but the dropbear and ssh issue i cannot resolve with that.
i also cannot see any normal login with the serial connection at normal boot from toon.

i hope you can help me with this ?

Best regards,trey
TheHogNL
Forum Moderator
Forum Moderator
Posts: 2125
Joined: Sun Aug 20, 2017 8:53 pm

Re: Fully automated rooting script

Post by TheHogNL »

The output from the rooting should tell you the password. Something like: ">>> Enabling root user. Your root password is: "

And if you are already in the toon using uboot, and dropbear/ssh is installed using the rooting tool you only need to reset your password if you don't know the password.
Member of the Toon Software Collective
mAiden
Member
Member
Posts: 330
Joined: Mon Jul 10, 2017 10:22 am

Re: Fully automated rooting script

Post by mAiden »

If you get in the uboot locate the password file /etc/passwd and edit the line:

root:DISABLED:0:0:root:/root:/bin/sh

to read:

root::0:0:root:/root:/bin/sh

and save. Otherwise you won't get in.

Start Toon normally, and you will see something like "Eneco Toon by Quby eneco-001-xxxxxx login:" now its time to login as root, if you get in, type "passwd" to create a strong password.
Member of the Toon Software Collective
alcomys
Starting Member
Starting Member
Posts: 29
Joined: Sat Dec 15, 2018 9:37 pm
Location: Arnhem,Netherlands

Re: Fully automated rooting script

Post by alcomys »

mAiden wrote:If you get in the uboot locate the password file /etc/passwd and edit the line:

root:DISABLED:0:0:root:/root:/bin/sh

to read:

root::0:0:root:/root:/bin/sh

and save. Otherwise you won't get in.

Start Toon normally, and you will see something like "Eneco Toon by Quby eneco-001-xxxxxx login:" now its time to login as root, if you get in, type "passwd" to create a strong password.
i did that before and still no root login with ssh.
i can connect using putty but is ask for a passwod and i did try the generated password during root procedure but that passwd dont work too.
so i don't know what i am doing wrong here.
Eneco Toon by Quby eneco-001-xxxxxx login < ------- this screen i cannot find during normal boot from toon.
but i did read that my firmware version is not enabled for serial because of the bussybox or so .
my firmware is version is 4.22.7

best regards,trey
alcomys
Starting Member
Starting Member
Posts: 29
Joined: Sat Dec 15, 2018 9:37 pm
Location: Arnhem,Netherlands

Re: Fully automated rooting script

Post by alcomys »

TheHogNL wrote:This oneliner will add the getty line to inittab without using vi:

Code: Select all

sed -i '/qtqt:245/a\# add serial console access:\ngett:235:respawn:/sbin/getty -L 115200 ttymxc0 vt102' /etc/inittab
i was forgotten to tell that i have discovered the save option of vi in u-boot mode to edit files .
if you want to edit some file use vi (filename) than when you want to add text u use the (i) option when added the text and you want to exit vi than use the (escape) and to close and save use (CTRL+ZZ) and your file is saved with the added text.

best regards,trey
TheHogNL
Forum Moderator
Forum Moderator
Posts: 2125
Joined: Sun Aug 20, 2017 8:53 pm

Re: Fully automated rooting script

Post by TheHogNL »

Yes, without the proper busybox you won't get user login prompt on serial port.

You can just easily set your root password from the uboot method. SSH login requires a root password to be set. It doesn't allow a empty password.
Member of the Toon Software Collective
Post Reply

Return to “Toon Rooting”