Raspbian Stretch repository is using a bit outdated version of kodi (version 17.1  17.3 and the latest stable is kodi 17.4 krypton).

By using the pipplware repository you will receive latest updates of kodi faster than the official raspbian repository .To install the latest version of kodi (kodi 17.4) on your raspberry pi follow below steps.

Note: This tutorial is for Raspbian Stretch (new), If you are running Raspbian Jessie (old ) Follow this guide

Add the pipplware repository  to  /etc/apt/sources.list

sudo nano /etc/apt/sources.list

 

add below line to /etc/apt/sources.list

deb http://pipplware.pplware.pt/pipplware/dists/stretch/main/binary /

 

Add the repo keys

wget -O - http://pipplware.pplware.pt/pipplware/key.asc | sudo apt-key add - 

 

Now update the sources and Upgrade your Rpi

sudo apt-get update && sudo apt-get dist-upgrade

 

Now install Kodi

sudo apt-get install kodi

 

install Kodi PVR addons (optional)

sudo apt-get install kodi-pvr*

 

below set of commands provides kodi proper permission for accessing rpi hardware

Create new system group

sudo addgroup --system input

 

Create new file

sudo nano /etc/udev/rules.d/99-input.rules

 

Now add the below lines to above file

SUBSYSTEM==input, GROUP=input, MODE=0660
KERNEL==tty[0-9]*, GROUP=tty, MODE=0660

Create new file

sudo nano /etc/udev/rules.d/10-permissions.rules

 

Now add the below lines to above file

#input
KERNEL=="mouse*|mice|event*", MODE="0660", GROUP="input"
KERNEL=="ts[0-9]*|uinput", MODE="0660", GROUP="input"
KERNEL==js[0-9]*, MODE=0660, GROUP=input
#tty
KERNEL==tty[0-9]*, MODE=0666
#vchiq
SUBSYSTEM==vchiq, GROUP=video, MODE=0660

 

Now run the following commands

Note:Replace ‘pi’ with your username (in most cases pi is the default user in raspbian,You can use the command ‘whoami’ to get your username)

sudo usermod -a -G audio pi
sudo usermod -a -G video pi
sudo usermod -a -G input pi
sudo usermod -a -G dialout pi
sudo usermod -a -G plugdev pi
sudo usermod -a -G tty pi

 

How to enable shutdown and reboot option in kodi power menu

To add shutdown or reboot option you need Make Sure policykit-1  package is installed (sudo apt-get install policykit-1) then create a new policy kit file.

sudo nano /etc/polkit-1/localauthority/50-local.d/all_users_shutdown_reboot.pkla

Now add below contents to the file

[Allow all users to shutdown and reboot]
Identity=unix-user:*
Action=org.freedesktop.login1.*;org.freedesktop.upower.*;org.freedesktop.consolekit.system.*
ResultActive=yes
ResultAny=yes
ResultInactive=yes 

To start kodi automatically with boot  (raspbian boots directly to kodi)
Run below command to add Kodi upstart script

 sudo wget -O /etc/init.d/kodi https://gist.githubusercontent.com/shyamjos/60ea61fd8932fd5c868c80543b34f033/raw;sudo chmod +x /etc/init.d/kodi

Then enable upstart script by running below command

sudo systemctl enable kodi

 

Voila! now you have successfully installed kodi on your raspberry pi

PS: Make Sure you have gpu memory of >=160MB to play Full HD videos. (use raspi-config command to increase  it)

 

 

Categories: Tutorials

shyam jos

My name is Shyam Jos, I am a passionate Linux system administrator from Kochi, India. I am a strong advocate of using Linux and Open-Source software.

26 Comments

Roland · October 24, 2017 at 1:05 PM

I have connect my kodi to mysql database. If I start Kodi with this script at startup, I don’t see the mediafiles. If I restart the service after I logged in as user pi, I see the mediafiles from sql.
So I think that the autostart doesn’t read the file ~/.kodi/userdata/advancedsettings.xml

    shyam jos · November 4, 2017 at 6:20 PM

    Sorry for the delayed response. I’ve seen your comment but couldn’t respond earlier due to work , Hope you have fixed this by now

Roland · October 24, 2017 at 8:22 PM

I find the problem. The SQL Server couldn’t be found at start. I think the network is not established.
I search in the internet for a solution. The kode startscript must wait until the network is ready.

    shyam jos · November 4, 2017 at 6:23 PM

    Hi roland,

    You can add something like this on top of the upstart script start on (local-filesystems and net-device-up IFACE!=lo)

Kerimos · November 3, 2017 at 1:30 PM

Hi !

Great work, I’ll test it today.

Thanks for that.

    shyam jos · November 4, 2017 at 6:18 PM

    Welcome Kerimos 🙂

Marcos · November 10, 2017 at 4:55 PM

Hi!
I follow your instructions and get two problems:

1 – I can’t save file after edit this:

sudo nano /etc/polkit-1/localauthority/50-local.d/all_users_shutdown_reboot.pkla

2 – When I try this command,

sudo systemctl enable kodi

I got:

kodi.service is not a native service, redirecting to systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable kodi

And after restart, Kodi don’t run.

Can I do something to solve?

