History log of /system/core/adb/backup_service.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
10f129ca8eb266f46393e981484e60521f9011df 22-Jun-2011 Christopher Tate <ctate@google.com> Fix hang after end of backup

The buggy behavior was that the 'adb backup ....' host command line
invocation would hang forever, even after the backup finished and
the forked device-side subprocess had been reaped. The reason for
this is that the device adbd end of the socketpair used to send
the data back from the forked subprocess was still stuck readable
even after the remote end of it had been closed.

With this patch, the thread whose job it is to waitpid() in order
to harvest the forked child process also closes the local (adbd)
end of the socketpair. This makes the fdevent logic notice that
the socket is dead, at which point it cleans up everything including
the communication back to the host.

Change-Id: I90e7e4e5db36c5a6f7363708b29a6d2c56d1250e
5b811fa5dd00288954f15209a56aea03d5e4a004 10-Jun-2011 Christopher Tate <ctate@google.com> Tidy up the end-of-data handling in backup

* Increase transfer buffer size to 32K
* Add logging about error conditions and fd teardown
* Pass the fd number as a command line option to the 'bu' subprocess
* Properly harvest the 'bu' subprocess after it's done

Change-Id: Id44dde25778ecf43c5604fd9d01d726ba58861e5
702967afb1bebc97c0b8a23c075d4932820ef7a3 18-May-2011 Christopher Tate <ctate@google.com> Add 'adb restore' to parallel 'adb backup'

It won't actually do anything until the 'bu' tool and framework are
updated to respond properly, but this is the adb side of the
necessary infrastructure: we copy the tarfile into the socket pointed
at the device, using the existing mechanisms.

Change-Id: Ic3b5779ade256bd1ad989a94b0685f7b1a7d59d2
024447c3c3dcf63b54cc481f2c6ecbda10823269 17-May-2011 Christopher Tate <ctate@google.com> Use the new 'bu' syntax for backup vs restore operation

Change-Id: Ib007705ee562a41869f8add3408101b3a53aa2d7
d2f5415c603f7d9961f7a0b05579a0768e071410 21-Apr-2011 Christopher Tate <ctate@google.com> Add 'adb backup' for pulling a full backup tarfile to the host

The direct command interfaces with the 'bu' binary in /system/bin
on the device.

Change-Id: I4cd69eedfe5144c47277573c5626c6ad8755d70b