HOWTO: Move Kodi's data to external memory on an Amazon Fire TV
#1
(2016-02-06, 11:25)Koying Wrote: Yeah, sorry about that, not our fault, really.
I've started digging into the Android api, but it really, really does not fit a native, cross-platform, app as Kodi.

Thanks for the detailed explanation. If you make a new thread with a "howto" (basically the post above with a bit of context), I'll stick it.

HOWTO: Move Kodi's data to external memory on an Amazon Fire TV

Short version for the Amazon Fire TV (AFTV):
  • Create a file on your AFTV called, "/mnt/sdcard/xbmc_env.properties"
  • xbmc_env.properties contains one line to tell Kodi where you're data is located
  • This line should read: xbmc.data=/usbdisk/Android/data/org.xbmc.kodi/files
  • "usbdisk" is the name of a flash drive plugged into the usb port. Verify this location
  • Changes to Android permissions require that the path for Kodi data on your external device be /Android/data/org.xbmc.kodi/files
  • Copy your settings to the USB drive
  • If your settings are on internal storage, copy the contents of: /storage/emulated/0/android/data/org.xbmc.kodi/files to /usbdisk/Android/data/org.xbmc.kodi/files
  • Mount the external storage on your AFTV

Kodi should now load it's library and user settings from your external device.

Long version:

Recent upgrades to Android OS have changed the access premissions of the SD card and USB drives. These changes require your attention when attempting to relocate your Kodi data to secondary storage.

Quote:Note: When the permissions changed the update happened automatically by the device and this cannot be blocked on a Amazon Fire TV without rooting. After the update, Kodi would launch and hang on a blank screen, or launch and then immediately fail. Before the upgrade Kodi had been working flawlessley. The change was very disorienting since an update to the OS had not been requested, but instead pulled by the device.

These instructions were written up based on an Amazon Fire TV running version 5.0.5 of the AFTV OS. They should also offer you enough insight to update other Android devices which will behave similarly once their Android OS has been updated to include these permission changes.

After the permission changes you can only move your data to a place that your application is allowed to write.

To move your data from internal storage to external you must place it in the folder:

Code:
/<external_device_name>/Android/data/org.xbmc.kodi/files

Using the USB port and a san disk USB drive on the AFTV, for example, the <external_device_name> is called usbdisk. On that device the files were placed in the folder:

Code:
/usbdisk/Android/data/org.xbmc.kodi/files

To move your data, follow these steps.

Create a file called, "xbmc_env.properties", it should have one line in it that tells Kodi where you're data is located.

Code:
xbmc.data=/usbdisk/Android/data/org.xbmc.kodi/files

Put "xbmc_env.properties" in the root of your internal storage. On the AFTV this should be /mnt/sdcard so put the file at the following file path:

Code:
/mnt/sdcard/xbmc_env.properties

Copied your Kodi data files to new location (/usbdisk/Android/data/org.xbmc.kodi/files). The Kodi data folders start with a period ("."). On the configuration used for these instructions these folders were called:
  • .kodi
  • .smb

If you initially install Kodi on internal storage and move these folders to external on the AFTV you will find them at:

Code:
/storage/emulated/0/android/data/org.xbmc.kodi/files

Quote:Note: Remember that on Android these folders can be mapped to multiple paths. The path above is not the only one to which the folder above has been mapped so if you look around your device you can likely get to the data files multiple ways. Use these instructions as a guide, but your mileage may vary.

Inside the internal data folder for Kodi (/storage/emulated/0/android/data/org.xbmc.kodi/files) you should see folders beginning with a period (".kodi"). These are the folders that should be placed into the folder listed in your "xbmc_env.properties" file.

xbmc_env.properties is detected by Kodi during startup and, if found, Kodi reads it to locate it's data. If this location is incorrect, Kodi will not start or hang will hang on a blank screen. If you don't have an external drive mounted or the path in the xbmc_env.properties file does not exist, Kodi may ignore it and load, but of course it will be using the settings from internal memory. If there are no settings on your internal memory it will create them and use the default settings.

