Hi freepine, I am using the Music app which is invoking the mediaplayback service. So, from what I gather, I believe the native code is running under a different process.
-Ravi On Dec 24, 3:29 pm, freepine <[email protected]> wrote: > Sorry I misunderstood your question:) > Is your native code running in the same process of the Java application? or > you want to create some files under the java app's home directory by another > native process? > > On Wed, Dec 24, 2008 at 6:22 PM, freepine <[email protected]> wrote: > > Each Android package (.apk) file installed on the device is given its own > > unique Linux user ID and any files created by that application will be > > assigned its user ID which is not normally accessible to other packages > > > You can refer to below link: > >http://code.google.com/intl/zh-CN/android/devel/security.html > > > On Wed, Dec 24, 2008 at 4:58 PM, 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 read > >>http://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 -~----------~----~----~----~------~----~------~--~---
