Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android:transfer error: Read-only file system

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

like image 613
Sal-laS Avatar asked May 25 '13 18:05

Sal-laS


2 Answers

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.

like image 62
atisman Avatar answered Nov 20 '22 08:11

atisman


@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.

like image 21
Watercayman Avatar answered Nov 20 '22 07:11

Watercayman