Skip Files with Errors
Especially on Windows, inevitably there's some file/folder with a filename that Windows doesn't like for one reason or another, and adb pull . It'd be nice if there was a way to get adb-sync to just skip files that give an error, instead of the whole process exiting over it. A way to log the errors would be nice, but at least being able to skip those issues would be appreciated.
The following Telegram file makes better-adb-sync abort:
ls -la /sdcard/Android/data/org.thunderdog.challegram/files/animations/.nomedia -rw------- 1 u0_a367 ext_data_rw 0 2023-06-20 06:46 /sdcard/Android/data/org.thunderdog.challegram/files/animations/.nomedia
This file is not readable by adb, but better-adb-sync should continue nonetheless. I hesitate between making a pull request solving this issue, and just blacklisting this .nomedia file with: adbsync --exclude org.thunderdog.challegram/files/'*'/.nomedia pull /sdcard/Android/data fold3/0/Android
In #27 (which is a duplicate of this one) there is a workaround for PermissionError, which could serve as a template for handling all errors (and simply skipping such files).
In #27 (which is a duplicate of this one) there is a workaround for PermissionError, which could serve as a template for handling all errors (and simply skipping such files).
Does that mean, a proper fix for this issue has been commited to the master branch?
Unfortunately not.
Thanks folks for help with this, which hit me too as:
ADB line not captured
ls: /storage/emulated/0/Android/data/org.videolan.vlc/files/medialib/cache: Permission denied
Try out the PR I just submitted based on other comments here and AI advice via Cursor: #52