From 7f247bc70071b84ab59486035f04b736853682c9 Mon Sep 17 00:00:00 2001 From: shizhx Date: Sat, 26 Aug 2023 19:20:12 +0800 Subject: [PATCH] feat: support KernelSU --- .gitignore | 3 ++- src/customize.sh | 10 +++++++++- src/module.prop | 4 ++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index cb84db4..a365e26 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -LogDisablerLite.zip \ No newline at end of file +LogDisablerLite*.zip +*.so \ No newline at end of file diff --git a/src/customize.sh b/src/customize.sh index 5253bf8..9c98e26 100755 --- a/src/customize.sh +++ b/src/customize.sh @@ -140,4 +140,12 @@ fi mkdir -p "${MODPATH}/${TARGET_DIR}" || abort "Failed to create ${MODPATH}/${TARGET_DIR}" cp -f "${TMPDIR}/${PATCHED_LIB}" "${MODPATH}/${TARGET_DIR}/${TARGET_LIB}" || abort "Failed to copy patched lib to target" -ui_print "Success to patch ${TARGET_DIR}/${TARGET_LIB}, reboot to take effect!" +ui_print "Success to copy patched liblog.so to ${MODPATH}/${TARGET_DIR}/${TARGET_LIB}" + +# set SELinux context on KernelSU +if [ "$KSU" ]; then + chcon "u:object_r:system_lib_file:s0" "${MODPATH}/${TARGET_DIR}/${TARGET_LIB}" + ui_print "Success to set SELinux context for liblog.so" +fi + +ui_print "Reboot to take effect!" diff --git a/src/module.prop b/src/module.prop index b49cc05..2c6e369 100644 --- a/src/module.prop +++ b/src/module.prop @@ -1,6 +1,6 @@ id=logddisablerlite name=LogDisablerLite -version=1.3 -versionCode=4 +version=1.4 +versionCode=5 author=shizhx@github description=Disable Logging to logcat \ No newline at end of file