summaryrefslogtreecommitdiffstats
path: root/adb/framebuffer_service.c
Commit message (Collapse)AuthorAgeFilesLines
* Move adb to C++.Dan Albert2015-03-091-184/+0
| | | | | | | | | | | | | | | | | I keep trying to clean things up and needing std::strings. Might as well just do this now. usb_linux_client.c is going to stay as C because GCC isn't smart enough to deal with the designated initializers it uses (though for some reason it is in C mode). The Darwin files are staying as C because I don't have a way to test that they build. The Windows files are staying as C because while I can actually build for them, it's slow and painful. Change-Id: I75367d29205a9049d34460032b3bb36384f43941
* Test readx/writex (now renamed).Dan Albert2015-02-251-7/+7
| | | | | | | | | | | | | | Renamed readx/writex to ReadFdExactly/WriteFdExactly respectively. These read/write a full fixed-size buffer. If the whole buffer cannot be read/written, these functions return an error. Rename write_string to WriteStringFully. Move the TEMP_FAILURE_RETRY definition in sysdeps.h out of the !Windows section. It seems Windows won't actually interrupt a call, but it's easier to just define it than to #ifdef each call. Change-Id: Ia8ddffa2a52764a2f9a281c96c937660e002b9b9
* Move transport declarations into transport.h.Dan Albert2015-02-241-14/+16
| | | | | | There are a few cloexec issues in here as an added bonus. Change-Id: I1699d719d733f47878bdba0454230cf5ab6a60b6
* Merge "Fix deadlocks."Elliott Hughes2014-12-031-3/+3
|\
| * Fix deadlocks.Bao Haojun2014-05-141-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Close pipe fds[1] as soon as possible. Otherwise it may block when reading from fds[0] even though the child process has exited early and closed its copy of fds[1]. 2. Waitpid after pipe is closed. Otherwise the screencap child process may block while writing fds[1], because the fds[0] is not closed yet. If we close fds[0] first, then the screencap child process will die because of SIGPIPE, and waitpid will return correctly. Change-Id: I433c95a5ba2eb3045727fc39a49fd9557fb1a1d1 Signed-off-by: Bao Haojun <baohaojun@gmail.com>
* | adb: avoid leaking file descriptorsNick Kralevich2014-06-051-1/+1
|/ | | | | | | | | | | | | | | If an adb shell connection comes in while taking a screenshot, an open pipe file descriptor will be leaked to the shell process. This causes SELinux denials of the form: avc: denied { read } for path="pipe:[21838]" dev="pipefs" ino=21838 scontext=u:r:shell:s0 tcontext=u:r:adbd:s0 tclass=fifo_file permissive=0 avc: denied { write } for path="pipe:[21838]" dev="pipefs" ino=21838 scontext=u:r:shell:s0 tcontext=u:r:adbd:s0 tclass=fifo_file permissive=0 Set O_CLOEXEC on the pipe connections, to avoid leaking them across an exec boundary. Bug: 15437785 Change-Id: Id2304b316bd7082d8baac246dce1f0e0e26e9197
* Handle screendumps for all framebuffer sizesChris Dearman2013-09-251-7/+9
| | | | | | | | | | | | readx() treats a partial read as an error but also consumes the data, Now exactly the amount of data needed for the screendump is requested. This bug showed up for framebuffers that were not a multiple of 640 bytes. Also fix a compiler warning related to handing pipe() failure. Change-Id: I8b1713923e156d4e3424784152e5dc5cbc7d478d
* Avoid zombies on androidscreencastYuriy Zabroda2012-07-231-0/+5
| | | | | | | | | | | | | When using a third party screen capture program called androidscreencast (http://code.google.com/p/androidscreencast/) to get the framebuffer of the device, there are tons of screencap zombie processes got left behind. The issue is also mentioned here: http://code.google.com/p/android/issues/detail?id=22836. The cause of the issue is that adbd spawns off screencap processes, and these child processes were not waited to be finished. This change fixes the issue. Change-Id: Ife928d65ecf6a2ff39b8b72ddba930fda6733a00 Signed-off-by: Yuriy Zabroda <yuriy.zabroda@ti.com>
* fix [3374821] Cannot take screenshot of HC previewMathias Agopian2011-02-091-13/+75
| | | | | | | don't hardcode the pixelformat to RGBA_8888 when taking screenshots. Change-Id: I3a76b49275acfce9a2994436f521b76310cd8fb2
* update adbd to use the new screencap command for taking screenshots.Mathias Agopian2010-09-261-41/+48
| | | | Change-Id: I02c49240f9db9258824020f3f5f04463e17a537a
* Add bitfields to header for screen shots. This will allow ddms to distinguishRebecca Schultz Zavin2009-09-151-9/+36
| | | | | | | | between various 32 bit pixel formats. Also adds new version number for future expansion. Change-Id: Ia1d7d7485614e961a47ebb65493b19f4a16ded05 Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
* Fix several issues in framebuffer_serviceRebecca Schultz Zavin2009-09-101-14/+23
| | | | | | | | | -supports fb's with x and y offsets -dumps the front buffer (instead of just the low end of the buffer) -switch from mmap to read/write, for fb's with very large offsets Change-Id: Id560790c9661f7cc3b4350a44cc29f0104831e85 Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
* Move fdevent from libcutils into adb directory. ADB is the only client of ↵David 'Digit' Turner2009-05-181-1/+1
| | | | this API, and I intend to modify it extensively to clean its codebase soon.
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+70
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-70/+0
|
* Code drop from //branches/cupcake/...@124589The Android Open Source Project2008-12-171-4/+5
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+69