summaryrefslogtreecommitdiffstats
path: root/adb/backup_service.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix hang after end of backupChristopher Tate2011-06-211-4/+17
| | | | | | | | | | | | | | | | | 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
* Tidy up the end-of-data handling in backupChristopher Tate2011-06-201-7/+42
| | | | | | | | | * 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
* Add 'adb restore' to parallel 'adb backup'Christopher Tate2011-05-171-16/+27
| | | | | | | | | 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
* Use the new 'bu' syntax for backup vs restore operationChristopher Tate2011-05-161-2/+3
| | | | Change-Id: Ib007705ee562a41869f8add3408101b3a53aa2d7
* Add 'adb backup' for pulling a full backup tarfile to the hostChristopher Tate2011-04-271-0/+95
The direct command interfaces with the 'bu' binary in /system/bin on the device. Change-Id: I4cd69eedfe5144c47277573c5626c6ad8755d70b