From 05f96a2561ff6916ecdc1ac431785ac9f7beff63 Mon Sep 17 00:00:00 2001 From: Tri Vo Date: Wed, 9 Jan 2019 15:29:07 -0800 Subject: [PATCH] init: don't restorecon root sepolicy files Removing restorecon on root sepolicy files because: 1. Under normal boot the files are properly labeled when creating the image. Restorecon'ing them successfully would require "adb remount". 2. These restorecon's are not required for recovery to function. Fixes: 122535196 Test: boot blueline Change-Id: I20b127e950b16535d4bfa9fd4e626e11228925e7 --- init/selinux.cpp | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/init/selinux.cpp b/init/selinux.cpp index 04ca207ab..e4da52c31 100644 --- a/init/selinux.cpp +++ b/init/selinux.cpp @@ -432,24 +432,6 @@ void SelinuxRestoreContext() { selinux_android_restorecon("/dev/urandom", 0); selinux_android_restorecon("/dev/__properties__", 0); - selinux_android_restorecon("/plat_file_contexts", 0); - selinux_android_restorecon("/nonplat_file_contexts", 0); - selinux_android_restorecon("/vendor_file_contexts", 0); - selinux_android_restorecon("/plat_property_contexts", 0); - selinux_android_restorecon("/nonplat_property_contexts", 0); - selinux_android_restorecon("/vendor_property_contexts", 0); - selinux_android_restorecon("/plat_seapp_contexts", 0); - selinux_android_restorecon("/nonplat_seapp_contexts", 0); - selinux_android_restorecon("/vendor_seapp_contexts", 0); - selinux_android_restorecon("/plat_service_contexts", 0); - selinux_android_restorecon("/nonplat_service_contexts", 0); - selinux_android_restorecon("/vendor_service_contexts", 0); - selinux_android_restorecon("/plat_hwservice_contexts", 0); - selinux_android_restorecon("/nonplat_hwservice_contexts", 0); - selinux_android_restorecon("/vendor_hwservice_contexts", 0); - selinux_android_restorecon("/sepolicy", 0); - selinux_android_restorecon("/vndservice_contexts", 0); - selinux_android_restorecon("/dev/block", SELINUX_ANDROID_RESTORECON_RECURSE); selinux_android_restorecon("/dev/device-mapper", 0);