Commit cd5f5d70 authored by topjohnwu's avatar topjohnwu

Fix stock image dump not stored correctly

parent 44b93e7c
...@@ -89,6 +89,9 @@ if $BOOTMODE; then ...@@ -89,6 +89,9 @@ if $BOOTMODE; then
rm -rf /dev/magisk/mirror/bin 2>/dev/null rm -rf /dev/magisk/mirror/bin 2>/dev/null
fi fi
# Save our stock boot image dump before removing it
[ -f $MAGISKBIN/stock_boot* ] && mv $MAGISKBIN/stock_boot* /data
# Copy required files # Copy required files
rm -rf $MAGISKBIN 2>/dev/null rm -rf $MAGISKBIN 2>/dev/null
mkdir -p $MAGISKBIN mkdir -p $MAGISKBIN
...@@ -119,7 +122,10 @@ cd $MAGISKBIN ...@@ -119,7 +122,10 @@ cd $MAGISKBIN
# Source the boot patcher # Source the boot patcher
. $COMMONDIR/boot_patch.sh "$BOOTIMAGE" . $COMMONDIR/boot_patch.sh "$BOOTIMAGE"
[ -f stock_boot* ] && rm -f /data/stock_boot* 2>/dev/null if [ -f stock_boot* ]; then
rm -f /data/stock_boot* 2>/dev/null
mv stock_boot* /data
fi
ui_print "- Flashing new boot image" ui_print "- Flashing new boot image"
if [ -L "$BOOTIMAGE" ]; then if [ -L "$BOOTIMAGE" ]; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment