From ae1322b907f140808844cd36864f6801c65ee871 Mon Sep 17 00:00:00 2001 From: Chris Renshaw Date: Sat, 1 Jun 2024 01:50:52 -0300 Subject: [PATCH] Work around AOSPA PropImitationHooks conflict --- module/common_setup.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/module/common_setup.sh b/module/common_setup.sh index 73ddc32..f75a8b2 100644 --- a/module/common_setup.sh +++ b/module/common_setup.sh @@ -58,3 +58,10 @@ for APP in $(grep -v '^#' $LIST); do fi fi done + +# Work around AOSPA PropImitationHooks conflict when their persist props don't exist +if [ -n "$(resetprop ro.aospa.version)" ]; then + for PROP in persist.sys.pihooks.first_api_level persist.sys.pihooks.security_patch; do + resetprop | grep -q "\[$PROP\]" || resetprop -n -p "$PROP" ""; + done; +fi;