Emulator: Writing to SD card permissions error


Last Updated:

  1. edojones

    edojones Member This Topic's Starter

    Joined:
    Jun 17, 2010
    Messages:
    11
    Likes Received:
    0
    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

    Joined:
    Jul 13, 2010
    Messages:
    1,934
    Likes Received:
    458
    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 This Topic's Starter

    Joined:
    Jun 17, 2010
    Messages:
    11
    Likes Received:
    0
    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

    Joined:
    Sep 14, 2011
    Messages:
    1
    Likes Received:
    0
    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

    Joined:
    Aug 12, 2010
    Messages:
    313
    Likes Received:
    51
    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...