语言

Menu
Sites
Language
File access problems

I'm new to Tizen and working on a media app. I'm experiencing several file access problems when working on a Gear S3 device and emulator:

  1. The path given by app_get_data_path() is not accessible. Not even when using 'sdb shell'. It exists but 'ls -l' shows question marks for the access info and I can not 'cd' to it.
  2. I can't fprint() to a new file in '/opt/usr/home/owner/apps_rw/<app_id>', but the Recorder API can save it recodings without problem.
  3. Using the Device manager I can pull files created by the Recorder API in the app. But in code I can't fread() it nor remove() it.

The manifest file has the recorder and mediatstorage privileges. Am I using the wrong api's or missing some other privileges?

 

响应

5 回复
GEUNSOO KIM

1. the access is allowed to 'root' account only.  usually not available on commercial devices.

2. and 3. try this privilege with your current privileges.,

<privilege>http://tizen.org/privilege/externalstorage</privilege>

good luck.

 
Yasin Ali

Hi,

I think you may try with suggestion that GEUNSOO KIM has given.
For more information please check it
https://developer.tizen.org/ko/development/training/native-application/understanding-tizen-programming/file-system-directory-hierarchy?langredirect=1

Condor

Unfortuately, even with that privilege it keeps giving a 'permission denied' error.  I understand that the shell behaves differently than code running in an app. The app runs under the 'owner' account and according to Yasin's link, owner should have read/write permissions. 

Condor

After reinstalling, recreating the certificates, recreating the apps, polishing up my C knowledge and the informational links, I've got it working.