To push the "xbmc_env.properties" to the AFTV, created the "xbmc_env.properties" where adb.exe is located and use these commands. Substitute your devices IP address for xxx.xxx.xxx.xxx (you can find your device's IP address in the settings under network).

Push "xbmc_env.properties" to the Fire TV with these commands:

Code:
adb connect xxx.xxx.xxx.xxx
adb push "xbmc_env.properties" "mnt/sdcard/xbmc_env.properties"
adb disconnect

Copy your Kodi data files (.kodi, etc) to your external storage device at the location listed in "xbmc_env.properties" and put the storage device into the AFTV. When you launch Kodi it should find the "xbmc_env.properties", be redirected to use the new data location on your external device, and load.

One advantage of using an external device is that you can easily backup your settings from time to time. To do so, go into Kodi and under "System Settings->Video->Library->Export video library" - this will update the play counts and any edits you've made via the Kodi interface. Whether you use the single file export or separate file export depends on the way you've setup your library. You may want to "Clean library..." before exporting.

After exporting your library, quit out of Kodi, go into the settings and eject the external device, take it to your computer and backup the /Android folder or more specifically the folders at /Android/data/org.xbmc.kodi/files.

Happy watching.
Reply
#2
Split and Stickied
Reply
#3
I've got 5 SPMC 13.3-SPMC(3) running on 1st Gen AFTV's. I'm trying to move Kodi's data to extenal memory after the 5.0.5 update.

I put a new flash drive in the AFTV. I let the box format the drive. I go into SPMC's file manager and I see a drive called usbdisk. When I attempt to access it I get a message that says "Path not found or invalid".

I can't even get started with this error. What's going wrong?

Thanks,

Roveer
Reply
#4
I thought the latest edition of ADBFire has that ability built in, to allow one to move kodi data to external media...
Reply
#5
I set this up a couple days ago on my AFTV2, which is rooted, and on the latest 5.0.5. I'm having a problem where every few times I start Kodi, it seems to ignore xbmc-env.properties, and create a (new) .kodi dir on sdcard instead of using the one on sdcard1. I can tell right away because I see the Confluence skin instead of Mimic. So I quit Kodi, run it again, and it's fine. There seems to be no rhyme or reason to this occurring. I speculate it may be due to the double-home-click I configured in FireStarter, but only because I always use that. Anyone else experiencing this?
Reply
#6
Hi there,

Thanks for this doc - it was really helpful.

I was able to get Kodi onto a USB stick through the FireTV menu. Settings->Applications->Manage installed applications->Kodi->Move to USB storage.

It seems to be working for me fine now.
Reply
#7
(2016-03-03, 20:14)sadsack007 Wrote: I thought the latest edition of ADBFire has that ability built in, to allow one to move kodi data to external media...

this is what I did, and it's alot easier.
Reply
#8
Hi, I recently attempted to move my Kodi's data to an external memory from my Amazon Fire TV by using the Move Kodi Data tab within the ABDFire companion. It seems to have successfully moved from the fire tv, but now I cannot figure how to access it. When I try to restore the data, it tells me that it is in a location that is named xbmc_env.properties. This action completely wiped my Kodi app, in which there was a lot of personalization that I would rather not loose. Please help! Thanks
Reply
#9
Recently got an AFTV2, installed SPMC on the external SD card, does it still put the data folder onto internal storage?
Nvidia ShieldTV (2017)+Nexus
Reply
#10
can someone please help me I recently changed my Internet password and now cannot get my Kodi to work......ugh please inbox if you can help
Reply
#11
(2016-03-03, 20:14)sadsack007 Wrote: I thought the latest edition of ADBFire has that ability built in, to allow one to move kodi data to external media...

Yes, it works for me to move data from kodi to other.
Reply
#12
This all seems complicated , Is there not a simple way to make a external hd as work like an internal hd on a Android mxq box ? .

I installed an external Hd on my game consol and had it working like an internal hd in less then 5mins
with just a few clicks .

Surly there has to be a away of just clicking few icons to do this simple task that only takes a few mins on a XB

Is there an app I can install that's simple to use no coding just point click and done .
Reply
#13
(2016-09-13, 08:41)Satanh Wrote: This all seems complicated , Is there not a simple way to make a external hd as work like an internal hd on a Android mxq box ? .

I installed an external Hd on my game consol and had it working like an internal hd in less then 5mins
with just a few clicks .

Surly there has to be a away of just clicking few icons to do this simple task that only takes a few mins on a XB

Is there an app I can install that's simple to use no coding just point click and done .

Try ADBlink: http://www.jocala.com
Reply
#14
Thank you , sorry if I sounded negitive , just was very stressed , tried to set the ex hd up for 12 hours no fixes worked. since i have mxq 4k pro tv box it only has 4gbs , which is not a lot of space 1tb will give me the security to know I can download updates with no worries. Thanks again. The ex hd is a My Passport WM
Reply
#15
Hi all,

I followed this guide for my FireTV and It worked great, however I use Kodi to launch emulators and other FireTV apps and when they close, Kodi resets completely. Default skin, no library and no Addons. If I exit and restart everything gets picked up again. Just wondering if anyone is experiencing the same issue/fixed it.
Reply

Logout Mark Read Team Forum Stats Members Help
HOWTO: Move Kodi's data to external memory on an Amazon Fire TV2