For Kodi there is a great pvr.teleboy add-on, created by rbuehlma.
Unfortunately, if you want to compile this add-on by yourself for whatever reason, there is no reliable step-by-step instruction on how to compile this add-on for Linux, Windows or Android installation of Kodi anywhere. So I went through the steps and here is the solution:
Note
Note
Note
For such a case it is important to understand that the build management tool is scattering logs in a non-sequential way across the command line interface when multiple CPU cores are provided to run multiple building threads in parallel. Because of this and because the cmd-cache is limited, important log information for troubleshooting may not be visible to the user in a userful way - if even. To workaround this, after a failed build operation, please start the build operation again by replacing the according make -j$(getconf _NPROCESSORS_ONLN)
command by make -j1
. The latter will limit the provided CPU cores to a single one which will also limit the build process into single threads (while the former provides the whole available system's CPU cores which makes multi-threading possible). This will provide the build management tool's progression sequentially on the command line interface which will make troubleshooting in case of a failed compile operation much easier - or even possible in the first place.
Installing dependencies:
$ sudo apt-get install cmake build-essential kodi-addons-dev libtinyxml-dev git
$ mkdir ~/tmp $ cd ~/tmp $ git clone https://github.com/Pulse-Eight/platform.git $ mkdir ./platform/build $ cd ./platform/build $ cmake .. $ make -j$(getconf _NPROCESSORS_ONLN) $ sudo make install $ sudo ldconfig $ cd ~/tmp $ git clone https://github.com/xbmc/kodi-platform.git $ mkdir ./kodi-platform/build $ cd ./kodi-platform/build $ cmake .. $ make -j$(getconf _NPROCESSORS_ONLN) $ sudo make install $ sudo ldconfig $ cd ~/tmp $ git clone --branch Matrix https://github.com/xbmc/xbmc.git $ git clone --branch Matrix https://github.com/rbuehlma/pvr.teleboy.git $ cd ./pvr.teleboy && mkdir build && cd build $ cmake -DADDONS_TO_BUILD=pvr.teleboy -DADDON_SRC_PREFIX=../.. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=../../xbmc/addons -DPACKAGE_ZIP=1 ../../xbmc/cmake/addons $ make package-pvr.teleboy -j$(getconf _NPROCESSORS_ONLN)
You will find the according compiled .zip
-package here:
~/tmp/pvr.teleboy/build/build/zips/pvr.teleboy+linux/pvr.teleboy-18.2.3.zip
You need to have installed the following depending applications before proceeding:
cd /D C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build vcvars64.bat mkdir C:\temp\teleboy cd /D C:\temp\teleboy git clone https://github.com/Pulse-Eight/platform.git cd platform git submodule update --init --recursive cd windows build.cmd cd /D C:\temp\teleboy git clone --branch Matrix https://github.com/xbmc/xbmc.git git clone --branch Matrix https://github.com/rbuehlma/pvr.teleboy.git cd pvr.teleboy mkdir build cd build cmake -DADDONS_TO_BUILD=pvr.teleboy -DADDON_SRC_PREFIX=../.. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=../../xbmc/addons -DPACKAGE_ZIP=1 ../../xbmc/cmake/addons msbuild pvr.teleboy.vcxproj /p:Configuration=Release cd /D C:\temp\teleboy\pvr.teleboy\build\pvr.teleboy-prefix\src\pvr.teleboy-build cpack
You will find the according compiled .zip
-package here:
C:/Users/<myUser>/AppData/Local/Temp/addon-pvr.teleboy-18.2.3-windows-x86_64.zip
Note: Compiling for Android is a more complex process as here we will have to cros-compile our Teleboy add-on. If something does not work the way as it is intended, please take help from the Kodi team via the official Kodi forum via the Development catergory.
Helpful links:
First of all, please take not of the following helpful links:
Helpful links
Settings
→ System information
→ Summary
Getting the Android device's architecture:
First off, because there are many(!) different Android devices based on different hardware on the market, you should first get to know about which architecture you need to compile for. To get the correct architecture you should use a shell client app on your Android device, for example ConnectBot.
After you have installed ConnectBot, please open the app and start a new session by tapping on the +
-icon. Then tap on protocol
and choose local
. Now insert and execute the following command:
$ uname -m
The command line output will give you the architecture your Android device is based on, e.g. aarch64
or armv7
(32-bit) or armv8
(64-bit), …
Please keep this output information as you will need it later on.
Installing dependencies:
Now, on your compiling machine, install the according dependencies as follows:
$ sudo apt-get install openjdk-18-jre build-essential git curl autoconf unzip zip zlib1g-dev gawk gperf cmake lib32stdc++6 lib32z1 lib32z1-dev libcurl4-openssl-dev kodi-addons-dev libtinyxml-dev bison flex
Note: As already mentioned the following cross-compiling example is for an aarch64 architecture Kodi 21.x Omega add-on target on Android version 13.
The following is just a (working) example. Replace the acording settings as you need for your specific target (Again: Read the official Kodi documentation linked above!):
// Get the latest SDK from here (Look for "Get just the command line tools"): // https://developer.android.com/studio // Replace the following link/file with the latest SDK download. $ cd ~/Downloads $ wget https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip $ mkdir -p $HOME/android-tools/android-sdk-linux $ unzip $HOME/Downloads/commandlinetools-linux-11076708_latest.zip -d $HOME/android-tools/android-sdk-linux/ $ rm -rf $HOME/Downloads/commandlinetools-linux-11076708_latest.zip // Before Android SDK can be used, you need to accept the licenses and configure it: $ cd $HOME/android-tools/android-sdk-linux/cmdline-tools/bin $ ./sdkmanager --sdk_root=$(pwd)/../.. --licenses # Confirm every query by inserting "y" $ ./sdkmanager --sdk_root=$(pwd)/../.. platform-tools $ ./sdkmanager --sdk_root=$(pwd)/../.. "platforms;android-33" # Select Andriod API version $ ./sdkmanager --sdk_root=$(pwd)/../.. "build-tools;33.0.1" # Select build tools version $ ./sdkmanager --sdk_root=$(pwd)/../.. "ndk;21.4.7075529" # Select NDK version // All packages must be signed. The following command will generate a self-signed debug key. If the result is a cryptic error, it probably just means a debug key already existed. $ keytool -genkey -keystore ~/.android/debug.keystore -v -alias androiddebugkey -dname "CN=Android Debug,O=Android,C=US" -keypass android -storepass android -keyalg RSA -keysize 2048 -validity 10000 // Get the according Kodi branch source code: $ cd $HOME $ git clone -b Omega https://github.com/xbmc/xbmc kodi // Prepare to configure build: $ cd $HOME/kodi/tools/depends $ ./bootstrap // Configure build for aarch64: $ ./configure --with-tarballs=$HOME/android-tools/xbmc-tarballs --host=aarch64-linux-android --with-sdk-path=$HOME/android-tools/android-sdk-linux --with-ndk-path=$HOME/android-tools/android-sdk-linux/ndk/21.4.7075529 --prefix=$HOME/android-tools/xbmc-depends // Build tools and dependencies (This may take a long time!): $ make -j$(getconf _NPROCESSORS_ONLN) // Build the pvr.teleboy add-on: $ cd $HOME/kodi $ make -j$(getconf _NPROCESSORS_ONLN) -C tools/depends/target/binary-addons ADDONS="pvr.teleboy" // Build the pvr.teleboy .ZIP-package: $ cd $HOME/kodi/tools/depends/target/binary-addons/aarch64-linux-android-21-debug $ make package-pvr.teleboy // Move the built .ZIP-package to the user's home folder: $ mv $HOME/kodi/tools/depends/target/binary-addons/aarch64-linux-android-21-debug/pvr.teleboy-prefix/src/pvr.teleboy-build/pvr.teleboy-0.1.1-Android.zip ~
Note that for some reason the build management tool is not naming the .ZIP-package accordingly, the version number on the package (version 0.1.1
in this case) is completely wrong.
Now after everything went successfully you might thinks this is it and you can just upload the .ZIP-package to your Android device and install the add-on, right? But wait…
You will take notice that the add-on installation will fail due to …wrong file structure
error message. So what's the deal here? Well, when taking a look into the generated .ZIP-package it comes out that the folder/file structure which is being generated automatically as follows is indeed wrong:
. ├── lib │ └── kodi │ └── addons │ └── pvr.teleboy │ └── libpvr.teleboy.so └── share └── kodi └── addons └── pvr.teleboy ├── addon.xml ├── fanart.jpg ├── icon.png ├── LICENSE.txt └── resources ├── eit_categories.txt ├── language │ └── resource.language.en_gb │ └── strings.po │ └── resource.language.de_de │ └── strings.po └── settings.xml
So the next step is to unzip the generated .ZIP-package, adjust the file structure and delete the needless data as follows and also copy and add the following file manually from here (this is due to the build management tool does not include the required libpvr.teleboy.so
file into the .ZIP-package for whatever reason):
$HOME/kodi/tools/depends/target/binary-addons/aarch64-linux-android-21-debug/pvr.teleboy-prefix/src/pvr.teleboy-build/libpvr.teleboy.so
The .ZIP-package's folder/file structure is supposed to look like this (Yes, you have to delete the ./lib
folder from above completely and you also have to extract the pvr.teleboy
folder from ./share/kodi/addon
completely):
pvr.teleboy ├── addon.xml ├── fanart.jpg ├── icon.png ├── libpvr.teleboy.so ├── LICENSE.txt └── resources ├── eit_categories.txt ├── language │ └── resource.language.en_gb │ └── strings.po │ └── resource.language.de_de │ └── strings.po └── settings.xml
Now create the .ZIP-package manually again, copy it over to your Android Kodi installation and install it (Please note that you will also need to install the inputstream.adaptive
add-on (which you can install from the official Kodi video add-on repository) first before installing the pvr.teleboy
add-on.).
Appreciate my work?
Buy me a coffee or PayPal