On Tue, Aug 9, 2011 at 2:38 AM, uday kiran jandhyala
<udayjandhy...@gmail.com> wrote:
> Has this been done for security reasons ?

Probably.

> Which means if an application downloads some bytes and writes to
> a file created through the below code
>
> File destination = new File ("/sdcard/myfile.txt");
>
> there is no way to change permissions of 'myfile.txt' to 777 ?

First, nobody uses /sdcard, since it is wrong. Use
Environment.getExternalStorageDirectory().

Second, nobody bothers to try to change Linux file permissions on
external storage, since for the vast majority of current devices,
that's FAT32 (vfat in Linux-ese), and file permissions do not matter
much on that filesystem.

> There is a 'Runtime' facility provided through java.lang, but I'm
> skeptical
> whether to use this or not. Runtime would only work on rooted devices
> right?

More importantly, you cannot reliably change permission bits that way either.

And, most of all, you shouldn't be changing permission bits in the
first place. I have no idea what you think "change the permission of
lcd device file permission", but it  has nothing to do with the
Android SDK.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android 3.1 Programming Books: http://commonsware.com/books

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to