Kodi Community Forum

Full Version: advancedsettings don't work on android
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a Windows Server 2012 NUC with mySQL and Network shares. When i copy my advancedsettings to any other windows device it just work like a charm. I open kodi, i have my videosources and my musicsources, when i go to add videos there is my saved smb://192... entry from mediasources.xml loaded over the network! When i upload the advancedsettings to any android device it shows me the videos and the music what means that the part of mySQL is working, but when i try to play it says that the source for this file is missing. When i go to videos -> files, my sources from smb://192.168.37.4/kodi/userdata/sources.xml are missing / not loaded and i dont see my saved SMB entries when i will add new sources, but this should be loaded over smb://192.168.37.4/kodi/userdata/mediasources.xml . I wasted much hours now and i stuck on that point. Can someone help me please? I don't see or find any error in the kodi.log, i also activated debugging mode, there is NOTHING!

advancedsettings.xml
Code:
<advancedsettings>

  <pathsubstitution>
        <substitute>
            <from>special://profile/sources.xml</from>
            <to>smb://192.168.37.4/kodi/userdata/sources.xml</to>
       </substitute>
       <substitute>
            <from>special://profile/mediasources.xml</from>
            <to>smb://192.168.37.4/kodi/userdata/mediasources.xml</to>
       </substitute>  
  </pathsubstitution>
  
  <network>
    <buffermode>0</buffermode>
    <cachemembuffersize>20971520</cachemembuffersize>
    <readbufferfactor>1</readbufferfactor>
  </network>

    <videodatabase>
        <type>mysql</type>
        <host>192.168.37.4</host>
        <port>3306</port>
        <user>username!</user>
        <pass>password!</pass>
    </videodatabase>

    <musicdatabase>
        <type>mysql</type>
        <host>192.168.37.4</host>
        <port>3306</port>
        <user>username!</user>
        <pass>password!</pass>
    </musicdatabase>

     <videolibrary>
          <importwatchedstate>true</importwatchedstate>
          <dateadded>0</dateadded>
     </videolibrary>
    
</advancedsettings>

sources.xml:
Code:
<sources>
    <programs>
        <default pathversion="1"></default>
    </programs>
    <video>
        <default pathversion="1"></default>
        <source>
            <name>filme</name>
            <path pathversion="1">smb://192.168.37.4/videos/filme/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>serien</name>
            <path pathversion="1">smb://192.168.37.4/videos/serien/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>superneu</name>
            <path pathversion="1">smb://192.168.37.4/videos/superneu/</path>
            <allowsharing>true</allowsharing>
        </source>
    </video>
    <music>
        <default pathversion="1"></default>
        <source>
            <name>musik</name>
            <path pathversion="1">smb://192.168.37.4/musik/</path>
            <allowsharing>true</allowsharing>
        </source>
    </music>
    <pictures>
        <default pathversion="1"></default>
    </pictures>
    <files>
        <default pathversion="1"></default>
    </files>
</sources>

mediasources:
Code:
<mediasources>
    <network>
        <location id="0">smb://username:[email protected]/videos</location>
        <location id="1">smb://username:[email protected]/musik</location>
    </network>
</mediasources>

