summaryrefslogtreecommitdiffstats
path: root/adb/services.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add WriteFdFmt and clean up more code.Elliott Hughes2015-05-011-39/+16
| | | | | | | | Also say *which* device wasn't found. Bug: http://b/20666660 Change-Id: I50e234ad89e39ae0a8995083c0b642c61275c5a3 (cherry picked from commit ab52c181fa4c1c9891644635dc5653cda5b90e2b)
* More adb buffer fixes.Elliott Hughes2015-05-011-75/+60
| | | | | | | | | | | | | | This patch factors out a lot of the basic protocol code: sending OKAY, sending FAIL, and sending a length-prefixed string. ADB_TRACE has been non-optional for a long time, so let's just remove the #ifs. Also actually build the device tracker test tool (and remove its duplicate). Bug: http://b/20666660 Change-Id: I6c7d59f18707bdc62ca69dea45547617f9f31fc6 (cherry picked from commit e67f1f87d9b1188ec8617035db7006c37ee7b21e)
* Add missing null checks after allocations.Elliott Hughes2015-04-211-0/+4
| | | | | Bug: http://b/20317729 Change-Id: I62bb761d48ee59a1f4ddd0cdd0632432305ca2ca
* Use escape_arg in "adb backup".Elliott Hughes2015-04-171-13/+4
| | | | | | | | This doesn't fix the injection vulnerability, but it makes "adb backup" no worse than the other commands, and lets me fix them all at once. Bug: 20323053 Change-Id: I39843c065d9d738b6b7943b2ffd660e4a031cc36
* Remove yet more fixed-length buffers (and their overruns).Elliott Hughes2015-04-171-2/+2
| | | | | Bug: 20317724 Change-Id: If137fc96f5f23576ccecd388ac87afefa47337c6
* Merge "Remove extern "C" barriers to using C++."Elliott Hughes2015-04-171-2/+0
|\
| * Remove extern "C" barriers to using C++.Elliott Hughes2015-04-171-2/+0
| | | | | | | | Change-Id: Ic046d6aa540738cb46b54531bc59ba3b47b0136d
* | Show $ADB_VENDOR_KEYS if authentication fails.Elliott Hughes2015-04-161-4/+4
|/ | | | | | | | | Incorrectly set $ADB_VENDOR_KEYS is the most likely cause of failed adb connections. Make it easier to debug such problems by including the value in use in the error message. Bug: 20165551 Change-Id: I64c1d98ae6d3fb40eea9e1f0ddcfcf4f2d9d7318
* adb: Add option to reboot into sideload mode in recoveryTao Bao2015-03-311-14/+56
| | | | | | | | | | | | | | | | Currently it requires manual key press to enter the sideload mode. This CL adds 'adb reboot sideload' to reboot the device into sideload mode directly with text display on. With 'adb reboot sideload-auto-reboot', it will reboot after the sideload regardless of the installation result, unless interrupted by user. Since it needs to write to /cache/recovery/command file, 'adb root' is required before calling 'adb reboot sideload' and the one with '-auto-reboot'. Also it requires the matching CL in bootable/recovery. Change-Id: Ib7bd4e216a1efc01e64460659c97c6005bbaec1b
* File header cleanup.Dan Albert2015-03-191-3/+4
| | | | | | | | | * sysdeps.h should always be included first. * TRACE_TAG needs to be defined before anything is included. * Some files were missing copyright headers. * Save precious bytes on my SSD by removing useless whitespace. Change-Id: I88980e6e00b5be1093806cf286740d9e4a033b94
* Revert "Revert "adb: support /oem partition""Elliott Hughes2015-03-161-0/+1
| | | | | | | | | | This reverts commit 6084a0124f868c7ec43f6c415a27a168f27ff694. The original build breakage is fixed by (a) building the verity code for eng builds as well as userdebug builds and (b) moving the exported remount service functions into a new header file. Change-Id: Ice0c4f97d4db38ab7eb333c7a6e56bbd11123f5b
* Move adb to C++.Dan Albert2015-03-091-0/+690
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