google / adb-sync

Apache License 2.0
1.08k stars 171 forks source link

Feature Request: Exclude option #21

Open yennor opened 7 years ago

yennor commented 7 years ago

it would be great if there would be an exclude options: --Exclude

with which you can exclude certain directories, even better if you could also exclude certain file types (like rsync)

divVerent commented 5 years ago

Yes, we do need this...

rafaelgp23 commented 5 years ago

adb sync --exclude data/

Would be great.

calebplum commented 2 years ago

I agree that this would be extremely useful

fk1000 commented 1 year ago

There is a newer rewrite with these options using Python fnmatch: https://github.com/SelfAdjointOperator/better-adb-sync

This command synchronizes all WhatsApp files (excluding your own from "Sent" subfolders, which are better synchronized from "DCIM" directly) from my phone: adbsync.py --pull --exclude '*/Sent/' ./WhatsApp/ /sdcard/WhatsApp/Media/

Halavus commented 1 year ago

This command synchronizes all WhatsApp files (excluding your own from "Sent" subfolders, which are better synchronized from "DCIM" directly) from my phone: adbsync.py --pull --exclude '*/Sent/' ./WhatsApp/ /sdcard/WhatsApp/Media/

The path on newer android system (I don't know exactly since when) is no more /sdcard/WhatsApp/ The WhatsApp Media dir is found under /sdcard/Android/media/com.whatsapp/WhatsApp/Media/

Thus: adbsync.py --pull --exclude '*/Sent/' ./sdcard/Android/media/com.whatsapp/WhatsApp/Media/