This is an old revision of the document!
Table of Contents
Kodi Android
Sideload Kodi via adb
To install or update kodi on Amazon Fire TV or similar, use the following steps:
1.) Enable “adb debugging” as well as “apps from unknown sources” on the device and obtain its IP address.
On Amazon Fire TV:
The settings can be found in settings → system → developer options.
The IP address is listed in settings → system → about → network.
2.) Download the android arm version (depending on device) of kodi using the latest stable url from https://kodi.tv/download/#devbuilds or from the mirrors here http://mirrors.kodi.tv/releases/android/arm/
Nightly snapshots can be downloaded from here: http://mirrors.kodi.tv/nightlies/android/arm/
wget http://mirrors.kodi.tv/releases/android/arm/kodi-16.1-Jarvis-armeabi-v7a.apk
3.) Install adb (if necessary). On a debian linux based machine, the command is:
apt-get install android-tools-adb
4.) use adb to push the downloaded kodi apk file to the device, replace the IP address with the relevant IP of the device
adb connect 192.168.1.10 adb install -r kodi*
Config edits via adb
To edit configuration files manually, you can connect to the kodi device via adb and open a shell:
adb connect 192.168.1.10 adb shell cd /sdcard/Android/data/org.xbmc.kodi/files/.kodi/userdata
Note, android shell by default does not have an editor and copy command does not work. However, when side-loading busybox, vi/nano should be possible as per this article and file copy can be done via cat file > /sdcard/newfile
http://stackoverflow.com/questions/4714411/how-to-copy-and-edit-files-in-android-shell
The better way is to create files on a pc and then connect via adb and pull or push files.
adb connect 192.168.1.10 adb pull /sdcard/Android/data/org.xbmc.kodi/files/.kodi/userdata/advancedsettings.xml advancedsettings.xml adb push advancedsettings.xml /sdcard/Android/data/org.xbmc.kodi/files/.kodi/userdata
The following advancedsettings.xml file increases the buffer to avoid issues with high bitrate files:
<advancedsettings> <network> <buffermode>1</buffermode> <cachemembuffersize>157286400</cachemembuffersize> <readbufferfactor>20</readbufferfactor> </network> </advancedsettings>
Add this as well to import watched status saved in nfo files (if present)
<videolibrary> <importwatchedstate>true</importwatchedstate> </videolibrary>
Restart Kodi after adding or changing advancedsettings!
Kodi update bash script
This bash script can be used to download the latest stable/nightly and install it via adb.
- kodi-updater.sh
#!/bin/bash ############################################################################### # Download and update latest Kodi build (nightly or stable) and install to a connected device. ############################################################################### which adb >/dev/null 2>&1 || { \ echo "adb doesn't exist in your path"; \ exit 3; \ } ############################################################################### # get latest versions (nightly and stable) ############################################################################### NIGHTLY_URL=http://mirrors.kodi.tv/nightlies/android/arm/ STABLE_URL=http://mirrors.xbmc.org/releases/android/arm/ # get latest nightly build (NOTE: sed syntax could be better but works) NIGHTLY=`curl -s $NIGHTLY_URL | grep apk | head -1 | sed 's/.*<a href="//g' | sed 's/".*//g'` if [[ "$NIGHTLY" == "" ]] then echo "Error fetching latest nightly version" exit fi # get latest nightly build (NOTE: sed syntax could be better but works) STABLE=`curl -s $STABLE_URL | grep apk | head -1 | sed 's/.*<a href="//g' | sed 's/".*//g'` if [[ "$STABLE" == "" ]] then echo "Error fetching latest stable version" exit fi echo "latest nightly: $NIGHTLY" echo "latest stable: $STABLE" ############################################################################### # detect device connected via adb (NOTE: does not support multiple devices) ############################################################################### adb start-server ((NUM_DEVICES = `adb devices | wc -l` - 2)) if [[ "$NUM_DEVICES" == 0 ]] then echo "No devices connected.." read -p "Enter device IP address: " IP adb connect $IP # check again and exit if no devices ((NUM_DEVICES = `adb devices | wc -l` - 2)) if [[ "$NUM_DEVICES" == 0 ]] then echo "No devices connected.." exit; fi fi ############################################################################### # choose nightly or stable version ############################################################################### echo 'Select Download Option:' select download in "Nightly" "Stable" "Exit" ; do case $download in "Nightly" ) break;; "Stable" ) break;; "Exit" ) echo "Exiting.."; exit;; esac done if [[ "$download" == "Nightly" ]] then FILE=$NIGHTLY DOWNLOAD_URL=$NIGHTLY_URL elif [[ "$download" == "Stable" ]] then FILE=$STABLE DOWNLOAD_URL=$STABLE_URL fi # save to /tmp TMP_FILE=/tmp/$FILE rm $TMP_FILE 2>/dev/null ############################################################################### # download ############################################################################### echo "downloading: $FILE" curl -# -L -o $TMP_FILE $DOWNLOAD_URL/$FILE if [ ! -f $TMP_FILE ] then echo "download failed!" exit fi ############################################################################### # install options ############################################################################### echo 'Select Install Option:' select result in "Upgrade" "Clean Install" "Exit" ; do case $result in "Upgrade" ) break;; "Clean Install" ) break;; "Exit" ) echo "Exiting.."; exit;; esac done ############################################################################### # clean install ############################################################################### if [[ "$result" == "Clean Install" ]] then echo "uninstalling.." adb uninstall org.xbmc.xbmc fi ############################################################################### # install with progress ############################################################################### echo "installing $TMP_FILE" SIZE=$(ls -l $TMP_FILE | awk '{print $5}') #export ADB_TRACE=all adb $device install -r $TMP_FILE ############################################################################### # cleanup ############################################################################### rm $TMP_FILE #export ADB_TRACE= #echo #echo 'press any key to exit' #read n