[arch-general] adb backup broken named pipe

Pascal patatetom at gmail.com
Thu May 16 08:57:19 UTC 2019


hello,

I'm looking for a solution for the problem below : all leads are welcome !

the adb tool is able to make a backup of a smartphone in a file:
adb backup -all -f mybackup.ab

however, the file mybackup.ab has a particular format that prevents it from
being used "simply".
to convert it into a tgz archive, it is possible to do this:
( printf "\x1f\x8b\x08\x08\x00\x00\x00\x00\x00\x00\x00"; tail -c +25
mybackup.ab ) > mybackup.tgz

but in this case, I can easily end up with two files of 16Gb or more...
to avoid this volume problem, I tried to do this:
mkfifo backup.fifo
adb backup -all -f backup.fifo &
( printf "\x1f\x8b\x08\x08\x00\x00\x00\x00\x00\x00" ; tail -c +25
backup.fifo) > mybackup.tgz

but adb systematically breaks my named pipe and my code doesn't work as
expected.
how to prevent adb from breaking the named pipe ?
I'm considering using fuse but there may be a simpler way...

regards, lacsaP.


More information about the arch-general mailing list