From e0de11375c2ede68c73e8fd14c9771a0017df990 Mon Sep 17 00:00:00 2001 From: kam821 Date: Sun, 12 Jan 2020 03:20:17 +0100 Subject: [PATCH] v4.0.1 - minor fixes Changelog: - redirect stderr to avoid any scripts crashing --- README.md | 12 +++++++----- common/post-fs-data.sh | 12 ++++++------ common/service.sh | 2 +- module.prop | 6 +++--- uninstall.sh | 4 ++-- 5 files changed, 19 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 8b41ff0..010b4ce 100644 --- a/README.md +++ b/README.md @@ -4,18 +4,20 @@ This module increases changes to hide Magisk as much as possible ## Changelog -- V4 - Completely rewrite the code [kam821] +- v4.0.1 - redirect stderr to avoid any scripts crashing +- v4.0.0 - Completely rewrite the code [kam821] - New features: - Added configuration file: /common/safetypatch_conf - Security patch date is now possible to change - Possibility to change chmod permissions for selected files - - Rewritten regular expressions (added hiding selinux policy value) + - Hide permissive selinux state + - Rewritten regular expressions - Removed /system/bin/safetypatcher script - Upgrade to the latest module installer format - Added uninstall.sh to remove junk files after module uninstall -- V3 - Latest hachintosh5 version. -- V2 - Adds a load of stuff so that it now also has a GUI (run safetypatcher in shell as root) and also passes CTS. -- V1 - Includes fixes for OP3 and other devices with messed up cases in the bootloader +- v3 - Latest hachintosh5 version. +- v2 - Adds a load of stuff so that it now also has a GUI (run safetypatcher in shell as root) and also passes CTS. +- v1 - Includes fixes for OP3 and other devices with messed up cases in the bootloader - A1 - Initial alpha ## Requirements diff --git a/common/post-fs-data.sh b/common/post-fs-data.sh index d162803..3ff0d7b 100644 --- a/common/post-fs-data.sh +++ b/common/post-fs-data.sh @@ -9,26 +9,26 @@ MODDIR=${0%/*} # This script will be executed in post-fs-data mode [ -f "$MODDIR/safetypatch_conf" ] && . $MODDIR/safetypatch_conf || exit 0 -rm -f "${CMDLINE_TEMP_PATH}" -rm -f "${PROP_TEMP_PATH}" +rm -f "${CMDLINE_TEMP_PATH}" 2>/dev/null +rm -f "${PROP_TEMP_PATH}" 2>/dev/null if [ "$CMDLINE_REPLACE_ENABLED" = true ]; then sed "${CMDLINE_REPLACE_VALUE}" ${CMDLINE_SYSTEM_PATH} > ${CMDLINE_TEMP_PATH} - mount -o bind ${CMDLINE_TEMP_PATH} ${CMDLINE_SYSTEM_PATH} + mount -o bind ${CMDLINE_TEMP_PATH} ${CMDLINE_SYSTEM_PATH} 2>/dev/null fi if [ "$PROP_FINGERPRINT_ENABLED" = true ]; then sed "${PROP_FINGERPRINT_SED}" ${PROP_SYSTEM_PATH} > ${PROP_TEMP_PATH} - mount -o bind ${PROP_TEMP_PATH} ${PROP_SYSTEM_PATH} + mount -o bind ${PROP_TEMP_PATH} ${PROP_SYSTEM_PATH} 2>/dev/null # The build.prop thing seems to be useless, but at some point Google are sure to catch on and check in the raw build.prop to see if we're abusing getprop/resetprop. for PROP_FINGERPRINT_VAR in "${PROP_FINGERPRINT_VARS[@]}"; do - resetprop ${PROP_FINGERPRINT_VAR} "${PROP_FINGERPRINT_VALUE}" >&2 + resetprop ${PROP_FINGERPRINT_VAR} "${PROP_FINGERPRINT_VALUE}" 2>/dev/null done fi if [ "$PROP_SECURITYPATCH_ENABLED" = true ]; then for PROP_SECURITYPATCH_VAR in "${PROP_SECURITYPATCH_VARS[@]}"; do - resetprop ${PROP_SECURITYPATCH_VAR} "${PROP_SECURITYPATCH_VALUE}" >&2 + resetprop ${PROP_SECURITYPATCH_VAR} "${PROP_SECURITYPATCH_VALUE}" 2>/dev/null done fi \ No newline at end of file diff --git a/common/service.sh b/common/service.sh index db7b61f..bd08733 100644 --- a/common/service.sh +++ b/common/service.sh @@ -11,6 +11,6 @@ MODDIR=${0%/*} if [ "$CHMOD_CHANGE_ENABLED" = true ]; then for CHMOD_CHANGE_PATH in "${CHMOD_CHANGE_PATHS[@]}"; do - chmod ${CHMOD_CHANGE_VALUE} "${CHMOD_CHANGE_PATH}" >&2 + chmod ${CHMOD_CHANGE_VALUE} "${CHMOD_CHANGE_PATH}" 2>/dev/null done fi \ No newline at end of file diff --git a/module.prop b/module.prop index 976638c..7465b22 100644 --- a/module.prop +++ b/module.prop @@ -1,6 +1,6 @@ id=safetypatcher -name=SafetyPatch v4 -version=v4 -versionCode=33 +name=SafetyPatch +version=v4.0.1 +versionCode=401 author=kam821 & hackintosh5 description=Hiding some props by replacing /proc/cmdline and build.prop values \ No newline at end of file diff --git a/uninstall.sh b/uninstall.sh index d2afdc2..8e1e850 100644 --- a/uninstall.sh +++ b/uninstall.sh @@ -1,5 +1,5 @@ CMDLINE_PROP_PATH="/data/local/tmp/cmdline" PROP_TEMP_PATH="/data/local/tmp/build.prop" -rm -f "${CMDLINE_TEMP_PATH}" -rm -f "${PROP_TEMP_PATH}" \ No newline at end of file +rm -f "${CMDLINE_TEMP_PATH}" 2>/dev/null +rm -f "${PROP_TEMP_PATH}" 2>/dev/null \ No newline at end of file