Update build script and remove redundant file

This commit is contained in:
topjohnwu 2017-03-19 05:02:20 +08:00
parent 0d10b812fe
commit 9f9333315e
3 changed files with 0 additions and 30 deletions

View File

@ -103,7 +103,6 @@ EXIT /B %ERRORLEVEL%
ECHO * Copying Files
ECHO ************************
COPY /Y scripts\ramdisk_patch.sh zip_static\common\ramdisk_patch.sh
COPY /Y scripts\magisksu.sh zip_static\common\magisksu.sh
COPY /Y scripts\init.magisk.rc zip_static\common\init.magisk.rc
COPY /Y binaries\busybox-arm zip_static\arm\busybox
COPY /Y binaries\busybox-arm64 zip_static\arm64\busybox

View File

@ -76,7 +76,6 @@ zip_package() {
echo "* Copying files"
echo "************************"
cp -afv scripts/ramdisk_patch.sh zip_static/common/ramdisk_patch.sh
cp -afv scripts/magisksu.sh zip_static/common/magisksu.sh
cp -afv scripts/init.magisk.rc zip_static/common/init.magisk.rc
cp -afv binaries/busybox-arm zip_static/arm/busybox
cp -afv binaries/busybox-arm64 zip_static/arm64/busybox

View File

@ -1,28 +0,0 @@
#!/system/bin/sh
MODDIR=${0%/*}
LOGFILE=/cache/magisk.log
log_print() {
echo "MagiskSU: $1"
echo "MagiskSU: $1" >> $LOGFILE
log -p i -t Magisk "MagiskSU: $1"
}
log_print "Moving and linking /sbin binaries"
mount -o rw,remount rootfs /
cp -af /sbin /sbin_orig
mount -o ro,remount rootfs /
log_print "Exposing su binary"
rm -rf /magisk/.core/bin $MODDIR/sbin_bind
mkdir -p $MODDIR/sbin_bind
ln -s /sbin_orig/* $MODDIR/sbin_bind
chcon -h u:object_r:rootfs:s0 $MODDIR/sbin_bind/*
chmod 755 $MODDIR/sbin_bind
ln -s $MODDIR/su $MODDIR/sbin_bind/su
ln -s /data/magisk/magiskpolicy $MODDIR/sbin_bind/magiskpolicy
mount -o bind $MODDIR/sbin_bind /sbin
log_print "Starting su daemon"
/sbin/su --daemon