Page 1 of 3

[App] libHideSource D/E/F/H

Posted: Sat Jul 25, 2015 8:20 pm
by zoelechat
Lib hides greyed out sources from source list and/or specific user-defined ones (greyed or not). So that you don't need anymore to scroll amongst unused/unplugged ones.

Usage:
*For D series (arm), replace every instance of /mnt below by /mtd_rwcommon/widgets/user/SamyGO/SamyGO
  • First install latest samyGOso as usual, if needed.
  • Extract attached archives and copy libHideSource.so to /mnt/opt/privateer/usr/libso (create folder if needed).
  • In case you're willing to permanently (=until TV reboot) hide some source, first list your sources numbers using command:

    Code: Select all

    samyGOso -d -A -B -l /mnt/opt/privateer/usr/libso/libHideSource.so LIST
    Resulting log (/dtv/HideSource.log) should be something like this, source labels being in your local language:

    Code: Select all

    [...]
    [HideSource] lib_init, >>>
    [HideSource] Building source list...
    [HideSource] TV:        0
    [HideSource] AV:        55
    [HideSource] AV2:       56
    [HideSource] AV3:       57
    [HideSource] S-Video1:  58
    [HideSource] S-Video2:  59
    [HideSource] S-Video3:  60
    [HideSource] Component: 61
    [HideSource] Component2:        62
    [HideSource] Component3:        63
    [HideSource] PC:        64
    [HideSource] PC2:       65
    [HideSource] PC3:       66
    [HideSource] HDMI1/DVI: 67
    [HideSource] HDMI2:     68
    [HideSource] HDMI3:     69
    [HideSource] HDMI4:     70
    [HideSource] Ext.:      71
    [HideSource] Ext.2:     72
    [HideSource] Ext.3:     73
    [HideSource] DVI:       74
    [HideSource] DVI2:      75
    [HideSource] DVI3:      76
    [HideSource] IPTV:      81
    [HideSource] DisplayPort:       85
    [HideSource] RUI:       87
    [HideSource] DisplayPort2:      89
    [HideSource] DiiVA:     91
    [HideSource] Intel? WiDi:       94
    [HideSource] HDMI-CEC:  97
    [HideSource] USB:       98
    [HideSource] <<< lib_deinit
  • Next is resident injection which can take 1 or 2 args:
    • GREYED - Dynamically hides all currently greyed out sources from list.
    • PERMANENT:source_nums - Permanently hide sources by numbers listed above, comma separated if more than one.
      Do not bother about obviously "unexisting" sources, simply ignore them :)
  • Sample usage:

    Code: Select all

    samyGOso -d -A -B -r -l /mnt/opt/privateer/usr/libso/libHideSource.so GREYED PERMANENT:55,61,71
    (no space before or after commas !!)
  • Any source doesn't necessarily need to be found by LIST option for it to be hidden. In case you can't find one, once you injected lib resident, press SOURCE key (at least) once and log will show current source list in order of display. There you might find some previously "missing" number(s) (labeled "Unknown") you could permanently hide afterwards:

    Code: Select all

    [HideSource] >>> SOURCE list displayed! <<<
    [HideSource] Shown source:      0       TV
    [HideSource] Shown source:      67      HDMI1/DVI
    [HideSource] Shown source:      68      HDMI2
    [HideSource] Hidden greyed:     69      HDMI3
    [HideSource] Hidden permanent:  97      HDMI-CEC
    [HideSource] Hidden permanent:  71      Ext.
    [HideSource] Hidden greyed:     55      AV
    [HideSource] Hidden greyed:     61      Component
    [HideSource] Shown source:      98      USB
    [HideSource] Shown source:      103     Unknown
    [HideSource] >>>>>>>>>>>> DONE <<<<<<<<<<<<
    Here "103 Unknown" being DLNA, for example.
  • Autostart
    • Copy 99_93_HideSource.init to /mnt/etc/init.d
    • Set permissions

      Code: Select all

      chmod +x /mnt/etc/init.d/99_93_HideSource.init
    • You can change OPTIONS value on top of script, default is "GREYED" only. You can set for example:

      Code: Select all

      OPTIONS="GREYED PERMANENT:71,97"
*Changelog:

Code: Select all

25/7/2015
v0.2.4 - Fixed some issue on H
v0.2.3 - First public release

Re: [App] libHideSource D/E/F/H

Posted: Tue Sep 08, 2015 10:34 pm
by braulio
Hello and thank you very much for you apps. :D

I have a problem with this one: I can manually start it. But "99_93_HideSource.init" is not working for me. When I turn on TV (UE40EH5300) nothing happens. And there is no HideSource.log in /dtv. :?

Can you help me?

Re: [App] libHideSource D/E/F/H

Posted: Tue Sep 08, 2015 10:41 pm
by zoelechat
Launch command from Telnet and give output please:

Code: Select all

/mnt/etc/init.d/99_93_HideSource.init start

Re: [App] libHideSource D/E/F/H

Posted: Tue Sep 08, 2015 10:54 pm
by braulio
Thats the output:

Code: Select all

root@tv:/mnt # /mnt/etc/init.d/99_93_HideSource.init start
/mnt/bin/sh: /mnt/etc/init.d/99_93_HideSource.init: not found
root@tv:/mnt #

Re: [App] libHideSource D/E/F/H

Posted: Tue Sep 08, 2015 10:57 pm
by zoelechat
Looks like you forgot to copy startup script at its place :)
Check "Autostart" part of 1st post.

