Why VTS fails with inaccurate adb error?

699 Views Asked by At

I run VTS test suite and my tests fail 100% with this consistent error:

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

The message is stderr: error: more than one device/emulator but if I list with adb devices I get only one device

List of devices attached
10.1.1.5:5555   device

same in VTS prompt:

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      

My connection with the device under test is not over USB but over Ethernet.

Why adb sees more than one device/emulator since that is not the case ?

Does anyone knows at what serves port 5010 and why is being redirected (reverse) to random ports 1489, 1922, 4950, etc?

1

There are 1 best solutions below

0
On

Seems that it doesn't work on an adb connection over Ethernet and you need an adb connection over USB.

Since the build was on a server I found this workaround to run the vts on the machine that is directly connected via USB to the DUT following these steps:

1) restart DUT

2) kill the old adb and check USB connected

sudo killall -9 adb
adb devices

3) then try to run the vts from the build on the server, by mounting via 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