Page 12 of 26

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series

Posted: Thu Jul 24, 2014 2:30 pm
by gogo
sectroyer wrote:
gogo wrote:Why this command don't work?

umount /mtd_rwarea/passwd
umount: can't umount /mtd_rwarea/passwd: Invalid argument
because you are not using latest stuff :) As a result your /mtd_rwarea/passwd is not mounted. You can check it by running:

Code: Select all

mount
This is then unnecessary.
It is enough only:
rm /mtd_rwarea/passwd

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series

Posted: Sat Nov 01, 2014 4:36 pm
by mmhorda
I didn't really find out what should we do for D series.
Coud you please help?
Thanks

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series

Posted: Mon Feb 02, 2015 10:30 pm
by miksi
sectroyer wrote:
gogo wrote:Why this command don't work?

umount /mtd_rwarea/passwd
umount: can't umount /mtd_rwarea/passwd: Invalid argument
because you are not using latest stuff :) As a result your /mtd_rwarea/passwd is not mounted. You can check it by running:

Code: Select all

mount
Hello sectroyer,

what of the "new stuff" is enough to get /mtd_rware/passwd mounted?
I did all of the lines in your post about F series, and still with mount command I can't see it mounted.
Telnet, FTP works but with SSH I get authentication failed.

21:05:36.746 Started a new SSH2 session.
21:05:36.755 Connecting to SSH2 server 192.168.1.20:22.
21:05:36.755 Connection established.
21:05:36.763 Server version: SSH-2.0-dropbear_2011.54
21:05:36.763 First key exchange started.
21:05:37.177 Received a new host key from the server. Algorithm: RSA, size: 1039 bits, MD5 fingerprint: c7:26:5a:47:96:47:16:9e:80:9b:0f:be:36:7b:80:60, Bubble-Babble: xodaf-pozis-tybis-vimem-kynuh-zobak-pekus-desob-lihom-sopez-toxax.
21:05:37.185 First key exchange completed using diffie-hellman-group14-sha1. Session encryption: aes256-ctr, MAC: hmac-sha1, compression: none.
21:05:37.185 Attempting keyboard-interactive authentication.
21:05:37.767 Authentication failed. Remaining authentication methods: 'publickey,password'.
21:05:48.741 Attempting password authentication.
21:05:48.749 Authentication failed. Remaining authentication methods: 'publickey,password'.
21:05:58.474 Attempting password authentication.
21:05:58.483 Authentication failed. Remaining authentication methods: 'publickey,password'.
21:06:00.142 Authentication aborted on user's request.
21:06:00.151 The SSH2 session has been terminated.

Command:
$SYSROOT/bin/busybox mount | grep "etc" gives

/dev/mmcblk0p16 on /etc/profile type emmcfs (rw,relatime)
/dev/mmcblk0p16 on /etc/passwd type emmcfs (rw,relatime)
/dev/mmcblk0p16 on /etc/profile type emmcfs (rw,relatime)
/dev/mmcblk0p16 on /etc/passwd type emmcfs (rw,relatime)

Best regards

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series

Posted: Mon Feb 02, 2015 11:11 pm
by sectroyer
Use new rooting method. Than passwd IS mounted :)

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series

Posted: Mon Feb 02, 2015 11:43 pm
by miksi
So I can root my F6510 model fw1119 also with the new root method (for fw>=1120)? Ok. Thanks. I will try it soon.

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series

Posted: Mon Feb 02, 2015 11:53 pm
by zoelechat
miksi wrote:So I can root my F6510 model fw1119 also with the new root method (for fw>=1120)?
Confirmed :)

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series

Posted: Tue Feb 03, 2015 12:06 am
by miksi
And then I will have Skype functional again. Minus one flash stick "permanently" attached.
Again, thanks for great effort and sharing knowledge. This things are sometimes mind bogling because one needs to pay attention to many things simultaneously. Cheers.

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series

Posted: Tue Feb 03, 2015 11:24 pm
by miksi
And now I can confirm, new root method for "old" firmwares works, telnet, SSH, SCP all works as it should for F6510. I have occasional TV restarts but that's nothing new.
I want to try recording on NFS shares (on my PC) again. I did it once before but I forgot exact procedure. It will come up eventually. Regards.

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series

Posted: Wed Mar 04, 2015 3:04 pm
by tempinbox
sectroyer wrote:THIS PART IS ONLY FOR C!!!!!!
FOR OTHER MODELS CHECK OTHER POSTS :)!!!!!!
I wanted to make as little changes to original SamyGO files as possible. Therefore (whenever it was possible) I have put most of my code in seperate files (rcEXT, rc.fix_telnetd, etc.). However probably it could be simplified and integrated directly with existing files (/dtv/.ashrc or /dtv/SGO.env). In order to make telnet working correctly (full bash history across reconnects and restarts, no more need to type . /dtv/SGO.env to have everything set up). You have to create following files:

$SYSROOT/rcEXT:

Code: Select all

#!/bin/sh

source /dtv/SGO.env

#echo "alias sgopwd='cd $1'" >> /dtv/SGO.env

echo "#!/dtv/network_opt/sh" > /dtv/sgoshfix
echo ". /dtv/SGO.env" >> /dtv/sgoshfix
echo "export HOME=\"$1\"" >> /dtv/sgoshfix
echo "export TERMINFO='$1/etc/terminfo'" >> /dtv/sgoshfix
echo "export TERM='xterm-color'" >> /dtv/sgoshfix
echo "export FRAMEBUFFER='/dev/sam/fb0'" >> /dtv/sgoshfix
echo "export LD_LIBRARY_PATH=\"$LD_LIBRARY_PATH\"" >> /dtv/sgoshfix
echo "export PATH=\"$PATH\"" >> /dtv/sgoshfix
echo "export SYSROOT=\"$SYSROOT\"" >> /dtv/sgoshfix
echo "export PS1='\u@tv:\w \\$ '" >> /dtv/sgoshfix

