Get the files all at once
I can copy all files from the smart watch using
sdb -s $deviceID pull /opt/usr/media/Documents/ location/on/pc
Which works like a charm for less than about 100 files.
However, currently I want to copy 229 files and the command sometimes returns error code 225
, fatal: failed to read '/opt/usr/media/Documents/0163.json': connection fails
, sometimes the command exits without error (without having copied all files).
sdb -s $deviceID shell ls /opt/usr/media/Documents/
lists all the files I expect to see.
Get the files one by one
I also tried
for filename in $(sdb -s $deviceID shell ls /opt/usr/media/Documents/);
do
sdb -s $smartwatchID pull /opt/usr/media/Documents/$filename
echo $?
done
Some of the sdb
commands return with exit code 1
and the error message ': unknown reasonget status of /opt/usr/media/Documents/0186.json
,
others return code 0 and no message.
What happens here?