From 8d0471effcb821f031183e1ac700b11828f8da8b Mon Sep 17 00:00:00 2001 From: Gabriele M Date: Sat, 24 Mar 2018 17:01:00 +0100 Subject: [PATCH] Make updates world readable This should allow update_engine to access the file without granting the dac_override capability. Change-Id: I5d0c8792fd47e5571dbaf802b2725f99ee2dc150 --- src/org/lineageos/updater/controller/UpdaterController.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/org/lineageos/updater/controller/UpdaterController.java b/src/org/lineageos/updater/controller/UpdaterController.java index 3987a90..35c9e20 100644 --- a/src/org/lineageos/updater/controller/UpdaterController.java +++ b/src/org/lineageos/updater/controller/UpdaterController.java @@ -251,6 +251,7 @@ public class UpdaterController implements Controller { Update update = mDownloads.get(downloadId).mUpdate; File file = update.getFile(); if (file.exists() && verifyPackage(file)) { + file.setReadable(true, false); update.setPersistentStatus(UpdateStatus.Persistent.VERIFIED); mUpdatesDbHelper.changeUpdateStatus(update); update.setStatus(UpdateStatus.VERIFIED);