Getting photos into the gallery on Android AVD
25 Jun 2012From android sdk’s tools folder run:
android
From Tools menu, Manage AVDs. Select the AVD and click Edit the AVD. to include a 100mb sd card image.
[caption id=”attachment_195” align=”alignnone” width=”199” caption=”AVD Edit”][/caption]
Note: Go ahead and bump RAM up to 1gb while you’re in here.
Launch the emulator and run this AVD
emulator @myavd
Now there are a couple ways to mount the SD card once the emulator is running. http://androidforums.com/developer-101/463412-how-access-files-avd-sd-card.html, however I found that the SDK allowed me to :
-
shell into the AVD using adb (which is in platform-tools, not tools).
adb shell
-
Make the appropriate folder
mkdir sdcard/Pictures exit
-
Copy a picture from my local file sytem over.
./adb push ~/Pictures/IMAG0381.jpg sdcard/Pictures
There may have been a way to copy the file over w/ shelling in, but this is another helpful tidbit.