How can I run logcat on multiple devices at the same time? "adb logcat" command gives an error:
error: more than one device and emulator
Use the -s
option of adb
:
adb -s <serialnumber>
Example
C:\Users\lel>adb devices
List of devices attached
192.168.198.101:5555 device
0123456789ABCDEF device
adb -s 0123456789ABCDEF logcat
adb -s 192.168.198.101:5555 logcat
You can combine grep
whit this, to get all lines that contain it.
an example is with System.out
Example:
adb -s 192.168.198.101:5555 logcat | grep "System.out"