Hi All,

I've been working recently on a script which requires copying some data from
a Tizen device. When I was researching the best possible way to copy data
from target, I noticed, that if I provide a directory to SDB, it builds a
list of files and copies *only* files - empty directories are not copied.
Unfortunately, the task I'm doing requires creating a fair copy of files and
directories.

I tried multiple approaches to achieve my goal, however:
* After looking into SDB source code I couldn't find a command line
parameter which would make SDB include empty directories when pulling.
* Copying using other tools (e.g. ssh and anything ssh-related) is not an
option for me - I must assume in my task, that ssh is not available on
target.
* Creating a tar archive on target device and copying it is forbidden as
well - I can't modify the contents of target device and must assume, that
target might have not enough space to create such archive.
* Streaming a temporary tar archive results in broken tar file being
generated - say I want to copy all files I put in /root directory. After
calling on my host machine "sdb shell 'cd /root/; tar cf - .' | tar xvf" I
get an error during unpacking received archive. After saving whatever is
being streamed to my host machine to disk and analyzing it I found out, that
I receive an archive which slightly differs in size from a working archive
created on target. I thought this was due to some messages from tar being
included into archive, however creating a hex dump and making a diff showed
me, that these files differ in multiple, seemingly random places. Archives
look similar, however they are not the same.

Is this a known behavior of "sdb pull" to copy only files and to skip
directories if they are empty? Is there a reason why streaming a tar archive
is not working as it should?

Best regards,

=====================================

Łukasz Kostyra
Samsung R&D Institute Poland
Samsung Electronics
E-mail: [email protected]




_______________________________________________
Dev mailing list
[email protected]
https://lists.tizen.org/listinfo/dev

Reply via email to