mirror of
https://github.com/kvorschk/Magisk.git
synced 2026-12-06 07:20:47 -05:00
Fix uninstaller
This commit is contained in:
@@ -12,11 +12,12 @@
|
||||
# Preparation
|
||||
##########################################################################################
|
||||
|
||||
BOOTMODE=false
|
||||
# This path should work in any cases
|
||||
TMPDIR=/dev/tmp
|
||||
|
||||
INSTALLER=$TMPDIR/install
|
||||
CHROMEDIR=$INSTALLER/chromeos
|
||||
|
||||
# Default permissions
|
||||
umask 022
|
||||
|
||||
@@ -30,6 +31,7 @@ fi
|
||||
|
||||
# Load utility functions
|
||||
. $INSTALLER/util_functions.sh
|
||||
|
||||
get_outfd
|
||||
|
||||
##########################################################################################
|
||||
@@ -42,23 +44,23 @@ ui_print "************************"
|
||||
|
||||
is_mounted /data || mount /data || abort "! Unable to mount partitions"
|
||||
is_mounted /cache || mount /cache 2>/dev/null
|
||||
mount_partitions
|
||||
|
||||
api_level_arch_detect
|
||||
|
||||
ui_print "- Device platform: $ARCH"
|
||||
CHROMEDIR=$INSTALLER/chromeos
|
||||
BINDIR=$INSTALLER/$ARCH32
|
||||
chmod -R 755 $CHROMEDIR $BINDIR
|
||||
|
||||
##########################################################################################
|
||||
# Detection all done, start installing
|
||||
##########################################################################################
|
||||
|
||||
if is_mounted /data; then
|
||||
check_data
|
||||
|
||||
if $DATA_DE; then
|
||||
recovery_actions
|
||||
# Save our stock boot image dump before removing it
|
||||
mv $MAGISKBIN/stock_boot* /data 2>/dev/null
|
||||
# Copy the binaries to /data/magisk, in case they do not exist
|
||||
rm -rf $MAGISKBIN 2>/dev/null
|
||||
mkdir -p $MAGISKBIN
|
||||
cp -af $BINDIR/. $CHROMEDIR $TMPDIR/bin/busybox $INSTALLER/util_functions.sh $MAGISKBIN
|
||||
|
||||
Reference in New Issue
Block a user