chmod +x /dtv/sgoshfix

ln -s "$SYSROOT/opt/privateer/usr/bin/" /dtv/bin

$1/etc/rc.fix_telnetd&
$SYSROOT/etc/rc.fix_telnetd:

Code: Select all

#!/bin/sh
killall telnetd
. /dtv/sgoshfix
cd
telnetd -l /dtv/network_opt/sh
In some cases you may have to run:

Code: Select all

chmod +x $SYSROOT/rcEXT
chmod +x $SYSROOT/etc/rc.fix_telnetd
Finally add to the end of $SYSROOT/rcSGO this single line:

Code: Select all

$1/rcEXT "$1"
After this you will have "fixed" telnet working. In order to "fix" SSH you just have to change the file $SYSROOT/etc/rc.sysinit. Locate the line:

Code: Select all

echo "export PS1='# '" >> /mtd_rwarea/profile
Comment it out and put bellow these lines:

Code: Select all

echo "PS1='\u@tv:\w \# '" >> /mtd_rwarea/profile
echo -e "ENV=/dtv/.ashrc\nexport ENV\n" >> /mtd_rwarea/profile
echo ". /dtv/sgoshfix" >> /mtd_rwarea/profile
 
mount -o bind /dtv/network_opt/sh /bin/sh 
Now both telnet and SSH have colors, full bash history across reconnects/reboots and always start a shell in $SYSROOT directory.

To get SCP working we just need to copy patched dropbear binary (attached in archive) to:

Code: Select all

$SYSROOT/opt/privateer/usr/sbin/dropbear
and scp static binary to:

Code: Select all

/opt/privateer/usr/bin/scp
hi sectroyer i try to fix telnet and ssh with this i copy samygoscp to my samygo directory but it seems don't work
when i connect to telnet with putty there are no colors and no history.
my tv is c series

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series

Posted: Wed Mar 04, 2015 5:00 pm
by sectroyer
tempinbox wrote:
sectroyer wrote:THIS PART IS ONLY FOR C!!!!!!
FOR OTHER MODELS CHECK OTHER POSTS :)!!!!!!
I wanted to make as little changes to original SamyGO files as possible. Therefore (whenever it was possible) I have put most of my code in seperate files (rcEXT, rc.fix_telnetd, etc.). However probably it could be simplified and integrated directly with existing files (/dtv/.ashrc or /dtv/SGO.env). In order to make telnet working correctly (full bash history across reconnects and restarts, no more need to type . /dtv/SGO.env to have everything set up). You have to create following files:

$SYSROOT/rcEXT:

Code: Select all

#!/bin/sh

source /dtv/SGO.env

#echo "alias sgopwd='cd $1'" >> /dtv/SGO.env

echo "#!/dtv/network_opt/sh" > /dtv/sgoshfix
echo ". /dtv/SGO.env" >> /dtv/sgoshfix
echo "export HOME=\"$1\"" >> /dtv/sgoshfix
echo "export TERMINFO='$1/etc/terminfo'" >> /dtv/sgoshfix
echo "export TERM='xterm-color'" >> /dtv/sgoshfix
echo "export FRAMEBUFFER='/dev/sam/fb0'" >> /dtv/sgoshfix
echo "export LD_LIBRARY_PATH=\"$LD_LIBRARY_PATH\"" >> /dtv/sgoshfix
echo "export PATH=\"$PATH\"" >> /dtv/sgoshfix
echo "export SYSROOT=\"$SYSROOT\"" >> /dtv/sgoshfix
echo "export PS1='\u@tv:\w \\$ '" >> /dtv/sgoshfix

chmod +x /dtv/sgoshfix

ln -s "$SYSROOT/opt/privateer/usr/bin/" /dtv/bin

$1/etc/rc.fix_telnetd&
$SYSROOT/etc/rc.fix_telnetd:

Code: Select all

#!/bin/sh
killall telnetd
. /dtv/sgoshfix
cd
telnetd -l /dtv/network_opt/sh
In some cases you may have to run:

Code: Select all

chmod +x $SYSROOT/rcEXT
chmod +x $SYSROOT/etc/rc.fix_telnetd
Finally add to the end of $SYSROOT/rcSGO this single line:

Code: Select all

$1/rcEXT "$1"
After this you will have "fixed" telnet working. In order to "fix" SSH you just have to change the file $SYSROOT/etc/rc.sysinit. Locate the line:

Code: Select all

echo "export PS1='# '" >> /mtd_rwarea/profile
Comment it out and put bellow these lines:

Code: Select all

echo "PS1='\u@tv:\w \# '" >> /mtd_rwarea/profile
echo -e "ENV=/dtv/.ashrc\nexport ENV\n" >> /mtd_rwarea/profile
echo ". /dtv/sgoshfix" >> /mtd_rwarea/profile
 
mount -o bind /dtv/network_opt/sh /bin/sh 
Now both telnet and SSH have colors, full bash history across reconnects/reboots and always start a shell in $SYSROOT directory.

To get SCP working we just need to copy patched dropbear binary (attached in archive) to:

Code: Select all

$SYSROOT/opt/privateer/usr/sbin/dropbear
and scp static binary to:

Code: Select all

/opt/privateer/usr/bin/scp
hi sectroyer i try to fix telnet and ssh with this i copy samygoscp to my samygo directory but it seems don't work
when i connect to telnet with putty there are no colors and no history.
my tv is c series
Then you didn't do all the steps :) Check once again :)