From 191a6ce91bcd4e01d76ab496ccb17854e7e8f3a4 Mon Sep 17 00:00:00 2001 From: Sebastiano Barezzi Date: Mon, 5 Sep 2022 17:09:02 +0200 Subject: [PATCH] sepolicy_vndr: legacy: Allow using logdump partition as metadata * sdm845 and sdm710 didn't have a metadata partition, but we can repurpose logdump which is a 64MB partition used to store Android logcats Change-Id: I826571d4e31f2a3f03c1d3e6a0daab262a4ccd6b (cherry picked from commit 8a5eeb6a2bfb3f1a7232199d32c1e3c2bbc0ef55) --- SEPolicy.mk | 6 ++++++ legacy/vendor/common/device.te | 3 --- legacy/vendor/common/logdump/device.te | 2 ++ 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 legacy/vendor/common/logdump/device.te diff --git a/SEPolicy.mk b/SEPolicy.mk index edd22bcf..707b3341 100755 --- a/SEPolicy.mk +++ b/SEPolicy.mk @@ -72,6 +72,12 @@ ifneq (,$(filter sdm845 sdm710, $(TARGET_BOARD_PLATFORM))) $(SEPOLICY_PATH)/legacy/vendor/ssg \ $(SEPOLICY_PATH)/legacy/vendor/common + ifeq ($(TARGET_USES_LOGDUMP_AS_METADATA),true) + BOARD_SEPOLICY_M4DEFS += logdump_partition=metadata_block_device + else + BOARD_VENDOR_SEPOLICY_DIRS += $(SEPOLICY_PATH)/legacy/vendor/common/logdump + endif + ifeq ($(TARGET_SEPOLICY_DIR),) BOARD_VENDOR_SEPOLICY_DIRS += $(SEPOLICY_PATH)/legacy/vendor/$(TARGET_BOARD_PLATFORM) else diff --git a/legacy/vendor/common/device.te b/legacy/vendor/common/device.te index 88c12ed1..b8539fd1 100644 --- a/legacy/vendor/common/device.te +++ b/legacy/vendor/common/device.te @@ -98,9 +98,6 @@ type efs_boot_dev, dev_type; #MBA debug image partition type mba_debug_dev, dev_type; -#logdump partition -type logdump_partition, dev_type; - #Bootselect partition type bootselect_device, dev_type; diff --git a/legacy/vendor/common/logdump/device.te b/legacy/vendor/common/logdump/device.te new file mode 100644 index 00000000..9ee235aa --- /dev/null +++ b/legacy/vendor/common/logdump/device.te @@ -0,0 +1,2 @@ +#logdump partition +type logdump_partition, dev_type;