Merge "adbd: shrink libadbd.so, libadbd_services.so." am: cb76bf0558 am: e7d5ae30c6

Change-Id: I55dd7c315e2222584972ded39571d845a3f7fffa
This commit is contained in:
Automerger Merge Worker 2020-03-16 21:38:02 +00:00
commit 6a0d14ac15
2 changed files with 34 additions and 9 deletions

View file

@ -387,17 +387,17 @@ cc_library_static {
generated_headers: ["platform_tools_version"],
static_libs: [
"libadbconnection_server",
"libapp_processes_protos_lite",
"libdiagnose_usb",
],
shared_libs: [
"libadbconnection_server",
"libadb_crypto",
"libadb_pairing_connection",
"libadb_protos",
"libadb_tls_connection",
"libadbd_auth",
"libapp_processes_protos_lite",
"libasyncio",
"libbase",
"libcrypto",
@ -432,6 +432,7 @@ cc_library_static {
exclude_shared_libs: [
"libadb_pairing_auth",
"libadb_pairing_connection",
"libapp_processes_protos_lite",
],
}
},
@ -458,9 +459,7 @@ cc_library {
static_libs: [
"libadbconnection_server",
"libadbd_core",
"libapp_processes_protos_lite",
"libdiagnose_usb",
"libprotobuf-cpp-lite",
],
shared_libs: [
@ -470,12 +469,14 @@ cc_library {
"libadb_tls_connection",
"libadbd_auth",
"libadbd_fs",
"libapp_processes_protos_lite",
"libasyncio",
"libbase",
"libcrypto",
"libcrypto_utils",
"libcutils_sockets",
"liblog",
"libprotobuf-cpp-lite",
],
target: {
@ -514,15 +515,14 @@ cc_library {
// libminadbd wants both, as it's used to build native tests.
compile_multilib: "both",
// libadbd doesn't build any additional source, but to expose libadbd_core as a shared library.
whole_static_libs: [
"libadbconnection_server",
"libadbd_core",
"libapp_processes_protos_lite",
"libprotobuf-cpp-lite",
],
shared_libs: [
"libadbconnection_server",
"libapp_processes_protos_lite",
"libprotobuf-cpp-lite",
"libadb_crypto",
"libadb_pairing_connection",
"libadb_tls_connection",

View file

@ -16,6 +16,7 @@
#if !ADB_HOST
#if !defined(__ANDROID_RECOVERY__)
#define TRACE_TAG JDWP
#include "sysdeps.h"
@ -459,7 +460,7 @@ static int jdwp_tracker_enqueue(asocket* s, apacket::payload_type) {
return -1;
}
asocket* create_process_tracker_service_socket(TrackerKind kind) {
static asocket* create_process_tracker_service_socket(TrackerKind kind) {
auto t = std::make_unique<JdwpTracker>(kind, true);
if (!t) {
LOG(FATAL) << "failed to allocate JdwpTracker";
@ -509,4 +510,28 @@ int init_jdwp(void) {
return 0;
}
#else // !defined(__ANDROID_RECOVERY)
#include "adb.h"
asocket* create_jdwp_service_socket(void) {
return nullptr;
}
unique_fd create_jdwp_connection_fd(int pid) {
return {};
}
asocket* create_app_tracker_service_socket() {
return nullptr;
}
asocket* create_jdwp_tracker_service_socket() {
return nullptr;
}
int init_jdwp() {
return 0;
}
#endif /* defined(__ANDROID_RECOVERY__) */
#endif /* !ADB_HOST */