[Nook Touch General] osm0sis:
Right, Pulse (great news app) is ridiculous for doing that, I agree completely. :)

I don't want adbsync to do anything special with this issue, all I'd like adbsync to do is ignore the error when it can't create a file (due to whatever reason), skip the file, and keep going, since currently when it hits those long filenames (which it can't create on the Windows/host side) adbsync just halts the entire sync operation.

I've worked around the situation by ignoring the offending path, I also made a workable solution to delete the host-side files that no long exist on the android-side, but please do consider adding it as a long-form option at least, --delete or something. I may have gigabytes at my disposal but I like to keep them tidy. ;)

Here is my batch file workaround/automation for all this if anyone was interested.

/backup/adbsync.bat:

@echo off
:: ADBsync Automation script by osm0sis @ xda-developers

cd %~p0
cd ..
echo ADB Sync Utility Copyright (c) Temblast 2012-2013
echo.

::echo Connecting to device . . .
::adb wait-for-device > nul 2>&1
::echo.

call adb shell mount /data > nul 2>&1
adbsync /hscu /s /ld /v "backup\sdcard" "/data/media/" /i*catalog*
::workaround adbsync bug where some files get pulled down to the root of the working drive
backup\adbsync\cp -Rfp %~d0\data\media\* .\backup\sdcard > nul 2>&1
backup\adbsync\rm -R %~d0\data > nul 2>&1
echo.

echo Logging remaining differences . . .
::adb push backup\adbsync\.adbsync /data/media/ > nul 2>&1
::echo temp > backup\adbsync\.adbsync
adbsync /hscu /s /ld "backup\sdcard" "/data/media/" /i*catalog* > .\backup\backup.log
::adb pull /data/media/.adbsync backup\adbsync\.adbsync > nul 2>&1
::adb shell rm /data/media/.adbsync
::del backup\sdcard\.adbsync
echo.

echo Removing old files . . .
cd %~p0
type backup.log | adbsync\grep -E ^H" " | adbsync\cut -c 36- | adbsync\cut --delimiter=+ --fields=1 > host.log
echo ..\host.log >> host.log
for /f "delims=" %%a in ('type host.log') do @adbsync\rm "sdcard/%%a"
echo.

echo Cleaning up empty directories . . .
for /f "delims=" %%d in ('dir /s /b /ad ^| sort /r') do @rd "%%d" > nul 2>&1
echo.

::echo Fixing hidden file permissions . . .
::attrib -h .* /s /d
::echo.

cd ..
echo Zipping long filenames . . .
adb push backup\adbsync\zip /tmp/ > nul 2>&1
adb shell chmod 755 /tmp/zip
adb shell /tmp/zip -9rq /tmp/sdcard-longfilenames.zip /data/media/0/Android/data/com.alphonso.pulse/files/catalog*
echo.

echo Pulling "sdcard-longfilenames.zip" . . .
adb pull /tmp/sdcard-longfilenames.zip .\backup
adb shell rm /tmp/zip /tmp/sdcard-longfilenames.zip
echo.

echo Done!
adb kill-server > nul 2>&1
echo.
pause

I've got some things in funky places (directories above and below the batch) to keep them out of the way on my setup, so just so it's a little clearer to everyone, here's the structure in use:

/adb.exe

/adbsync.exe

/backup/adbsync.bat

/backup/adbsync/cut.exe

/backup/adbsync/cp.exe

/backup/adbsync/grep.exe

/backup/adbsync/rm.exe

/backup/adbsync/zip

/backup/sdcard/

zip is just an Android-compiled Info-Zip binary (I grabbed it from the mod here) and the other exes can be from the GNUWin32 project of your - choice. adbsync.bat is the file I code quoted above, and the sdcard subfolder is where my entire /data/media/ backup goes. This is great because it grabs my CWM backups and everything else, so I literally have a snapshot of everything on my device in working order at the time, sdcard and all. :good:

I also made a little flashable zip script to fix ownership and permissions of files and directories on the sdcard to what they would be if Android OS had put them there itself, since some apps can't access pushed files that have root.root as owner. This is useful when restoring to your backup. Now located in my "Odds and Ends" thread. Not sure if adbsync sets permissions or owner but that would be another cool option since generally pushed files get root.root from adb shell and higher permissions than usual.

Edit: Commented out the attrib changes in the batch file since it doesn't appear to be required anymore, the testing filepush to force a differences list since it's not necessary, and the wait-for-device since it doesn't seem to work all the time on the latest version of adb. :good:

Edit 2: Added back the workaround for the adbsync bug where some files get pulled down to the root of the working drive, (requires cp.exe) since I'm still seeing it here. Also fixed file deletion when there randomly ends up being a newer version on the host (another bug) by differentiating between H and H> in the log it parses, and fixed support for files/directories with spaces.

Edit 3: Testing this against the new version of adbsync and properly packaging it in my Odds and Ends thread (see above for link). The above version of the batch script is out of date now.