Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4943c3ea authored by Chris Gross's avatar Chris Gross
Browse files

Allow bootjars in system_ext.

Bug: 148385042
Test: Built and booted Pixel 3a both with and without a boot jar in system_ext.
Change-Id: I14274b6906eaf6ff1999f8aa0232f7fc0e8aec0b
parent b9c89bb3
Loading
Loading
Loading
Loading
+11 −4
Original line number Diff line number Diff line
@@ -81,12 +81,19 @@ bool FileDescriptorWhitelist::IsAllowed(const std::string& path) const {
  }

  // Framework jars are allowed.
  static const char* kFrameworksPrefix = "/system/framework/";
  static const char* kFrameworksPrefix[] = {
          "/system/framework/",
          "/system_ext/framework/",
  };

  static const char* kJarSuffix = ".jar";
  if (android::base::StartsWith(path, kFrameworksPrefix)

  for (const auto& frameworks_prefix : kFrameworksPrefix) {
    if (android::base::StartsWith(path, frameworks_prefix)
        && android::base::EndsWith(path, kJarSuffix)) {
      return true;
    }
  }

  // Jars from the ART APEX are allowed.
  static const char* kArtApexPrefix = "/apex/com.android.art/javalib/";