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