Skip to content
This repository has been archived by the owner on Dec 31, 2020. It is now read-only.

Commit

Permalink
v4.0.1 - minor fixes
Browse files Browse the repository at this point in the history
Changelog:
- redirect stderr to avoid any scripts crashing
  • Loading branch information
kam821 committed Jan 12, 2020
1 parent cc7859d commit e0de113
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 17 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions common/post-fs-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion common/service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions module.prop
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions uninstall.sh
Original file line number Diff line number Diff line change
@@ -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}"
rm -f "${CMDLINE_TEMP_PATH}" 2>/dev/null
rm -f "${PROP_TEMP_PATH}" 2>/dev/null

0 comments on commit e0de113

Please sign in to comment.