1. Check out our app, Forums for Android! Download and leave feedback here!

Emulator: Writing to SD card permissions error

Discussion in 'Application Development' started by edojones, Nov 3, 2010.

  1. edojones

    edojones Member
    Thread Starter
    35

    Jun 17, 2010
    11
    0
    35
    I am developing using Eclipse and the emulator and things are working nicely. However I now want to read a file from the emulators SD card and this is where I am having trouble.

    On my phone I can read and write from the SD card no problem but when using the emulator all I get is a read/write permission error. I have tried ADB PUSH command but get this permission error. I have also tried ADB REMOUNT which says success, and also SU from within ADB SHELL but I still can not write the file. The file is tiny, only around 900kb and is plain text and my application can read it fine when running from my phone.

    So, how do I make the SD card on the emulator read/write?
     

    Advertisement

  2. jonbonazza

    jonbonazza Well-Known Member
    163

    Jul 13, 2010
    1,934
    458
    163
    Male
    Did you add an virtual SD card to your AVD when creating it? it does not include one by default.
     
    edojones likes this.
  3. edojones

    edojones Member
    Thread Starter
    35

    Jun 17, 2010
    11
    0
    35
    Many thanks for the prompt reply! I had missed out specifying to use a virtual SD card, so I have now done that and all sorted! Thanks!!
     
  4. vfpribeiro

    vfpribeiro New Member
    5

    Sep 14, 2011
    1
    0
    5
    I have exactly the same problem, but one more question please could you tell me how did you specify the use a virtual SD card?
     
  5. miXer

    miXer Well-Known Member
    53

    Aug 12, 2010
    313
    51
    53
    Norway
    Preferences -> Android SDK and AVD manager. Mark your avd, click on Edit... and under section SD Card you can put a size.
     
    vfpribeiro likes this.

Share This Page

Loading...