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
feat: connect adb over wifi #29
base: main
Are you sure you want to change the base?
Conversation
Nice work @itsspriyansh , but the implementation seems to be wrong, since it would be a complete walkthrough and not capturing it from adb , the user would manually enter the adb addr:port and pairing code to connect the same at the same time running the helper tool |
Hey @Biki-das, thanks for pointing that out. I have corrected the changes now. |
Great work on this @itsspriyansh. But, this should not be a part of the main setup. The main setup is used to ensure that all the requirements that we would potentially need to download are present on the system, and if not, download the requirements. Connecting a device to
So, instead of asking user to connect to a device at the time of setup, we can provide user with a separate command that they can run to do connect to the Android device wirelessly, an number of time as they like to. The command can be something like: |
Btw, to pass the flags in the dev run, you'd need to prepend the arguments with a Also, I haven't reviewed the code yet, will do so in a while. |
a28b692
to
9228731
Compare
@garg3133 I have made the suggested changes. |
@itsspriyansh Looks good. Two things:
|
2fba69a
to
7a6c61f
Compare
@garg3133 I have added the instructions. I have also update the video preview in the PR description. You may take a look at it to review the changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We would also need to provide a way for users to be able to disconnect a device as that is also not very straightforward.
Think of what flags we could use while running command for this purpose.
Now that we have both these use cases, I'm more inclined towards having the following commands:
# connecting a device
npx @nightwatch/mobile-helper android connect
# ^ will only show a list of devices connected because for USB or emulator connections
# we don't need to do anything to establish a connection.
# connecting a device wirelessly
npx @nightwatch/mobile-helper android connect --wireless
# ^ what's being done in this PR
# disconnecting a device
npx @nightwatch/mobile-helper android disconnect
# ^ will show a list of all the connected devices and ask a further question on which device to disconnect.
For this PR, let's just keep the scope to the second command above and the rest we can do later on.
@garg3133 I have updated the instructions and the video preview. As for now, I have not implemented the use of |
@itsspriyansh The flow is superb! Thank you. I'll do a more thorough review of the code later, but this looks good. Regarding the
But any of this does not need to be implemented in this current PR. The work on this PR is mostly complete I think. |
Thank you @garg3133 |
Co-authored-by: Priyansh Garg <priyanshgarg30@gmail.com>
@garg3133 I have now handled the case when |
Feature Implemented
Added functionality to connect to Android Debug Bridge (ADB) wirelessly using a pairing code. This feature enhances the flexibility of connecting to devices, particularly useful in scenarios where USB connection is not feasible.
Changes Made
--wireless
flag to enable wireless ADB connection.Additional Notes
This feature adds convenience and flexibility to the ADB connection process, especially in scenarios where physical USB connections are impractical or unavailable. The implementation adheres to best practices and maintains compatibility with existing codebase and dependencies.
Resolves: #19
simplescreenrecorder-2024-03-04_23.35.12.mp4