Re: [App] libHideSource D/E/F/H

Posted: Tue Sep 08, 2015 11:16 pm
by braulio
It?s weird :shock:

"99_93_HideSource.init" it's in /mnt/etc/init.d, just below "99_94_ToolsMenu.init" I promise... :? (sorry but Idon?t know how to add an image)

but...

Code: Select all

root@tv:/mnt # /mnt/etc/init.d/99_93_HideSource.init start
/mnt/bin/sh: /mnt/etc/init.d/99_93_HideSource.init: not found
root@tv:/mnt # /mnt/etc/init.d/99_94_ToolsMenu.init start
checking /dtv/usb/sdj
checking /dtv/usb/sdw1
samyGOso v1.2.4 (c) bugficks 2013, sectroyer 2014
Injecting '/mnt/opt/privateer/usr/libso/libToolsMenu.so' resident: '1'
Succeeded.
root@tv:/mnt #
I?m confused...

Re: [App] libHideSource D/E/F/H

Posted: Tue Sep 08, 2015 11:20 pm
by zoelechat
Funny :)
Maybe delete it and try again with default provided script.
No need to "add an image", you can give for example output of:

Code: Select all

ls -l /mnt/etc/init.d

Re: [App] libHideSource D/E/F/H

Posted: Tue Sep 08, 2015 11:42 pm
by braulio
Yessss.. That solved the problem: deleted and tried again.

Thank youuuu :D :D :D

Re: [App] libHideSource D/E/F/H

Posted: Wed Sep 09, 2015 10:07 am
by zoelechat
No problem, I suspect script file was existing but empty :)

Re: [App] libHideSource D/E/F/H

Posted: Fri Dec 23, 2016 12:40 pm
by Borygo77
Hey Zoele! Got some bug... After finished movie or episode file browser is exiting to live TV.... When I disable HideSource I can browse folders until exit manualy... Would ya have a look on those files please ? ;)
SpoilerShow

Code: Select all

#!/bin/sh
#
# ? Copyright 1996-2015, zoelechat@SamyGO
#
#
. /dtv/SGO.env

OPTIONS="GREYED PERMANENT:59,65,107"

SODIR=$SYSROOT/opt/privateer/usr/libso			# D/E-series only, on F/H environment LIBSO_DIR is used

stop_bootloop()
{
	for USB in /dtv/usb/sd* ; do
		echo "checking $USB"
		[ -e $USB/STOP ] && echo "STOP found. Script exit..." && exit 1
	done
}

case $1 in 
	start)
	stop_bootloop
	[ "$LIBSO_DIR" ] && SODIR=$LIBSO_DIR
	samyGOso -A -B -r -l $SODIR/libHideSource.so $OPTIONS
	sleep 3
	;;
	stop)
	;;
	status)
	[ -f /dtv/HideSource.log ] && cat /dtv/HideSource.log || echo "Not started"
	;;
	*)
	echo "Usage: $0 {start|stop|status}" 1>&2
	exit 0
	;;
esac

Code: Select all

[HideSource] SamyGO D/E/F/H libHideSource v0.2.4 - (c) zoelechat 2015
[HideSource] _ZN9PCWString7ConvertEPcPKtiiPi [0x16ef2d4].
[HideSource] dlsym '_ZN18CSourceManagerUtil28t_FlagLegacyDeviceConnectionEiPm' failed.
[HideSource] _ZN18CSourceManagerUtil28t_FlagLegacyDeviceConnectionEiPmb [0x4ecdbb0].
[HideSource] _ZNK11CSourceItem13GetSourceTextEv [0x4a7f3bc].
[HideSource] _ZN10CTVAppUtil13GetSourceNameEN8TCWindow7ESourceEPtj [0x2a85264].
[HideSource] dlsym '_ZN11CSourceUtil15GetSourceStringEi' failed.
[HideSource] _ZN11CSGHomeUtil15GetSourceStringEN8TCWindow7ESourceE [0x3c43f14].
[HideSource] lib_init, >>>
[HideSource] Building source list...
[HideSource] Dynamically hiding greyed out sources
[HideSource] Permanently hiding source 59: HDMI3
[HideSource] Permanently hiding source 65: Z??cze
[HideSource] Permanently hiding source 107: Screen Mirroring
[HideSource] dlsym '_ZN18CSourceManagerUtil15t_AddSourceItemERSt6vectorIPNS_11_SourceInfoESaIS2_EENS_11SOURCE_TYPEEib' failed.
[HideSource] _ZN18CSourceManagerUtil15t_AddSourceItemERSt6vectorIPNS_11_SourceInfoESaIS2_EENS_11SOURCE_TYPEEibbi [0x4ed1ccc].
[HideSource] Init done...
[HideSource] >>> SOURCE list displayed! <<<
[HideSource] Shown source:	0	TV
[HideSource] Hidden greyed:	57	HDMI1
[HideSource] Hidden greyed:	58	HDMI2/DVI
[HideSource] Hidden permanent:	59	HDMI3
[HideSource] Hidden greyed:	60	HDMI4
[HideSource] Hidden permanent:	65	Z??cze
[HideSource] Hidden greyed:	28	AV
[HideSource] Hidden greyed:	41	Component
[HideSource] Shown source:	229	Unknown
[HideSource] Shown source:	219	Unknown
[HideSource] Shown source:	225	Unknown
[HideSource] >>>>>>>>>>>> DONE <<<<<<<<<<<<
As you see in log Permanently hiding source 107: Screen Mirroring this should be hidden but it"s NOT ;)