How to add files like images inside your emulator in ANDROID?

By | March 24, 2011

In many of our android applications we need images and other files to be inside your emulator, such as images in the gallery. But unlike iPhone we cannot simply drag and drop files inside the emulator., because iPhone’s is simply a simulator. It justs creates an envoronment for testing. But ANDROID mimics the real phone. So we need to put files into the memory space inside the phone.
In this tutorial I will show you how to add files to the gallery of ANDROID emulator.
First you need to create an SD card for the emulator.
Second start the emulator with the created SD Card.

These two things are covered in this tutorial.
Third Open File Explorer from Window-> showViews and search for File-explorer.
You can see the File-explorer in the screnshot below.

See the Market portion on the right side of the window.
There are two buttons for pulling data out of the emulator and other for putting data into the emulator. Click on the “push a file on to the device”

Then you will be prompted with a dialogue(see above screenshot). choose the file from your computer and click Open. The selected file will be in your Emulator SD Card.

Now to see the file inside your emulator.
Either restart your phone or restart the emulator. If you put an image file then go to “Gallery” and you will see the pulled in file.

23 thoughts on “How to add files like images inside your emulator in ANDROID?

  1. New Balance

    I seriously knew about virtually all of this, but having said that, I still thought it had been helpful. Nice blog!

  2. Pingback: ANDROID - Upload an image to a server | Coderz Heaven

  3. Nabil

    Hey thanks for the valuable information…

    But i got a problem while uploading files into emulator like this

    “””Failed to push selection: Read-only file system”””………..

    Can anyone please resolve the above issue…


    1. James

      Maybe the folder in the SdCard you are trying to push your file into doesn’t have the write (w) permission. Under the File Explorer tab, find the Permissions column. What are the permissions there? Is your directory marked as d–rwxr-x?

  4. ranganatha

    Hi ,

    Thanks for giving crucial information in very understandable way

  5. Smita


    Thank for the information! I tried pushing file to sdcard but it says “Failed to push selection: Read-only file system” . I check the permission column and it shows “d———-“. How do I change the permission ?

    1. James

      Hi Smita. Which SDK are you using. Is there a folder named /mnt in File explorer. Or a folder named /scard there , then push images only to /sdcard folder not /mnt folder.If you try to push to /mnt folder then you will get read-only file-system error. Please try this and let me know.

  6. sam

    Nice post ,but there is another way to do, the browser and the image search the any one image from search
    4.then log press the on image,it will ask for save as
    5.the image will be downloaded in download folder.

    i have done it 2.3


  7. Pingback: How to find a file size in KB in android? | Coderz Heaven

  8. hari

    its very nice and easily understandable. but,
    while pushing data into sdcard it showing following error.

    [2011-08-29 14:45:52] Failed to push selection: Read-only file system
    please give the solution for this.
    Thanks in advance.

    1. James

      You are not pushing the file in the sdcard. select the folder and then push.

  9. hari

    hi ,
    i tried to push images into sdcard folder but it showing following error

    [2011-08-29 15:18:18] Failed to push the item(s).
    [2011-08-29 15:18:18] (null)

    1. James

      I think you have not selected the sdcard folder before pushing file into it.

  10. khushbu

    i have selected sdcard folder and then push image.. but still same error..

    Failed to push the item(s).

  11. seema

    i have selected sdcard folder and then push image.. but i get the following error:

    [2014-03-09 17:00:56 – ddms] transfer error: Read-only file system
    [2014-03-09 17:00:56] Failed to push selection: Read-only file system

    the sdcard permissions show lrwxwxrwx

    plz help

    1. James

      Then its not the sdcard. check for mnt/sdcard and push the file.

  12. balasrilakshmi vaddi

    hi very easy blog ur way of explanation is good.congrats you have done good job!


Leave a Reply

Your email address will not be published. Required fields are marked *