-
Notifications
You must be signed in to change notification settings - Fork 14
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
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 |
@garg3133 I have now handled the case when |
7e856aa
to
c43547e
Compare
Co-authored-by: Priyansh Garg <priyanshgarg30@gmail.com>
@itsspriyansh Have I not told you not to force push before? Doing force-push makes it impossible to review the diff and requires us to review the entire PR again. Also, changes in other files are missing now from this PR, only one file is there now which can't be run on its own. Or is this intentional and you want aim to do the integration in other PRs? |
@garg3133 Actually you haven't told me that. I will keep that in mind. And yes it is intentional. If we get the changes in other files merged, we will be overwriting them anyways in the next pr which I didn't think would be helpful. For now, I just wanted to add the script. |
I don't think that's true. I just tried it myself by removing the Can you try this in your system once more? And if it still doesn't work, let me know of the steps you followed. |
I think those error messages are still useful. The main purpose of those error messages is so that user knows what we're trying to do internally and if the command fails continuously they can just try it themselves instead of using the tool. |
@garg3133 Thanks for the merge! As you can see, it is not getting installed in my case. |
@itsspriyansh This seems to be a bug in that case but the functionality is there. As you can see, it downloaded the Can you try to debug this? |
@garg3133 What I have obeserved is that this issues lies with sdkmanager and not in our tool. I tried deleting |
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
Added script to achieve the functionality in
android/utils/connect-device.ts
.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