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?
I think the problem here is that you forgot to set SD card size
Follow these steps to make it work:
This works well in my emulator!
I increased the virtual memory of sdcard up to 512 MB for the emulator and that was enough
make sure that you have the correct permissions.
In adb version 1.0.32 and Eclipse Luna (v 4.4.1).
I found a directory in the avd /mnt/media_rw/sdcard that you can write to using the adb command. adb push {source} /mnt/media_rw/sdcard
There appears to be rw access to this directory.
Hope this helps :-)
Alternate way: Dismount the drive (from settings/storage) and re-mount the sdcard also fixes the problem. (verify by moving a file from internal storage to sdcard) In any case, this simple method saved my butt this time :)
Ensure two things in the AVD manager utility for the emulator:
SD Card size is mentioned e.g. 512.
From the Hardware tag, press New and select "SD Card Support" from the drop down menu.
Now, start the emulator. SD Card shall now support writing as well.