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.

CEO & Co-Founder at SolGuruz® | Organiser @ GDG Ahmedabad | Top 0.1% over StackOverflow | 15+ years experienced Tech Consultant | Helping startups with Custom Software Development

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