kodi.log:
Code:
11:34:58 T:1519214104  NOTICE: special://profile/ is mapped to: special://masterprofile/
11:34:58 T:1519214104  NOTICE: -----------------------------------------------------------------------
11:34:58 T:1519214104  NOTICE: Starting Kodi (14.2 Git:2015-03-26-7cc53a9-dirty). Platform: Android ARM 32-bit
11:34:58 T:1519214104  NOTICE: Using Release Kodi x32 build
11:34:58 T:1519214104  NOTICE: Kodi compiled Mar 26 2015 by GCC 4.8.0 for Android ARM 32-bit API level 14 (API level 14)
11:34:58 T:1519214104  NOTICE: Running on Amazon AFTM with Android 4.2.2 API level 17, kernel: Linux ARM 32-bit version 3.0.31+
11:34:58 T:1519214104  NOTICE: FFmpeg version: 14.2rc1-Helix-5-g7cc53a9-xbmc-2.4.6-Helix
11:34:58 T:1519214104  NOTICE: Host CPU: ARMv7 Processor rev 0 (v7l), 2 cores available
11:34:58 T:1519214104  NOTICE: Product: montoya, Device: montoya, Board: capri - Manufacturer: Amazon, Brand: BRCM, Model: AFTM, Hardware: montoya
11:34:58 T:1519214104  NOTICE: ARM Features: Neon enabled
11:34:58 T:1519214104  NOTICE: special://xbmc/ is mapped to: /data/data/org.xbmc.kodi/cache/apk/assets
11:34:58 T:1519214104  NOTICE: special://xbmcbin/ is mapped to: /data/data/org.xbmc.kodi/cache/apk/assets
11:34:58 T:1519214104  NOTICE: special://masterprofile/ is mapped to: /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/userdata
11:34:58 T:1519214104  NOTICE: special://home/ is mapped to: /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi
11:34:58 T:1519214104  NOTICE: special://temp/ is mapped to: /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/temp
11:34:58 T:1519214104  NOTICE: The executable running is:
11:34:58 T:1519214104  NOTICE: Local hostname: localhost
11:34:58 T:1519214104  NOTICE: Log File is located: /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/temp/kodi.log
11:34:58 T:1519214104  NOTICE: -----------------------------------------------------------------------
11:34:58 T:1519214104  NOTICE: load settings...
11:34:58 T:1519214104   DEBUG: static int CAndroidFeatures::GetVersion(): android.os.Build.VERSION 17
11:34:58 T:1519214104   DEBUG: CSettings: loaded settings definition from special://xbmc/system/settings/settings.xml
11:34:58 T:1519214104 WARNING: CSettingInt: unknown options filler "audiocdactions" of "audiocds.autoaction"
11:34:58 T:1519214104   DEBUG: CSettings: loaded settings definition from special://xbmc/system/settings/android.xml
11:34:58 T:1519214104  NOTICE: Found 1 Lists of Devices
11:34:58 T:1519214104  NOTICE: Enumerated AUDIOTRACK devices:
11:34:58 T:1519214104  NOTICE:     Device 1
11:34:58 T:1519214104  NOTICE:         m_deviceName      : AudioTrack
11:34:58 T:1519214104  NOTICE:         m_displayName     : android
11:34:58 T:1519214104  NOTICE:         m_displayNameExtra: audiotrack
11:34:58 T:1519214104  NOTICE:         m_deviceType      : AE_DEVTYPE_HDMI
11:34:58 T:1519214104  NOTICE:         m_channels        : FL,FR,FC,LFE,BL,BR
11:34:58 T:1519214104  NOTICE:         m_sampleRates     : 48000
11:34:58 T:1519214104  NOTICE:         m_dataFormats     : AE_FMT_S16LE,AE_FMT_AC3,AE_FMT_DTS
11:34:58 T:1519214104  NOTICE: No settings file to load (special://xbmc/system/advancedsettings.xml)
11:34:58 T:1519214104  NOTICE: Loaded settings file from special://profile/advancedsettings.xml
11:34:58 T:1519214104  NOTICE: Contents of special://profile/advancedsettings.xml are...
                                            <advancedsettings>
                                              <pathsubstitution>
                                                <substitute>
                                                  <from>special://profile/sources.xml</from>
                                                  <to>smb://192.168.37.4/kodi/userdata/sources.xml</to>
                                                </substitute>
                                                <substitute>
                                                  <from>special://profile/mediasources.xml</from>
                                                  <to>smb://192.168.37.4/kodi/userdata/mediasources.xml</to>
                                                </substitute>
                                              </pathsubstitution>
                                              <network>
                                                <buffermode>0</buffermode>
                                                <cachemembuffersize>20971520</cachemembuffersize>
                                                <readbufferfactor>1</readbufferfactor>
                                              </network>
                                              <videodatabase>
                                                <type>mysql</type>
                                                <host>192.168.37.4</host>
                                                <port>3306</port>
                                                <user>username!</user>
                                                <pass>password!</pass>
                                              </videodatabase>
                                              <musicdatabase>
                                                <type>mysql</type>
                                                <host>192.168.37.4</host>
                                                <port>3306</port>
                                                <user>username!</user>
                                                <pass>password!</pass>
                                              </musicdatabase>
                                              <videolibrary>
                                                <importwatchedstate>true</importwatchedstate>
                                                <dateadded>0</dateadded>
                                              </videolibrary>
                                            </advancedsettings>
11:34:58 T:1519214104   DEBUG: Configuring path substitutions
11:34:58 T:1519214104   DEBUG:   Registering substition pair:
11:34:58 T:1519214104   DEBUG:     From: [/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/userdata/sources.xml]
11:34:58 T:1519214104   DEBUG:     To:   [smb://192.168.37.4/kodi/userdata/sources.xml]
11:34:58 T:1519214104   DEBUG:   Registering substition pair:
11:34:58 T:1519214104   DEBUG:     From: [/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/userdata/mediasources.xml]
11:34:58 T:1519214104   DEBUG:     To:   [smb://192.168.37.4/kodi/userdata/mediasources.xml]
11:34:58 T:1519214104 WARNING: VIDEO database configuration is experimental.
11:34:58 T:1519214104  NOTICE: Default DVD Player: dvdplayer
11:34:58 T:1519214104  NOTICE: Default Video Player: dvdplayer
11:34:58 T:1519214104  NOTICE: Default Audio Player: paplayer
11:34:58 T:1519214104  NOTICE: Disabled debug logging due to GUI setting. Level 0.
11:34:58 T:1519214104  NOTICE: Log level changed to "LOG_LEVEL_NORMAL"
11:34:59 T:1519214104  NOTICE: Loading player core factory settings from special://xbmc/system/playercorefactory.xml.
11:34:59 T:1519214104  NOTICE: Loaded playercorefactory configuration
11:34:59 T:1519214104  NOTICE: Loading player core factory settings from special://masterprofile/playercorefactory.xml.
11:34:59 T:1519214104  NOTICE: special://masterprofile/playercorefactory.xml does not exist. Skipping.
11:34:59 T:1516443744  NOTICE: Thread ActiveAE start, auto delete: false
11:34:59 T:1516446096  NOTICE: Thread AESink start, auto delete: false
11:34:59 T:1519214104  NOTICE: Running database version Addons16
11:34:59 T:1519214104  NOTICE: ADDONS: Using repository repository.xbmc.org
11:34:59 T:1519214104 WARNING: Unable to resolve: /libcec.so CECInitialise, reason: Symbol not found:
11:34:59 T:1519214104   ERROR: Unable to resolve exports from dll libcec.so
11:34:59 T:1519214104   ERROR: virtual void PERIPHERALS::CPeripherals::Initialise() - failed to initialise bus cec
11:34:59 T:1518700696  NOTICE: Thread PeripBusUSB start, auto delete: false
11:34:59 T:1519214104  NOTICE: virtual bool CWinSystemEGL::InitWindowSystem(): Using EGL Implementation: android
11:34:59 T:1519214104  NOTICE: Current resolution: 1920x1080 @ 60.00 - Full Screen
11:34:59 T:1519214104  NOTICE: Previous line repeats 1 times.
11:34:59 T:1519214104  NOTICE: Found resolution 1920 x 1080 for display 0 with 1920 x 1080 @ 60.000000 Hz
11:34:59 T:1519214104  NOTICE: Found ([email protected]) at 16, setting to RES_DESKTOP at 16
11:34:59 T:1519214104  NOTICE: Checking resolution 16
11:34:59 T:1519214104  NOTICE: Current resolution: 1920x1080 @ 60.00 - Full Screen
11:34:59 T:1519214104  NOTICE: GL_VENDOR = Broadcom
11:34:59 T:1519214104  NOTICE: GL_RENDERER = VideoCore IV HW
11:34:59 T:1519214104  NOTICE: GL_VERSION = OpenGL ES 2.0
11:34:59 T:1519214104  NOTICE: GL_SHADING_LANGUAGE_VERSION = OpenGL ES GLSL ES 1.00
11:34:59 T:1519214104  NOTICE: GL_EXTENSIONS = GL_OES_compressed_ETC1_RGB8_texture GL_OES_compressed_paletted_texture GL_OES_texture_npot GL_OES_depth24 GL_OES_vertex_half_float GL_OES_EGL_image GL_OES_EGL_image_external GL_EXT_discard_framebuffer GL_OES_rgb8_rgba8 GL_OES_depth32 GL_OES_packed_depth_stencil GL_EXT_texture_format_BGRA8888 GL_EXT_debug_marker
11:34:59 T:1519214104  NOTICE: Current resolution: 1920x1080 @ 60.00 - Full Screen
11:34:59 T:1519214104  NOTICE: No Joystick name specified, loading default map
11:34:59 T:1519214104  NOTICE: Previous line repeats 36 times.
11:34:59 T:1519214104  NOTICE: Running database version Addons16
11:34:59 T:1519214104  NOTICE: Running database version ViewModes6
11:34:59 T:1519214104  NOTICE: Running database version Textures13
11:34:59 T:1519214104  NOTICE: Running database version MyMusic48
11:34:59 T:1519214104  NOTICE: Running database version MyVideos90
11:34:59 T:1519214104  NOTICE: Running database version TV26
11:34:59 T:1519214104  NOTICE: Running database version Epg8
11:35:00 T:1519214104 WARNING: JSONRPC: Could not parse type "PVR.Details.Channel"
11:35:00 T:1519214104 WARNING: JSONRPC: Could not parse type "PVR.Details.ChannelGroup.Extended"
11:35:00 T:1519214104 WARNING: JSONRPC: Could not parse type "GUI.Property.Value"
11:35:00 T:1519214104 WARNING: JSONRPC: Could not parse type "Setting.Details.SettingList"
11:35:00 T:1541301008  NOTICE: Thread LanguageInvoker start, auto delete: false
11:35:00 T:1519214104  NOTICE: initialize done
11:35:00 T:1519214104  NOTICE: Running the application...
11:35:00 T:1541301008  NOTICE: -->Python Interpreter Initialized<--
11:35:01 T:1636953488  NOTICE: Thread JobWorker start, auto delete: true
11:35:02 T:1519214104  NOTICE: starting zeroconf publishing
11:35:02 T:1636560912  NOTICE: Thread ZerocconfEmbedded start, auto delete: false
11:35:02 T:1519214104  NOTICE: ES: Starting event server
11:35:02 T:1637560472  NOTICE: Thread EventServer start, auto delete: false
11:35:02 T:1637560472  NOTICE: ES: Starting UDP Event server on 0.0.0.0:9777
11:35:02 T:1637560472  NOTICE: UDP: Listening on port 9777
11:35:02 T:1636696024  NOTICE: Thread TCPServer start, auto delete: false
11:35:02 T:1519214104  NOTICE: Current resolution: 1920x1080 @ 60.00 - Full Screen
11:35:02 T:1637546544  NOTICE: Thread JobWorker start, auto delete: true
11:35:02 T:1519214104  NOTICE: GL_VENDOR = Broadcom
11:35:02 T:1519214104  NOTICE: GL_RENDERER = VideoCore IV HW
11:35:02 T:1519214104  NOTICE: GL_VERSION = OpenGL ES 2.0
11:35:02 T:1519214104  NOTICE: GL_SHADING_LANGUAGE_VERSION = OpenGL ES GLSL ES 1.00
11:35:02 T:1519214104  NOTICE: GL_EXTENSIONS = GL_OES_compressed_ETC1_RGB8_texture GL_OES_compressed_paletted_texture GL_OES_texture_npot GL_OES_depth24 GL_OES_vertex_half_float GL_OES_EGL_image GL_OES_EGL_image_external GL_EXT_discard_framebuffer GL_OES_rgb8_rgba8 GL_OES_depth32 GL_OES_packed_depth_stencil GL_EXT_texture_format_BGRA8888 GL_EXT_debug_marker
11:35:02 T:1637257280  NOTICE: Thread RSSReader start, auto delete: false
11:35:06 T:1636704648  NOTICE: Thread JobWorker start, auto delete: true
11:35:10 T:1528346112  NOTICE: Thread BackgroundLoader start, auto delete: false
Sounds as if your Android device isn't allowed to access your smb share.

If you have a passwords.xml file inside a Windows client's Kodi appdata folder, copy that file over to your Android device alongside with your advancedsettings.xml.
If this file doesn't exist Kodi would create it if you'd configure your shares to be password protected, e.g. accessible only for a certain user.

Code:
<passwords>
    <path>
        <from pathversion="1">smb://192.168.37.4/videos/filme</from>
        <to pathversion="1">smb://servername%5cUsername:[email protected]/videos/filme</to>
    </path>
    <path>
        <from pathversion="1">smb://192.168.37.4/videos/serien</from>
        <to pathversion="1">smb://servername%5cUsername:[email protected]/videos/serien</to>
    </path>
</passwords>
Hello and thank you for that detail. I will try that. But what means %5c in smb://servername%5cUsername:[email protected]/videos/serien?
Is this a backslash? And why does this not work under android:

<substitute>
<from>special://profile/passwords.xml</from>
<to>smb://192.168.37.4/kodi/userdata/passwords.xml</to>
</substitute>
Yes, it's the backslash.

If the culprit really is your Android device being refused access to your share, then it won't be able to read your xml from it in the first place, will it?
(2015-07-05, 17:54)Fry7 Wrote: [ -> ]Yes, it's the backslash.

If the culprit really is your Android device being refused access to your share, then it won't be able to read your xml from it in the first place, will it?

That makes sense, or not, im confused! Anyway thank you for this Informations, i got it work, somehow. But i try to understand this. I have 3 shares: videos (username and password needed), musik (username and password needed) and kodi (accessable for everyone as public share). So it should be possible to access the xml files in the public share, right? That is very strange, in the password.xml file are only the usernames and passwords for music and videos, not for the share kodi where the xml's are stored.

When this is set:
<substitute>
<from>special://profile/passwords.xml</from>
<to>smb://192.168.37.4/kodi/userdata/passwords.xml</to>
</substitute>

kodi crashes and dont start anymore!
(2015-07-05, 18:40)steel4me Wrote: [ -> ]kodi crashes and dont start anymore!

When this is set:
<substitute>
<from>special://profile/passwords.xml</from>
<to>smb://192.168.37.4/kodi/userdata/passwords.xml</to>
</substitute>

Someone got this problem, too? So i have to upload the password.xml with advancedsettings.xml on any android device. That's okay for me as workaround but i dont understand why, access to network smb share is public.