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

Commit

Permalink
6.1.6 - minor fixes
Browse files Browse the repository at this point in the history
Changelog:
- redirect stdout to avoid any scripts crashing
- more elegant way to display own print_modname function
  • Loading branch information
kam821 committed Jan 12, 2020
1 parent 86f183b commit 10ed900
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions META-INF/com/google/android/update-binary
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ if is_legacy_script; then
set_permissions
else
unzip -o "$ZIPFILE" customize.sh -d $MODPATH >&2

grep -q '^print_modname' $MODPATH/customize.sh 2>/dev/null || print_modname

if ! grep -q '^SKIPUNZIP=1$' $MODPATH/customize.sh 2>/dev/null; then
print_modname

ui_print "- Extracting module files"
unzip -o "$ZIPFILE" -x 'META-INF/*' -d $MODPATH >&2

Expand Down
14 changes: 7 additions & 7 deletions common/post-fs-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@ ENFORCE_FILE="/data/misc/taichi_enforce"
LOG_FILE="/data/local/tmp/taichi.log"
SEPOLICY_FILE="${MODDIR}/sepolicy.rule"

rm -f "{WATCH_FILE}"
rm -f "{ENFORCE_FILE}"
rm -f "{LOG_FILE}"
rm -f "{WATCH_FILE}" 2>/dev/null
rm -f "{ENFORCE_FILE}" 2>/dev/null
rm -f "{LOG_FILE}" 2>/dev/null

# Load utility functions
[ -f "/data/adb/magisk/util_functions.sh" ] && . /data/adb/magisk/util_functions.sh
[ "${MAGISK_VER_CODE}" -ge 20110 ] && exit 0

AB_UPDATE=$(getprop ro.build.ab_update)
grep ' / ' /proc/mounts | grep -qv 'rootfs' && SAR="true" || SAR="false"
[ "${AB_UPDATE}" != "true" ] || ([ "${AB_UPDATE}" == "true" ] && [ "${SAR}" == "false" ]) && ENFORCE="true" || ENFORCE="false"
[ "${AB_UPDATE}" != "true" ] || ([ "${AB_UPDATE}" == "true" ] && [ "${SAR}" == "false" ]) && SETENFORCE="true" || SETENFORCE="false"

if ([ $(getprop ro.build.version.sdk) -ge 29 ] && [ "${ENFORCE}" == "true" ]) || [ ! -f "${SEPOLICY_FILE}" ]; then
touch "${ENFORCE_FILE}" >&2
if ([ $(getprop ro.build.version.sdk) -ge 29 ] && [ "${SETENFORCE}" == "true" ]) || [ ! -f "${SEPOLICY_FILE}" ]; then
touch "${ENFORCE_FILE}" 2>/dev/null
setenforce 0
else
grep -v '^#' < "${SEPOLICY_FILE}" | while read RULE; do
magiskpolicy --live "${RULE}"
magiskpolicy --live "${RULE}" 2>/dev/null
done
fi
6 changes: 3 additions & 3 deletions common/service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ while [ ! -f "${WATCH_FILE}" ] && [ "$timeout" -gt 0 ]; do
done

if [ ! -f "${WATCH_FILE}" ]; then
setprop ctl.restart zygote_secondary >&2
setprop ctl.restart zygote_secondary 2>/dev/null
else
rm -f "${WATCH_FILE}"
rm -f "${WATCH_FILE}" 2>/dev/null
fi

until [ $(getprop sys.boot_completed) -eq 1 ]; do
sleep 1
done

if [ -f "${ENFORCE_FILE}" ]; then
rm -f "${ENFORCE_FILE}"
rm -f "${ENFORCE_FILE}" 2>/dev/null
setenforce 1
fi
4 changes: 2 additions & 2 deletions customize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ on_install() {
set_permissions() {
ui_print "- Setting permissions"
# The following is the default rule, DO NOT remove
set_perm_recursive $MODPATH 0 0 0755 0644
# set_perm $MODPATH/system/lib/libmedia_legacy.so 0 0 0644 u:object_r:system_lib_file:s0
set_perm_recursive $MODPATH 0 0 0755 0644
# set_perm $MODPATH/system/lib/libmedia_legacy.so 0 0 0644 u:object_r:system_lib_file:s0
}

SKIPUNZIP=1
Expand Down
4 changes: 2 additions & 2 deletions module.prop
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
id=taichi
name=Taichi
version=v6.1.5
versionCode=615
version=v6.1.6
versionCode=616
author=weishu
description=Use Xposed modules with Taichi in Magisk.
8 changes: 4 additions & 4 deletions uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ WATCH_FILE="/data/misc/taichi"
ENFORCE_FILE="/data/misc/taichi_enforce"
LOG_FILE="/data/local/tmp/taichi.log"

rm -rf "${SYSTEM_DIR}"
rm -f "${WATCH_FILE}"
rm -f "${ENFORCE_FILE}"
rm -f "${LOG_FILE}"
rm -rf "${SYSTEM_DIR}" 2>/dev/null
rm -f "${WATCH_FILE}" 2>/dev/null
rm -f "${ENFORCE_FILE}" 2>/dev/null
rm -f "${LOG_FILE}" 2>/dev/null

0 comments on commit 10ed900

Please sign in to comment.