hi

try with

/mnt/sdcard

This will help you out


On Sat, Aug 7, 2010 at 6:55 AM, john brown <[email protected]>wrote:

> I got a command prompt via c:\Program Files\Android-SDK\tools> adb
> shell
>
> # ls -l /sdcard/Android/data/lms
> ----rwxr-x system    sdcard_rw        63   2010-07-19 15:17
> mpReadAbDdx201006.txt
> ----rwxr-x system    sdcard_rw     45211   2010-07-19 15:17
> mpTranAbDdx201006.txt
>
> The way I read this is that the owner's rights are ---, group is rwx,
> others is r-x. I'm just guessing, the application is others?
> But I cannot get chmod to change the attributes, i.e.:
>
> # chmode o-rwx /sdcard/Android/data/lms/mpReadAbDdx201006.txt
> Bad mode
>
> Where can I find documentation to the Android linux (?) commands? (I
> mean the command line commands)
>
> Thanks, John
>
> On Aug 6, 6:12 pm, DanH <[email protected]> wrote:
> > Sounds like you forgot to insert the write ring.  (Oops!  Wrong
> > technology!)
> >
> > Is the file write-protected maybe?
> >
> > On Aug 6, 5:13 pm, john brown <[email protected]> wrote:
> >
> >
> >
> > > Hello,
> >
> > > I am using Android 2.1 update 1, API level 7, Eclipse, and HVGA skin.
> >
> > > When the AVD is running, I check settings > sdcard total 49.21MB,
> > > available 49.07MB.
> >
> > > Programatically checking Environment.getExternalStorageState() equals
> > > MEDIA_MOUNTED which I think means that the sdcard is available and
> > > writeable.
> >
> > > I use getExternalStorageDirectory() to establish the sdcard root
> > > directory.
> >
> > > I copied the files on the sdcard with adb push source destination.
> >
> > > I am able to successfully read other files in that directory.
> >
> > > code to write to file:
> > > //*****************************************
> >
> > > File fFile = new File(pathFile);
> > > if (fFile.exists()){ ... // returns true
> > > if (fFile.canRead()){ ... // returns true
> > > if (fFile.canWrite()){ ... // returns false
> >
> > > try{
> > >         FileWriter Fw = new FileWriter(fFile, true);
> > >         BufferedWriter Bw = new BufferedWriter(Fw);
> > >         PrintWriter outPw = new PrintWriter(Bw, true);
> > >         outPw.println(strRec);
> > >         outPw.close();}
> >
> > > catch(IOException ex){
> > >         System.out.println("IO Error - " + ex.toString());
> > >         System.exit(0);
> >
> > > }
> >
> > > //************************************
> > > System.out shows:
> > > IO Error - java.io.FileNotFoundException
> >
> > > but we know the file is there from the preceding checks:
> > > if (fFile.exists()){ ... // returns true
> > > if (fFile.canRead()){ ... // returns true
> >
> > > What do I need to do to make the file writable?
> > > Or
> > > I want to write to the file. What am I doing wrong?
> >
> > > Thanks, John Brown- Hide quoted text -
> >
> > - Show quoted text -
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" 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-developers?hl=en

Reply via email to