Jellepepe / flutter_adb

Native dart implementation of a network ADB (Android Debug Bridge) client.
https://pub.dev/packages/flutter_adb
BSD 3-Clause "New" or "Revised" License
4 stars 1 forks source link

Does the pair command work? #1

Open sharpordie opened 4 months ago

sharpordie commented 4 months ago

Is flutter_adb currently supporting the ADB pair command for recent devices?

Also, you're basing your work on the very old AdbLib project. Why not basing it on recent ones like Kadb or libadb-android?

Jellepepe commented 4 months ago

I have not implemented the pair functionality yet, no. My own usecase for the package is on an android 10 device using self-adb to run certain commands not otherwise possible without requiring root access. Since the pairing functionality was added in android 11 this wasn't useful for me, so I haven't looked into it, I just figured I'd take the hour or 2 to write the readme & example app to submit the package so others might benefit from it, since there wasn't any native dart alternative yet from what I could find.

This is a rewrite of the protocol from scratch in flutter, I simply used cgutman's library for the protocol basics, and ended up somewhat copying his class structure, hence why I added the attribution.

Both of the libraries you linked to are vastly more complex, so would not make a lot of sense for a simple library like this which is rewritten from scratch in native dart code, and at least for me my usecases are all already covered by this simple implementation. I don't think for the basic functionality of opening a shell and running some commands there is any functional difference. I agree that if you wanted to make a plugin simply to adapt an existing java/kotlin android library, then it would make more sense to use one of those libraries you linked.

Feel free to submit a pull request with the addition of the pair functionality if that is useful to you, I don't expect to be working on any new functionality for this library any time soon, aside from fixing bugs or reviewing pull requests, as I am busy with other projects.

sharpordie commented 4 months ago

I was looking for a complete implementation of ADB in Dart, because yes it is relatively complicated. I currently use libadb-android, but it doesn't work for iOS.

agusibrahim commented 2 days ago

i'm waiting too for pair function. pair ip:port code