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

Here are software that related with Samsung F series TVs.
Please don't create any new topic here unless you have software to post/release.

OlliGo
Posts: 8
Joined: Fri Mar 25, 2016 10:45 am

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

Post by OlliGo »

I read carefully through the thread, but a final solution for D was never posted. Last quote was from juusso:
yes, i saw these files on server, they slightly differ from files you`ve attached here ;)
I haven`t succeed to merge your full patch with my Extensions, somewhere i still make mistakes. As result - still no benefits you mentioned. Yet.
We could merge all for each series, so no need to distribute separate fixes. Just re-install whole widget.
He doesn't stated which changes he did. So far I don't see where /dtv/network_opt needs to be mapped to. Also rcfix_telnetd cannot work as there is no telnetd on the D. And finally I don't see any line that would start the dropbear demon. As I have done that manually result was already discussed.

@All: Anyone who has it working on D and could provide more concrete steps for it?

sectroyer
Official SamyGO Developer
Posts: 5951
Joined: Wed May 04, 2011 5:10 pm

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

Post by sectroyer »

1) No point in "starting dropbear demon" - Will NOT work until other stuff fixed :)
2) You should read all stuff and adjust it to your series. That's mine thing :)
I do NOT support "latest fw" at ALL. If you have one you should block updates on router and wait for it to STOP being "latest":)
If you want me to help you please paste FULL log(s) to "spoiler"/"code" bbcodes or provide link(s) to pasted file(s) on http://ctrlv.it/ Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!

ZizaXXX
SamyGO Project Donor
Posts: 3
Joined: Sat Jan 23, 2016 12:25 pm

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

Post by ZizaXXX »

Hello Gents,

I have UE46F8000 rooted with no problems. FTP and all apps working, however I cannot get telnet and SSH correctly working. Followed all instructions for F series in third post. Telnet is working with colours, but no executing history (i.e. if injecting, does not display "injecting...". SSH is not working at all with "CONNECTION REFUSED".

01_02_telnet.init:

Code: Select all

#!/mnt/bin/busybox sh
#
# ? Copyright 1996-2013, SamyGO
#
#
. /dtv/SGO.env

stop_bootloop()
{
# emergency skript exit to prevent boot loop
      for USB in ${1:- \
         /dtv/usb/sd* } ; do
         echo "checking $USB"
         sleep 1
         if [ -e $USB/STOP_TELNET ]; then
            "STOP_TELNET found. Script exit..."
            exit 1
         fi
      done
}

case $1 in 
	start)
	stop_bootloop # in testing phase. Just for protection.
#antishell, mount, console unlock, authuld exception, printk restrictions:
	insmod $MOD_DIR/kernel/drivers/pty/SRS_module.ko >> $LOGFILE 2>&1
	sync; sleep 1
		echo " " >> $LOGFILE 2>&1
		echo "++++++++++++++++++++++++++++++++++" >> $LOGFILE 2>&1
		echo "lsmod after insmod SRS_module.ko:" >> $LOGFILE 2>&1
		echo "++++++++++++++++++++++++++++++++++" >> $LOGFILE 2>&1
			lsmod   >> $LOGFILE 2>&1
		echo " " >> $LOGFILE 2>&1

#modules with dynamic addressing by bugficks:
	insmod $MOD_DIR/kernel/drivers/pty/ptys.ko >> $LOGFILE 2>&1 # alternative to pty.ko and devpts.ko from bugficks. Automatic mount of /dev/pts
	sync; sleep 2

# true telnet
   echo "export PS1='root@tv:\w \$ '" >> /mtd_rwarea/profile
   echo -e "ENV=/dtv/.ashrc\nexport ENV\n" >> /mtd_rwarea/profile
   echo "PS1='root@tv:\w \$ '" >> /mtd_rwarea/profile
   echo -e "ENV=/dtv/.ashrc\nexport ENV\n" >> /mtd_rwarea/profile
   /bin/mount -o bind "$SYSROOT/bin/sh" /bin/sh
   export HOME=/mnt/
   export PS1='root@tv:\w \$ '
   $SYSROOT/bin/busybox2 telnetd -p 23 -l $SYSROOT/bin/sh &  >> $LOGFILE 2>&1
	sync

#### E/F series: bind option is prohibited, you have to load proper mount.ko to use mount --bind.
	#mount our profile over original /etc/profile if mount.ko is loaded and mount issue fixed:
	$SYSROOT/bin/busybox mount -o bind /mtd_rwarea/profile /etc/profile || echo "can not mount profile!" && dmesg | tail >> $LOGFILE 2>&1

# mount our passwd file over original one (/bin/sh changed to /mnt/bin/sh )
   ln -s /mnt/bin/ /dtv/bin
      if [ ! -e /mtd_rwarea/passwd ]; then
                echo "root:saJvQKUdIxRW2:0:0:SamyGO secured Root:$HOME:/bin/sh" > /mtd_rwarea/passwd
        fi
	$SYSROOT/bin/busybox mount -o bind /mtd_rwarea/passwd /etc/passwd || echo "can not mount passwd" && dmesg | tail  >> $LOGFILE 2>&1
		echo " " >> $LOGFILE 2>&1
		echo "++++++++++++++++++++++++++++++++++" >> $LOGFILE 2>&1
		echo "checking mount --bind:"  >> $LOGFILE 2>&1
		echo "++++++++++++++++++++++++++++++++++" >> $LOGFILE 2>&1
	$SYSROOT/bin/busybox mount | grep "etc"  >> $LOGFILE 2>&1
                echo " " >> $LOGFILE 2>&1
                echo "++++++++++++++++++++++++++++++++++" >> $LOGFILE 2>&1
                echo "dmesg -c:"  >> $LOGFILE 2>&1
                echo "++++++++++++++++++++++++++++++++++" >> $LOGFILE 2>&1
			dmesg -c >> $LOGFILE 2>&1
                echo "++++++++++++++++++++++++++++++++++" >> $LOGFILE 2>&1
	;;
	stop)
	;;
	status)
	;;
	*)
	echo "Usage: $0 {start|stop|status}" 1>&2
	exit 0
	;;
esac
I am not an expert, so in case of support, can you please kindly post codes if you need me to do anything?

Many thanks in advance for your help.

Post Reply

Return to “[F] Software”