3

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?

Community
  • 1
  • 1
pasbi
  • 2,037
  • 1
  • 20
  • 32
  • Workaround: Use Tizen Studio's Connection Explorer to download the files. – pasbi Jun 08 '17 at 13:39
  • where's the reference of local directory in "sdb -s $smartwatchID pull /opt/usr/media/Documents/$filename" this line? – Shaswati Saha Jun 12 '17 at 10:50
  • Do you mean working directory? It's in the directory where I want the files to be downloaded to, i.e. some sub dir of my home. – pasbi Jun 12 '17 at 10:55
  • I meant the directory of your dev machine in which you're trying to pull the files from the remote device. – Shaswati Saha Jun 12 '17 at 11:00
  • ~/d0/data/raw/smartwatch/ – pasbi Jun 12 '17 at 11:02
  • So, shouldn't you write the sdb pull command inside the for loop like this "sdb -s $deviceID pull /opt/usr/media/Documents/ location/on/pc" ? – Shaswati Saha Jun 12 '17 at 11:05
  • no because I run the script from that directory (it's my working directory). It doesn't matter at the end, since it should download the file to any directory I have writing access to. – pasbi Jun 12 '17 at 11:08
  • Well, I couldn't find any noticeable information about this error on internet. Please share here if you could find! – Shaswati Saha Jun 13 '17 at 03:40

0 Answers0