Skip to content

Conversation

@ToofDerling
Copy link
Contributor

Inspired by the Stat extension method in DeviceCommands.cs I added similar methods for List, Pull, and Push. You can now do stuff like listing directories in parallel or downloading files in parallel. The cost is that each sync request opens and closes a new socket, but it seems be fast enough using an USB connection to my Samsung device.

I think the reason that re-using a SyncService for multiple sync requests fails is related to this "Sync mode is
implicitly exited after each sync request, and normal adb communication follows" (from https://android.googlesource.com/platform/system/adb/+/refs/heads/master/SYNC.TXT), but I don't know for sure.

@ToofDerling
Copy link
Contributor Author

Using the extension methods instead of the SyncService directly also fixes #19

@wherewhere
Copy link
Member

It's also a solution 🤣.
Thanks for your contribution.

@wherewhere wherewhere merged commit 3332522 into SharpAdb:dev Jan 10, 2023
wherewhere added a commit that referenced this pull request Jan 17, 2023
…sions

Add List, Pull & Push IAdbClient extension methods
@wherewhere wherewhere linked an issue Jan 30, 2023 that may be closed by this pull request
@wherewhere wherewhere added the enhancement New feature or request label Mar 28, 2023
@megapro17
Copy link

Did anyone even tried to use Pull method? It just doesn't work. Socket does dispose sooner than necessary. Removing using statement fixes it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

System.ArgumentOutOfRangeException: ''

3 participants