Monday, January 23, 2017

Amazon Fire TV and Kodi

For Christmas, we got an Amazon Fire TV, which is a cool little box that was to allow us to watch our Netflix in High Def.  But it is more -- oh, so much more!

I have a library of videos stored locally, which for the past several years was accessed using XBMC (XBox Media Center), which then more recently became Kodi.  I physically displaced my Raspberry PI that occupied the network cable and HDMI plug to instead connect the Fire TV.  So now I thought was wasn't going to have the same abilities for NAS video content.

But then I started Googling around, and came across Troypoint blog, which details how to sideload Kodi onto the Fire TV.  I had to learn that sideload is another way to say install a program that isn't in the official play store.  So that worked great, and was again able to pull up local NAS video content.

But, that wasn't enough.  Nope.  I also wanted to be able to keep track of all the shows I had already watched on my PI, but now on the FireTV.  So, figured that one out too.  I moved my Raspberry PI Kodi device into another room where it can serve up content to a new TV.  Key thing is here, it was already set up to host a MySQL Kodi DB some time ago so I could share watched information with a Linux installation of Kodi.  I just want the Fire TV to use the same database.  Figured out I had to get into the Fire TV file system, which is available via the adb interface.  Managed that pretty handily thru the rpi
sudo apt-get install android-tools-adb
after which I could 'adb connect' to my Fire TV.  Then it was just a matter of putting a version of the advancedsettings.xml with the pi's IP address all filled in from that same Kodi rpi into the Fire TV's directory structure:
adb push advancedsettings.xml /sdcard/Android/data/org.xbmc.kodi/files/.kodi/userdata/