From fde439ab4555a047bea49081c88218571e4bf2d9 Mon Sep 17 00:00:00 2001 From: Kiyoung Kim Date: Tue, 14 Apr 2020 17:39:13 +0900 Subject: [PATCH] Match vendor requires with system from VNDK Lite Vendor section of VNDK Lite device has search path for /system/lib, so in general VNDK Lite's vendor section's default namespace should have same scope of requires with system section's default namespace. This change updates vendor's default namespace to require libraries same from system's default namespace. Bug: 153412158 Test: m -j passed Change-Id: Ie15838b0506b3fcd617f624572f1a560eda07987 --- contents/context/context.cc | 1 + contents/namespace/vendordefault.cc | 21 +++++++++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/contents/context/context.cc b/contents/context/context.cc index 38ffd2f..3ec30a4 100644 --- a/contents/context/context.cc +++ b/contents/context/context.cc @@ -50,6 +50,7 @@ bool Context::IsLegacyConfig() const { return current_linkerconfig_type_ == LinkerConfigType::Legacy; } +// TODO(b/153944540) : Remove VNDK Lite supports bool Context::IsVndkliteConfig() const { return current_linkerconfig_type_ == LinkerConfigType::Vndklite; } diff --git a/contents/namespace/vendordefault.cc b/contents/namespace/vendordefault.cc index cb650f1..f9b5f09 100644 --- a/contents/namespace/vendordefault.cc +++ b/contents/namespace/vendordefault.cc @@ -27,18 +27,31 @@ using android::linkerconfig::modules::Namespace; namespace { // Keep in sync with the "platform" namespace in art/build/apex/ld.config.txt. -const std::vector kVndkLiteArtLibs = { +const std::vector kVndkLiteVendorRequires = { + // Keep in sync with the "platform" namespace in art/build/apex/ld.config.txt. "libdexfile_external.so", "libdexfiled_external.so", "libnativebridge.so", "libnativehelper.so", "libnativeloader.so", + "libandroidicu.so", + // TODO(b/122876336): Remove libpac.so once it's migrated to Webview + "libpac.so", // TODO(b/120786417 or b/134659294): libicuuc.so // and libicui18n.so are kept for app compat. "libicui18n.so", "libicuuc.so", - // Workaround for b/124772622 - "libandroidicu.so", + // resolv + "libnetd_resolv.so", + // nn + "libneuralnetworks.so", + // statsd + "libstatspull.so", + "libstatssocket.so", + // adbd + "libadb_pairing_auth.so", + "libadb_pairing_connection.so", + "libadb_pairing_server.so", }; } // namespace @@ -87,7 +100,7 @@ Namespace BuildVendorDefaultNamespace([[maybe_unused]] const Context& ctx) { ns.AddPermittedPath("/system/vendor", AsanPath::NONE); if (is_vndklite) { - ns.AddRequires(kVndkLiteArtLibs); + ns.AddRequires(kVndkLiteVendorRequires); } else { ns.GetLink(ctx.GetSystemNamespaceName()) .AddSharedLib(Var("LLNDK_LIBRARIES_VENDOR")); -- 2.11.0