Friday, June 8, 2012

Solution for ADB error: more than one device and emulator


Have you encountered error message of "error: more than one device and emulator" while communicating Android device with adb commands? The reason behind this is the adb tool is already connected to your Android device by itself and entering the command: adb connect localhost will result in adb connecting with 2 emulator/device instances. So in further executing adb commands like sending files and installing apk applications to your Android device will be responded with this error message.

What to do after this error message shows up?
Enter: adb devices and you should see something like this below:
List of devices attached
emulator-5554 device
localhost:5555 device
Enter: adb kill-server to disconnect localhost:5555. Now you can run adb commands to your Android device without "adb connect localhost" command line.

How to overcome it?
It might not be the best answer. ADB tool behaves weirdly on my computer as it connects to my Android VM automatically and sometimes it don't. So it is advisable to execute this command: adb devices first to see the list of devices attached with adb.

If there is nothing under "List of devices attached", run adb connect localhost to connect.

If there is device like "emulator-5554 device" under "List of devices attached", adb is already connected the particular device. Without the need to enter "adb connect localhost", you can straightly operate commands to your Android device such as adb push, adb pull, adb install, and etc.

That's how I solve this adb connection error between computer and Android-x86 Virtual Machine.

17 comments:

  1. It shows an error that the device is offline
    and when i type adb devices it shows
    List of devices attached
    emulator-5554 offline
    localhost:5555 offline

    ReplyDelete
  2. Hi, does you Android VM have Internet connection? adb tool requires that.

    ReplyDelete
  3. Tom Korawit ChamkraiDecember 24, 2012 at 7:11 PM

    I want to get rid of the "emulator-5554 device". How do I do that?
    I'm new to this whole thing.

    ReplyDelete
  4. had this problem. uninstalled bluestacks. resolved.

    ReplyDelete
  5. thanks really helpful thumbs up

    ReplyDelete
  6. if you need bluestacks and don't want to uninstall, just kill all processes about bluestacks. ;-)

    ReplyDelete
  7. im having the same problem with port 5576 and 5574

    ReplyDelete
  8. im having the same problem with port 5576 and 5574

    ReplyDelete
  9. Thanks it worked for me. I've Geny motion running for a react-native project. I created a new react native project and ran into this problem. Adb devices followed by adb kill server fixed the issue.

    ReplyDelete
  10. After study some of the blog posts in your internet site now, i genuinely appreciate your means of blogging. I bookmarked it to my bookmark site list and you will be checking back soon. Pls have a look at my web page at the same time and inform me what you consider. noticias deal corcon

    ReplyDelete
  11. Hi, i think that i saw you visited my website so i came to “return the favor”. I’m trying to find things to enhance my website! I suppose its ok to use a few of your ideas!!   hadeelweb.com

    ReplyDelete