Transfer data from desktop to an emulator I have some items in my ubuntu 12.04 desktop. I want to transfer them into the Sdcard of one of the avds in my android emulator (android-sdk-linux) which I have installed on the same system.

Like to know how to do the above.
1. Using command line: Here's how you can copy files to an SD card image.

You have to use adb push to copy files from Desktop to Emulator and adb pull for the reverse. Here's the syntax to copy files to or from an Emulator/Device Instance:

Copy from desktop to emulator:

adb push &lt;local&gt; &lt;remote&gt;


Copy from emulator to desktop:

adb pull &lt;remote&gt; &lt;local&gt;


Here &lt;local&gt; is path of file / folder on your desktop and &lt;remote&gt; is path of file / folder on your emulator.

Here is an example:

adb push foo.txt /sdcard/foo.txt


foo.txt will be pushed (copied) to the emulator.



2. Using DDMS UI: Here's how to work with emulator's file system using DDMS.


In the Devices tab, select the emulator that you want to view the file system for.
To copy a file from the device, locate the file in the File Explorer and click the Pull file button.
To copy a file to the device, click the Push file button on the File Explorer tab.


I personally prefer the adb pull and adb push commands as you can copy multiple files (in a single directory) with just one line command, using DDMS you can copy only one file at a time (no directory).