how to add images to android emulator?
Asked Answered
C

9

34

any one guide me how to add some images to emulator image gallery?

Canada answered 19/7, 2010 at 10:6 Comment(0)
H
27

Goto the DDMS tool in eclipse to push or pull a file onto the emulator. Then go into the running emulator itself, select "Dev Tools" from the Apps screen, select "Media Scanner" (or "Media Provider" in newer versions of Android) to get the emulator to recognize the files so they would be displayed in the Media Gallery.

Howlan answered 31/1, 2013 at 5:12 Comment(3)
There is a bug which crashes Media Provider when one attempts to scan SD card: code.google.com/p/android/issues/detail?id=62134. Restarting the emulator seems to help the image get recognized.Silvereye
MediaProvider crashes.Ironworker
Did anyone figure out how to get around it crashing? Restarting the emulator didn't work for meTeetotal
E
24

If you don't care what image this is, it might just be easier to browse to any image on the internet with Android browser, long-tap on it and select "Save image" from the context menu.

Elastic answered 21/3, 2012 at 5:0 Comment(3)
This is crashing the browser for me.Surfacetoair
it is crashing here tooChronogram
Works! BUT: See answer from Socialsupaxrew, you have to give storage permission to the browser: Go to Settings > Apps > Browser > Permission > and allow StorageVanthe
P
12

Drag image to android emulator and it will transfer image file to download folder. (this only works for genymotion)

Plum answered 25/3, 2015 at 10:7 Comment(3)
It worked but I had to restart the emulator for the image to appear in the gallery.Muscid
Oh! It was not in my case. Right now i dont have android emulator setup in my machine. Lil busy with iOSPlum
Needs restart after drag and drop.Ironworker
S
6

Combining a couple solutions here since newer versions of Android crash without the right permissions:

  1. Turn on the Storage permission in Settings -> Apps -> Browser -> Permissions to give your emulator browser access to storage.
  2. In the emulator Browser app, long press on any image and save it.
  3. Saved images now appear in the emulator Gallery app.
Stocks answered 28/4, 2017 at 18:6 Comment(0)
C
5

To those (Dmitry's answers) that the browser crash when you try to download image from the emulator browser :

You have to authorise the storage to your browser.

Go to Settings > Apps > Browser > Authorisation > and allow Storage

Now you should be able to download any image from this browser.

PS : I would have added a comment to Dmitry's answer but I don't have enough rep

Classify answered 10/8, 2016 at 14:2 Comment(0)
M
4

On the off chance someone had this problem: I had issues seeing files I downloaded from browser on API 23 in Android Studio. I've been to four different StackOverflow threads but nothing was helping. I tried Scanning my SD Card from within the Emulator using Dev Tools>Media Provider but it kept crashing.

What finally worked for me was to go to the Downloads app on the Emulator. Settings(top right)> Show SD Card. After this I long-click on the image I would like to see in Gallery, Settings > Copy To. Now we have to navigate to the right place in SD Card.

MenuBar(top left) > SDCARD > Android > data > com.android.browser > files > Download ...finally you should still be within the "Copy To" mode so simply click on Copy (bottom right).

You can also try: MenuBar > Internal Storage > Downloads

Myron answered 8/3, 2016 at 18:1 Comment(1)
You have to enable "Storage" permission for the Browser app in Settings. the reason it keep crashing is, That Browser app was not compatible with the new Marshmallow Permission API.Millian
T
3

I recently had the same problem. I wanted to have images in the gallery, so that i could use the Gallery intent to pull in one of those images.

What I did was I set the AVD to have the sim camera, went to the camera app and took a couple pictures. The pics were nothing but the square at different points moving around the frame but it works as examples images.

Its a quick solution to generate images in the gallery if you dont want to bother with the sd card emulation.

Trottier answered 14/10, 2012 at 20:56 Comment(1)
I have the square points moving around as well when selecting a webcam as phone's camera... why is that?Coup
T
0

open device settings in android emulator.find storage>internal storage(shared)>images>download.

then drag and drop your image file to the download folder.

it will be copied to your AVD internal storage and will show to you.

if it does not showed in your AVD,you have to restart your device.

then you can see the image you copied.

Territorialize answered 22/2, 2017 at 12:0 Comment(0)
C
0
  1. Open google browser on emulator and type download free images.
  2. You will see options like - unsplash, pexels open website of your wish
  3. Then choose an image that you want to download.
  4. Click on the download button. it will ask permission. give permission. now your image is downloaded.
Cento answered 16/4, 2022 at 7:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.