mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-24 18:47:38 +00:00
I shall test Samsung before release...
This commit is contained in:
parent
02e039d792
commit
d53f33bed8
@ -73,7 +73,7 @@ loopsetup() {
|
||||
|
||||
image_size_check() {
|
||||
e2fsck -yf $1
|
||||
curBlocks=`e2fsck -n $1 2>/dev/null | cut -d, -f3 | cut -d\ -f2`;
|
||||
curBlocks=`e2fsck -n $1 2>/dev/null | grep $1 | cut -d, -f3 | cut -d\ -f2`;
|
||||
curUsedM=`echo "$curBlocks" | cut -d/ -f1`
|
||||
curSizeM=`echo "$curBlocks" | cut -d/ -f1`
|
||||
curFreeM=$(((curSizeM - curUsedM) * 4 / 1024))
|
||||
@ -324,6 +324,24 @@ case $1 in
|
||||
chown -R 0.0 $TOOLPATH
|
||||
find $BINPATH $TOOLPATH -exec chcon -h u:object_r:system_file:s0 {} \;
|
||||
|
||||
log_print "* Linking binaries to /sbin"
|
||||
mount -o rw,remount rootfs /
|
||||
chmod 755 /sbin
|
||||
ln -sf $BINPATH/magiskpolicy /sbin/magiskpolicy
|
||||
ln -sf $BINPATH/magiskpolicy /sbin/sepolicy-inject
|
||||
ln -sf $BINPATH/resetprop /sbin/resetprop
|
||||
if [ ! -f /sbin/launch_daemonsu.sh ]; then
|
||||
log_print "* Starting MagiskSU"
|
||||
export PATH=$OLDPATH
|
||||
ln -sf $BINPATH/su /sbin/su
|
||||
ln -sf $BINPATH/magiskpolicy /sbin/supolicy
|
||||
/sbin/su --daemon
|
||||
export PATH=$TOOLPATH:$OLDPATH
|
||||
fi
|
||||
mount -o ro,remount rootfs /
|
||||
|
||||
[ -f $DISABLEFILE ] && unblock
|
||||
|
||||
# Multirom functions should go here, not available right now
|
||||
MULTIROM=false
|
||||
|
||||
@ -374,24 +392,6 @@ case $1 in
|
||||
fi
|
||||
fi
|
||||
|
||||
log_print "* Linking binaries to /sbin"
|
||||
mount -o rw,remount rootfs /
|
||||
chmod 755 /sbin
|
||||
ln -sf $BINPATH/magiskpolicy /sbin/magiskpolicy
|
||||
ln -sf $BINPATH/magiskpolicy /sbin/sepolicy-inject
|
||||
ln -sf $BINPATH/resetprop /sbin/resetprop
|
||||
if [ ! -f /sbin/launch_daemonsu.sh ]; then
|
||||
log_print "* Starting MagiskSU"
|
||||
export PATH=$OLDPATH
|
||||
ln -sf $BINPATH/su /sbin/su
|
||||
ln -sf $BINPATH/magiskpolicy /sbin/supolicy
|
||||
/sbin/su --daemon
|
||||
export PATH=$TOOLPATH:$OLDPATH
|
||||
fi
|
||||
mount -o ro,remount rootfs /
|
||||
|
||||
[ -f $DISABLEFILE ] && unblock
|
||||
|
||||
log_print "* Preparing modules"
|
||||
|
||||
# Remove crap folder
|
||||
|
@ -56,8 +56,8 @@ log_print "`$BINPATH/resetprop -v -n ro.secure 1`"
|
||||
log_print "`$BINPATH/resetprop -v -n ro.build.type user`"
|
||||
[ ! -z "$BUILDTAGS" -a "$BUILDTAGS" != "release-keys" ] && \
|
||||
log_print "`$BINPATH/resetprop -v -n ro.build.tags release-keys`"
|
||||
[ ! -z "$BUILDSELINUX" -a "$BUILDSELINUX" != "0" ] && \
|
||||
log_print "`$BINPATH/resetprop -v -n ro.build.selinux 0`"
|
||||
[ ! -z "$BUILDSELINUX" -a "$BUILDSELINUX" != "1" ] && \
|
||||
log_print "`$BINPATH/resetprop -v -n ro.build.selinux 1`"
|
||||
|
||||
touch $MODDIR/hidelist
|
||||
chmod -R 755 $MODDIR
|
||||
|
Loading…
x
Reference in New Issue
Block a user