7

I want to push a *.mp3 file in to my emulator, but it gives me these 2 errors:

 transfer error: Read-only file system
 Failed to push selection: Read-only file system

To resolve the problem, i have done these works, but still not working:

1-Using CMD to do this: c:\android-sdk\platform-tools\>abd remount

2-Add these 2 lines to the AndroidManifest.xml

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>

3-Set the SDcard in emulator configuration as 1024 Mb enter image description here

The thing that makes me wonderful is that the sdcard folder in file explorer has all the necessary permissions enter image description here

Sal-laS
  • 11,016
  • 25
  • 99
  • 169
  • try this http://stackoverflow.com/questions/16007395/how-to-upload-images-in-gallery-of-android-emulator/16007494#16007494 if it helps – Raghunandan May 25 '13 at 18:25
  • May [this](http://stackoverflow.com/questions/2083709/android-emulator-sdcard-push-error-read-only-file-system) helps you :) – Oli May 25 '13 at 18:26

3 Answers3

23

Here is a solution I found in other site, which is the only way that worked in my case:


In a terminal (I work on Mac OS X) I wnt to sdk/platform-tools directory (to get access to the adb shell) then I typed the following commands:

./adb shell
su
mount -o rw,remount rootfs / 
chmod 777 /mnt/sdcard 

and then typed exit to exit su, and exit again to exit the adb shell.

Armand
  • 23,463
  • 20
  • 90
  • 119
atisman
  • 1,187
  • 1
  • 11
  • 16
5

@atisman's answer got me working. There are two small bits to add to his response though:

First, picky as it seems, you might need an extra '-' in the unix command line, depending on your local OS. The only way it would work for me was:

mount -o -rw,remount rootfs / 

The other item is to make sure you have actually defined the device's SD card with some size. I see you have, but I didn't, so just putting it out there in case anyone else has a similar issue.

Open AVD manager, click on the device you are using... click 'edit' and go to the "SD Card" area. Make sure if "Size" is clicked, that there is a number in the area next to it. Otherwise the SD card can't hold any info.

Armand
  • 23,463
  • 20
  • 90
  • 119
Watercayman
  • 7,970
  • 10
  • 31
  • 49
  • I just put some size in the edit field of the AVD Manager and the read only error has gone but now another one is in. and its like :Failed to push the item :Null Any help please? – Sisay Jun 19 '14 at 10:10
  • Ok got it! It starts working after i restarted my IDE. – Sisay Jun 19 '14 at 10:48
0

if some one have same problem in new build of studio . 0.8.9 and above see my solution and it will work like a charm , here : afra mehrparvar solution in the bottom of the page .

Android Emulator sdcard push error: Read-only file system

Community
  • 1
  • 1
afra mehrparvar
  • 259
  • 2
  • 5