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
* Check the current adb user to choose the order of root/unroot.
* Re-root the device when finished.
Change-Id: I47a14b89e2c405bd63722e4d2043fcc629fb5e58
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
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
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
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
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
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
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
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
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>