====== 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:
1
157286400
20
Add this as well to import watched status saved in nfo files (if present)
true
**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.
#!/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/.*/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