Sorry for the poor english.

    Marcos · November 10, 2017 at 4:58 PM

    My knowledge of Linux is beginner.

      shyam jos · November 10, 2017 at 10:16 PM

      Hi Marcos,

      No issues , This is how we learn new things 🙂

    shyam jos · November 10, 2017 at 10:15 PM

    1) ctrl + x and type y , then enter
    2) Executing: /lib/systemd/systemd-sysv-install enable kodi – this is normal

    try sudo systemctl stop kodi and sudo systemctl start kodi
    then check the status of kodi service sudo systemctl status kodi

Anitheus · November 20, 2017 at 10:11 PM

Hi, You have to gt the policy kit at first !

sudo apt-get install policykit-1

im my case it was missing

    shyam jos · November 20, 2017 at 10:12 PM

    Thanks for the suggestion 🙂

Anitheus · November 20, 2017 at 10:46 PM

hi,

hi
I’am able to boot automated into kodi after all..
but i’m still missing shutdown options in kodi

btw i’am using an elemetnt 14 case with an additional board and a script that is able to shut down the system by pressing an external key !
it still works fine, but i want to shutdown it by a remote so i need the kodi power options !

Greetings Ani

    shyam jos · November 20, 2017 at 11:33 PM

    Hi Ani,

    To add shutdown or reboot option you need to Make Sure policykit-1 package is installed and follow the instructions to create a new policy kit file.

SqueakyDeath · January 2, 2018 at 12:52 AM

Hello

I followed your guide and had no issues with the commands however as soon as I open kodi from start menu then it goes to a black screen?
it looks like it opened it but all I can see is black with a small white stripe on the left top corner.

thanks!
Squeaky

menaibangor · January 7, 2018 at 4:21 AM

Unfortunately I am getting the following error message:

~$ sudo apt-get update && sudo apt-get dist-upgrade
E: Type ‘wget’ is not known on line 5 in source list /etc/apt/sources.list
E: The list of sources could not be read.

Running latest Raspbian Stretch.
What’s wrong? Many thanks.

    shyam jos · January 7, 2018 at 1:31 PM

    Please share contents of /etc/apt/sources.list

      menaibangor · January 8, 2018 at 3:09 AM

      As requested:

      deb http://mirrordirector.raspbian.org/raspbian/ stretch main contrib non-free rpi# Uncomment line below then ‘apt-get update’ to enable ‘apt-get source’#deb-src http://archive.raspbian.org/raspbian/ stretch main contrib non-free rpideb http://pipplware.pplware.pt/pipplware/dists/stretch/main/binary /wget -O – http://pipplware.pplware.pt/pipplware/key.asc | sudo apt-key add –

      Many thanks for your help.

        shyam jos · January 8, 2018 at 10:47 PM

        You have accidentally added wget -O – http://pipplware.pplware.pt/pipplware/key.asc | sudo apt-key add – in your sources file , instead of executing it in terminal, Kindly update your sources file as below

        deb http://mirrordirector.raspbian.org/raspbian/ stretch main contrib non-free rpi

        # Uncomment line below then ‘apt-get update’ to enable ‘apt-get source’
        #deb-src http://archive.raspbian.org/raspbian/ stretch main contrib non-free rpi

        deb http://pipplware.pplware.pt/pipplware/dists/stretch/main/binary /

          menaibangor · January 9, 2018 at 2:05 AM

          Rectified. Working now like a charm.
          Many thanks for your help.
          Very much appreciated.

Nealio · January 21, 2018 at 10:20 AM

Helloo Roland,
I have run into a problem when trying to install Kodi.
I get an error: some packages could not be installed…
kodi: Depends: kodi-bin (>=2:17.6-2~stretch) but 2:17.1+dfsg1-3 is to be installed
Depends: libshairplay0 but it is not installable
Reccomends libva-intel-vaapi-driver but it is notinstallable

Michal · February 19, 2018 at 2:51 PM

I have the same issue as described Nealio
“some packages could not be installed…
kodi: Depends: kodi-bin (>=2:17.6-2~stretch) but 2:17.1+dfsg1-3 is to be installed
Depends: libshairplay0 but it is not installable”

Anyone of you was getting over it?

    Roy · April 13, 2018 at 9:18 PM

    I am getting the following error

    pi@raspberrypi:~ $ sudo apt-get install kodi
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:

    The following packages have unmet dependencies:
    kodi : Depends: kodi-bin (>= 2:17.6-2~stretch) but it is not going to be installed
    Depends: kodi-bin (< 2:17.6-2~stretch.1~) but it is not going to be installed
    Depends: fonts-liberation but it is not installable or
    ttf-liberation but it is not installable
    Depends: python-bluez but it is not installable or
    python-lightblue but it is not installable
    Depends: python-imaging but it is not installable
    Depends: libshairplay0 but it is not going to be installed
    Depends: libaacs0 but it is not installable
    Recommends: libva-intel-vaapi-driver but it is not installable
    E: Unable to correct problems, you have held broken packages.
    pi@raspberrypi:~ $

      shyam jos · April 14, 2018 at 9:50 AM

      Try this
      sudo apt-get clean && sudo apt-get update && sudo apt-get dist-upgrade && sudo apt-get install kodi

Joining the Rasberry Pi revolution | The Cra1gster · November 12, 2017 at 6:31 AM

[…] worked through this article and created the rules and permissions files but still no […]

How to install latest version kodi 17 krypton on Raspbian jessie [Rpi2,Rpi3] · November 20, 2017 at 11:34 PM

[…] 1: This tutorial is for Raspbian jessie,  If you are running latest Raspbian Stretch Follow this guide. Note 2: Latest version in pplware jessie repo is 17.3 (kodi latest stable is […]

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.