Kodi Community Forum

Full Version: XBMC Settings restore on first run Help needed
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi all,
I am making an android apk file of xbmc 12.3 with some addons enabled out of the box for my tvbox mk908 and i need to include some changes in the guisettings.xml for subtitles charset to ISO-8859-7 (Greek). I have unpacked the apk and added all the addons i need repacked and works ok. My problem is that inside the apk i can find a userdata folder that i add a customized guisettings.xml but when i install the apk, under the xbmc userdata folder on sdcard is the default guisettings.xml with no customizations. As i believe there is some script running on xbmc first run that creates all the userdata folder structure and files under sdcard with all settings default.
Is there a way to change the default settings that first run installs or a way to execute a script on first run only that can copy my guisettings.xml to the userdata folder? I looked all the addons folder to find the first run script with no success. I searched a lot in google and on the forum but the only thing i could find is addons for backup/restore and i need this to run only on first run. The only close to my needs addon i found was an addon that was executing scripts on several xbmc statuses (start, pause movie, play movie). If I could only overwrite the default xml file with my custom so on first run it would be the one to be installed would be great.
Thank you all and excuse me if i deed something wrong in my post but i am new to the forum.Blush
Somewhere there should be a file called settings.xml where you can define defaults.
Hi,
Thank you for replying so quick!! I have found a lot of settings.xml under the addons folder but they are for the addons, not first run setup, please correct me if i am wrong.
Under the apk there are 3 folders:
assets
lib
res
Under lib are some xbmc libraries, under res are all the picture-icons to display in android interface and under assets are the files for settings and addons.
Under assets there are the folders:
addons
language
media
python2.6
sounds
system
userdata
On the addons folder i added all the addons i need to include in installation and under userdata i thought that i could add the user settings i need because it is the same as the one created to the sdcard. But when you install, it copies this user data in nand and the userdata in sdcard is the default. I tried with deleting the userdata folder from the apk completly and again the apk worked with all addons i needed and with no problem. I have started to believe that this must be somewhere hardcoded in the xbmc, every time it starts, it checks for the userdata folder on sdcard and if there is nothing, it creates it with defaults, else it loads it and starts. If you have a working installation and delete the userdata folder next time you open xbmc you get the first run message and the folder is recreated with defaults. If i could find that first run script i could add some code to copy my guisettings.xml to the sdcard userdata.
I hope i didn't tired you because i am not very good in English.
Thank you!!
It's not the one under addons, keep looking. I think it's something like System/Settings/settings.xml
I have checked all the xml files under system but non have something todo with userdata or first run.
It has xml about font, about default player, about device that it runs, about remote control keymaps but non for creating userdata folder. Is there any possibility that this is done under the android install scripts? The problem with android install scripts and code is that i will have to decompile the apk to see them, and if i change something there i am not sure that it will recompile ok again.
Hi,

I asked the same question in another thread but I heared nothing. I have the same problem as you discribed. Normally in the frodo builds we could have changed the guisettings in the system folder. I took a look at the settings.xml but i found out that there are some things I could change like language for example. What I'm trying to do is making a custom xbmc apk which has included my customized ace skin. So I looked at the xml but couldn't find anything related to those skinsettings except the default skin.

Where can i place my guisettings in that xml? And why exactly is it changed this way in gotham?

Thx
I searched for the file Scott mentioned but i can not find it in the extracted apk. Maybe it is somewhere i cannot see and have to decompile the apk to find it. Either way if you search on the file there is no reference about guisettings.xml or userdata folder, neither <subtitles></subtitles> setting as in guisettings.xml . Blazingramirez i think i saw your question as i was searching for a solution in google. I believe changing only the skin can be done in the addons folder because i have inserted xbmchub wizard addon and it works with all the skin settings that it changes. But i work with frodo 12.3 not gotham so i do not know if there are any changes.
Its located in the asserts/system/settings folder and calles sertings.xml. I have customized my menu by favourites shortcuts and more playlists thats why id like as a reseller to create a custom apk. I hope you guys can help me.

Thx


By the way, if you like to do it on frodo just copy your guisettings from your userdata to the system folder and sign your apk you will be good then
This file has nothing to do with guisettings.xml i think it is skin settings that you can change.
Well to be honest there are some values you can change to change remoteaskeyboard for example, you can also preserve your menu there but it doesnt work in gotham betas
Well i guess that the only way to do it is with a script addon someone wrote that executes scripts on xbmc events (like xbmc start or play-pause). That way we could make a bash script that copies the guisettings.xml on the sdcard and then deletes it self for no further execution, or deletes the addon.
(2014-03-16, 16:09)blazinramirez Wrote: [ -> ]Its located in the asserts/system/settings folder and calles sertings.xml. I have customized my menu by favourites shortcuts and more playlists thats why id like as a reseller to create a custom apk. I hope you guys can help me.

Thx


By the way, if you like to do it on frodo just copy your guisettings from your userdata to the system folder and sign your apk you will be good then

If you're modifying XBMC for resell (or any redistribution, sold or not) then we insist you compile XBMC from scratch and remove our logos and name and replace it with something else. Too many people already sell/distribute modified versions of XBMC without changing the name, and people come to us thinking we've done those changes or we support some pre-installed add-on. The software is free, but the identity is not. If you want to use XBMC without changing those things then provide an un-modified APK.

(2014-03-16, 16:15)maraveasp Wrote: [ -> ]This file has nothing to do with guisettings.xml i think it is skin settings that you can change.

I don't say this very often, but you're an idiot. The settings.xml file I mentioned is what is used to generate the guisettings.xml file for the user. There's about 20 subtitle settings in there alone. Skin setting defaults are set in the skin's add-on folder, such as this: https://github.com/xbmc/xbmc/blob/master...faults.xml

You're also an idiot for pre-installing "xbmchub wizard addon", which is a pile of crap.

Since it's almost guaranteed that you guys are just doing this to sell craptastic android boxes with preinstalled add-ons that associate XBMC with pirate video add-ons, and don't do anything to change the name/logos in XBMC, I don't really see why anyone should spoon-feed you anymore.
@ned Unless mistaken, the xml settings is a Gotham thing. That didn't exist in Frodo.
First of all i don't want to resell anything, the only reason i need to create an apk is because when i flash the device for testing a new rom or upgrade i have to copy all the userdata for backup. The userdata folder with all the addons, settings and thumbnails from the addons is more than 500Mb and i have to copy that for backup and restore. It is much easier to have an apk that installs everything from scratch with your settings.
Second i search the settings.xml for a reference to <subtitles> and there was none, so you could be more polite and explain what is the configuration in the settings.xml that has to do with subtitles.
From the other hand if you think that explaining something to people not so genius like your self is useless you could not answer the question and leave the idiots strangling with it.
Anyway thanks for the help so far and i learned the lesson not to ask geniuses any more.
Pages: 1 2