30

I am trying to push a file to the SD Card but its showing error in console 'failed to push selection: Read-only file system'.I am using DDMS perspective in Eclipse.I generated sdcard using mksdcard command.

Amel Jose
  • 873
  • 2
  • 9
  • 22

7 Answers7

32

Just go to

C:\Documents and Settings\<adminstrator>\.android\avd

take 'properties' of your avd folder (there is a folder for each of the avd's)

uncheck 'Read only' -> OK

This was the only thing that worked for me.

P.S: Some of these folders might be hidden.

Mahm00d
  • 3,881
  • 8
  • 44
  • 83
Amel Jose
  • 532
  • 5
  • 9
13

On the Terminal or Command-Prompt, write these( for me its command prompt ):

  • adb shell(Opens the device shell. you'll see a #)
  • su(get the root permission, if necessary)
  • mount -o rw,remount rootfs /(remount the root file system.)
  • chmod 777 /mnt/sdcard (change the permission of the sdcard to rwe.)
  • exit

If it doesn't work, try to push the file from the same shell using adb push . Hope this help.

IronBlossom
  • 3,898
  • 3
  • 35
  • 42
10

You need to give SDCard support to your AVD and mount the SDCard.

First go to 'AVD Manager and select your AVD then Click on Edit and in the Hardware add SDCard Support'.

Please check this link for complete detailed step to achieve SDCard support and mounting.

You can also give a try to this command in CMD, this will remount your SDCard.

c:\android-sdk\platform-tools\>adb remount
csnewb
  • 1,190
  • 2
  • 19
  • 37
MKJParekh
  • 34,073
  • 11
  • 87
  • 98
  • 1
    There is no `abd remount` command in this list. There is `adb remount' command. Also i've seen another places this 'abd'. Or, is it correct? – Bob Mar 13 '14 at 11:03
5

I was also facing same issue :

Failed to push selection: Read-only file system

In computers with higher configuration(beyond Windows XP) settings like ---> C:\Documents and Settings\.android\avd
doesn't exist so instead go to this path --> C:\Users\.android and right click on this folder and uncheck the box having name as read only.

Hope this helps those with newer windows on their pc :) , if this solution helps you than please vote for it.

L.Sidhu
  • 90
  • 1
  • 1
2

In my case i have mistake with the slash. while specifying "Additional Emulator Command Line Options" in eclipse

Actually it should be -sdcard C:/Kamal/sdcard/emulator_sdcard

and i was putting -sdcard C:\Kamal\sdcard\emulator_sdcard

Then after restarting the Eclipse & Emulator it works.

Kamal Trivedi
  • 239
  • 3
  • 10
2

If the data in the sd card is not updated in the emulator or in the app which you are developing then, Select, Dev Tools->Media Scanner The data which has been already pushed into the sd card by variant means will get loaded soon.!

Exceptional
  • 2,994
  • 1
  • 18
  • 25
2

if some one have same problem in new build of studio . 0.8.9 and above see my solution here and it will work like a charm : (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