Fully automated rooting script

Everything about rooting Toons 1 and 2.

Moderators: marcelr, TheHogNL, TerrorSource, Toonz

Re: Fully automated rooting script

Postby CarlvO » Wed Dec 05, 2018 5:30 pm

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
CarlvO
Starting Member
Starting Member
 
Posts: 2
Joined: January 2018

Re: Fully automated rooting script

Postby martenjacobs » Thu Dec 06, 2018 7:16 pm

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
martenjacobs
Starting Member
Starting Member
 
Posts: 45
Joined: March 2018

Re: Fully automated rooting script

Postby alcomys » Tue Dec 11, 2018 9:08 pm

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
User avatar
alcomys
Starting Member
Starting Member
 
Posts: 22
Joined: December 2018
Location: Arnhem,Netherlands

Re: Fully automated rooting script

Postby alcomys » Tue Dec 11, 2018 9:41 pm

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
User avatar
alcomys
Starting Member
Starting Member
 
Posts: 22
Joined: December 2018
Location: Arnhem,Netherlands

Re: Fully automated rooting script

Postby TheHogNL » Wed Dec 12, 2018 11:44 am

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
User avatar
TheHogNL
Forum Moderator
Forum Moderator
 
Posts: 809
Joined: August 2017

Re: Fully automated rooting script

Postby alcomys » Wed Dec 12, 2018 6:35 pm

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 :( .
User avatar
alcomys
Starting Member
Starting Member
 
Posts: 22
Joined: December 2018
Location: Arnhem,Netherlands

Re: Fully automated rooting script

Postby TheHogNL » Wed Dec 12, 2018 8:01 pm

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
User avatar
TheHogNL
Forum Moderator
Forum Moderator
 
Posts: 809
Joined: August 2017

Re: Fully automated rooting script

Postby alcomys » Wed Dec 12, 2018 9:59 pm

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
User avatar
alcomys
Starting Member
Starting Member
 
Posts: 22
Joined: December 2018
Location: Arnhem,Netherlands

Re: Fully automated rooting script

Postby martenjacobs » Thu Dec 13, 2018 6:21 pm

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.
martenjacobs
Starting Member
Starting Member
 
Posts: 45
Joined: March 2018

Re: Fully automated rooting script

Postby alcomys » Fri Dec 14, 2018 9:14 pm

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
User avatar
alcomys
Starting Member
Starting Member
 
Posts: 22
Joined: December 2018
Location: Arnhem,Netherlands

Re: Fully automated rooting script

Postby TheHogNL » Sat Dec 15, 2018 2:12 pm

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
User avatar
TheHogNL
Forum Moderator
Forum Moderator
 
Posts: 809
Joined: August 2017

Re: Fully automated rooting script

Postby mAiden » Sat Dec 15, 2018 2:28 pm

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.
mAiden
Member
Member
 
Posts: 142
Joined: July 2017

Re: Fully automated rooting script

Postby alcomys » Sat Dec 15, 2018 5:54 pm

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
User avatar
alcomys
Starting Member
Starting Member
 
Posts: 22
Joined: December 2018
Location: Arnhem,Netherlands

Re: Fully automated rooting script

Postby alcomys » Sat Dec 15, 2018 6:43 pm

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
User avatar
alcomys
Starting Member
Starting Member
 
Posts: 22
Joined: December 2018
Location: Arnhem,Netherlands

Re: Fully automated rooting script

Postby TheHogNL » Sat Dec 15, 2018 8:47 pm

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
User avatar
TheHogNL
Forum Moderator
Forum Moderator
 
Posts: 809
Joined: August 2017

PreviousNext

Return to Toon Rooting

Who is online

Users browsing this forum: No registered users and 1 guest