mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-06-12 13:17:39 +02:00
@ -65,7 +65,7 @@ installation() {
|
||||
. ./boot_patch.sh "$BOOTIMAGE"
|
||||
|
||||
ui_print "- Flashing new boot image"
|
||||
flash_image new-boot.img "$BOOTIMAGE"
|
||||
flash_image new-boot.img "$BOOTIMAGE" || abort "! Insufficient partition size"
|
||||
rm -f new-boot.img
|
||||
|
||||
if [ -f stock_boot* ]; then
|
||||
|
@ -115,7 +115,7 @@ cd $MAGISKBIN
|
||||
. ./boot_patch.sh "$BOOTIMAGE"
|
||||
|
||||
ui_print "- Flashing new boot image"
|
||||
flash_image new-boot.img "$BOOTIMAGE"
|
||||
flash_image new-boot.img "$BOOTIMAGE" || abort "! Insufficient partition size"
|
||||
rm -f new-boot.img
|
||||
|
||||
if [ -f stock_boot* ]; then
|
||||
|
@ -114,7 +114,7 @@ case $? in
|
||||
# Sign chromeos boot
|
||||
$CHROMEOS && sign_chromeos
|
||||
ui_print "- Flashing restored boot image"
|
||||
flash_image new-boot.img $BOOTIMAGE
|
||||
flash_image new-boot.img $BOOTIMAGE || abort "! Insufficient partition size"
|
||||
fi
|
||||
;;
|
||||
2 ) # Other patched
|
||||
|
@ -203,11 +203,15 @@ flash_image() {
|
||||
COM2="cat -"
|
||||
fi
|
||||
if [ -b "$2" ]; then
|
||||
local s_size=`stat -c '%s' "$1"`
|
||||
local t_size=`blockdev --getsize64 "$2"`
|
||||
[ $s_size -gt $t_size ] && return 1
|
||||
eval $COM1 | eval $COM2 | cat - /dev/zero > "$2" 2>/dev/null
|
||||
else
|
||||
ui_print "- Not block device, storing image"
|
||||
eval $COM1 | eval $COM2 > "$2" 2>/dev/null
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
find_dtbo_image() {
|
||||
|
Reference in New Issue
Block a user