views:

643

answers:

2

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

Does anyone konw how to solve this problem?

A: 

Maybe it sounds stupid but it worked for me when I had the same problem: delete the created avd and create one again through AVD Manager with a sd card of, for example, 512MB.

Check that both have the correct permissions and if not, try to change them with chmod.

And if everything still fails, repeat the process but creating both avd and sd card manually via terminal:

android create avd -n my_avd -t 7
mksdcard -l e 512M mysdcard.img
emulator -avd my_avd -sdcard mysdcard.img

Hope that helps!

Edu Zamora
A: 

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 :)

ashutosh