[App] libSoftPowerOff D/E/F/H

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.

zoelechat
SamyGO Moderator
Posts: 8615
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

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

Post by zoelechat »

Well, if I understood correctly (!) you could simply check "your condition" in CMD_OFF script and "sync ; micom shutdown" if true. Is that it? :)
Shutdown by micom shouldn't cause any problem, except in case TV was recording (recording might be lost).
I do NOT receive any PM. Please use forum.
mad_ady
SamyGO Project Donor
Posts: 268
Joined: Sun May 03, 2015 10:42 am

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

Post by mad_ady »

Thank you. I didn't know about the shutdown option of micom. Yes, that would do.
H6400, firmware 2602.2 downgraded to 2130
mad_ady
SamyGO Project Donor
Posts: 268
Joined: Sun May 03, 2015 10:42 am

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

Post by mad_ady »

@zoelechat: I've implemented a custom script to run on powerOn that activates LockTV if the time is right. If LockTV had been injected before, it reboots the TV (and a different script would activate on boot).
Here is the code: http://pastebin.com/kePaHqZW

When I run it from shell, it works correctly, but when I run it as an event onPower on it works, but does not inject LockTV. I dug a bit deeper, and it seems the scripts that run onPowerOn/onPowerOff are run as user 1010 (app):

Code: Select all

/mnt/scripts/onPowerOn.sh: Injecting libPinCode because we are on a weekday before 18
/mnt/scripts/onPowerOn.sh: Running as uid=1010(app) gid=1010(app) groups=500(gfx),501(video),502(audio),503(disk),504(security),506(dtvlogd),1010(app)
/mnt/scripts/onPowerOn.sh: Text injection error code:0
/mnt/scripts/onPowerOn.sh: Lock TV injection error code:0
So, what would be the best way to run some commands as root inside the script?

I tried with

Code: Select all

su -c /mnt/opt/privateer/usr/bin/samyGOso -d -A -B -l /mnt/opt/privateer/usr/libso/libText.so TEXT:'injecting libPinCode to enforce time' FONT:2 CENTER:7 TIMEOUT:5
The code exits with errorcode 1. Using quotes around the command (after -c) has the same effect.
H6400, firmware 2602.2 downgraded to 2130
zoelechat
SamyGO Moderator
Posts: 8615
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

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

Post by zoelechat »

It's expected on H, any CMD launched by lib (and even by TV) is not as root, you have to use such trick (example in libAirToSat thread IIRC):

Code: Select all

(echo "/mnt/opt/privateer/usr/bin/samyGOso -d -A -B -l /mnt/opt/privateer/usr/libso/libText.so TEXT:'injecting libPinCode to enforce time' FONT:2 CENTER:7 TIMEOUT:5" ; sleep 2) | /mnt/bin/telnet localhost 23
I do NOT receive any PM. Please use forum.
mad_ady
SamyGO Project Donor
Posts: 268
Joined: Sun May 03, 2015 10:42 am

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

Post by mad_ady »

I see. I have disabled telnet since it didn't ask for a password. Now I see it was a feature, not a bug. Perhaps I can start it listening on localhost only. Thanks
Edit: -b does just that...
H6400, firmware 2602.2 downgraded to 2130
Borygo77
SamyGO Project Donor
Posts: 129
Joined: Mon Nov 07, 2016 12:58 pm
Location: Poland
Contact:

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

Post by Borygo77 »

@zoelechat is there anyway to shutdown AV Receiver using libSoftPowerOFF ? Tryied STB option and it's not working but I probably don't fully understand how it works...
48HU7500 1008 - half rooted by mihd :P
zoelechat
SamyGO Moderator
Posts: 8615
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

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

Post by zoelechat »

I think STB option is illustrated enough, it's ONLY for RCs having "STB" button (rare but added on request).
Otherwise, unless you can remotely (through network/commandline or so) shutdown your AV receiver: No :)
I do NOT receive any PM. Please use forum.
Borygo77
SamyGO Project Donor
Posts: 129
Joined: Mon Nov 07, 2016 12:58 pm
Location: Poland
Contact:

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

Post by Borygo77 »

Well, do you know how to pull out command from on screen tools menu? There is option to power on or off my AV receiver...
48HU7500 1008 - half rooted by mihd :P
zoelechat
SamyGO Moderator
Posts: 8615
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

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

Post by zoelechat »

No idea, never seen such option :) (HDMI-CEC related?)
Possible it could correspond to that famous STB key, but can't tell you which keycode it owns (I don't cheat it by keycode there). You might try keys using samyGOrc until you find it maybe.
I do NOT receive any PM. Please use forum.
Borygo77
SamyGO Project Donor
Posts: 129
Joined: Mon Nov 07, 2016 12:58 pm
Location: Poland
Contact:

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

Post by Borygo77 »

It's not hdmi-cec related as it's disappearing after pluging in hdmi ;) Better leave it as I don't want any bootloops caused with samyGOrc :P
48HU7500 1008 - half rooted by mihd :P

Post Reply

Return to “[F] Software”