Hi Dave, Sorry...I did not understand completely.
What is the native app? -Ravi On Dec 25, 12:34 am, Dave Sparks <[email protected]> wrote: > Hi Ravi, > > I think you need to have the native app create the file and pass the > open file descriptor to the media server. This is how rights are > conferred from one process to another in the Android security model. > > Dave > > On Dec 24, 12:58 am, rktb <[email protected]> wrote: > > > Hi, > > > Need some pointers about file access permissions: > > > Here is what I have tried: > > > From the Java app., I can create a file in /data/data/ > > <my_package_name>/files/ using the API openFileOutput(). The > > permissions of the file is as follows: > > -rw-rw---- app_10 app_10 0 2008-12-23 09:17 testFile1.txt > > > The files folder itself has the permissions: > > drwxrwx--x app_10 app_10 2008-12-23 09:17 files > > > When I create a file using native code on /sdcard, the permissions are > > as follows: > > ----rw-rw- system system 0 2008-12-23 09:17 > > fromNativeCode.txt > > Is it right to say that native code process has "system" rights? > > > Now, when I create a file using the Java layer, I can open the same > > file for "reading" through native code. But, I cannot open a file in > > the same place using the native code with "writing" capability. The > > permissions of the "files" folder is "app_10", which is the userID of > > the app. Right? Doesn't "system" trump "app_10" in terms of > > permissions? > > > In other words, the objective that I am trying to achieve is to create > > a file inside native code at a place other than sdcard. Preferably, > > application specific location. > > > Any document that anybody could point that would detail more about > > security and permissions? I have already > > readhttp://code.google.com/android/devel/security.html. But, it does not > > deal with native code details. > > > Thanks, > > Ravi --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "android-framework" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-framework?hl=en -~----------~----~----~----~------~----~------~--~---
