adbd: remove static dependency on libcutils.
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
diff --git a/adb/Android.bp b/adb/Android.bp
index 32581a2..6d4db23 100644
--- a/adb/Android.bp
+++ b/adb/Android.bp
@@ -114,66 +114,6 @@
},
}
-// libadbconnection
-// =========================================================
-// libadbconnection_client/server implement the socket handling for jdwp
-// forwarding and the track-jdwp service.
-cc_library {
- name: "libadbconnection_server",
- srcs: ["adbconnection/adbconnection_server.cpp"],
-
- export_include_dirs: ["adbconnection/include"],
-
- stl: "libc++_static",
- shared_libs: ["liblog"],
- static_libs: ["libbase"],
-
- defaults: ["adbd_defaults", "host_adbd_supported"],
-
- // Avoid getting duplicate symbol of android::build::getbuildnumber().
- use_version_lib: false,
-
- recovery_available: true,
- compile_multilib: "both",
-}
-
-cc_library {
- name: "libadbconnection_client",
- srcs: ["adbconnection/adbconnection_client.cpp"],
-
- export_include_dirs: ["adbconnection/include"],
-
- stl: "libc++_static",
- shared_libs: ["liblog"],
- static_libs: ["libbase"],
-
- defaults: ["adbd_defaults"],
- visibility: [
- "//art:__subpackages__",
- "//system/core/adb/apex:__subpackages__",
- ],
- apex_available: [
- "com.android.adbd",
- "test_com.android.adbd",
- ],
-
- // libadbconnection_client doesn't need an embedded build number.
- use_version_lib: false,
-
- target: {
- linux: {
- version_script: "adbconnection/libadbconnection_client.map.txt",
- },
- },
- stubs: {
- symbol_file: "adbconnection/libadbconnection_client.map.txt",
- versions: ["1"],
- },
-
- host_supported: true,
- compile_multilib: "both",
-}
-
// libadb
// =========================================================
// These files are compiled for both the host and the device.
@@ -435,7 +375,6 @@
"libbase",
"libcrypto",
"libcrypto_utils",
- "libcutils",
"liblog",
],
@@ -459,7 +398,7 @@
},
}
-cc_library {
+cc_library_static {
name: "libadbd_services",
defaults: ["adbd_defaults", "host_adbd_supported"],
recovery_available: true,
@@ -485,11 +424,11 @@
shared_libs: [
"libadbd_auth",
+ "libadbd_fs",
"libasyncio",
"libbase",
"libcrypto",
"libcrypto_utils",
- "libcutils",
"liblog",
],
@@ -533,13 +472,19 @@
shared_libs: [
"libadbd_auth",
- "libadbd_services",
+ "libadbd_fs",
"libasyncio",
"libbase",
"libcrypto",
"libcrypto_utils",
- "libcutils",
"liblog",
+ "libselinux",
+ ],
+
+ static_libs: [
+ "libadbd_services",
+ "libcutils_sockets",
+ "libdiagnose_usb",
],
export_include_dirs: [
@@ -574,7 +519,7 @@
"libbase",
"libcap",
"libcrypto_utils",
- "libcutils",
+ "libcutils_sockets",
"libdiagnose_usb",
"liblog",
"libmdnssd",
@@ -584,10 +529,14 @@
shared_libs: [
"libadbd_auth",
+ "libadbd_fs",
"libcrypto",
],
- required: ["libadbd_auth"],
+ required: [
+ "libadbd_auth",
+ "libadbd_fs",
+ ],
}
phony {
@@ -660,9 +609,9 @@
"libadbd",
"libadbd_auth",
"libbase",
- "libcutils",
"libcrypto_utils",
"libcrypto_static",
+ "libcutils_sockets",
"libdiagnose_usb",
"liblog",
"libusb",