Kodi Community Forum
Android Is it possible to use a USB flash drive for caching & internal storage? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Android (https://forum.kodi.tv/forumdisplay.php?fid=164)
+---- Thread: Android Is it possible to use a USB flash drive for caching & internal storage? (/showthread.php?tid=182371)

Pages: 1 2


Is it possible to use a USB flash drive for caching & internal storage? - Triton2014 - 2014-01-05

Hi all, I have a MX2 (round shape) dual core android stream box unit and I am wondering if there is a way to set the internal storage destination or cach memory destination a USB flash drive? I have watched SuperChargediOS' s tutorial video's but It didn't seem to work for me. I'm not entirely sure what the internal storage on the MX2 box id, I presumed it was an SD card but no ID shows up when I run the external 2 internal app. I need help with this as I believe this could be the solution to my buffering problems.


RE: Is it possible to use a USB flash drive for caching & internal storage? - dsmryder - 2014-01-13

(2014-01-05, 22:19)Triton2014 Wrote: Hi all, I have a MX2 (round shape) dual core android stream box unit and I am wondering if there is a way to set the internal storage destination or cach memory destination a USB flash drive? I have watched SuperChargediOS' s tutorial video's but It didn't seem to work for me. I'm not entirely sure what the internal storage on the MX2 box id, I presumed it was an SD card but no ID shows up when I run the external 2 internal app. I need help with this as I believe this could be the solution to my buffering problems.

Yeah, I'm in the same boat. How would one tell XBMC to use one drive over another? I'm going to keep looking.

Could one use a symbolic link to fudge it. But where does the player cache the information?


RE: Is it possible to use a USB flash drive for caching & internal storage? - Ned Scott - 2014-01-13

I've heard this works: https://play.google.com/store/apps/details?id=com.buak.Link2SD&hl=en


RE: Is it possible to use a USB flash drive for caching & internal storage? - Triton2014 - 2014-01-13

Thanks Ned I will try that app,

@ned Scott - does this mean if the Link2SD card app works for me I can increase the number in the <cachemembuffersize>52488000</cachemembuffersize> setting as my external SD card is a 64GB and should have plenty of space for cache. (the reason why I ask is when I tried to increase the <cachemembuffersize> to 104976000 (around 1GB of buffering space) on the internal SD card - which bearing in mind has only about 4GB free space.) I had issues getting any movie to play back inside XBMC, once a link was clicked it said resolving link as usual but then nothing after that, so I presume it does matter how high you set this when using internal SD cache buffering method.

I did try the 'External 2 Internal' SD switching method as discussed via 'Supercharged iOS's channel on Youtube but it didn't work for me. @dsmryder - I have managed (I think) to allow the cache buffer to increase whilst playing a movie a lot longer than the usual 5% (which is about 50MB or something like that) by adding the script below to the advancedsettings.xml in my user XBMC data folder (NOTE: putting '0' into the <cachemembuffersize> which is supposed to allow unlimited cache buffering didn't work for me, I assume as of my current version XBMC FRODO 12.2 this would only work if you were running things on a PC or MAC etc. something with an internal HDD, very confusing for us android users with internal SD card memory (or maybe I just don't know how to set it up properly Wink ) any how it didn't work for me Tongue but by adding the code below it should give you around 500MB of buffer space rather than 50MB as standard.

<advancedsettings>
<network>
<buffermode>1</buffermode>
<cachemembuffersize>52488000</cachemembuffersize>
<readbufferfactor>4.0</readbufferfactor>
</network>
</advancedsettings>

Thanks for the reply Ned


RE: Is it possible to use a USB flash drive for caching & internal storage? - dsmryder - 2014-01-13

(2014-01-13, 12:33)Triton2014 Wrote: Thanks Ned I will try that app,

@ned Scott - does this mean if the Link2SD card app works for me I can increase the number in the <cachemembuffersize>52488000</cachemembuffersize> setting as my external SD card is a 64GB and should have plenty of space for cache. (the reason why I ask is when I tried to increase the <cachemembuffersize> to 104976000 (around 1GB of buffering space) on the internal SD card - which bearing in mind has only about 4GB free space.) I had issues getting any movie to play back inside XBMC, once a link was clicked it said resolving link as usual but then nothing after that, so I presume it does matter how high you set this when using internal SD cache buffering method.

I did try the 'External 2 Internal' SD switching method as discussed via 'Supercharged iOS's channel on Youtube but it didn't work for me. @dsmryder - I have managed (I think) to allow the cache buffer to increase whilst playing a movie a lot longer than the usual 5% (which is about 50MB or something like that) by adding the script below to the advancedsettings.xml in my user XBMC data folder (NOTE: putting '0' into the <cachemembuffersize> which is supposed to allow unlimited cache buffering didn't work for me, I assume as of my current version XBMC FRODO 12.2 this would only work if you were running things on a PC or MAC etc. something with an internal HDD, very confusing for us android users with internal SD card memory (or maybe I just don't know how to set it up properly Wink ) any how it didn't work for me Tongue but by adding the code below it should give you around 500MB of buffer space rather than 50MB as standard.

<advancedsettings>
<network>
<buffermode>1</buffermode>
<cachemembuffersize>52488000</cachemembuffersize>
<readbufferfactor>4.0</readbufferfactor>
</network>
</advancedsettings>

Thanks for the reply Ned

You seem to misunderstand how the cache buffer works. If you state a size you are doing it in RAM. And it's times three for some reason. That makes 100MB take 300MB. If you use "0" it uses the internal space. For us it's the ROM space.

On a desktop I'm sure the location could be chosen, but Android may not allow it in a direct way. That's why I was thinking of the symbolic link. It can be done with a Terminal Emulator. I just don't know where the video cache is put. If it's moved to the SDCard, or the USB drive in my case, with link2sd it will have the desired affect.

And thanks for the replies, guys.


RE: Is it possible to use a USB flash drive for caching & internal storage? - Ned Scott - 2014-01-13

I think the on-disk cache goes wherever the XBMC temp folder is, but I'm not entirely sure.


RE: Is it possible to use a USB flash drive for caching & internal storage? - Triton2014 - 2014-01-14

Ok so I installed Link2SD last night and partitioned a 64GB SD card with a 'Primary' Partition and a 'Secondary partition'. My query is what exactly do I need to link over to this external SD card to allow me to increase the buffer cache size in my 'Adavnced settings.xml file. If I move over the whole XBMC app will it detect that there is now loads of free space (hence the 64GB card) automatically or do I have to do anything else? I'm a little confused with how the XBMC Temp folder and caching would change things once moved to the External SD card. Any thoughts


RE: Is it possible to use a USB flash drive for caching & internal storage? - helkish - 2014-01-16

<pathsubstitution>
<substitute>
<from>G:\dvds\</from>
<to>smb://somecomputer/g-share/dvds/</to> <!-- Note the difference between the usage of forward and backslashes -->
</substitute>
</pathsubstitution>

I haven't tried this and don't know if it still works in the latest builds but you want to create an advancedsettings.xml and use path substitutions.

http://wiki.xbmc.org/index.php?title=Path_substitution


RE: Is it possible to use a USB flash drive for caching & internal storage? - dsmryder - 2014-01-21

(2014-01-16, 20:49)helkish Wrote: <pathsubstitution>
<substitute>
<from>G:\dvds\</from>
<to>smb://somecomputer/g-share/dvds/</to> <!-- Note the difference between the usage of forward and backslashes -->
</substitute>
</pathsubstitution>

I haven't tried this and don't know if it still works in the latest builds but you want to create an advancedsettings.xml and use path substitutions.

http://wiki.xbmc.org/index.php?title=Path_substitution

Dag nab it! I just found the same thing yesterday. This is another thing I found I'm not sure where this goes as it seems different than what I have on my mx2 box. I did change the caching from RAM to disk, though. I did fully buffer the show I wanted to watch. I just forgot to pause it and when it was done buffering it played the show. I need to check if there is something where link says there the cache should be (it wasn't there before I changed the caching) and the Linux location of my USB stick.


RE: Is it possible to use a USB flash drive for caching & internal storage? - dsmryder - 2014-01-21

I think I might have it.

On my device the USB stick is listed as "/storage/external_storage/sda1/"
So for me I substituted "/data/data/org.xbmc.xbmc/cache/temp/"
to "/storage/external_storage/sda1/data/org.xbmc.xbmc/cache/temp"
I may have misspelled so careful if you copy and paste.
I'm not sure if I got it right as the USB stick has a built in light and it doesn't blink. The wifey is sleeping and I don't want to open up the cabinet to test anything out on that end. I might make the directory on the stick to see what happens.

My connection in my living room is poor and sketchy at best. I've had a bunch of issues with it. Netflix works the best for me, but even trying to watch something local can be a challenge......

And if Momma isn't happy, no one is happyWink


RE: Is it possible to use a USB flash drive for caching & internal storage? - Triton2014 - 2014-01-21

Hey all, sorry not been back in touch for a while, sounds like your on to something dsmryder, you will have to let me know how it goes and if you crack it I will modify mine.

The reason I haven't been on here for a while is because I managed to totally screw up my MX box :/ using the Link to SD method lol I linked it over to the external SD vold number and found the whole xbmc to be a lot slower than usual so I thought i'll just remove the link and it should all be fine...........erm didn't happen!! - when I removed the link it deleted my Streambox logo from the main home screen so I couldn't find how to get back into XBMC, I tried to restore the Streambox....no luck! I restored the whole unit in the end back to original android box settings, now I am having problems with the playback of any movie.....stuttering jerky playback and patchy sound loss, I have tried various versions of XBMC inc. nightly builds and stable Frodo 12.2 and 12.3 releases still the same stuttering playback, I have tried altering all video and audio settings, adjusted my Advancedsettings.xml......still the same problem which leads me to believe it might be something to do with the Mali 400 GPU firmware as nothing is making a difference to the stuttering video playback....

Does anyone know what might be causing this? can you update the Mali 400 GPU with the latest drivers, firmware etc? it's been driving me insane! Sad


RE: Is it possible to use a USB flash drive for caching & internal storage? - hondas3000 - 2014-01-22

(2014-01-21, 12:30)Triton2014 Wrote: Hey all, sorry not been back in touch for a while, sounds like your on to something dsmryder, you will have to let me know how it goes and if you crack it I will modify mine.

The reason I haven't been on here for a while is because I managed to totally screw up my MX box :/ using the Link to SD method lol I linked it over to the external SD vold number and found the whole xbmc to be a lot slower than usual so I thought i'll just remove the link and it should all be fine...........erm didn't happen!! - when I removed the link it deleted my Streambox logo from the main home screen so I couldn't find how to get back into XBMC, I tried to restore the Streambox....no luck! I restored the whole unit in the end back to original android box settings, now I am having problems with the playback of any movie.....stuttering jerky playback and patchy sound loss, I have tried various versions of XBMC inc. nightly builds and stable Frodo 12.2 and 12.3 releases still the same stuttering playback, I have tried altering all video and audio settings, adjusted my Advancedsettings.xml......still the same problem which leads me to believe it might be something to do with the Mali 400 GPU firmware as nothing is making a difference to the stuttering video playback....

Does anyone know what might be causing this? can you update the Mali 400 GPU with the latest drivers, firmware etc? it's been driving me insane! Sad

your mx box is using amlogic hardware so you need to download amlogic hw xbmc.


RE: Is it possible to use a USB flash drive for caching & internal storage? - Triton2014 - 2014-01-22

Thanks for the reply Hondas3000, I have found a thread on a forum regarding the different versions of XBMC with amlogic hardware included in the build here > http://forum.androidgadget.co.uk/showthread.php?tid=29 do you know which one of these would suit the MX (round version) android TV box I have ? or could you point me to a newer (stable) version of XBMC that has amlogic hardware support and preferably External Player support as well (sorry to sound so demanding lol! but I really do appreciate your help).

Many thanks
Andy


RE: Is it possible to use a USB flash drive for caching & internal storage? - hondas3000 - 2014-01-23

(2014-01-22, 13:16)Triton2014 Wrote: Thanks for the reply Hondas3000, I have found a thread on a forum regarding the different versions of XBMC with amlogic hardware included in the build here > http://forum.androidgadget.co.uk/showthread.php?tid=29 do you know which one of these would suit the MX (round version) android TV box I have ? or could you point me to a newer (stable) version of XBMC that has amlogic hardware support and preferably External Player support as well (sorry to sound so demanding lol! but I really do appreciate your help).

Many thanks
Andy

If you are running on android its all the same, as long as you clean and delete all the old file and do a clean install. But if your is an MX box then use this http://www.mediafire.com/download/21qgbmxtldwxoet/xbmcapp-armeabi-v7a-liquidblueocean-7aeee6d-20130225.apk file as it is frodo 12.0 but it runs great with amlogic and play HD video fine. There are MX 2 which run frodo 12.2 but so far I don't know how to pull the xbmc out of my android yet. Here is the latest software update for mx 2. http://matriserver.com/files/MX2/firmware/MX2-full-1.1.7S-firmware-alpha.zip


RE: Is it possible to use a USB flash drive for caching & internal storage? - dsmryder - 2014-03-05

Here is what I have found so far.

1: You can map the cache to another "drive"
2: When you are caching it will play after a while, well mine would while I was waiting. Very annoying!
3: Doing the cache fixes does not solve the cause of the issue in the first place. Poor data streaming.

What I did was went back to using the RAM to cache my streams and upgraded my router. This seems to have solved my studdering issues for now and will allow me to use my USB HDD as a network storage.