Loading services/core/java/com/android/server/pm/PackageInstallerSession.java +15 −4 Original line number Diff line number Diff line Loading @@ -1491,12 +1491,12 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { // Inherit base if not overridden if (mResolvedBaseFile == null) { mResolvedBaseFile = new File(appInfo.getBaseCodePath()); mResolvedInheritedFiles.add(mResolvedBaseFile); resolveInheritedFile(mResolvedBaseFile); // Inherit the dex metadata if present. final File baseDexMetadataFile = DexMetadataHelper.findDexMetadataForFile(mResolvedBaseFile); if (baseDexMetadataFile != null) { mResolvedInheritedFiles.add(baseDexMetadataFile); resolveInheritedFile(baseDexMetadataFile); } baseApk = existingBase; } Loading @@ -1508,12 +1508,12 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { final File splitFile = new File(existing.splitCodePaths[i]); final boolean splitRemoved = removeSplitList.contains(splitName); if (!stagedSplits.contains(splitName) && !splitRemoved) { mResolvedInheritedFiles.add(splitFile); resolveInheritedFile(splitFile); // Inherit the dex metadata if present. final File splitDexMetadataFile = DexMetadataHelper.findDexMetadataForFile(splitFile); if (splitDexMetadataFile != null) { mResolvedInheritedFiles.add(splitDexMetadataFile); resolveInheritedFile(splitDexMetadataFile); } } } Loading Loading @@ -1627,6 +1627,17 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { mResolvedStagedFiles.add(stagedSignature); } private void resolveInheritedFile(File origFile) { mResolvedInheritedFiles.add(origFile); // Inherit the fsverity signature file if present. final File fsveritySignatureFile = new File( VerityUtils.getFsveritySignatureFilePath(origFile.getPath())); if (fsveritySignatureFile.exists()) { mResolvedInheritedFiles.add(fsveritySignatureFile); } } @GuardedBy("mLock") private void assertApkConsistentLocked(String tag, ApkLite apk) throws PackageManagerException { Loading services/core/java/com/android/server/pm/PackageManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -17153,7 +17153,7 @@ public class PackageManagerService extends IPackageManager.Stub if (!legacyMode) { // fs-verity is optional for now. Only set up if signature is provided. if (new File(signaturePath).exists()) { if (new File(signaturePath).exists() && !VerityUtils.hasFsverity(filePath)) { try { VerityUtils.setUpFsverity(filePath, signaturePath); } catch (IOException | DigestException | NoSuchAlgorithmException Loading
services/core/java/com/android/server/pm/PackageInstallerSession.java +15 −4 Original line number Diff line number Diff line Loading @@ -1491,12 +1491,12 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { // Inherit base if not overridden if (mResolvedBaseFile == null) { mResolvedBaseFile = new File(appInfo.getBaseCodePath()); mResolvedInheritedFiles.add(mResolvedBaseFile); resolveInheritedFile(mResolvedBaseFile); // Inherit the dex metadata if present. final File baseDexMetadataFile = DexMetadataHelper.findDexMetadataForFile(mResolvedBaseFile); if (baseDexMetadataFile != null) { mResolvedInheritedFiles.add(baseDexMetadataFile); resolveInheritedFile(baseDexMetadataFile); } baseApk = existingBase; } Loading @@ -1508,12 +1508,12 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { final File splitFile = new File(existing.splitCodePaths[i]); final boolean splitRemoved = removeSplitList.contains(splitName); if (!stagedSplits.contains(splitName) && !splitRemoved) { mResolvedInheritedFiles.add(splitFile); resolveInheritedFile(splitFile); // Inherit the dex metadata if present. final File splitDexMetadataFile = DexMetadataHelper.findDexMetadataForFile(splitFile); if (splitDexMetadataFile != null) { mResolvedInheritedFiles.add(splitDexMetadataFile); resolveInheritedFile(splitDexMetadataFile); } } } Loading Loading @@ -1627,6 +1627,17 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { mResolvedStagedFiles.add(stagedSignature); } private void resolveInheritedFile(File origFile) { mResolvedInheritedFiles.add(origFile); // Inherit the fsverity signature file if present. final File fsveritySignatureFile = new File( VerityUtils.getFsveritySignatureFilePath(origFile.getPath())); if (fsveritySignatureFile.exists()) { mResolvedInheritedFiles.add(fsveritySignatureFile); } } @GuardedBy("mLock") private void assertApkConsistentLocked(String tag, ApkLite apk) throws PackageManagerException { Loading
services/core/java/com/android/server/pm/PackageManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -17153,7 +17153,7 @@ public class PackageManagerService extends IPackageManager.Stub if (!legacyMode) { // fs-verity is optional for now. Only set up if signature is provided. if (new File(signaturePath).exists()) { if (new File(signaturePath).exists() && !VerityUtils.hasFsverity(filePath)) { try { VerityUtils.setUpFsverity(filePath, signaturePath); } catch (IOException | DigestException | NoSuchAlgorithmException