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.
Nice blog post, neat site template, keep up the good work
Thanks Alec.
Thanks for the encouragement.
I seriously knew about virtually all of this, but having said that, I still thought it had been helpful. Nice blog!
Thanks New Balance…..
Pingback: ANDROID - Upload an image to a server | Coderz Heaven
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…
Regardzzzzz……
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?
Hi ,
Thanks for giving crucial information in very understandable way
Hi,
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 ?
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.
I like this info shown and it has given me some sort of desire to succeed for some reason, so thanks.
Hi,
Nice post ,but there is another way to do,
1.open the browser and google.com
2.select the image search
3.select 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
Thanks
ya….good one……friend
Pingback: How to find a file size in KB in android? | Coderz Heaven
hi,
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.
You are not pushing the file in the sdcard. select the folder and then push.
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)
I think you have not selected the sdcard folder before pushing file into it.
There are fantastic blog post which is post by you.
i have selected sdcard folder and then push image.. but still same error..
Failed to push the item(s).
null
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
Then its not the sdcard. check for mnt/sdcard and push the file.
hi very easy blog ur way of explanation is good.congrats you have done good job!