Page 1 of 1

[App] libCMDonPVR D/E/F/H - Run scripts on PVR start/stop

Posted: Sun May 10, 2015 9:53 pm
by zoelechat
This patch allows to run distinct scripts or system commands on PVR recording start/stop.

Usage:
*For D series (arm), replace every instance of /mnt below by /mtd_rwcommon/widgets/user/SamyGO/SamyGO
  • Get latest samyGOso from there and copy/overwrite samyGOso file (not folder) to /mnt/opt/privateer/usr/bin
  • Set permissions if needed (usually not if overwritten)

    Code: Select all

    chmod +x /mnt/opt/privateer/usr/bin/samyGOso
  • Extract attached archives and copy libCMDonPVR.so to /mnt/opt/privateer/usr/libso (create folder if needed).
  • Execute

    Code: Select all

    samyGOso -d -A -B -r -l /mnt/opt/privateer/usr/libso/libCMDonPVR.so arg1 [arg2...arg4]
    At least one arg is mandatory. Usable ones are:
    • CMD_START:/full_path/to/cmd - Launches cmd script/command on PVR recording start.
    • CMD_STOP:/full_path/to/cmd - Launches cmd script/command on PVR recording stop.
    • CMD_START_OFF:/full_path/to/cmd - Same as CMD_START, but when TV is off (scheduled/soft-off state).
    • CMD_STOP_OFF:/full_path/to/cmd - Same as CMD_STOP, but when TV is off (scheduled/soft-off state).
    Recording path/filename is passed as 1st arg of stop cases CMDs ($1 = /dtv/usb/sd*/CONTENTS/*.srf)

    Logfile is written to /dtv/CMDonPVR.log
  • Autostart
    • First edit OPTIONS field in 99_92_CMDonPVR.init and copy script to /mnt/etc/init.d
    • Set permissions

      Code: Select all

      chmod +x /mnt/etc/init.d/99_92_CMDonPVR.init
    • Sample OPTIONS:

      Code: Select all

      OPTIONS="CMD_STOP:/mtd_rwcommon/cmdstop.sh CMD_START_OFF:/mtd_rwcommon/cmdstartoff.sh"
*Changelog:

Code: Select all

10/5/2015
v0.1.0 - First public release

Re: [App] libCMDonPVR D/E/F/H - Run scripts on PVR start/stop

Posted: Sat Oct 24, 2015 2:34 pm
by wifi75
What is this script?

Re: [App] libCMDonPVR D/E/F/H - Run scripts on PVR start/stop

Posted: Sat Oct 24, 2015 2:36 pm
by zoelechat
If you don't understand, it means you don't need it :)

Re: [App] libCMDonPVR D/E/F/H - Run scripts on PVR start/stop

Posted: Sat Oct 24, 2015 2:38 pm
by wifi75
sorry but I don't know pvr, what is?

Re: [App] libCMDonPVR D/E/F/H - Run scripts on PVR start/stop

Posted: Sat Oct 24, 2015 2:40 pm
by zoelechat

Re: [App] libCMDonPVR D/E/F/H - Run scripts on PVR start/stop

Posted: Sun Jan 17, 2016 12:59 pm
by Poloche9x7
Hi,

I want to run record session via my PC, when TV is soft-OFF... Is this app do it please ?
Is this app can run record session and choose Channel ?

Thaknx

Re: [App] libCMDonPVR D/E/F/H - Run scripts on PVR start/stop

Posted: Sun Jan 17, 2016 1:09 pm
by zoelechat
Nope, it just sends a command/script when recording starts and/or when it stops, it receives nothing.

Re: samyGOso (.so injection - patching exeDSP/exeAPP)

Posted: Sat Aug 31, 2019 12:47 pm
by ssdfsewerwv
I am trying to use this patch, but after injecting it, my TV (F-Series) crashes within about 5 seconds, although the command returns "success".
I am using samyGOso Version 1.2.5 for injection.

Code: Select all

VDLinux#> samyGOso_v1.2.5 -d -A -B -l /mnt/opt/privateer/usr/libso/libCMDonPVR.so CMD_STOP:/mtd_rwcommon/afterrec.sh
samyGOso v1.2.5 (c) bugficks 2013-2014, sectroyer 2014-2015
Injecting '/mnt/opt/privateer/usr/libso/libCMDonPVR.so' resident: '0'
mprotect: 0x41e96f80
dlopen: 0x42158c5c
dlclose: 0x42158cf0
dlsymaddr: 0x42158d50
pc=41fc4654 lr=41fc4638 sp=bea3fe80 fp=80
r0=be2a1f4 r1=80
r2=1 r3=0
stack: 0xbea20000-0xbea41000 length = 135168
executing injection code at 0xbea3fd1c
library injection completed!
Succeeded.
The other patch running is NoDRM, which I inject with some older version of SamyGOso (not printing a version when invoking). NoDRM works fine.

Any ideas?

Re: [App] libCMDonPVR D/E/F/H - Run scripts on PVR start/stop

Posted: Sat Aug 31, 2019 2:09 pm
by zoelechat
Post moved.
Lib should be injected resident (-r, 1st post fixed lol, 4 years later...)
Otherwise only lib log helps, and incidentally TV model and fw number.

Re: [App] libCMDonPVR D/E/F/H - Run scripts on PVR start/stop

Posted: Sat Aug 31, 2019 2:22 pm
by ssdfsewerwv
Not crashing anymore. This did the trick. Thanks :-).