Fix scripts

This commit is contained in:
topjohnwu 2016-10-03 10:16:52 +08:00
parent e4ace49536
commit 88c25a9390
3 changed files with 4 additions and 15 deletions

View File

@ -426,7 +426,7 @@ fi
ui_print "- Installing root helper module" ui_print "- Installing root helper module"
cp -af $INSTALLER/roothelper /magisk/00roothelper cp -af $INSTALLER/roothelper /magisk/00roothelper
chmod 755 /magisk/00roothelper/post-fs-data.sh chmod 755 /magisk/00roothelper /magisk/00roothelper/*
# Patch ramdisk # Patch ramdisk
ui_print "- Patching ramdisk" ui_print "- Patching ramdisk"

View File

@ -401,15 +401,4 @@ case $1 in
run_scripts service 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 esac

View File

@ -9,10 +9,10 @@ if [ -f "launch_daemonsu.sh" ]; then
cp supersu.sh /magisk/99supersu/post-fs-data.sh cp supersu.sh /magisk/99supersu/post-fs-data.sh
cp supersu.prop /magisk/99supersu/module.prop cp supersu.prop /magisk/99supersu/module.prop
cp launch_daemonsu.sh /magisk/99supersu/launch_daemonsu.sh cp launch_daemonsu.sh /magisk/99supersu/launch_daemonsu.sh
chmod 755 /magisk/99supersu/* chmod 755 /magisk/99supersu /magisk/99supersu/*
else else
# phh mode # phh mode
if [ -f "/magisk/phh/su" ]]; then if [ -f "/magisk/phh/su" ]; then
# Old version detected # Old version detected
cp /magisk/phh/su su cp /magisk/phh/su su
rm -rf /magisk/phh rm -rf /magisk/phh
@ -22,7 +22,7 @@ else
cp /data/magisk/sepolicy-inject /magisk/phh/bin/sepolicy-inject cp /data/magisk/sepolicy-inject /magisk/phh/bin/sepolicy-inject
cp phh.sh /magisk/phh/post-fs-data.sh cp phh.sh /magisk/phh/post-fs-data.sh
cp phh.prop /magisk/phh/module.prop 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
fi fi