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

[WIP] Utilize tcp:0 to find available adb port instead of portpicker #871

Closed

Conversation

mhaoli
Copy link
Collaborator

@mhaoli mhaoli commented Feb 20, 2023

When using adb, we can utilize tcp:0 to find available adb port instead of portpicker.

However, when using other ADB alternatives (i.e. waterfall), portpicker is still used, because waterfall forward doesn't print out which port it picked.

This change is Reviewable

@mhaoli mhaoli added this to the Mobly Release 1.12.2 milestone Feb 20, 2023
@mhaoli mhaoli self-assigned this Feb 20, 2023
@mhaoli
Copy link
Collaborator Author

mhaoli commented Feb 20, 2023

Looks like this PR caused presubmit failed in cl/510984231.

Taking a look tomorrow. Marking this as WIP for now.

@mhaoli mhaoli changed the title Utilize tcp:0 to find available adb port instead of portpicker [WIP] Utilize tcp:0 to find available adb port instead of portpicker Feb 20, 2023
@mhaoli mhaoli removed the request for review from xpconanfan February 20, 2023 15:07
@mhaoli mhaoli changed the title [WIP] Utilize tcp:0 to find available adb port instead of portpicker Utilize tcp:0 to find available adb port instead of portpicker Feb 21, 2023
By default, the ADB binary supports this feature, i.e. it supports passing 0
as host port when doing port forwarding.

But sometimes users override the `ADB` variable to use a customized variant to
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we afford to wait for the migration to adb forwarder to push this PR, or is there some urgency?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not urgent, we can wait for the migration.

@mhaoli mhaoli changed the title Utilize tcp:0 to find available adb port instead of portpicker [WIP] Utilize tcp:0 to find available adb port instead of portpicker Feb 22, 2023
@mhaoli mhaoli removed this from the Mobly Release 1.12.3 milestone May 10, 2023
@xpconanfan
Copy link
Collaborator

Are we ready to submit this now?

@mhaoli
Copy link
Collaborator Author

mhaoli commented Nov 6, 2023

Currently waterfall migration is not completed, waiting until the end of this year, if it is still not completed I will submit the PR.

@mhaoli
Copy link
Collaborator Author

mhaoli commented Dec 14, 2023

Now we can do this with simpler code. Closing this and created a new PR #904

@mhaoli mhaoli closed this Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants