summaryrefslogtreecommitdiffstats
path: root/adb
Commit message (Collapse)AuthorAgeFilesLines
* Fix build from -Werror=maybe-uninitialized.Dan Albert2015-03-101-1/+1
| | | | | | | | | | | | This won't actually ever be uninitialized because the code will take a failure path if the code that initializes it fails. The goto seems to thwart this check though. Not sure why this is only firing on userdebug builds yet. I'll look in to it tomorrow. Change-Id: Ie9d837d6baea255d2a4d169355b53dfd775eacce (cherry picked from commit 83ca56ac98c089dfa5d61f282353e9ae2024797e)
* Move adb to C++.Dan Albert2015-03-0934-278/+317
| | | | | | | | | | | | | | | | | 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
* Merge "Fix a writex transcription error."Dan Albert2015-03-091-1/+1
|\
| * Fix a writex transcription error.Dan Albert2015-03-091-1/+1
| | | | | | | | Change-Id: I71b11127d41ebac6caf68926089c5a3b99d8c21e
* | Make the root/unroot test more robust.Dan Albert2015-03-091-2/+22
|/ | | | | | | * Check the current adb user to choose the order of root/unroot. * Re-root the device when finished. Change-Id: I47a14b89e2c405bd63722e4d2043fcc629fb5e58
* check if uid=0 before attempting remountNick Kralevich2015-02-251-0/+6
| | | | | | | | | If "adb remount" is done without having done "adb root" first, scary looking SELinux denials are emitted before the operation eventually fails. Avoid the scary looking messages by refusing remount attempts if we're not running with privileges. Change-Id: I298621251a10e38345ef77875003a97c8b5a0270
* Test readx/writex (now renamed).Dan Albert2015-02-2519-211/+435
| | | | | | | | | | | | | | 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
* Remove _(GNU|XOPEN)_SOURCE makefile cruft.Dan Albert2015-02-251-4/+6
| | | | | | None of the functions that require these are used. Change-Id: I10cffab127795b94340131f8737f7924b9138f9e
* Add some basic tests to adb.Dan Albert2015-02-253-18/+107
| | | | Change-Id: I946b5b1e5650540db3b4f75892214c4218b3baf3
* Fix the mac build.Dan Albert2015-02-251-2/+3
| | | | Change-Id: Ieb6f2650ce5f39f1d8c938d0ca8cbec459d8e2fd
* Merge "Move transport declarations into transport.h."Dan Albert2015-02-2521-155/+193
|\
| * Move transport declarations into transport.h.Dan Albert2015-02-2421-155/+193
| | | | | | | | | | | | There are a few cloexec issues in here as an added bonus. Change-Id: I1699d719d733f47878bdba0454230cf5ab6a60b6
* | Add .clang-format file.Dan Albert2015-02-241-0/+11
|/ | | | | | | Not going to format the whole world just yet, but this helps for `git clang-format`. Change-Id: I482819419647e4c752d3b044bde8d637e1fae1e5
* Merge "Add a project wide clang switch."Dan Albert2015-02-251-0/+8
|\
| * Add a project wide clang switch.Dan Albert2015-02-241-0/+8
| | | | | | | | | | | | | | I'll probably make this the default soon, but I'm not brave enough to do that without checking the recovery image first. Change-Id: I9cde687b08a588e3797645a308f381e4ec553447
* | Merge "Remove the emulator special case from the "adb root" code."Elliott Hughes2015-02-241-7/+0
|\ \
| * | Remove the emulator special case from the "adb root" code.Elliott Hughes2015-02-241-7/+0
| | | | | | | | | | | | | | | | | | | | | The emulator is essential an "eng" build, so the regular properties should suffice. Change-Id: Id63b3918f9b0b04b0d887ed886535b9976a9cc85
* | | Make Python tests only check the current device.Dan Albert2015-02-241-46/+19
| |/ |/| | | | | | | | | | | | | | | | | | | | | In practice testing all connected devices is a pain, since it's probably each device is running a different build. It would probably make sense to just move this functionality up into a higher level test runner (which could just live in main). Also rename test_devices to test_shell, since it doesn't really test `adb devices`. Change-Id: Ie96d3e83b30acfac4e3bcbd9821690c0ad4d2f7e
* | Fix Mac build.Dan Albert2015-02-241-1/+1
| | | | | | | | | | | | | | | | | | Prior to https://android-review.googlesource.com/#/c/134253/ the makefile had assumed !Windows was the same as Linux, so the Mac was actually getting all the Linux sources as well. I mistakenly didn't add fdevent.cpp to the Darwin sources in that change. Change-Id: I4e12a394e9a2baf7c1e3c711a01a6b5fccbf79d9
* | Fix Windows SDK build.Dan Albert2015-02-241-1/+4
|/ | | | Change-Id: I9c0f9c92c28867ff17f1ec83aac935d18348c335
* Add missing <stdlib.h> to adb_listeners.c.Elliott Hughes2015-02-241-0/+1
| | | | Change-Id: If9505880a33131b27bfaa19f3efd45c83a6810ed
* Merge "Move more into libadb and libadbd."Dan Albert2015-02-241-23/+6
|\
| * Move more into libadb and libadbd.Dan Albert2015-02-201-23/+6
| | | | | | | | | | | | | | None of this needs to be shared with minadbd, but these sources are still needed for anything linking libadb (such as tests). Change-Id: I3024f714da42364bf27a991986f00676e2bbbf2c
* | Merge "Oops. Fix make variable name. Thanks again, make."Dan Albert2015-02-242-2/+4
|\ \ | |/
| * Oops. Fix make variable name. Thanks again, make.Dan Albert2015-02-202-2/+4
| | | | | | | | Change-Id: Iecbb41acc835bb8eb20b668c89a3ff065470fcb7
* | Merge "Ignore another stupid lint warning."Dan Albert2015-02-241-1/+1
|\ \ | |/
| * Ignore another stupid lint warning.Dan Albert2015-02-201-1/+1
| | | | | | | | Change-Id: I8e586e472a139cc3039f1371f8a99935d20aa0f0
* | Add more logging message and dead codeNanik Tolaram2015-02-233-20/+9
|/ | | | | | | | | * Add more logging message to aid in easier debugging * Remove unnecessary dead/commented code Change-Id: I9c7fe8f6b674cab41601001458010ab176b89776 Signed-off-by: Nanik Tolaram <nanikjava@gmail.com>
* Merge "Lose adb.c and sockets.c to libadb."Dan Albert2015-02-191-13/+11
|\
| * Lose adb.c and sockets.c to libadb.Dan Albert2015-02-191-13/+11
| | | | | | | | | | | | | | | | Also kill the device side libadb. This was added for the now dead device side adb, and is no longer used. Bug: 17626262 Change-Id: I3b28915641fd5b4f16fc86cf1f4f4e9711093001
* | Merge "Document the behavior of props affecting adb root."Dan Albert2015-02-191-2/+13
|\ \
| * | Document the behavior of props affecting adb root.Dan Albert2015-02-191-2/+13
| |/ | | | | | | Change-Id: Icfdc3ba696556d6db64835e61dde6f40b491d1a7
* | Fix Windows adb build.Dan Albert2015-02-193-11/+9
|/ | | | Change-Id: I560bedfcf77556b36acadc19f5dac71b3628ea2b
* Move adb_main to its own file.Dan Albert2015-02-186-379/+415
| | | | Change-Id: If6e98c089b39f73bd8f4a878a82669bfeee367f3
* Move the listener code into its own file.Dan Albert2015-02-185-280/+352
| | | | Change-Id: I7332455ed1a213daedeaa4a81260edf08b2fd131
* Move the adb auth code into its own file.Dan Albert2015-02-185-67/+108
| | | | Change-Id: I84cf0bd7777f0147119e7c6afc4096c2e93156a2
* Merge "Move emulator tracing into its own file."Dan Albert2015-02-194-54/+112
|\
| * Move emulator tracing into its own file.Dan Albert2015-02-184-54/+112
| | | | | | | | | | | | adb.c is far too monolithic. Change-Id: I4a9ee97927e4a96a38ea5859d84efac86bfdfc35
* | Fix build.Elliott Hughes2015-02-181-6/+12
| | | | | | | | Change-Id: I31fc562068ebbba5e9872ee91694feb611fc957f
* | Merge "adb: add "adb unroot" to restart adb in non-root mode"Elliott Hughes2015-02-195-37/+70
|\ \ | |/ |/|
| * adb: add "adb unroot" to restart adb in non-root modeDan Pasanen2015-02-185-37/+70
| | | | | | | | Change-Id: Ice6b94a71a62648ac073d129914a07372411fb25
* | Move USB transport code to libadb.Dan Albert2015-02-181-10/+15
|/ | | | | | | | Also note that we need both a libadb and a libadbd (for now) to differentiate between code using ADB_HOST=1 and ADB_HOST=0. Bug: 17626262 Change-Id: I873a8fb442a8a69258fe39af17781714a8fae4f6
* Merge "Add extern "C" to all the adb headers."Dan Albert2015-02-186-0/+56
|\
| * Add extern "C" to all the adb headers.Dan Albert2015-02-186-0/+56
| | | | | | | | Change-Id: Iaefa3e18d6ee2e065eb97271a796613b2a8e7d6e
* | Ignore useless cpplint messages in adb.Dan Albert2015-02-181-0/+2
|/ | | | Change-Id: I6411eb3963d215b228e50cd967a2174e5036ed73
* fix bug that passing invalid fd to fstats on win32 buildseric.yan2015-02-091-1/+1
| | | | | | | | | | lfd returned by adb_open is not the actual file desc. on win32 builds. calling through fstat with invalid fd will lead to crash, using stat instead. Change-Id: I7fdc8b825162eaa42efe8755265842c300b00e39 Signed-off-by: eric.yan <eric.yan@yulong.com> Signed-off-by: severecold <severecold@gmail.com>
* Remove netcfg's unused options.Elliott Hughes2015-02-031-1/+1
| | | | | | | Only "netcfg" for a list of interfaces and "netcfg <interface> dhcp" still seem to be used. Change-Id: I9f0b580474258fa648deb5287f98d8ec5533ca6f
* Revert "Remove netcfg's unused options."Elliott Hughes2015-02-031-1/+1
| | | | | | This reverts commit f8e83054cb8a8b13ee84a4aeeaa0a2fd8debca81. Change-Id: Iede772f96ff9008277df433dcbb5f6603de65283
* Remove netcfg's unused options.Elliott Hughes2015-02-031-1/+1
| | | | | | | Only "netcfg" for a list of interfaces and "netcfg <interface> dhcp" still seem to be used. Change-Id: Iaf499c06b09ffe5e0925339b9cd6e502f3234a86
* The bsddroid project has been dead since 2010.Elliott Hughes2015-01-313-699/+0
| | | | | | | And even if it wasn't, they should probably keep this stuff in their own repository. Change-Id: If9fa2e47ee2700098d8a99f6986f7e89fc6dfdf3