-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash with Command failed (host:features): more than one device/emulator #64
Comments
With a trivial test-rig:
This patch seems to allow me to access remote TCP devices connected with 'adb connect':
... I'll try building it into maestro tomorrow. If it fixes this for me, I'll submit a patch. |
Adding the following in the same place makes emulators work, but I still get the 'multiple devices attached' if I also plug in my phone...
|
Maybe it's not 'connecting' to the device once adb has selected it, so the host:features is dropped because it's still waiting for a connect? |
I dug into adb's source code and found what looks like the proper fix, replacing all the foregoing:
It's mentioned in https://android.googlesource.com/platform/system/adb/+/d3b1f06b5694c84a32ab0349a2aa1f37e3806d95/SERVICES.TXT:
My test rig now outputs this:
|
While the 'host-serial' change works, there's also a 'host-transport-id' in adb's source which might be better. The advantage and disadvantage of serial numbers vs transport_ids is that transport_ids are new for each plug-in, whereas serial numbers allows the device to disconnect and reconnect. We found serial number handling useful with flaky hubs where the devices would connect and reconnect randomly but quickly enough that tests weren't affected much, but transport_ids are probably better for stable situations. I've tried making it use transport ids - having deviceQuery 'host:transport-id:5' or whatever - and I'm a bit confused about whether the socket is ever actually irrevocably proxying to the phone, as mentioned in SERVICES.TXT
I find there's a host-transport-id:x prefix coded in sockets.cpp that insists on ending in : so... I guess that could replace 'host:features', but it would need fiddling. Anyhow. I have a version of this working with transport_ids, and the serial version. I don't know which one you're more interested in. The transport_ids one is more code. |
I am using DADB but it fails with
Command failed (host:features): more than one device/emulator
dadb/dadb/src/main/kotlin/dadb/adbserver/AdbServer.kt
Line 128 in 447f9b4
The text was updated successfully, but these errors were encountered: