Linux上用adb同时抓多个设备的log

来源:互联网 发布:win10更新完连不上网络 编辑:程序博客网 时间:2024/05/17 22:11

      有多个设备,需要同时抓取log,可以使用串口(minicom)抓log。因为minicom可以同时识别多个串口。

      但如何使用adb命令同时抓取个多设备的log呢?

      step1:使用命令"adb devices"

                    可以得到每个device的序列号(device_serial_number)

       step2:使用命令"adb -s device_serial_number command" 执行需要的操作


比如有两个设备“1234”和“5678”,分别抓log

在一个终端抓“1234”的log:

                    adb -s 1234 shell | tee 1234.log

                    logcat -c

                    logcat -k -v threadtime

在另一个终端抓”5678“的log:

                   adb -s 5678 shell | tee 5678.log

                   logcat -c

                   logcat -k -v threadtime


那么问题来了,当多个device的序列号相同时该怎么办?接下来要想一个能够rename的方法.....

0 0