This will be used for parsing user-provided names to 'adb connect' and
'adb pair' in order to check for matches in the mdns service registry.
Bug: 152886765
Test: $ANDROID_HOST_OUT/nativetest64/adb_test/adb_test
--gtest_filter=mdns_utils*
Change-Id: Ifd74b4394212853c1c193a2ea64937f6a6a0ff24
We have dependencies that use libc++_shared, which results in ODR
violation manifesting as host adbd crashing on launch in libc++ locale
initialization.
Test: adbd on host
Change-Id: I6c039b325308fb8c36dfe5c1d090ff4ebe9e3433
Even though mdnsresponder seems to allow us to use _adb_secure_connect
and _adb_secure_pairing as service names, these names violate the syntax
outlined in RFC6763, and may not be compatible with other dns-sd
implementations.
Also address some comments from a previous CL.
Bug: 154268895
Test: atest adbd_test
Change-Id: Ia872e976fc4276587b500a827a41d46d9dc755dd
Add support for LZ4 compression, which compresses and decompresses far
more quickly than brotli, at the cost of worse compression ratio.
`adb sync -d system` speeds (in MB/s) on aosp_blueline-eng:
none brotli lz4
USB 3.0 120 110 190
USB 2.0 38 75 63
Bug: https://issuetracker.google.com/150827486
Test: python3 -m unittest test_device.FileOperationsTest{Uncompressed,Brotli,LZ4}
Change-Id: Ibef6ac15a76b4e5dcd02d7fb9433cbb1c02b8382
Temporarily delete adb_benchmark, since it seems difficult to make this
sensibly work with a single target that's used for both libadb and
libadbd benchmarking.
Bug: http://b/150317254
Test: treehugger
Change-Id: Ibf81fdff4f2b7304b586ce9a7955b4bc2c11484e
This code path is effectively dead in adbd, and fastboot's dependency on
libadbd makes it hard to refactor adbd's dependencies.
Bug: http://b/150317254
Test: built and flashed aosp_walleye-eng
Change-Id: I5118136d32fdcbbd011559ed0a4a71e1dc7bf064
This improves performance when syncing by up to 2x (remote cuttlefish
goes from 11.9 MB/s to 21.3 MB/s, blueline over USB 2.0 from 36 MB/s
to 70 MB/s).
This results in a slight drop in push speeds over USB 3.0 (125 -> 115
MB/s on blueline), presumably because we're compressing and extracting
on only a single thread, but the gains over lower bandwidth transports
make this worth it to submit this now and parallelize later.
Bug: https://issuetracker.google.com/150827486
Test: ADB_COMPRESSION={0, 1} test_device.py (with new/old adbd)
Change-Id: Ic2a0c974f1b6efecda115f87d336e3caac810035
This reverts commit 56a712f6c9.
Reason for revert: forward fix is at aosp/1265379
Exempt-From-Owner-Approval: relanding of an already approved CL
Change-Id: I0d93417939d570ce21f105ee4b3bae6414194dbe
Before this change, "Success" is returned after all data is streamed,
around 7.5 seconds for Megacity.
After this change, "Success" is returned in about 1.5 seconds, before
streaming finishes.
BUG: 151676293
Test: manual
Change-Id: Ifda7de48da8e82623c99ae0194f70cb162fd72fa
Merged-In: Ifda7de48da8e82623c99ae0194f70cb162fd72fa
The marked library(ies) were available to the adbd APEX via the
hand-written whitelist in build/soong/apex/apex.go. Trying to remove the
whitelist by adding apex_available property to the Android.bp of the
libraries.
Exempt-From-Owner-Approval: already +2'ed by the owner (enh)
Bug: 150999716
Bug: 151398197
Test: m
Change-Id: I8b572e3c4e76bd10c0443a6c08b72e9519243ab5
abb links against libadbd_core for the shell protocol, and must be
on the system image because it links against cmd, so let's just
expose it to abb for now.
Bug: http://b/151398197
Test: treehugger
Change-Id: Id926bc4324d3259def21ea19d3bd72320311a6e3
We were ending up with multiple copies of the proto runtime in the
recovery image, when we need zero.
Before:
784K recovery/root/system/lib64/libadbd_services.so
832K recovery/root/system/lib64/libadbd.so
After:
360K recovery/root/system/lib64/libadbd_services.so
344K recovery/root/system/lib64/libadbd.so
Bug: http://b/150317254
Test: treehugger
Change-Id: I39fbb3959128994f0de2ae0ea47dbc0800c516fe
libselinux is currently being copied to APEXes. This is risky because
the library is not designed to be portable; part of it is tied to the
specific version of the Android that it was developed for.
This change fixes the problem by declaring that the library supports
a stub with the list of C APIs that are included in the stub. Then there
is only one copy of libselinux in /system/lib and other APEXes use the
copy by dynamically linking to it.
Also, adbd no longer statically links to it, because doing so brings
libselinux in it.
Bug: 151053366
Test: m com.android.adbd. It doesn't include libselinux in it.
Test: m com.android.adbd-deps-info. then inspect
out/soong/com.android.adbd-deps-info.txt. The dependency to libselinux
is shown as '(external)'.
Change-Id: If418cbe3abdeacb759d59052e6dca4c2067678dd
liblog is a platform library that provides stable C API. There is no
need to include the library, especialy by statically linking to it, in
any APEX. It not only wastes the storage/ram, but also is incorrect
because the socket interface to logd which is implemented in liblog is
not guaranteed to be stable.
Fixing this issue by converting static_libs: ["liblog"] into
shared_libs: ["liblog"], in which case the dependency to the library
is satisfied via the stub variant of the library.
As a result, we could restrict the availablity of the library to
the platform and the runtime APEX.
Exempt-From-Owner-Approval: already approved when this was in internal
master (ag/10572699)
Bug: http://b/151051671
Bug: http://b/150827719
Test: m
Change-Id: I5aab863cb12b8767b6979255c247000a59355b0e
For currently unknown reasons, sideloading is broken with
libadbd_services as a cc_library_static.
Partial revert of commit a9b62d5452.
Bug: http://b/151056300
Test: xunchang@ tested manually
Change-Id: Iaffad9c476ba0adcffc5db512ba4a7ee0fb5cb22
Add a "track-app" service in adbd. For every debuggable or
profileable-from-shell process, ART sends related info to
adbd and adbd surfaces the info through the "track-app"
service.
The output format of "track-app" is a line summarizing
the number of reported processes, followed by a protobuf
message in human readable form. For example,
Process count: 2
process {
pid: 3307
profileable: true
architecture: "arm64"
}
process {
pid: 3341
debuggable: true
profileable: true
architecture: "arm64"
}
Bug: 149050485
Test: manually unplugged/replugged, "adb track-app",
"adb track-jdwp"
Change-Id: Id1f1a920e1afc148c7e4d2add790baab796178e1
Add some requested logging options that can be turned on at runtime
without having to restart adbd.
Bug: http://b/141959374
Test: manual
Change-Id: Ib97acc6d199e0b91238a6758e18b7cb75f8688d9
Also remove statically linking libc++, because these libraries are not
exported native shared libraries.
We are slightly over the 12MB limit for ramdisk recovery size, so let's
remove the adb pairing libraries, since they won't be used in recovery
mode.
These are only used in normal boot mode, and currently, only by adb
client. The pairing server is used by system server.
Bug: 150317254
Test: Check size of ramdisk-recovery.img in walleye, walleye-hwasam
build to be under 12MB. Also verify installed-files-recovery.txt no
longer contains libadb_pairing*.
Also put phone into recovery mode, check system/lib64 for no
libadb_pairing*.
Change-Id: Ida7c4fdc9dda2b09091b853feac8df8f125e4274
Merged-In: Ida7c4fdc9dda2b09091b853feac8df8f125e4274
(cherry picked from commit afc2cf0dec)
Exempt-From-Owner-Approval: cherry-pick
This broke because two CLs touching the Android.bp file both
independently passed presubmit, but failed when combined.
Clean up a misindentation while we're at it.
Bug: http://b/150032367
Test: mma in system/core/adb
Change-Id: I091ef9dec806c767ffb21a5fd73b2bb37ab29ff9
Bug: 111434128, 119493510, 119494503
Test: Enable wireless debugging in Settings UI, click "pair with pairing code"
to generate pairing code.
On client, 'adb pair <ip_address>', enter pairing code at prompt and hit
enter. Pairing should complete.
'adb logcat'.
Change-Id: I86527bd3fc52e30a8e08ec5843dc3e100abf91fa
Exempt-From-Owner-Approval: approved already
We were previously statically linking libcutils into adbd for several
different reasons, which were addressed as follows:
socket functions: extracted to a statically linked libcutils_network
fs_config: wrapped with a shared library on /system
ATRACE: deleted the single use in adbd
Test: treehugger
Change-Id: I821fa174cfcbfa8e29a4be10de4016b817adbaf8
Since both the client and daemon will now be generating keys.
BUG: b/111434128
Test: atest adb_crypto_test
Change-Id: I6fac562ae5629ab30b6639fbd88d822dae6e96bd
It seems like we might not be tracking dependencies properly on
devices with flattened APEXes? Add libadbd_auth to adbd's required
list to work around this for now.
Bug: http://b/148812347
Test: `ls $ANDROID_PRODUCT_OUT/system/lib/libadbd_auth.so` before and after when building a go device
Change-Id: If60abeb00797e37bf6a5a037249a21877e0b3d26
Previously, we were using the version script for only the stubs in the
library, which led to symbols from libc++_static leaking out.
Bug: http://b/148504737
Test: booted a user build
Change-Id: Ie22856f7d16cc837eb961f70195d49898bf7fb49
libadbd_auth was accidentally linked as a static library, which defeats
the entire purpose.
Test: treehugger
Test: readelf -d $ANDROID_PRODUCT_OUT/apex/com.android.adbd/bin/adbd
Change-Id: Id5b66745946a8b92e368ee5f3965275ff03e056d
Build a test apex with an INT_MAX version code for the purposes of
update/rollback testing.
Test: atest adbd_e2e_tests # in internal master
Change-Id: I0e616db03dcbc940af2741dfca5b4c5f50a5a654
liblog will soon be required for all of libbase's logging. This
change proactively requires liblog in all configurations instead of
just Android.
Bug: 119867234
Test: build
Change-Id: I696162fbebc78d4ef23c6032412101ac51d397a4
Try to not allocate as many blocks on the heap, and reuse
memory instead of copying it
Get rid of unique_ptr and shared_ptr where possible, move
the Block objects themselves
Overall this reduces the time spent in memcpy() from 30% to
15% of the whole 'adb push' command, and gets rid of about 5%
of the time spent in the malloc/free calls
Test: builds
Change-Id: I8995115274b6f08a4df13c58183c928ef384a767
required doesn't propagate from apexes, so we need a separate phony
target to track adbd's dependenecies.
Test: m
Change-Id: I4c97047dbd1c2f9b394d864aed229798f09fc9b1