Use transport-id feature requests for scrcpy ADB#2682
Draft
quanru wants to merge 3 commits into
Draft
Conversation
Deploying midscene with
|
| Latest commit: |
88229fd
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://1f9e0634.midscene.pages.dev |
| Branch Preview URL: | https://codex-android-scrcpy-feature.midscene.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
host:featuresfailure.{ serial }selectors to the matching devicetransportId, use existing{ transportId }selectors directly, and keep non-deterministic selectors delegated to upstream@yume-chan/adbbehavior.@midscene/androidand@midscene/android-playgroundthrough an@midscene/android/internal/*entry point instead of the public root API.Root Cause
@yume-chan/adb@2.5.1and the current2.6.0release still query features throughcreateDeviceConnection(device, "host:features"). On some multi-device ADB server environments, especially the reported Ubuntu setup, that two-step path can fail becausehost:featuresis handled as a host service and is not reliably scoped to the selected device.Midscene already knows the target device in the scrcpy paths, so this change resolves deterministic selectors to a concrete
transportIdfirst and then requestshost-transport-id:<id>:features. Ambiguous selectors such as USB/TCP or undefined selectors still use the upstream implementation.Validation
npx nx test @midscene/android -- tests/unit-test/adb-server-client-transport-id-features.test.ts tests/unit-test/scrcpy-adapter.test.tsnpx nx test @midscene/android-playground -- tests/unit/scrcpy-server.test.tsnpx nx build @midscene/androidnpx nx build @midscene/android-playgroundpnpm run lint