quamotion / madb

SharpAdbClient is a .NET library that allows .NET applications to communicate with Android devices. It provides a .NET implementation of the adb protocol, giving more flexibility to the developer than launching an adb.exe process and parsing the console output.
Apache License 2.0
360 stars 133 forks source link

pull or push folder #195

Open xujianxin0525 opened 4 years ago

xujianxin0525 commented 4 years ago

Could you add a function that pull android folder to local folder?

pull push

bddckr commented 4 years ago

Already offered, isn't it? https://github.com/quamotion/madb#send-or-receive-files

xujianxin0525 commented 4 years ago

Already offered, isn't it? https://github.com/quamotion/madb#send-or-receive-files Thanks for your replay. It seems that I can only pull out files. I want to pull out the entire folder. Is that possible? Like adb command:adb -s DLLKR17223005174 pull /sdcard/data C:\ADB_Log. "/sdcard/data" is a folder pah.

qmfrederik commented 4 years ago

There isn't a single convenience method you can call to achieve this (because it's not part of the adb protocol).

The adb client which ships with the ADK will first do a file listing and then download all files, one by one: https://android.googlesource.com/platform/system/core/+/master/adb/client/file_sync_client.cpp#1605

In SharpAdbClient, this would be equivalent to first calling SyncService.GetDirectoryListing and then downloading the files one by one.

Hope it helps.

xujianxin0525 commented 4 years ago

I see, thanks for your replay.