How to copy favorites between osmc builds?

Hi. After this thread: Switch_root: can't execute '/sbin/splash_early' : No such file or directory I realized I have to re-install my system.

As I’m an idiot without backups, I’m screwed and that will take ages. No so much because of the addons, but all the underlining config plus the favorites. And that’s what I wanted to know. Is it possible to copy the favorites configuration from one file in the old osmc file system (or the file itself) and move it across? I can access the old image files, some are 0kb (which is not good), but the majority are still ok, so I’m wondering if I could just copy that and save some time.

Obs all the addons an configs related to the favorites need to be configured before they are used, but having the favorites automatically moved across would be a massive help already.

Thanks in advance.

The file is /home/osmc/.kodi/userdata/favourites.xml check if that is still there and has more than 0 bytes

1 Like

You could map your favourites to a network drive so you won’t lose it next time:


See here for more info:


Thanks @fzinken, going to check now if the file is still valid (preying to all gods atm).

@nrosier really? thanks amazing stuff! Thank means I can share the same favorites across different devices in the same network (which was always a pain I had!). Thank you so much, I’ll get on it straight away!

Will update this topics with my findings over the weekend, but thanks for the direction!

Just check the link. I also keep 1 copy of my sources and playlists on the share. I only need to setup the advancedsettiings.xml on each new device to point to these files. Quite handy…

1 Like

That’s really handy. Unfortunately, the home folder is empty… I have no idea how this happened, but yeah I guess I lost the hole thing… Well, at least I’ve learnt my lesson and will start creating those network resources…

I assume they need to be accessible from locations on the network that are mounted first thing when osmc runs? I guess non of them are vital config so should be fine if it fails to load from time to time…

The .kodi folder is hidden. ls -lh will show hidden.

Be careful when sharing favourites like this, it’s not real likely but you file could be corrupted if 2 kodi instances try to write it at the same time.

1 Like

I was trying to recover that file on a Windows machine, using DiskInternals Linux reader. It looks like to me that it loads hidden files as well - with the monday update I got loads of files missing + some with 0kb including the /sbin/splash_early which messed up with my startup and prevents me from recovering anything via ssh unfortunately.

As soon as read can be done in parallel, is very unlikely that would happen anyway. Thanks for the reminder though, makes sense.

Hi @nrosier

I’m having some trouble to get the favorites sharing to work. I’ve found the advancedsettings.xml file, made a copy to /home/osmc/.kodi/userdata/advancedsettings.xml as it says on the file instructions it should override the original one, so I believe my problem is with the file path.

I’m using this:


My favorites network file is actually on a hard drive plugged to this RP. I thought the difficult part will be setting this up on the other machines as this would then be a smb locations and I’m not sure how to construct the url for linux, but I guess I got stuck even before…

Any idea what I’m doing wrong?


Where is the favourites.xml really storred? /media/mars or .kodi/userdata?

I think @nrosier already provided the likely answer in post #3:

@bmillham there 2 favourites.xml files, the original one is where everyone else is, .kodi/userdata so I used


The one I want to use is on an external drive connected to that device, and that’s why I used the path


I’m surely missing something obvious that everyone else is seeing.

Hey @dillthedog

So I’ve used that exact path he provided as well just in case, but that didn’t work and because that doesn’t look like a valid path to me I changed it to what I though was the correct path to the file - clearly wrong.

So I’ve changed back to what @nrosier said, but it still doesn’t work - still displaying the local ones. Any other idea why?

Can’t say for sure. In post #3 there is also a link to that says:

Note: Path substitution or any kind of sharing of setting files is not officially supported (with the exception of playlists). It probably won’t hurt anything, but some things might not always work right depending on what you are substituting. The following settings on this page are believed to work okay, but if something doesn’t work out, just copy the file instead of trying to share/pathsub it.

Although an example is given for favourites, perhaps it simply doesn’t work. Also ensure you spelled favourites correctly.

Yeah I did, the one in the title was the browser correcting to en-us, need to change those settings somewhere.

Ok cool, thanks for the help @dillthedog. If anyone has an example working please post your paths so that I can try to guess what mine should be. If I find the solution I’ll update this topic as well.

This is how I map it:


This works also for sources.xml for me:


1 Like

Hey! It started working… What was the issue? idk… it started to work all of a sudden when I checked today… I’m using:


So this is now working fine for the device where the external hard-drive is connected.

Now, I’m trying to get it to work with the smb shared folder. Looking into your example, I would say my path should be


I tried the following as well to follow the exact path @nrosier did, and it didn’t work either:


But it doesn’t work. I mean, it works in a way - it returns 0 favourites which tells me the local ones were replaced, but it’s not replacing with anything, so it’s not liking the path I provided. Any idea how to use a smb path here anyone? Do I have to configure something with the smb before? I assume it’s working fine as I can access files within osmc kodi file navigation, but I don’t know if something else is required…