Reimplementation of Nintendo Switch contents-delivery. This implements a server which nssu-updater can connect to over the network for installing sysupdates (this is also used internally by nssu-updater itself, see below).
Output from running the app without args or with -h
:
Usage: contents_delivery_manager [options]
--help, -h Display this information.
--log, -l Enable logging to the specified file, or if path not specified stdout.
--server, -s Run as a server (default).
--client, -c Run as a client.
--address, -a Hostname or IPv4 address to bind/connect to. With server the default is 0.0.0.0.
--port, -p Port, the default is 55556.
--datadir, -d Sysupdate data dir path.
--depth, -e Sysupdate data dir scanning depth, the default is 3.
--tmpdir, -t Temporary directory path used during datadir scanning, this will be automatically deleted when usage is finished. The default is 'tmpdir'.
Only server-mode should be used, client-mode is for testing. --datadir
is required for server-mode. Example command: contents_delivery_manager -s --datadir {path} --log[=path]
The datadir is the directory containing the sysupdate content data. The datadir is scanned recursively with a maximum depth of {see --depth option}. During scanning files/directories which have a name starting with '.' are ignored. Content filenames must be one of the following: *{hex ContentId}
, {hex ContentId}.nca
, or {hex ContentId}.cnmt.nca
. Meta content must have filenames ncatype0_*{hex ContentId}
(where *
is ignored), or {hex ContentId}.cnmt.nca
.
During Meta loading with datadir-scanning the Meta content is extracted using hactool (see the --tmpdir
option): you must have keys setup for decrypting [1.0.0+] content. The hactool executable must be located in $PATH
, make sure running hactool {content}.cnmt.nca
works without throwing errors. The hactool package is automatically installed when installing the contents-delivery-manager package (see the below Download section).
All content required for installing the sysupdate requested by the client must be present in the datadir: if the client is more than 1 system-version behind the requested version, make sure the content for those versions are also present if there isn't a newer version of that content.
Like nim, this server implementation only supports 1 client. When finished with the client connection, the server will stop running.
Check the log when issues occur. For error-codes, see switchbrew.
With the toolchain setup, run sudo (dkp-)pacman -S contents-delivery-manager
to install. Make sure your $PATH
includes $DEVKITPRO/tools/bin
.
./autogen.sh && mkdir build && cd build && ../configure && make
Building requires libnx.
The common/ directory can be used externally, nssu-updater uses this.
- This uses the SHA256 implementation from nettle, bundled under common/nettle/. This is only used on pc, on Switch libnx is used.