FORUMS

Optimize Battery Life with This Useful App

Battery life is an important aspect of your smartphone, especially if you use it for more … more

The OnePlus 2 & The Year of Smartphone Compromises

We are very close to entering the last third of 2015, and we have now seen many of … more

OnePlus 2 Teardown, Major Android Vulnerability – XDA TV

The OnePlus 2 has been officially released. That and much more news is … more

What Do You Think About Fingerprint Scanners?

More and more phones are featuring fingerprint scanners, and with many promising … more

Run Kodi from an external share (not directly connected through USB)

159 posts
Thanks Meter: 30
 
By dbdoshi, Senior Member on 30th March 2015, 06:39 PM
Post Reply Subscribe to Thread Email Thread
Hello, I was playing with Kodi over the weekend to run it from my Western Digital MyCloud (WD). I had initially moved my Thumbnails folders to WD and was using advancedsettings.xml to redirect the thumbnails folders to WD.

Recently I ran into a way to move the whole Kodi folder to WD (or any network storage). If this has been mentioned before, my apologies for the redundant post. Anyways...

For background, when you start Kodi, the app reads a file (if present) to find where its files are located. If this file is not present, Kodi uses the default location to find its files. Through this file, you can redirect your Kodi to look at alternate location to run. The name of the file is "xbmc_env.properties" and it has a single line listing your desired location. I have attached it to this post. More info here:

http://kodi.wiki/view/HOW-TO:Change%...0for%20Android

The steps to make this happen are:

-- Create your network share on WD. I went with a public share and using CIFS to access the share.
Say, my share is "\\192.168.1.2\MyKodi"
-- Create a mount on FTV to that share. For mounting help, see http://forum.xda-developers.com/fire...-boot-t2986158
Say, my mount is "/mnt/obb/KodiShare"
-- Make sure you can read/write to this mount by testing it with an app like ES File Explorer.
-- Now, you will need to start with a clean install of Kodi.
-- Do not install any addons or do any restores of your Kodi backup at this point.
-- Once Kodi is installed, open it once so that your folders are created for you. Then shut down Kodi.
-- Create a file named "xbmc_env.properties" and put it in /sdcard. The file has to be named exactly that and it has to be located at /sdcard.
-- Now, open Kodi. Let it stay up for a min or so. In the background, Kodi will make a ".kodi" folder in your mount and will create a skeleton structure of all folders/files. Basically, you will see "/mnt/obb/KodiShare/.kodi"

-- CAUTION: If you are starting with a fully customized Kodi with your addons, Kodi WILL NOT MOVE your addons/etc. during the previous step!
You will need to do that manually.... (move the userdata and addons folder manually from /sdcard as if you are restoring a backup)


-- The folder ".kodi" on your mount will have identical structure as is for a default install. You can verify it by drilling down into your mount.
-- Now shut down Kodi.
-- At this point, you will have 2 ".kodi" folders. One will be in your mount and the other at /sdcard/Android/data/org.xbmc.kodi/files/.
-- You are now ready to restore your backup (if you have one). If you do not have any backups, you can skip this step.
You will copy your "userdata" and "addons" folder to /mnt/obb/KodiShare/.kodi.
You will be over-writing those 2 existing folders already present there.
-- Now, go to "/sdcard/Android/data/org.xbmc.kodi/files/.kodi". Delete everything in the ".kodi" folder, all 6 subfolders. (this is where the space savings are realized)
You can delete all this because the data within ".kodi" has been moved to your mount (or WD).
Keep the empty ".kodi" folder though.
-- Start Kodi. You should see it functioning normally.

------------------------------------------------------------

So, what happens if you shut down FTV, restart your FTV but your share is not mounted correctly and you start Kodi? On my FTV, when I do that, my Kodi at start will show a hazy blank screen. It will stay like that for a few seconds (If you hit the back button on FTV remote while the Kodi screen is still hazy, Kodi will exit out without creating your base folders in /.kodi. This saves you the hassle of deleting them again after you have restored your mount) and then Kodi will start. But you will not see any addons/customizations etc. Kodi will start as if its a default clean install. Its a fail safe play by Kodi so that it does not crash. If you look at "/sdcard/Android/data/org.xbmc.kodi/files/.kodi", you will find that it is not empty and you will see the 6 subfolders in there. To fix this, once you can properly mount again, just shut down Kodi and restart it and it will start with all your stuff intact. You can either leave the ".kodi" folder in your /sdcard as is or you can delete them again, it makes no difference.

I have been testing this for last couple of days, and the performance is just fine (just a tad slow but not a killer). The exit of Kodi (from its home page) is slow though, it takes around 7 seconds for it to shut down on my FTV. I would imagine that NFS should be faster than CIFS, but I have not tested that yet.
Attached Files
File Type: txt xbmc_env.properties.txt - [Click for QR Code] (27 Bytes, 100 views)
Last edited by dbdoshi; 3rd April 2015 at 06:59 AM. Reason: Attached file. Remove ".txt" from the end.
The Following User Says Thank You to dbdoshi For This Useful Post: [ View ]
 
 
31st March 2015, 01:07 AM |#2  
Junior Member
Thanks Meter: 0
 
More
Great Guide


