[Android Krypton Compile Guide] Step by Step

How to build Kodi Krypton for Android with no compiler errors.
This is based on xbmc/docs/README.android. I just filled in
the blanks that README.android had. The APK was tested on
Amazon FireTV.

After many hours of trying to compile Kodi for Android, I thought I could
share my steps to help prevent headaches. This is a step by step guide.
This will work with both Windows 7, and OSX (because we are using Virtual box.)

There are less things to go wrong when you start with a fresh install of the
operating system.
-----------------------------------------------
Starting Environment:
Ubuntu 16.04 LTS 64 bit(running on Windows 7 Virtual Box 5.1.14)
javac 1.8.0_121
openjdk version "1.8.0_121"
OpenJDK Runtime Environment (build 1.8.0_121-8u121-b13-0ubuntu1.16.04.2-b13)
OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode)
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
-----------------------------------------------

** Here are the steps:

----------------------
1) Install VirtualBox, then make a Linux Virtual Machine
----------------------
VirtualBox on Windows 7 host. A 30GB expandable disk for Linux is plenty.
Ubuntu 16.04 LTS 64 bit(running on Windows 7 Virtual Box)

----------------------
2) Prepare the Ubuntu installation:
----------------------
$ sudo apt-get update
$ sudo apt-get install default-jdk
$ sudo apt-get install build-essential default-jdk git curl autoconf \
unzip zip zlib1g-dev gawk gperf cmake

$ sudo apt-get install lib32stdc++6 lib32z1 lib32z1-dev
$ sudo apt-get install libcurl4-openssl-dev

----------------------
3) Get Android SDK & NDK
----------------------
a) SDK tools
$ mkdir $HOME/android-sdk-linux

get the sdk tools from the link below:
https://dl.google.com/android/repository...-linux.zip
uncompress tools_r25.2.3-linux.zip to: /$HOME/android-sdk-linux/

$ cd /$HOME/android-sdk-linux/tools
$ ./android update sdk -u -t platform,platform-tool
$ ./android update sdk --all -u -t build-tools-20.0.0

b) NDK
get the NDK from the link below
https://dl.google.com/android/repository...x86_64.zip
uncompress android-ndk-r12b-linux-x86_64.zip to /$HOME/
so you'll have: /$HOME/android-ndk-r12b

----------------------
4) Set up the Android tool chain
----------------------
$ cd /$HOME/android-ndk-r12b
$ cd build/tools
$ ./make-standalone-toolchain.sh --ndk-dir=../../ \
--install-dir=/$HOME/arm-linux-androideabi-4.9-vanilla/android-21 --platform=android-21 \
--toolchain=arm-linux-androideabi-4.9

----------------------
5) Creat debug key to sign for the APK
----------------------
$ 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

----------------------
6) Get the source code — this gets me Kodi version 17 RC1
VERSION_MAJOR 17 / VERSION_MINOR 1 / VERSION_TAG RC1
VERSION_CODE 170901 / ADDON_API 17.0.901
----------------------
$ cd $HOME
$ git clone -b Krypton git://github.com/xbmc/xbmc.git kodi-krypton
$ cd kodi-krypton

----------------------
8) Building dependencies
----------------------
$ cd $HOME/kodi-krypton/tools/depends
$ ./bootstrap
$ ./configure --with-tarballs=/$HOME/xbmc-tarballs --host=arm-linux-androideabi --with-sdk-path=/$HOME/android-sdk-linux --with-ndk=/$HOME/android-ndk-r12b --with-toolchain=/$HOME/arm-linux-androideabi-4.9-vanilla/android-21 --prefix=/$HOME/xbmc-depends

-- this next two steps would take a while. I did not follow the advice to use make -j
$ make
$ make -C target/binary-addons

----------------------
9) Building Kodi.Finally!!!! The instructions in the readme.Android are not updated.
The two lines with * are completely different than the README file.
----------------------
$ cd $HOME/kodi-krypton
* $ make -C tools/depends/target/cmakebuildsys
* $ cd /kodi-krypton/build
$ make
$ make apk

you’ll get your apk in $HOME/kodi-krypton

Random TV Thumbnails Missing

I'm using a Fire TV here, and this appears to only be an issue with TV shows, not movies. If I delete the show and do a rescan, it's still bad. I've tried deleting the textures13.dba and wiping the Thumbnails folder. Anyone have any suggestions?

Pressing backspace to remove filtering?

Hello all, When using advanced filtering pressing <-- backspace on keyboard removes filtering and feels natural. However in regular filtering, pressing the <-- on keyboard doesn't remove filtering, it actually navigates to the previous page. Is...

rasberry pi kodi client not seeing all movies

I have my hole house setup with kodi clients on my tv's and I have a central video database. my library is quite large so I had to span it across two windows 10 pc's one is the database with mysql installed and the second is just storage. I am setting ...

Contextual menu will not mark video watched

Created a new SD with Kodi, 16.1, 12/10/2016. Got Kodi with addons all working. The "C" key, Contextual menu will not mark a video watched.. My previous Kodi, 16.1, 5/20/2016, load works fine for that function.... Any fixes Thx

LiveTV group and Estuary recent recordings

Hello, is there a way to hide the LiveTV group in kodi or otherwise prevent recordings in the LiveTV group from showing up in the Recent recordings section of the new TV menu entry in Krypton's estuary skin? At the moment when we have been 'channel su...

Go.cnn (US) M3u Playlist

I've been able to devise a script to populate a kodi m3u playlist for all of the go.cnn.com episodic content. It is all straightforward hls. However, I haven't been able to do the same for the live streams. I can't determine the hls equivalent sourc...

Kodi on iPhone in iOS 10.2, no jailbreak

Hello, I was curios to try out kodi on my iPhone running on iOS 10.2. Searched for and found different guides but all are about Xcode. I tried finding for windows but did not get it. Like: http://teamcydia.com/download-kodi-ios-1...jailbreak/ http://...

ActivateWindow home not working in Guide

I just setup a new ShieldTV with Kodi 17 and TItan. I duplicated my remote setup from my htpc which includes a button for ActivateWindow(Home). Which nicely works to get back to the Kodi homescreen from anywhere. However, on the new setup it works ev...

help scraping tv bluray iso

I want to be able to scrape and separate a tv episode bluray without having to rename mpls files. I have most of my collection in iso's . I have tried to use strm files , but for some reason my setup wont correctly address the file location. is it poss...

Newbie question

I bought two boxes and one was rooted. Is rooting them "taboo" to talk about? I quickly looked through the forum rules and didn't see anything about that. Or at least to my little knowledge. The reason I ask is from everything I see online it seems as...