Commit graph

6 commits

Author SHA1 Message Date
Mark Salyzyn
60299dfd6a adb: turn on -Werror
- Deal with some -Wunused issues

Change-Id: Idfd1a114e68ae637978b52fde5144d0dca0ec79f
2014-05-05 10:30:06 -07:00
Christopher Tate
10f129ca8e 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
2011-06-21 16:05:17 -07:00
Christopher Tate
5b811fa5dd 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
2011-06-20 16:19:42 -07:00
Christopher Tate
702967afb1 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
2011-05-17 15:52:54 -07:00
Christopher Tate
024447c3c3 Use the new 'bu' syntax for backup vs restore operation
Change-Id: Ib007705ee562a41869f8add3408101b3a53aa2d7
2011-05-16 16:28:59 -07:00
Christopher Tate
d2f5415c60 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
2011-04-27 15:27:23 -07:00