2

我运行 VTS 测试套件,我的测试 100% 失败,并出现以下一致错误:

AdbError: Error executing adb cmd 'adb -s 10.1.1.5:5555 reverse tcp:5010 tcp:1489'. ret: 1, stdout: , stderr: error: more than one device/emulator
AdbError: Error executing adb cmd 'adb -s 10.1.1.5:5555 reverse tcp:5010 tcp:1922'. ret: 1, stdout: , stderr: error: more than one device/emulator
AdbError: Error executing adb cmd 'adb -s 10.1.1.5:5555 reverse tcp:5010 tcp:4950'. ret: 1, stdout: , stderr: error: more than one device/emulator
AdbError: Error executing adb cmd 'adb -s 10.1.1.5:5555 reverse tcp:5010 tcp:1566'. ret: 1, stdout: , stderr: error: more than one device/emulator
AdbError: Error executing adb cmd 'adb -s 10.1.1.5:5555 reverse tcp:5010 tcp:7793'. ret: 1, stdout: , stderr: error: more than one device/emulator
AdbError: Error executing adb cmd 'adb -s 10.1.1.5:5555 reverse tcp:5010 tcp:4126'. ret: 1, stdout: , stderr: error: more than one device/emulator
AdbError: Error executing adb cmd 'adb -s 10.1.1.5:5555 reverse tcp:5010 tcp:3753'. ret: 1, stdout: , stderr: error: more than one device/emulator

消息是stderr: error: more than one device/emulator,但如果我列出adb devices我只会得到一台设备

List of devices attached
10.1.1.5:5555   device

在 VTS 提示符下相同:

vts-tf > l d
Serial                  State   Allocation  Product         Variant         Build            Battery  
10.1.1.5:5555       ONLINE  Allocated   dev_prod    dev_prod    6/22/2018.025   100      

我与被测设备的连接不是通过 USB 而是通过以太网。

adb既然more than one device/emulator不是这样,又何必呢?

有谁知道在什么服务端口5010以及为什么被重定向(reverse)到随机端口1489, 1922, 4950等?

4

1 回答 1

0

似乎它不适用于adb以太网连接,您需要adb通过 USB 连接。

由于构建是在服务器上,我发现这种解决方法可以在通过 USB 直接连接到 DUT 的机器上运行 vts,执行以下步骤:

1) 重启 DUT

2)杀死旧的adb并检查USB连接

sudo killall -9 adb
adb devices

3)然后尝试从服务器上的构建运行 vts,通过挂载sshfs

sudo apt-get install sshfs
mkdir android
sudo groupadd fuse
sudo modprobe fuse
sudo adduser $USER fuse
fusermount -uz ./android
sshfs user@server:/storage/user/android-build/ ./android
cd android
cd ./out/host/linux-x86/vts/android-vts/tools/
pushd `pwd` && cd ./out/host/linux-x86/bin && export PATH=$PATH:$(pwd) && popd
./vts-tradefed
于 2018-06-22T14:04:52.627 回答