Last active
August 15, 2024 07:08
-
-
Save Vodes/365a9a7775c0b21a2358731ea4eb0519 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This was tested and ran on Mint 21.2 but any modern ubuntu (or derivative) should work. | |
# This may or may not become outdated at any point in time, so I recommend double checking the original guide at https://github.com/xbmc/xbmc/blob/master/docs/README.Android.md | |
# The only command responsible for making Hi10 work is the sed command | |
# System Dependencies | |
cd $HOME | |
sudo apt install -y wget autoconf bison build-essential curl openjdk-17-jdk flex gawk git gperf lib32stdc++6 lib32z1 lib32z1-dev libcurl4-openssl-dev unzip zip zlib1g-dev | |
mkdir -p $HOME/android-tools/android-sdk-linux | |
wget https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip | |
unzip commandlinetools-linux-11076708_latest.zip -d $HOME/android-tools/android-sdk-linux/ | |
# Configure Android SDK Stuff | |
cd $HOME/android-tools/android-sdk-linux/cmdline-tools/bin | |
yes | ./sdkmanager --sdk_root=$(pwd)/../.. --licenses | |
./sdkmanager --sdk_root=$(pwd)/../.. platform-tools | |
./sdkmanager --sdk_root=$(pwd)/../.. "platforms;android-34" | |
./sdkmanager --sdk_root=$(pwd)/../.. "build-tools;33.0.1" | |
./sdkmanager --sdk_root=$(pwd)/../.. "ndk;21.4.7075529" | |
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 | |
# Clone git & Apply fancy hi10 patch (you may want to change the branch) | |
cd $HOME | |
git clone -b Omega https://github.com/xbmc/xbmc kodi | |
sed -i 's/ profile = CJNIMediaCodecInfoCodecProfileLevel::AVCProfileHigh10;//g' $HOME/kodi/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp | |
# Setup and Build dependencies | |
cd $HOME/kodi/tools/depends | |
./bootstrap | |
./configure --with-tarballs=$HOME/android-tools/xbmc-tarballs --host=arm-linux-androideabi --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 --enable-gplv3=yes --enable-debug=no | |
make -j$(getconf _NPROCESSORS_ONLN) | |
# Build all addons because why not | |
cd $HOME/kodi | |
make -j$(getconf _NPROCESSORS_ONLN) -C tools/depends/target/binary-addons | |
# Build Kodi | |
cd $HOME/kodi | |
mkdir $HOME/kodi-build | |
make -C tools/depends/target/cmakebuildsys BUILD_DIR=$HOME/kodi-build | |
cd $HOME/kodi-build | |
make -j$(getconf _NPROCESSORS_ONLN) | |
# Generate APK | |
make apk |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment