[App] libSoftPowerOff D/E/F/H

Here are software that related with Samsung F series TVs.

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

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

Post by zoelechat » Thu Oct 20, 2016 11:12 am

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.

User avatar
mad_ady
SamyGO Project Donor
Posts: 237
Joined: Sun May 03, 2015 10:42 am

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

Post by mad_ady » Thu Oct 20, 2016 11:28 am

Thank you. I didn't know about the shutdown option of micom. Yes, that would do.
H6400, firmware 2602.2 downgraded to 2130

User avatar
mad_ady
SamyGO Project Donor
Posts: 237
Joined: Sun May 03, 2015 10:42 am

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

Post by mad_ady » Sat Oct 22, 2016 12:48 pm

@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: 7798
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

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

Post by zoelechat » Sat Oct 22, 2016 3:24 pm

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.

User avatar
mad_ady
SamyGO Project Donor
Posts: 237
Joined: Sun May 03, 2015 10:42 am

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

Post by mad_ady » Sat Oct 22, 2016 6:14 pm

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: 127
Joined: Mon Nov 07, 2016 12:58 pm
Location: Poland
Contact:

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

Post by Borygo77 » Wed Dec 14, 2016 9:10 pm

@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: 7798
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

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

Post by zoelechat » Wed Dec 14, 2016 10:31 pm

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: 127
Joined: Mon Nov 07, 2016 12:58 pm
Location: Poland
Contact:

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

Post by Borygo77 » Fri Dec 16, 2016 10:09 pm

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: 7798
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

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

Post by zoelechat » Fri Dec 16, 2016 10:36 pm

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: 127
Joined: Mon Nov 07, 2016 12:58 pm
Location: Poland
Contact:

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

Post by Borygo77 » Sat Dec 17, 2016 2:39 am

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”