Skip to content
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

[RFC] Support for emulator discovery #8

Closed
wants to merge 1 commit into from

Conversation

yschimke
Copy link

Not sure if you are taking PRs, or consider this in scope, so no offense taken if you close this.

Ideally I would use host:devices or host:devices-l to find the available emulator and devices. But I couldn't get that working with Dadb (#7).

As a shortcut, I read from the avd process files as described here https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:utp/android-test-plugin-host-retention/src/main/java/com/android/tools/utp/plugins/host/icebox/IceboxConfigUtils.kt?q=8554%20f:android

Original code in yschimke/emulator-tools@9637455

@Leland-Takamine
Copy link
Contributor

Leland-Takamine commented Jan 19, 2022

I'd like to propose a simpler implementation. Please let me know whether the following would satisfy your use case:

  • Expose a Dadb.listDevices method that scans ports 5554 to 5583 (default emulator adb port range) and identifies which ports have running emulators.

It would also generally be useful to understand how this functionality is being used in your use case. For instance, what type of information returned by host:devices are you using and for what purpose?

@dmitry-zaitsev
Copy link
Contributor

One thing to consider is that there is no guarantee that devices are running locally. With that in mind, exposing Dadb.listDevices has an advantage.

Thank you for raising this, regardless!

@yschimke
Copy link
Author

Makes sense, can you get details about the devices for those devices? That's essentially what I'd need. As a Wear developer, I frequently have both a watch and mobile connected, and would like to detect which is which.

If so, listDevices would be perfect.

@Leland-Takamine
Copy link
Contributor

Closing since this will be handled by a future api

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants