google / adb-sync

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature Request: Exclude option

yennor opened this issue · comments

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)

Yes, we do need this...

adb sync --exclude data/

Would be great.

I agree that this would be extremely useful

commented

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/

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/