Android emulator sd card image already in use

Go To StackoverFlow.com

2

I have followed the answers from this question without success. I could not respond to the posted answer (lack of reputation) so I had to make a new question.

Purging all adb processes does not alleviate the 'SD Card image already in use' error. Similarly, if I delete the SD card image, create a new one, then immediately launch the emulator, the error persists. After the emulator loads to the phone home screen, an "SD Card Removed" message is displayed. Here is what my command line looks like when calling the emulator:

jet98f@rc04ucs213:/mnt/dfs/jet98f/Users/jet98f/android-sdk-linux/tools$ emulator -avd Phone -sdcard sdcard.iso

WARNING: Data partition already in use. Changes will not persist!

WARNING: SD Card image already in use: sdcard.iso

WARNING: Cache partition already in use. Changes will not persist!

Failed to symlink /nethome/users/jet98f/.pulse/f4ac236e8e0d8ef32a8796d24e3c758b-runtime to /tmp/pulse-2L9K88eMlGn7: Operation not supported

emulator: emulator window was out of view and was recentered

EDIT: One more thing: running 'lsof | grep sdcard ' results in no returns. That is, the UNIX utility says the file is not open, yet adb claims the image is already in use.

2012-04-05 01:20
by onezeno
Try to uninstall the project which is already installed and run it again - MAC 2012-04-05 09:57
I am no longer working in Android at all, so I can't test any of these answers. If someone thinks any of the provided answers is best, I can mark it as the answer - onezeno 2014-10-29 14:34


3

Delete lock pid files?

I am on Windows7 and was having the same problem with the SD Card image, as well as general problems with Eclipse not wanting to connect with the Adb. The state seems to get out of sync.

In windows, there are lock files. In my case (environment, if you will) it is C:\Users\joe\.android\avd\Em22.avd\xxx\pid

where xxx are:

  • cache.img.lock
  • hardware-qemu.ini.lock
  • sdcard.img.lock <<<---
  • userdata-qemu.img.lock

When the state of eclipse seems lost, I shut everything down, and delete the pid files in the lock directories. It did the trick in at least one occasion where Eclipse would not connect with adb, and when it did, complained about locked sd card image.

Ooops, I just noticed it has the same answered in link in original question.

2012-08-19 17:25
by Joe Wronski


1

Here is the solution, 1) Open Task Manager. 2) Close all the running emulators from list. 3) Close bluestack programs if running any. 4) Now you are done. You can now run New emulator.

2014-10-29 02:43
by Savan Patel


0

The sdcard image should be a writeable FAT32 image file. See this link

It seems you are using an ISO image.

If you really suspect there's another process (emulator) using a specific sdcard image you can confirm it by running

$ fuser ~/.android/avd/4.0.3.avd/sdcard.img 

~/.android/avd/4.0.3.avd/sdcard.img: 90719

in this case there's an emulator running (or something else having the file opened) (pid 90719).

2012-04-05 04:01
by Diego Torres Milano
I don't think the suffix matters. I remade an image named 'sdcard.img', with the same results - onezeno 2012-04-05 04:38
The format matters, not the suffi - Diego Torres Milano 2012-04-05 04:50
Ads