It's a bit tricky, but for self-contained binary addons like tvheadend without dependencies it's doable. Main problem is getting the latest ZIP . You can do this with that shell script:
Bash
#!/bin/sh
if [ $# -ne 1 ] ; then
echo "usage: $0 addon-id"
exit 1
fi
set -e
ADDON_NAME="$1"
DATADIR=$(xmlstarlet sel -t -v \
"/addon/extension/datadir[@zip='true']" \
/usr/share/kodi/addons/repository.libreelec.tv/addon.xml)
ADDONS_XML_GZ=$(xmlstarlet sel -t -v \
"/addon/extension/info" \
/usr/share/kodi/addons/repository.libreelec.tv/addon.xml)
wget -O - "$ADDONS_XML_GZ" | zcat > /tmp/addons.xml
VERSION=$(xmlstarlet sel -t -v \
"/addons/addon[@id='${ADDON_NAME}']/@version" \
/tmp/addons.xml )
ADDON_FILENAME="${ADDON_NAME}-${VERSION}.zip"
wget "${DATADIR}/${ADDON_NAME}/${ADDON_FILENAME}"
echo "addon $ADDON_FILENAME downloaded"
Display More
name it eg "get-addon.sh" and then run "sh get-addon.sh service.tvheadend42"
Then stop your current tvheadend (via systemctl stop service.tvheadend42), unzip the file in /storage/.kodi/addons, make sure all files in the bin subdir have executable permissions (otherwise to a chmod +x /storage/.kodi/addons/service.tvheadend42/bin/*), then start it via "systemctl start service.tvheadend42".
That's basically what kodi is doing as well.
so long,
Hias