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

Commit fca69e95 authored by Nicolas Geoffray's avatar Nicolas Geoffray
Browse files

Add jar files from the runtime APEX in the whitelist.

Those files moved from /system to the APEX.

Test: m && boots
Change-Id: I68c4c8243dae3eab321da4b0923c1a422d300c10
parent 0d4002db
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -71,6 +71,7 @@ bool FileDescriptorWhitelist::IsAllowed(const std::string& path) const {
      return true;
  }

  // Framework jars are allowed.
  static const char* kFrameworksPrefix = "/system/framework/";
  static const char* kJarSuffix = ".jar";
  if (android::base::StartsWith(path, kFrameworksPrefix)
@@ -78,6 +79,13 @@ bool FileDescriptorWhitelist::IsAllowed(const std::string& path) const {
    return true;
  }

  // Jars from the runtime apex are allowed.
  static const char* kRuntimeApexPrefix = "/apex/com.android.runtime/javalib/";
  if (android::base::StartsWith(path, kRuntimeApexPrefix)
      && android::base::EndsWith(path, kJarSuffix)) {
    return true;
  }

  // Whitelist files needed for Runtime Resource Overlay, like these:
  // /system/vendor/overlay/framework-res.apk
  // /system/vendor/overlay-subdir/pg/framework-res.apk