144

I'm just having trouble with getting my emulator SD card work... I created a new AVD device with a new SD card.

So how to put data onto it? I found the "correct" file to be mounted on Daemon tools, but is corrupt or simply not readable...

It would be great if you have any idea :)

octosquidopus
  • 3,517
  • 8
  • 35
  • 53
poeschlorn
  • 12,230
  • 17
  • 54
  • 65

6 Answers6

131

If you are using Eclipse you can move files to and from the SD Card through the Android Perspective (it is called DDMS in Eclipse). Just select the Emulator in the left part of the screen and then choose the File Explorer tab. Above the list with your files should be two symbols, one with an arrow pointing at a phone, clicking this will allow you to choose a file to move to phone memory.

Janusz
  • 187,060
  • 113
  • 301
  • 369
  • 4
    hi, thanks, that seems to work, but how can I add a whole directory with subdirectories? – poeschlorn May 11 '10 at 08:07
  • 6
    you can also run ddms as a standalone application if you have the android SDK installed. It's at $ANDROID_SDK_PATH/tools/ddms – fijiaaron Jul 19 '11 at 18:05
  • 1
    When I ran ddms from the Android SDK Path, The file explorer was not there as a tab. But it was there in the menu. Device -> File Explorer – Ranhiru Jude Cooray Oct 07 '11 at 11:14
  • is there a way to delete a file/folder from the DDMS perspective? – Felipe Sabino Dec 22 '11 at 20:32
  • 2
    Just to add. It must be running to show in the DDMS Devices list. – IAmGroot May 15 '12 at 08:49
  • Hello1 I just did that - uploaded files to simulator, but I have a little problem. When I try to get Environment.getExternalStorageState(); all is OK, but I can't get list of files from that program folder. On device it is working, but on simulator fails. Did you have such problem? Please help. Thanks. – yozhik Feb 01 '13 at 21:35
107

Use the adb tool that comes with the SDK.

adb push myDirectory /sdcard/targetDir

If you only specify /sdcard/ (with the trailing slash) as destination, then the CONTENTS of myDirectory will end up in the root of /sdcard.

jgillich
  • 71,459
  • 6
  • 57
  • 85
olafure
  • 3,518
  • 2
  • 33
  • 45
49

In Android Studio, open the Device Manager: Tools -> Android -> Android Device Monitor

In Eclipse open the Device Manager: enter image description here

In the device manager you can add files to the SD Card here: enter image description here

Benjamin Mesing
  • 4,075
  • 1
  • 18
  • 22
Kirtikumar A.
  • 4,140
  • 43
  • 43
40

One easy way is to drag and drop. It will copy files to /sdcard/Download. You can copy whole folders or multiple files. Make sure that "Enable Clipboard Sharing" is enabled. (under ...->Settings)enter image description here

johnml1135
  • 4,519
  • 3
  • 23
  • 18
3

I am using Android Studio 3.3.

Go to View -> Tools Window -> Device File Explorer. Or you can find it on the Bottom Right corner of the Android Studio.

If the Emulator is running, the Device File Explorer will display the File structure on Emulator Storage.

Here you can right click on a Folder and select "Upload" to place the file

enter image description here

Jitendra Sawant
  • 648
  • 7
  • 14
  • Hi , with this technique also it shows file permission denied when android code tries to access fie present at this location. – mrsorrted Jun 24 '22 at 17:03
1

In Visual Studio 2019 (Xamarin):

  1. Click on the Device Monitor (DDMS) button.

enter image description here

  1. Go to the File Explorer tab and click the button with a phone and a right-pointing arrow on top of it.

enter image description here

silkfire
  • 24,585
  • 15
  • 82
  • 105