How to use ADB with Multiple Devices

Have you ever had multiple emulators or physical devices or a combination of the two attached at once? It’s frustrating to shut off or unplug your devices in order to single out the one that needs to be targeted. Look no further, adb includes a command line switch to choose the specific device you want to target.

Let’s begin by listing our currently attached devices.

$ adb devices
List of devices attached
emulator-5554 device
emulator-5556 device
HT09PR217646 device

As you can see, we have three devices attached to our system. Two emulators and one physical phone. Now let’s logcat our physical device because it’s running our application that we want to debug. Just pass the -d switch to adb to target our device.

$ adb -d logcat

If we had a single emulator instance and one or more physical devices attached we could pass in the -e switch to adb which targets emulator.

$ adb -e logcat

The final switch we can use for device targeting is the -s switch, which stands for serial number.

$ adb -s emulator-5554 logcat
$ adb -s emulator-5556 logcat
$ adb -s HT09PR217646 logcat

Edwin Huertas

Edwin Huertas

May 6, 2020

Hands-on executive officer known for strategic and focused approach, with extensive accolades for limiting risk, creating lean teams, and establishing creative strategies for optimizing internal operations, financial returns and external customer service.

More like this delivered right to you:

Sign up for our Newsletter to get our latest posts plus invitations to our events and access to future whitepapers.

Related Posts

Seeing the Member Experience in a “User-Experience” World

Seeing the Member Experience in a “User-Experience” World

In the world of product development, we are often always saying “user” _______. User-centered design, user analytics, user personas, user journeys, etc, etc.It’s a term that holds importance because it is a genuine focus on the end-user experience.  It’s also often...

7 Tips for Utilizing Amazon Alexa to Engage with Customers

7 Tips for Utilizing Amazon Alexa to Engage with Customers

Amazon first released Alexa virtual assistant and smart speaker Echo in late 2014. An in-home virtual assistant is an impressive tool, but creating a seamless user experience with it can be a challenge. So how do companies overcome this challenge? What engagement can...

Ready to drop us a line?