OSDN Git Service

Match vendor requires with system from VNDK Lite
authorKiyoung Kim <kiyoungkim@google.com>
Tue, 14 Apr 2020 08:39:13 +0000 (17:39 +0900)
committerKiyoung Kim <kiyoungkim@google.com>
Tue, 14 Apr 2020 09:38:46 +0000 (18:38 +0900)
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
contents/namespace/vendordefault.cc

index 38ffd2f..3ec30a4 100644 (file)
@@ -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;
 }
index cb650f1..f9b5f09 100644 (file)
@@ -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<std::string> kVndkLiteArtLibs = {
+const std::vector<std::string> 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"));