Kodi Builds Stop Downloading At 40 Mb
Android build guide
This guide has been tested with Ubuntu 16.04 (Xenial) x86_64. It is meant to cross-compile Kodi for Android using Kodi'due south unified depends build system. Delight read it in full before you keep to familiarize yourself with the build process.
It should work if you're using macOS. If that is the case, read macOS specific prerequisites commencement.
Table of Contents
- Document conventions
- Install the required packages
- Prerequisites
3.i. Excerpt Android SDK and NDK
three.2. Configure Android SDK
3.3. Set up the Android toolchain
3.4. Create a key to sign debug APKs
3.v. macOS specific prerequisites - Become the source code
- Build tools and dependencies
- Build binary add together-ons
- Build Kodi
- Packet
- Install
- Debugging Kodi
i. Certificate conventions
This guide assumes y'all are using concluding
, likewise known every bit console
, control-line
or merely cli
. Commands need to be run at the terminal, one at a fourth dimension and in the provided club.
This is a comment that provides context:
this is a command this is another command and yet another i
Example: Clone Kodi'southward electric current master co-operative:
git clone https://github.com/xbmc/xbmc kodi
Commands that comprise strings enclosed in angle brackets denote something you need to change to arrange your needs.
git clone -b <branch-name> https://github.com/xbmc/xbmc kodi
Instance: Clone Kodi's current Krypton branch:
git clone -b Krypton https://github.com/xbmc/xbmc kodi
Several different strategies are used to draw your attending to certain pieces of information. In social club of how disquisitional the information is, these items are marked equally a note, tip, or warning. For example:
Note: Linux is user friendly... It's simply very particular about who its friends are.
TIP: Algorithm is what developers call code they exercise not desire to explain.
Alarm: Developers don't change light bulbs. It's a hardware problem.
back to tiptop | back to section top
2. Install the required packages
Install build dependencies needed to cantankerous-compile Kodi for Android:
sudo apt install autoconf build-essential curl default-jdk gawk git gperf lib32stdc++6 lib32z1 lib32z1-dev libcurl4-openssl-dev unzip zlib1g-dev
NOTE: If you're running a 32bit Debian/Ubuntu distribution, remove lib32stdc++half dozen lib32z1 lib32z1-dev
from the command. Note: Gradle 7.0.2+ requires Jave Runtime eleven+. Check java version past running java --version
. If version is < 11, set JAVA_HOME to java 11+ home directory._
back to top
3. Prerequisites
Building Kodi for Android requires Android NDK revision 20b. For the SDK only use the latest available. Kodi CI/CD platforms currently employ r21e for build testing and releases, so we recommend using r21e for the most tested build feel
- Android SDK (Wait for
Get just the control line tools
) - Android NDK
three.1. Extract Android SDK and NDK
Create needed directories:
mkdir -p $HOME/android-tools/android-sdk-linux/cmdline-tools
Extract Android SDK:
unzip $Domicile/Downloads/commandlinetools-linux-6200805_latest.zip -d $Home/android-tools/android-sdk-linux/cmdline-tools
NOTE: Since we're using the latest SDK available, filename tin alter over time. Suit the unzip
control accordingly.
Extract Android NDK:
unzip $Home/Downloads/android-ndk-r21e-linux-x86_64.zip -d $Home/android-tools
3.ii. Configure Android SDK
Before Android SDK can exist used, you demand to accept the licenses and configure it:
cd $Domicile/android-tools/android-sdk-linux/cmdline-tools/tools/bin ./sdkmanager --sdk_root=$(pwd)/../.. --licenses ./sdkmanager --sdk_root=$(pwd)/../.. platform-tools ./sdkmanager --sdk_root=$(pwd)/../.. "platforms;android-28" ./sdkmanager --sdk_root=$(pwd)/../.. "build-tools;28.0.iii"
3.3. Create a cardinal to sign debug APKs
All packages must be signed. The post-obit command will generate a cocky-signed debug key. If the result is a cryptic error, it probably just ways a debug key already existed.
keytool -genkey -keystore ~/.android/debug.keystore -5 -alias androiddebugkey -dname "CN=Android Debug,O=Android,C=The states" -keypass android -storepass android -keyalg RSA -keysize 2048 -validity 10000
3.4. macOS specific prerequisites
- Coffee Development Kit 11+ (JDK) installed.
- Normal macOS installations filesystem is case insensitive but compiling for Android requires a case sensitive filesystem. Generate a writeable hdd paradigm and format it with hfs+ (example sensitive) issuing
-
hdiutil create -type UDIF -fs 'Case-sensitive Journaled HFS+' -size 20g -volname android-dev $Abode/android-dev.dmg
-
- Whenever yous want to compile/develop you lot demand to mount the image
-
open up ~/android-dev.dmg
-
- Once you lot have your hdd image with case sensitive hfs+ file organization execute all the steps inside of this filesystem. You demand to conform all paths in this guide so that they match your local environment. As an case hither is a configure line that demonstrates possible paths:
-
./configure --with-tarballs=/Users/Shared/xbmc-depends/tarballs --host=arm-linux-androideabi --with-sdk-path=/Volumes/android-dev/android/android-sdk-macosx --with-ndk-path=/Volumes/android-dev/android/android-ndk-r21e --prefix=/Volumes/android-dev/android/xbmc-depends
-
back to top | back to department top
four. Get the source lawmaking
Alter to your home
directory:
Clone Kodi's current master branch:
git clone https://github.com/xbmc/xbmc kodi
5. Build tools and dependencies
Ready to configure build:
cd $Domicile/kodi/tools/depends ./bootstrap
TIP: Wait for comments starting with Or ...
and just execute the command(s) you need.
Configure build for aarch64:
./configure --with-tarballs=$Dwelling house/android-tools/xbmc-tarballs --host=aarch64-linux-android --with-sdk-path=$HOME/android-tools/android-sdk-linux --with-ndk-path=$HOME/android-tools/android-ndk-r21e --prefix=$Home/android-tools/xbmc-depends
Or configure build for arm:
./configure --with-tarballs=$HOME/android-tools/xbmc-tarballs --host=arm-linux-androideabi --with-sdk-path=$Abode/android-tools/android-sdk-linux --with-ndk-path=$HOME/android-tools/android-ndk-r21e --prefix=$Home/android-tools/xbmc-depends
Or configure build for x86:
./configure --with-tarballs=$Dwelling/android-tools/xbmc-tarballs --host=i686-linux-android --with-sdk-path=$HOME/android-tools/android-sdk-linux --with-ndk-path=$HOME/android-tools/android-ndk-r21e --prefix=$Domicile/android-tools/xbmc-depends
Or configure build for x86_64:
./configure --with-tarballs=$HOME/android-tools/xbmc-tarballs --host=x86_64-linux-android --with-sdk-path=$HOME/android-tools/android-sdk-linux --with-ndk-path=$HOME/android-tools/android-ndk-r21e --prefix=$HOME/android-tools/xbmc-depends
Notation: Android x86 and x86_64 are not maintained and are not 100% certain that everything works correctly!
Build tools and dependencies:
brand -j$(getconf _NPROCESSORS_ONLN)
TIP: By calculation -j<number>
to the make command, you lot can choose how many concurrent jobs will exist used and expedite the build process. It is recommended to apply -j$(getconf _NPROCESSORS_ONLN)
to compile on all bachelor processor cores. The build machine can also be configured to do this automatically by calculation export MAKEFLAGS="-j$(getconf _NPROCESSORS_ONLN)"
to your shell config (due east.g. ~/.bashrc
).
Alarm: Await for the Dependencies congenital successfully.
success message. If in doubt run a single threaded make
command until the message appears. If the single make fails, clean the specific library by issuing make -C target/<name_of_failed_lib> distclean
and run make
again.
back to summit | back to section top
six. Build binary add-ons
Yous can discover a complete listing of available binary add-ons here.
Change to Kodi's source code directory:
Build all add together-ons:
make -j$(getconf _NPROCESSORS_ONLN) -C tools/depends/target/binary-addons
Build specific add together-ons:
brand -j$(getconf _NPROCESSORS_ONLN) -C tools/depends/target/binary-addons ADDONS="audioencoder.flac pvr.vdr.vnsi audiodecoder.snesapu"
Build a specific group of add-ons:
make -j$(getconf _NPROCESSORS_ONLN) -C tools/depends/target/binary-addons ADDONS="pvr.*"
For boosted information on regular expression usage for ADDONS_TO_BUILD, view ADDONS_TO_BUILD section located at Kodi add-ons CMake based buildsystem
back to top
vii. Build Kodi
Configure CMake build:
cd $Domicile/kodi make -C tools/depends/target/cmakebuildsys
TIP: BUILD_DIR tin can be provided every bit an argument to cmakebuildsys. This allows y'all to provide an alternating build location. Alter all paths onwards as required if BUILD_DIR option used.
mkdir $Abode/kodi-build make -C tools/depends/target/cmakebuildsys BUILD_DIR=$HOME/kodi-build
Build Kodi:
cd $HOME/kodi-build make -j$(getconf _NPROCESSORS_ONLN)
back to top
viii. Packet
CMake generates a target chosen apk
which will package Kodi gear up for distribution.
Create package:
Generated apk
file will be inside $Domicile/kodi
.
back to top
ix. Install
Connect your Android device to your computer through USB and enable the Unknown sources
option in your device settings.
Make sure adb
is installed:
Install Kodi:
cd $HOME/kodi-android adb devices adb -due south <device-id> install -r <generated-apk-name-here>.apk
The device-id tin be retrieved from the list returned by the adb devices
command and is the first value in the row representing your device.
back to top
x. Debugging Kodi
To exist able to run across what is happening while running Kodi you need to enable USB debugging
in your device settings (already enabled in the Android Emulator).
Access the log output of your Android device:
adb -s <device-id> logcat
Install a new build over the existing one:
adb -e install -r images/xbmcapp-debug.apk
Launch Kodi on Android Emulator without the GUI:
adb shell am start -a android.intent.action.MAIN -northward org.xbmc.xbmc/android.app.NativeActivity
Kill a misbehaving Kodi:
adb shell ps | grep org.xbmc | awk '{print $two}' | xargs adb beat out kill
Filter logcat messages by a specific tag (e.g. Kodi
):
Enable CheckJNI (before starting the Kodi):
adb crush setprop debug.checkjni 1
Notation: These commands assume that current directory is tools/android/packaging
and that the proper SDK/NDK paths are set.
GDB can be used to debug, though the support is rather primitive. Rather than using gdb directly, you volition demand to utilise ndk-gdb which wraps information technology. Practise non trust the -p/--project
switches, as they do not piece of work. Instead you will need to cd
to tools/android/packaging/xbmc
and execute it from there.
ndk-gdb --start --delay=0
This will open the installed version of Kodi and interruption. The warnings tin can exist ignored as we have the appropriate paths already setup.
back to meridian | back to section top
DOWNLOAD HERE
Posted by: cruickshankwhadeand44.blogspot.com
0 Comments