scripts: add nand/mtd support to uninstaller
This commit is contained in:
parent
d7cd1b37f8
commit
91b6d2852a
@ -67,6 +67,12 @@ cd $MAGISKBIN
|
||||
CHROMEOS=false
|
||||
|
||||
ui_print "- Unpacking boot image"
|
||||
# Dump image for MTD/NAND character device boot partitions
|
||||
if [ -c $BOOTIMAGE ]; then
|
||||
nanddump -f boot.img $BOOTIMAGE
|
||||
BOOTNAND=$BOOTIMAGE
|
||||
BOOTIMAGE=boot.img
|
||||
fi
|
||||
./magiskboot unpack "$BOOTIMAGE"
|
||||
|
||||
case $? in
|
||||
@ -79,6 +85,9 @@ case $? in
|
||||
;;
|
||||
esac
|
||||
|
||||
# Restore the original boot partition path
|
||||
[ "$BOOTNAND" ] && BOOTIMAGE=$BOOTNAND
|
||||
|
||||
# Detect boot image state
|
||||
ui_print "- Checking ramdisk status"
|
||||
if [ -e ramdisk.cpio ]; then
|
||||
@ -142,10 +151,10 @@ fi
|
||||
cd /
|
||||
|
||||
if $BOOTMODE; then
|
||||
ui_print "**********************************************"
|
||||
ui_print "* Magisk Manager will uninstall itself, and *"
|
||||
ui_print "* the device will reboot after a few seconds *"
|
||||
ui_print "**********************************************"
|
||||
ui_print "********************************************"
|
||||
ui_print " Magisk Manager will uninstall itself, and"
|
||||
ui_print " the device will reboot after a few seconds"
|
||||
ui_print "********************************************"
|
||||
(sleep 8; /system/bin/reboot)&
|
||||
else
|
||||
rm -rf /data/user*/*/*magisk* /data/app/*magisk*
|
||||
|
Loading…
Reference in New Issue
Block a user