summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Android.mk5
-rw-r--r--sepolicy/twrp.te1
2 files changed, 6 insertions, 0 deletions
diff --git a/Android.mk b/Android.mk
index ed32528d5..dab1b1705 100644
--- a/Android.mk
+++ b/Android.mk
@@ -17,15 +17,20 @@ LOCAL_PATH := $(call my-dir)
ifdef project-path-for
ifeq ($(LOCAL_PATH),$(call project-path-for,recovery))
PROJECT_PATH_AGREES := true
+ BOARD_SEPOLICY_DIRS += bootable/recovery-twrp/sepolicy
endif
else
ifeq ($(LOCAL_PATH),bootable/recovery)
PROJECT_PATH_AGREES := true
+ BOARD_SEPOLICY_DIRS += bootable/recovery/sepolicy
endif
endif
ifeq ($(PROJECT_PATH_AGREES),true)
+# Make recovery domain permissive for TWRP
+BOARD_SEPOLICY_UNION += twrp.te
+
include $(CLEAR_VARS)
TWRES_PATH := "/twres/"
diff --git a/sepolicy/twrp.te b/sepolicy/twrp.te
new file mode 100644
index 000000000..3ebdc4b3b
--- /dev/null
+++ b/sepolicy/twrp.te
@@ -0,0 +1 @@
+permissive recovery;