From 02a58171a9d41ad0048d6a1a48d79dee585c22a5 Mon Sep 17 00:00:00 2001 From: Victor Hsieh Date: Wed, 17 Jun 2020 11:04:49 -0700 Subject: [PATCH] Do not force to verify priv apps on boot Originally, priv apps are forced to stay verified upon reboot. fs-verity helps to postpond to verification to access time and is done by kernel. In case if fs-verity is stripped, we fall back to classic signature verification, which is slow as it touches the whole apk. As we are just starting to roll out FSI, fs-verity is not served yet and we'll be on the slow path until it's done, which will take a while. For now, disable the force verification to priv apps. Test: build Bug: 154310064 Change-Id: Ibafdb79ba2e042286c9a635ec8d9159f0af6ef06 --- .../com/android/server/pm/PackageManagerServiceUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/core/java/com/android/server/pm/PackageManagerServiceUtils.java b/services/core/java/com/android/server/pm/PackageManagerServiceUtils.java index 1fce07b0cbf13..03f4708c09c4a 100644 --- a/services/core/java/com/android/server/pm/PackageManagerServiceUtils.java +++ b/services/core/java/com/android/server/pm/PackageManagerServiceUtils.java @@ -595,8 +595,8 @@ public class PackageManagerServiceUtils { /** Returns true to force apk verification if the package is considered privileged. */ static boolean isApkVerificationForced(@Nullable PackageSetting ps) { - return ps != null && ps.isPrivileged() && ( - isApkVerityEnabled() || isLegacyApkVerityEnabled()); + // TODO(b/154310064): re-enable. + return false; } /**