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
Extend the file sync protocol to support calling regular stat (instead
of lstat), return error codes, and provide the entire stat struct.
Bug: http://b/33058958
Test: python test_device.py with both old and new adbd
Change-Id: I841123debc380f86194a19e91c97d85160112144