[Dev] Platform Storage

Whiteman, John L john.l.whiteman at intel.com
Thu May 22 23:15:01 GMT 2014

Hi Art,


The patch I mentioned is merged into Tizen Common but hasn’t reached Tizen IVI yet.  We are working on that now, but may take a little time.


For now, it’s a simple change to the platform/core/multimedia/media-data-sdk/packaging/media-data-sdk.manifest file.  The SMACK “User” label is now required:  




    <domain name="User"/>




I confirmed the patch and it works fine.


You can pull the latest RPM or rebuild it yourself with the change mentioned above.  Let me know if you need any help with this.


commit 6c9651e1aae28857c5183cbf6be163f7fb09d5c2

Author: Casey Schaufler <casey at schaufler-ca.com>

Date:   Mon Mar 17 15:48:47 2014 -0700


    Add media data to the User domain


    The entire package gets labeled User.


    Change-Id: Icb4d6c361b155cb83e860852acf10ece33790aeb

    Signed-off-by: Casey Schaufler <casey.schaufler at intel.com>

    Fixes: TIVI-2917


Best Regards,




From: IVI [mailto:ivi-bounces at lists.tizen.org] On Behalf Of Whiteman, John L
Sent: Thursday, May 22, 2014 10:53 AM
To: Jones, Brian J; McGee, Art; ivi at lists.tizen.org; dev at lists.tizen.org
Subject: RE: Platform Storage


Thanks, Brian.  I’m looking at it right now too.  I confirmed the behavior Art reported.   File creation is possible with EOY but not with  APR.  A patch was submitted a while back to rectify this but did not get merged.  I’m following up on this now.  In the meantime, per Brian’s suggestion, Art, please try chsmack as a workaround if possible.


Best Regards,




From: IVI [mailto:ivi-bounces at lists.tizen.org] On Behalf Of Jones, Brian J
Sent: Thursday, May 22, 2014 10:45 AM
To: McGee, Art; ivi at lists.tizen.org; dev at lists.tizen.org
Subject: RE: Platform Storage


Hi Art,


That looks right.  You might check that the Smack label of the Downloads directory is set right.  If ls –lZ /opt/usr/media doesn’t show the label as User, use ‘chsmack –a User /opt/usr/media/Downloads’ to fix it.  Hopefully that resolves your issue, if not I’ll dig further to see what might be going on.




From: IVI [mailto:ivi-bounces at lists.tizen.org] On Behalf Of McGee, Art
Sent: Thursday, May 22, 2014 7:58 AM
To: ivi at lists.tizen.org; dev at lists.tizen.org
Subject: Platform Storage


I'm working on an app that stores and reads from the Downloads directory on the system using.  I seem to having an error when trying to access that storage location.  This seems to be a change from EOY release and the APR22 release.   Please advise if I'm using this incorrectly or if something has changed in the security model.






It asks for permission using the config.xml file with the following.

            <tizen:privilege name="http://tizen.org/privilege/filesystem.read" />

            <tizen:privilege name="http://tizen.org/privilege/filesystem.write" />


The code that seems to have the fault.

        if (typeof(tizen) !== 'undefined') {

            // Has this called changed or should I be requesting permission by another means? Note this._settingsStorageName = "downloads"
            tizen.filesystem.resolve(this._settingsStorageName, function(directory) {
                var settingsFile;
                try {
                     settingsFile = directory.resolve(self._settingsFileName);
                } catch(ex) {
                    console.warn("Settings file doesn't exist, creating ...", ex);
                    settingsFile = directory.createFile(self._settingsFileName);

                settingsFile.readAsText(function(contents) {
                    //console.log("Settings file contents", contents);
                    var configValues = null;

                    if (contents.length > 0) {
                        try {
                            configValues = JSON.parse(contents);
                        catch (ex) {
                            console.error("Error occured during parsing settings file", ex);

                    if (!configValues || !configValues.version || configValues.version < self._values.version) {
                        configValues = jQuery.extend({}, self._values);
                    //console.log("Loaded settings:", configValues);

                    if (JSON.stringify(configValues) !== JSON.stringify(self._values)) {
                        console.log("Settings updated.");
                        self._values = configValues;

                }, function(ex) {
                    console.error("Cannot read settings file", ex);
            }, function(error) {

                console.error("Error occured during opening Documents directory", error); // This is the line that reports the error.
            }, "rw");
        } else {
            console.warn("Tizen API is not available, cannot read settings from persistent storage.");



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.tizen.org/pipermail/dev/attachments/20140522/7d8d7cea/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6664 bytes
Desc: not available
URL: <http://lists.tizen.org/pipermail/dev/attachments/20140522/7d8d7cea/attachment-0001.p7s>

More information about the Dev mailing list