I shall test Samsung before release...

This commit is contained in:
topjohnwu 2017-03-21 04:25:49 +08:00
parent 02e039d792
commit d53f33bed8
2 changed files with 21 additions and 21 deletions

View File

@ -73,7 +73,7 @@ loopsetup() {
image_size_check() { image_size_check() {
e2fsck -yf $1 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` curUsedM=`echo "$curBlocks" | cut -d/ -f1`
curSizeM=`echo "$curBlocks" | cut -d/ -f1` curSizeM=`echo "$curBlocks" | cut -d/ -f1`
curFreeM=$(((curSizeM - curUsedM) * 4 / 1024)) curFreeM=$(((curSizeM - curUsedM) * 4 / 1024))
@ -324,6 +324,24 @@ case $1 in
chown -R 0.0 $TOOLPATH chown -R 0.0 $TOOLPATH
find $BINPATH $TOOLPATH -exec chcon -h u:object_r:system_file:s0 {} \; 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 functions should go here, not available right now
MULTIROM=false MULTIROM=false
@ -374,24 +392,6 @@ case $1 in
fi fi
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" log_print "* Preparing modules"
# Remove crap folder # Remove crap folder

View File

@ -56,8 +56,8 @@ log_print "`$BINPATH/resetprop -v -n ro.secure 1`"
log_print "`$BINPATH/resetprop -v -n ro.build.type user`" log_print "`$BINPATH/resetprop -v -n ro.build.type user`"
[ ! -z "$BUILDTAGS" -a "$BUILDTAGS" != "release-keys" ] && \ [ ! -z "$BUILDTAGS" -a "$BUILDTAGS" != "release-keys" ] && \
log_print "`$BINPATH/resetprop -v -n ro.build.tags release-keys`" log_print "`$BINPATH/resetprop -v -n ro.build.tags release-keys`"
[ ! -z "$BUILDSELINUX" -a "$BUILDSELINUX" != "0" ] && \ [ ! -z "$BUILDSELINUX" -a "$BUILDSELINUX" != "1" ] && \
log_print "`$BINPATH/resetprop -v -n ro.build.selinux 0`" log_print "`$BINPATH/resetprop -v -n ro.build.selinux 1`"
touch $MODDIR/hidelist touch $MODDIR/hidelist
chmod -R 755 $MODDIR chmod -R 755 $MODDIR