From 88c25a93905510aa513d39dca83cfda965bec16e Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Mon, 3 Oct 2016 10:16:52 +0800 Subject: [PATCH] Fix scripts --- zip_static/META-INF/com/google/android/update-binary | 2 +- zip_static/common/magic_mask.sh | 11 ----------- zip_static/roothelper/post-fs-data.sh | 6 +++--- 3 files changed, 4 insertions(+), 15 deletions(-) diff --git a/zip_static/META-INF/com/google/android/update-binary b/zip_static/META-INF/com/google/android/update-binary index cbaf9aea7..8610d7d43 100644 --- a/zip_static/META-INF/com/google/android/update-binary +++ b/zip_static/META-INF/com/google/android/update-binary @@ -426,7 +426,7 @@ fi ui_print "- Installing root helper module" cp -af $INSTALLER/roothelper /magisk/00roothelper -chmod 755 /magisk/00roothelper/post-fs-data.sh +chmod 755 /magisk/00roothelper /magisk/00roothelper/* # Patch ramdisk ui_print "- Patching ramdisk" diff --git a/zip_static/common/magic_mask.sh b/zip_static/common/magic_mask.sh index 45e8f64e1..74849c42a 100644 --- a/zip_static/common/magic_mask.sh +++ b/zip_static/common/magic_mask.sh @@ -401,15 +401,4 @@ case $1 in run_scripts service ;; - root ) - SUPATH=$(getprop magisk.supath) - ROOT=$(getprop magisk.root) - if [ "$ROOT" -eq "1" ]; then - log_print "Enabling root" - ln -s $SUPATH /magisk/.core/bin - else - log_print "Disabling root" - rm -f /magisk/.core/bin - fi - ;; esac diff --git a/zip_static/roothelper/post-fs-data.sh b/zip_static/roothelper/post-fs-data.sh index 7e1f9264f..d639ba810 100644 --- a/zip_static/roothelper/post-fs-data.sh +++ b/zip_static/roothelper/post-fs-data.sh @@ -9,10 +9,10 @@ if [ -f "launch_daemonsu.sh" ]; then cp supersu.sh /magisk/99supersu/post-fs-data.sh cp supersu.prop /magisk/99supersu/module.prop cp launch_daemonsu.sh /magisk/99supersu/launch_daemonsu.sh - chmod 755 /magisk/99supersu/* + chmod 755 /magisk/99supersu /magisk/99supersu/* else # phh mode - if [ -f "/magisk/phh/su" ]]; then + if [ -f "/magisk/phh/su" ]; then # Old version detected cp /magisk/phh/su su rm -rf /magisk/phh @@ -22,7 +22,7 @@ else cp /data/magisk/sepolicy-inject /magisk/phh/bin/sepolicy-inject cp phh.sh /magisk/phh/post-fs-data.sh cp phh.prop /magisk/phh/module.prop - chmod 755 /magisk/phh/* /magisk/phh/bin/* + chmod 755 /magisk/phh /magisk/phh/* /magisk/phh/bin/* fi fi