Test: Was able to discover a raspberry pi.
Bug: 28074466
(cherry picked from e292cd16760321fccc99c8c261cb92fa4b6462ab)
Change-Id: Id9571576457a4a0a078e48a274a4e8eac78bfe2b
Now all devices won't appear as "Android." Should make it easier to
multiplex.
Test: Verified locally on a raspberry pi 3
Bug: 28887278
(cherry picked from 815b23319635d264ae0ce2c8c29a5776a57b8051)
Change-Id: Icfd0116477543af6a3049c14d818c1cff7fc3b93
We now request mdnsd from adb and register a service of type _adb._tcp
for clients to connect to.
Test: Verified service appears in avahi-browse
Bug: 28074466
(cherry picked from 379ac414e4d9f53388d903913022a55695292775)
Change-Id: Ie871b9c8b40e86063cc1e68e8f3e4290ead2d279
Traditionally, qemu_pipe has both the declaration and implentation of each
function in one header file--qemu_pipe.h, and it is getting incovenient to
maintain.
This CL separates the implementation of functions from the header file,
and makes qemu_pipe a static library for other modules to link to.
Note that the interface and implementation of qemu_pipe are kept unchanged,
and future CLs will enhance the implementation to make it more reliable and
more compatible with old and new API levels.
Following projects are affected by this refactoring, and they are modified
accordingly:
device/generic/goldfish
device/generic/goldfish-opengl
hardware/ril/reference-ril
Change-Id: I541ecbf0cc7eadeef9d4e37ffd9ca7bfcc5c94c0
adb already provides an implementation of dirname and basename that
take and produce std::strings, move it into libbase so it can be
used in the implementation of GetExecutableDirectory.
Test: out/host/linux-x86/nativetest64/adb_test/adb_test
Test: out/host/linux-x86/nativetest64/libbase_test/libbase_test
Test: adb shell /data/nativetest64/libbase_test/libbase_test64
Change-Id: Ideb1627607b14562121316d4ed27fa6fb0930684
verity toggle through adb failed to work for early mount due to fstab
entries being moved into kernel/dt. This change fixes that by using the
new fs_mgr_read_fstab_default() api that will make sure all fstab
entries (from dt as well as from /fstab.{ro.hardware}) are combined
before returning the fstab object.
b/27805372
Test: early mount /system and /vendor on angler.
- test adb disable-verity && adb root to ensure rebooted instance
doesn't have 'partition.system.verified' property set. i.e. verity is
indeed disabled.
- test adb enable-verity && adb root to ensure rebooted instance does
have 'partition.system.verified' property set, i.e. verity is enabled.
also verified by trying to do 'adb remount' which correctly warns about
verity
Change-Id: Iffdcc0a0b959a65c326219bd4e9e41cba9ec7c88
Signed-off-by: Sandeep Patil <sspatil@google.com>
Add a 'host-features' command to get the features of the currently
running host adb server. Abuse it to report libusb status.
Bug: http://b/34983123
Test: adb host-features; adb kill-server; ADB_LIBUSB=1 adb start-server; adb host-features
Change-Id: I0e8d503a2dbdff9002ebb6ce8a298498a9421422
Explicitly link against the static libwinpthread.a to avoid a
dependency on the dll.
Also, make the tests link against libbase statically.
Bug: http://b/31665213
Test: wine adb.exe
Test: wine adb_test.exe
Change-Id: Ifd41afcb1756a4b9b6db12e102b4db502e73d846
Sometimes when endpoint_alloc returns ENODEV,
max_rw will end up being a value that is too
big.
Bug: 35634401
Test: push/pull files
Change-Id: Iaa81a3311b1855e2a835562cdf7a46ff4399feb1
POSIX lets you choose whether or not SIGPIPE disposition is inherited,
and Linux chose "yes". Work around that.
Bug: http://b/35209888
Test: "ps -A | head" without the toybox workaround
Change-Id: I6b5afa3d87eb2af04b24c6c37fa338ab60ad2336
This allows reliable use of larger buffer sizes.
Max r/w size is set only when that preallocation
is successful so that memory is guaranteed to be
available.
Bug: 31722483
Test: adb push with multi GB files
Change-Id: Ia0459ca051988abb144645871792e8f840dd3ff7
Print actual usage messages in most cases.
Add --help and --version.
Bug: http://b/28054087
Test: manual
Change-Id: I39c1cb7a84f52e0c35d24f140ec55c3a181283fb
The first time you run adb, it starts the adbd server and annoyingly
generates the following message:
adb I 02-01 11:57:58 99717 99717 usb_dispatch.cpp:30] using native
backend
Drop the severity of the message to avoid visible spammy messages only
intended for debugging.
Test: code compiles and no more log message in normal adb use
Change-Id: I882092a6cd14bc67980d88416397d51ab8393b1b
Add a libusb-based implementation alongside the existing native
implementations, controlled by the ADB_LIBUSB environment variable.
Windows will need more work for the usb driver.
Bug: http://b/31321337
Test: python test_device.py on linux/darwin, with ADB_LIBUSB=0 and 1
Change-Id: Ib68fb2c6c05475eae3ff4cc19f55802a6f489bb7
Break adbd's USB initialization code into its own static library to
allow it to be used by benchmark code that pretends to be adbd.
Bug: http://b/31289465
Test: adb shell works on bullhead
Change-Id: I0ac7d78a4f7aef59bd6d14fc5cf1ed870e1f3a9d
Remove debuggerd in favor of a helper process that gets execed by
crashing processes.
Bug: http://b/30705528
Test: debuggerd_test
Change-Id: I9906c69473989cbf7fe5ea6cccf9a9c563d75906
Everything should be using the functionfs interface instead by now.
Bug: http://b/34228376
Test: grepping for f_adb, android_adb in source tree
Test: m
Change-Id: I6bc41049c49a867499832588dac8ed108c636c11
We used to write the command file (/cache/recovery/command) to trigger
the sideload mode. A/B devices don't support that (may not have /cache
paritition). This CL switches to using libbootloader_message which
writes the command to BCB (bootloader control block) instead.
Test: "adb root && adb reboot sideload" reboots sailfish into recovery
sideload mode.
Change-Id: I158fd7cbcfa9a5d0609f1f684a2d03675217628f
Don't require the extension on explicit file paths passed on; only
check for it in monitored directories.
Bug: http://b/33638233
Test: ADB_TRACE=1 ADB_VENDOR_KEYS=$HOME/foo adb server nodaemon
Change-Id: I7387e0bbe0f2e16878bf22b05d5c6e8d0f9e5a92
The ADB trace enum value collided with the 0 values used to mean all, hence it
was not possible to just trace the ADB tagged messages without also tracing everything else.
Change-Id: I15ff9c50c4ac01806c4841cf8213ce859faf130b
Test: Manually by setting ADB_TRACE and running adb, e.g. "ADB_TRACE=adb adb shell ls"
install_listener can fail if we told a previous adb server to quit and
it hasn't finished doing so yet. Retry it for a few hundred
milliseconds to avoid this.
Bug: http://b/28618716
Test: nc -l 5037; adb server nodaemon
Change-Id: Ibbda8f2718b85a2b6a08985aa8d29aa2204a3ead
We do a remote stat to get the file's size before pulling in sync_recv,
but all of the callers to sync_recv have already done a stat. Pass the
expected file size into sync_recv to remove its stat.
Bug: http://b/31289465
Test: python test_device.py
Change-Id: I7ca8ed11c6134e5954acac86626f880ade3ec696
This reverts commit afa4b5d6eb.
Add functions to translate errno to and from the linux asm-generic
values, since mips has different values.
Bug: http://b/33058958
Test: python test_device.py with both old and new adbd
Change-Id: I1a122235f3e793ed10b3bf3ad293388015134150