Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
topjohnwu committed Mar 19, 2017
1 parent 9f93333 commit 02e039d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
10 changes: 5 additions & 5 deletions scripts/magic_mask.sh
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ case $1 in
if [ -f $UNINSTALLER ]; then
touch /dev/.magisk.unblock
chcon u:object_r:device:s0 /dev/.magisk.unblock
sh $UNINSTALLER
BOOTMODE=true sh $UNINSTALLER
exit
fi

Expand Down Expand Up @@ -493,18 +493,18 @@ case $1 in
bind_mount $COREDIR/hosts /system/etc/hosts
fi

if [ -f /data/magisk/magisk.apk ]; then
if [ -z `ls /data/app | grep com.topjohnwu.magisk` ]; then
if [ -f $BINPATH/magisk.apk ]; then
if ! ls /data/app | grep com.topjohnwu.magisk; then
mkdir /data/app/com.topjohnwu.magisk-1
cp /data/magisk/magisk.apk /data/app/com.topjohnwu.magisk-1/base.apk
cp $BINPATH/magisk.apk /data/app/com.topjohnwu.magisk-1/base.apk
chown 1000.1000 /data/app/com.topjohnwu.magisk-1
chown 1000.1000 /data/app/com.topjohnwu.magisk-1/base.apk
chmod 755 /data/app/com.topjohnwu.magisk-1
chmod 644 /data/app/com.topjohnwu.magisk-1/base.apk
chcon u:object_r:apk_data_file:s0 /data/app/com.topjohnwu.magisk-1
chcon u:object_r:apk_data_file:s0 /data/app/com.topjohnwu.magisk-1/base.apk
fi
rm -f /data/magisk/magisk.apk 2>/dev/null
rm -f $BINPATH/magisk.apk 2>/dev/null
fi

# Expose busybox
Expand Down
3 changes: 1 addition & 2 deletions scripts/magisk_uninstaller.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Detect whether in boot mode
ps | grep zygote | grep -v grep >/dev/null && BOOTMODE=true || BOOTMODE=false
[ -z $BOOTMODE ] && BOOTMODE=false

# This path should work in any cases
TMPDIR=/dev/tmp
Expand Down
Binary file modified zip_static/common/magisk.apk
Binary file not shown.

0 comments on commit 02e039d

Please sign in to comment.