If you want to use the usb stick follow the guide above and just change the follow

Using ES File Manager
Select extUsb
Add folder call it kodi_data

then download this attachment xbmc_env.properties.txt
rename it so its called xbmc_env.properties

copy or push file to sdcard directory

Now Install Kodi
Attached Files
File Type: txt xbmc_env.properties.txt - [Click for QR Code] (35 Bytes, 140 views)
31st March 2015, 01:47 AM |#3  
OP Senior Member
Thanks Meter: 30
 
More
It does seem that once you have used Kodi enough (lke your addons and whatnot), I notice "almost" no degradation in performance. Of course, even this minute slowness is not applicable to actual streaming as this is using your FTV hardware and not your external share.

One note though, I did notice a gradual slowness if you are using subtitles for your movie/show. Because by default, the subtitles are saved to the "temp" directory which is now on the external share. And subtitles are sensitive to the timings. I saw a gradual slowness, around a 3 second delay at the end for around a 2 hour movie (Subtitles are completely in sync at the start, but lag around 3 seconds by the end of the movie). You can always, in Kodi, go to Settings, Video, Subtitles. On the right, scroll down to "Subtitle storage location" and change it to "Custom location". On the next line for "Custom subtitle folder", you can navigate to "Root Filesystem" and select a folder in /sdcard. Select a folder that you can regularly clean out.
Last edited by dbdoshi; 31st March 2015 at 01:50 AM.
31st March 2015, 03:10 PM |#4  
Member
Thanks Meter: 2
 
More
Quote:
Originally Posted by ISMADDER

Great Guide


If you want to use the usb stick follow the guide above and just change the follow

Using ES File Manager
Select extUsb
Add folder call it kodi_data

then download this attachment xbmc_env.properties.txt
rename it so its called xbmc_env.properties

copy or push file to sdcard directory

Now Install Kodi

So overall what does this mean? Kodi data will be stored on my thumb drive instead of Ftv internal storage?....I've installed rbox pre-rooted latest rom last night and moved Kodi over to my flashdrive but I haven't backed up as yet,normally my Kodi data reads over 1gb and will like to have it installed ob my thumb drive if it won't drastically slow it down
31st March 2015, 03:31 PM |#5  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by nickyb003

So overall what does this mean? Kodi data will be stored on my thumb drive instead of Ftv internal storage?....I've installed rbox pre-rooted latest rom last night and moved Kodi over to my flashdrive but I haven't backed up as yet,normally my Kodi data reads over 1gb and will like to have it installed ob my thumb drive if it won't drastically slow it down


Yes tested it last night no issues yet
31st March 2015, 03:43 PM |#6  
Member
Thanks Meter: 2
 
More
Quote:
Originally Posted by ISMADDER

Yes tested it last night no issues yet

Thanks will try when I get home

one question I pushed kodi over to my usb will it make any difference or should I send it back to internal storage then proceed?
Last edited by nickyb003; 31st March 2015 at 03:50 PM.
31st March 2015, 04:41 PM |#7  
OP Senior Member
Thanks Meter: 30
 
More
Quote:
Originally Posted by nickyb003

Thanks will try when I get home

one question I pushed kodi over to my usb will it make any difference or should I send it back to internal storage then proceed?

I would leave Kodi on FTV. It really does not take too much space. If you move your data using this method, all your FTV will use is around 60 MB for the app and some for cache (which can be cleaned out). My FTV tops out with cache around 130 MB on storage space for Kodi.

As a tip, for taking good backup, I will install Kodi. I will add all my addons and customizations (like keyboard, advanced settings, ACE stream setup, etc) and Kodi core settings and do a backup. I don't go into any addons or stream stuff. I then do a backup, this will keep your backup size to a minimum (the goal is to reduce the Thumbnails folder size in your backup). Also, in your backup, you can go into /addons/packages and delete all the files from there (just the contents in that folder, not the folder itself). The folder stores the older versions of addons you have installed. That usually saves around 50 MB depending on your installed addons. This gives you a good compact backup.

I am not sure how the performance will be with a USB... I had tried moving Thumbnails to USB a while back and Kodi did slow down (usually when I am pulling any page with icons). If you have a good backup, you can check it out with different scenarios pretty quickly.
31st March 2015, 04:49 PM |#8  
Junior Member
Thanks Meter: 0
 
More
makes no differents ive got mine on the usb
3rd April 2015, 06:30 AM |#9  
OP Senior Member
Thanks Meter: 30
 
More
I see AFTVNews has posted an excellent guide covering this:

http://www.aftvnews.com/how-to-parti...l-usb-storage/

And I can confirm, I changed the subtitle location to a folder in /sdcard and the same movie with the same subtitle source/file does not lag.
Last edited by dbdoshi; 3rd April 2015 at 06:37 AM.
5th April 2015, 03:50 PM |#10  
Member
Thanks Meter: 2
 
More
I did this on my 16gb flashdrive and noticed a slight lag in opening addons nothing major but streams work flawlessly and my AFTV has been on 4gbs+ compared to the 2gbs+ before this update
5th April 2015, 05:04 PM |#11  
Junior Member
Thanks Meter: 0
 
More
Thanks
Geat guide.

Read More
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes