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

Add support for adb pair (connecting with Android 11+ over Wi-Fi) #25

Open
sharpordie opened this issue Jul 29, 2022 · 12 comments
Open

Comments

@sharpordie
Copy link

Is the pair command supported by Dadb?
If not, it would be great to add this feature.

https://developer.android.com/studio/command-line/adb#connect-to-a-device-over-wi-fi-android-11+

@Leland-Takamine
Copy link
Contributor

Hi @sharpordie - I'd like to understand your use case a bit better.

Today the following is supported:

  1. Pair your device over wifi using the standard adb pair HOST:PORT CODE command. eg: adb pair 10.0.0.192:5555 123456
  2. Once your device is paired, you can connect to your device using your device's IP address (same as HOST above): Dadb.discover(10.0.0.192) or Dadb.connect(10.0.0.192, 5555).

These steps requires the adb binary to initially set up the pairing, but since this is a one-time setup per laptop maybe that acceptable.

Do these steps satisfy your use case or are you looking for something else?

@Leland-Takamine
Copy link
Contributor

Leland-Takamine commented Aug 22, 2022

Btw I just added documentation on this in the README: https://github.com/mobile-dev-inc/dadb/blob/master/README.md#connecting-to-a-physical-device

But I'm still interested in whether this solves your use case or if there's a reason you'd need / prefer built-in wifi pairing support in dadb?

@Leland-Takamine
Copy link
Contributor

@sharpordie Please don't hesitate to reopen this issue if the above documentation doesn't work for your usecase!

@sharpordie
Copy link
Author

sharpordie commented Aug 26, 2022

Dadb is presented as a library to connect to android device without an adb binary or server. So for me using adb binary to pair (or connect) a device first is a nonsense.

But it requires to find out how the official adb forges the "request" for pairing process for a proper dadb implementation.

@tiann
Copy link
Contributor

tiann commented Aug 31, 2022

Here is a adb pair implementation: https://github.com/RikkaApps/Shizuku/blob/master/manager/src/main/jni/adb_pairing.cpp

@tiann
Copy link
Contributor

tiann commented Aug 31, 2022

And here is a pure java implementation: https://github.com/MuntashirAkon/libadb-android/blob/master/libadb/src/main/java/io/github/muntashirakon/adb/PairingAuthCtx.java

@sharpordie
Copy link
Author

@tiann
This is exactly what I would like in Dadb (with Kotlin).

@Leland-Takamine
Copy link
Contributor

Not sure on timeline yet but opening this back up as it does seem like a use case folks are asking for.

@tytydraco
Copy link

This would certainly be a game changer. I'd be willing to put forward some work into this as best I can. This library opens up so many possibilities.

@JamshedAlamQaderi
Copy link

JamshedAlamQaderi commented Feb 28, 2023

Hi dadb team,
You guys made a great library. I would like to ask that any progress on this issue. Because i'm also want to pair using dadb and don't want use adb binary either

@malbry
Copy link

malbry commented Mar 24, 2023

Yes, I'd like to add my voice to the other requests to add a pairing option to dadb. We really need it for devices running Android 11+. Thank you.

@binglingziyu
Copy link

We really need adb pair

@bartekpacia bartekpacia changed the title How to pair Android 11+ devices? Add support for adb pair (connecting with Android 11+ over Wi-Fi) Jul 13, 2024
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

No branches or pull requests

7 participants