SceneSet is an application launcher service for RDK based Set-Top Boxes that automatically launches the RDK reference application during system boot up. It provides a reliable mechanism to start the reference application using the WPEFramework AppManager interface, manage preinstallation of app bundles, and monitor for over-the-air reference app updates.
SceneSet is designed to run as a systemd service that:
- Initializes communication with Thunder/WPEFramework
- Registers for reference application lifecycle events via AppManager
- Automatically launches a specified reference application
- Manages app bundle preinstallation via PreinstallManager, including first-boot factory app copying
- Monitors a download directory for new reference app packages and triggers over-the-air updates
- Restarts the reference app when a new version is installed
- Monitors reference application state changes and restarts the app if it crashes
- Handles graceful shutdown via signal handling
- Automatic App Launch: Launches the RDK reference application specified by the compile-time
SCENESET_DEFAULT_APPNAMEsetting, with optional runtime override via/opt/sceneset_app.conf - PreinstallManager Integration: Triggers app bundle preinstallation at boot and waits for completion before launching the reference app
- Factory Settings Reset (FSR) Support: Detects first boot via a marker file and copies factory app bundles to the preinstall directory using force-install mode; subsequent boots use normal (version-aware) install mode
- Over-the-Air Update Monitoring: Watches a configured download directory for new RALF packages using inotify; verifies them with libralf and stages them for installation via PreinstallManager
- Reference App Update & Restart: Detects when a new version of the reference app is installed and automatically kills and restarts it
- PackageInstaller Event Monitoring: Tracks per-package installation status from
org.rdk.AppPackageManagerto confirm successful preinstall before cleaning up staged bundles - Crash Recovery: Automatically restarts the reference app on an ABORT lifecycle error
- Signal Handling: Graceful shutdown on SIGTERM/SIGINT signals
- Systemd Integration: Reports readiness via
sd_notifyand runs as aType=notifysystemd service and·AppPackageManager·communication- Thunder Integration: Uses WPEFramework COMRPC for AppManager, PreinstallManager, and AppPackageManager communication
-
THUNDER_ACCESS: Optional path to Thunder communicator socket- Default:
/tmp/communicator
- Default:
-
SCENESET_INITIAL_DOWNLOAD_SWEEP: Process packages already present in the download directory at monitor startup- Default:
0(disabled). Accepted enabled values:1,true,yes,on. Accepted disabled values:0,false,no,off
- Default:
SCENESET_DEFAULT_APPNAME: Compile-time default application ID set through the CMake variable of the same name (can be overridden at runtime via/opt/sceneset_app.conf)
/opt/sceneset_app.conf: Optional plain-text file whose first line overridesSCENESET_DEFAULT_APPNAMEat runtime. Useful for changing the launched app without rebuilding.
Sample /opt/sceneset_app.conf
root@ipstb-mediabox-rtd1325:/opt# cat /opt/sceneset_app.conf
com.rdkcentral.Netflix
The project uses CMake for building.
- WPEFramework: Core framework and interfaces (AppManager, PreinstallManager, AppPackageManager)
- libralf: RALF package verification and metadata extraction
- libsystemd: systemd integration (
sd_notify) - gtest/gmock: For unit testing
| Variable | Default | Description |
|---|---|---|
SCENESET_DEFAULT_APPNAME |
empty/unset | Default application ID to launch when explicitly provided by the build |
FACTORY_APP_PATH |
empty/unset | Path to factory app bundles copied on first boot when explicitly provided by the build |
APP_PREINSTALL_DIRECTORY |
empty/unset | Fallback preinstall directory when explicitly provided by the build (also resolved dynamically from the PreinstallManager plugin config key appPreinstallDirectory) |
DAC_APP_CERT_PATH |
/etc/rdk/certs |
Directory containing DAC certificates for RALF package verification |
ENABLE_SYSTEM_CONFIG |
OFF |
Enables reading /etc/sceneset.conf for system-config keys such as defaultHomeApp and preinstallLocation |
ENABLE_CONFIG_OVERRIDE |
OFF |
Enables optional /opt/sceneset.conf key-level override on top of /etc/sceneset.conf |
RESTART_HOMEAPP_ALWAYS |
OFF |
When ON, reference app restarts for any TERMINATING to UNLOADED transition (not only APP_ERROR_ABORT) |
DISABLE_REFERENCE_APP_UPDATE |
OFF |
Set to ON to disable download monitoring and OTA update support |
Note: If
FACTORY_APP_PATHis set,APP_PREINSTALL_DIRECTORYmust also be set.Typical integrator-provided values may include
SCENESET_DEFAULT_APPNAME=com.rdkcentral.refui,FACTORY_APP_PATH=/etc/rdk/factoryapps, andAPP_PREINSTALL_DIRECTORY=/media/apps, but these are not the built-in CMake defaults unless passed explicitly.
- Connects to AppManager, PreinstallManager, and AppPackageManager via COMRPC
- Registers for events from all three interfaces
- Detects first boot (FSR) by checking for marker file
/opt/persistent/.sceneset_factory_apps_copied - On first boot: copies factory app bundles from
FACTORY_APP_PATHto the preinstall directory - Starts preinstall (force mode on FSR, normal mode on subsequent boots) and waits for
OnPreinstallationComplete - If preinstall succeeds, cleans up the preinstall directory; otherwise preserves files for retry on next boot
- Checks if the reference app is already installed and launches it
- Unless built with
-DDISABLE_REFERENCE_APP_UPDATE=ON, starts a download directory monitor for OTA updates
SceneSet connects to the following WPEFramework plugins at runtime:
org.rdk.AppManager— app lifecycle management and launchorg.rdk.PreinstallManager— bundle preinstallation and completion notificationorg.rdk.AppPackageManager— per-package installation status events and download directory configuration
The systemd service unit requires:
- Requires/After:
wpeframework-appmanager.service - ConditionPathExists:
/opt/ai2managers
L1 unit tests are located in Tests/L1Tests/ and use gtest/gmock alongside libralf. The test executable is SceneSetL1TestsIN.
Licensed under the Apache License, Version 2.0. See the source files for full license text.
Copyright 2024 RDK Management