Reputation: 11
I'm trying to backup data from a phone (specifically a Samsung Note 10+) using adb pull, it is a lot of data (over 200GB), and every time it stops due to some files having long filenames (the 260 characters long windows limitation), it throws this error:
adb: error: cannot create 'D:\Backup...
I renamed some of the files manually on the phone, like:
"The quick, brown fox jumps over a lazy dog DJs flock by when MTV ax quiz prog Junk MTV quiz graced by fox whelps Bawds jog, flick quartz, vex nymphs Waltz, bad nymph, for quick jigs vex Fox nymphs grab quick-jived waltz Brick quiz whangs jumpy veldt fox Bright vixens jump dozy fowl quack Quick wafting zephyrs vex bold Jim Quick zephyrs blow, vexing daft Jim.docx"
to:
"The quick, brown fox jumps over a lazy dog DJs flock by when MTV ax quiz prog Junk MTV quiz graced by fox whelps Bawds jog, flick quartz, vex nymphs Waltz, bad nymph, for quick jigs vex Fox nymphs grab quick-jived waltz Brick quiz whangs jumpy veldt fox.docx"
I only delete the last part of the filename so it would fit in the 260 characters limitation, then I run adb pull but it stops again because another file is too long.
I was wondering if there is any way I could auto rename the files while transferring them, either by a batch script, adb shell or even a python script, is it possible? And not just rename them, but deleting only the last characters of the filename.
Upvotes: 1
Views: 390