2016-10-03 04:34:50 +08:00
|
|
|
#!/system/bin/sh
|
|
|
|
|
|
|
|
cd /magisk/00roothelper
|
|
|
|
|
|
|
|
if [ -f "launch_daemonsu.sh" ]; then
|
|
|
|
# SuperSU mode
|
2016-10-03 11:01:24 +08:00
|
|
|
rm -rf /magisk/supersu /magisk/zzsupersu
|
|
|
|
mkdir -p /magisk/zzsupersu
|
|
|
|
cp supersu.sh /magisk/zzsupersu/post-fs-data.sh
|
|
|
|
cp supersu.prop /magisk/zzsupersu/module.prop
|
|
|
|
cp launch_daemonsu.sh /magisk/zzsupersu/launch_daemonsu.sh
|
|
|
|
chmod 755 /magisk/zzsupersu /magisk/zzsupersu/*
|
2016-10-03 04:34:50 +08:00
|
|
|
else
|
|
|
|
# phh mode
|
2016-10-03 10:16:52 +08:00
|
|
|
if [ -f "/magisk/phh/su" ]; then
|
2016-10-03 04:34:50 +08:00
|
|
|
# Old version detected
|
|
|
|
cp /magisk/phh/su su
|
|
|
|
rm -rf /magisk/phh
|
|
|
|
mkdir -p /magisk/phh/bin
|
|
|
|
mkdir -p /magisk/phh/su.d
|
|
|
|
cp su /magisk/phh/bin/su
|
|
|
|
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
|
2016-10-03 10:16:52 +08:00
|
|
|
chmod 755 /magisk/phh /magisk/phh/* /magisk/phh/bin/*
|
2016-10-03 04:34:50 +08:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
rm -rf /magisk/00roothelper
|