Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Emulator sdcard push error: Read-only file system

I am developing under Android 1.6 (Android SDK 2.1). I create a avd by using avd manager in Eclipse. When I launch this avd, I found that the /sdcard directory's permisson is "d---------". So I can't push file to the sdcard.

Does anyone know how to solve this problem?

like image 615
Leox Avatar asked Jan 18 '10 03:01

Leox


People also ask

How do I push files to Android emulator?

Go to "Device File Explorer" which is on the bottom right of android studio. If you have more than one device connected, select the device you want from the drop-down list on top. mnt>sdcard is the location for SD card on the emulator. Right click on the folder and click Upload.


2 Answers

I found this works

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

Source: http://www.coderanch.com/t/611842/Android/Mobile/Android-emulator-sdcard-writable

like image 184
user2002993 Avatar answered Sep 24 '22 18:09

user2002993


Once you started the Emulator from one shell, login to another shell & type

adb shell 

You should see # prompt displayed, this is your device(emulator) shell. Now , type following command at adb shell.

mount -o remount rw /sdcard 

This will now remount /sdcard with rw(read-write) permission & now you can push your files into /sdcard by using following command from your host shell.

`adb push filename.mp3 /sdcard,` 

where filename.mp3 could be any file that you want to push into Android Emulator.

Hope this helps :)

like image 43
ashutosh Avatar answered Sep 20 '22 18:09

ashutosh