HOW-TO:Change data location for Android: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{mininav| [[Android]] {{l2| [[Advanced topics]] }} }}
{{mininav| [[Android]] }}
<section begin="intro" />As of v14, Kodi supports a backdoor to specify the location of your settings folder, which includes the [[userdata folder]] and add-ons. It is the equivalent of using environment variables on other platforms<section end="intro" />


<section begin="intro" />As of v14, Kodi supports a backdoor to specify the location of your settings folder, which includes the [[Userdata|userdata folder]] and add-ons. It is the equivalent of using environment variables on other platforms<section end="intro" />


To do so, create a file <code>/sdcard/xbmc_env.properties</code>.
This is accomplished by creating a plain text file file at <code>/sdcard/xbmc_env.properties</code> (the root directory for the Android device) with the following line:
Its content is simply:
 


<syntaxhighlight lang="text">
<syntaxhighlight lang="text">
Line 11: Line 9:
</syntaxhighlight>
</syntaxhighlight>


'''''Example:''''' <code>xbmc.data=/storage/sdcard0/external_sdcard/kodi_data</code>
== How-to ==
{{how-to
| Step1= Quit Kodi by using the quit option or shutdown menu from within Kodi.
 
| Step2= In the root directory of the internal storage of your device, usually just mnt/sdcard (not mnt/sdcard/root) create a plain text file called: '''<code>xbmc_env.properties</code>'''
 
{{note|You must use "xbmc" when noted above for the text and file name, even when using Kodi.}}
 
| Step3 = In '''<code>xbmc_env.properties</code>''' you need to tell Kodi where it's data will now be stored.
 
This will be done by creating a path statement like:  
 
:<syntaxhighlight lang="text">xbmc.data=/storage/sdcard0/external_sdcard/kodi_data</syntaxhighlight>
 
 
The path might start with /storage/ as shown above, but it might be different on various Android devices. You can find the correct path by using a file explorer, like "File Browser" or "Root Explorer" to determine the proper path.
 
 
For example:
:A USB drive location might look like: <syntaxhighlight lang="text">xbmc.data=/storage/external_storage/sda1/kodi_data/</syntaxhighlight>
 
| Step4 = Using a file manager program, such as "File Browser" or "Root Explorer", move or copy the '''<code>.kodi</code>''' directory from <code>/sdcard/Android/data/org.xbmc.kodi/.kodi</code> to the new location you defined in '''Step 3'''.
 
 
For example:
 
:Move or copy: <code>/mnt/sdcard/Android/data/org.xbmc.kodi/.kodi</code>
 
:To: <code>/storage/sdcard0/external_sdcard/kodi_data/</code>
 
}}




{{note|You must use "xbmc" when noted above for the text and file name, even when using Kodi v14.}}
== New data location requirements ==
{{note|The destination folder must be created manually beforehand (This is not a limitation. Presence of the folder is used to find out if Kodi has to wait for an external drive to be active)}}


* Some Android devices require a specific folder on the external memory (USB or SD card). See http://forum.kodi.tv/showthread.php?tid=258783


Inside this, a directory ".kodi" will be created which contain the well-known xbmc structure ("addons", "userdata", ...).


* The specified path must be a local Android file path and not a typical network path. i.e. no "smb://" or "nfs://". To use a network file path you would need to mount the network share as a local mount, which might require root access on some Android devices.


Currently, the specified path must be an android file path and not a typical network path. i.e. no "smb://" or "nfs://". To use a network file path you must first mount the file share in Android, and then point to that mount path.


{{helix updated}}
{{updated|16}}


[[Category:Advanced topics]]
[[Category:Advanced topics]]
[[Category:How-to]]
[[Category:How-to]]
[[Category:Android]]
[[Category:Android]]
[[Category:Manual]]

Latest revision as of 21:15, 28 August 2020

Home icon grey.png   ▶ Android ▶ HOW-TO:Change data location for Android

As of v14, Kodi supports a backdoor to specify the location of your settings folder, which includes the userdata folder and add-ons. It is the equivalent of using environment variables on other platforms

This is accomplished by creating a plain text file file at /sdcard/xbmc_env.properties (the root directory for the Android device) with the following line:

xbmc.data=<path to the Kodi data folder you wish to use>

How-to

1 Quit Kodi by using the quit option or shutdown menu from within Kodi.
2 In the root directory of the internal storage of your device, usually just mnt/sdcard (not mnt/sdcard/root) create a plain text file called: xbmc_env.properties

Note: You must use "xbmc" when noted above for the text and file name, even when using Kodi.

3 In xbmc_env.properties you need to tell Kodi where it's data will now be stored.

This will be done by creating a path statement like:

xbmc.data=/storage/sdcard0/external_sdcard/kodi_data


The path might start with /storage/ as shown above, but it might be different on various Android devices. You can find the correct path by using a file explorer, like "File Browser" or "Root Explorer" to determine the proper path.


For example:

A USB drive location might look like:
xbmc.data=/storage/external_storage/sda1/kodi_data/
4 Using a file manager program, such as "File Browser" or "Root Explorer", move or copy the .kodi directory from /sdcard/Android/data/org.xbmc.kodi/.kodi to the new location you defined in Step 3.


For example:

Move or copy: /mnt/sdcard/Android/data/org.xbmc.kodi/.kodi
To: /storage/sdcard0/external_sdcard/kodi_data/


New data location requirements


  • The specified path must be a local Android file path and not a typical network path. i.e. no "smb://" or "nfs://". To use a network file path you would need to mount the network share as a local mount, which might require root access on some Android devices.