Android Adb logcat issue

By -

While working on more than one android devices attached to the same PC, at that time if you want to see a logcat output then there may be a problem you faced.(Its Not a problem but not known thing).

See, here i have started emulator and also attached my samsung galaxy phone. So at the same time 2 devices are connected to the same machine. So if you launched a “adb logcat” command then following console appear.

pm-paresh@comp35:~$ adb logcat
- waiting for device -
error: more than one device and emulator
- waiting for device -
error: more than one device and emulator
- waiting for device -
error: more than one device and emulator
- waiting for device -
Solution:
Give device id with -s option same as below:
adb -s emulator-5556 logcat

Note that, if you issue a command without specifying a target emulator/device instance using -s, adb generates an error.

Here is a more info on Android: http://developer.android.com/guide/developing/tools/adb.html.

FYI, You can find out the attached devices by using adb devices command at console.

Paresh Mayani

Lazy android developer, exploring the horizon of android development since 7 years, currently working as a Technical Lead - Android at Simform Solutions, India. Former Application Architect at KarConnect. He is the Head/Organizer of Google Developers Group (GDG), Ahmedabad

Loading Facebook Comments ...
Loading Disqus Comments ...