From 4de51d93ef9b0fe7eb59e8b554cd70e4045691b9 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Wed, 4 Jul 2018 23:46:16 +0800 Subject: [PATCH] Tweak info when installing --- scripts/addon.d.sh | 6 +++--- scripts/boot_patch.sh | 4 ++-- scripts/flash_script.sh | 8 ++++---- scripts/util_functions.sh | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/scripts/addon.d.sh b/scripts/addon.d.sh index 2f5902adc..e978d098f 100644 --- a/scripts/addon.d.sh +++ b/scripts/addon.d.sh @@ -40,9 +40,9 @@ show_logo() { detection() { find_boot_image find_dtbo_image - [ -z $BOOTIMAGE ] && abort "! Unable to detect boot image" - ui_print "- Found boot/ramdisk image: $BOOTIMAGE" - [ -z $DTBOIMAGE ] || ui_print "- Found dtbo image: $DTBOIMAGE" + [ -z $BOOTIMAGE ] && abort "! Unable to detect target image" + ui_print "- Target image: $BOOTIMAGE" + [ -z $DTBOIMAGE ] || ui_print "- DTBO image: $DTBOIMAGE" get_flags } diff --git a/scripts/boot_patch.sh b/scripts/boot_patch.sh index 107a777ae..864c413ab 100644 --- a/scripts/boot_patch.sh +++ b/scripts/boot_patch.sh @@ -155,8 +155,8 @@ rm -f ramdisk.cpio.orig ########################################################################################## if ! $KEEPVERITY; then - [ -f dtb ] && ./magiskboot --dtb-patch dtb && ui_print "- Removing dm(avb)-verity from fstab in dtb" - [ -f extra ] && ./magiskboot --dtb-patch extra && ui_print "- Removing dm(avb)-verity from fstab in extra-dtb" + [ -f dtb ] && ./magiskboot --dtb-patch dtb && ui_print "- Removing dm(avb)-verity in dtb" + [ -f extra ] && ./magiskboot --dtb-patch extra && ui_print "- Removing dm(avb)-verity in extra-dtb" fi if [ -f kernel ]; then diff --git a/scripts/flash_script.sh b/scripts/flash_script.sh index 9750f92ca..6fb834bec 100644 --- a/scripts/flash_script.sh +++ b/scripts/flash_script.sh @@ -53,14 +53,14 @@ find_dtbo_image get_flags -[ -z $BOOTIMAGE ] && abort "! Unable to detect boot image" -ui_print "- Found boot/ramdisk image: $BOOTIMAGE" -[ -z $DTBOIMAGE ] || ui_print "- Found dtbo image: $DTBOIMAGE" +[ -z $BOOTIMAGE ] && abort "! Unable to detect target image" +ui_print "- Target image: $BOOTIMAGE" +[ -z $DTBOIMAGE ] || ui_print "- DTBO image: $DTBOIMAGE" # Detect version and architecture api_level_arch_detect -[ $API -lt 21 ] && abort "! Magisk is only for Android higher than Lollipop (5.0+) (SDK 21+)" +[ $API -lt 21 ] && abort "! Magisk is only for Lollipop and above (5.0+) (SDK 21+)" ui_print "- Device platform: $ARCH" diff --git a/scripts/util_functions.sh b/scripts/util_functions.sh index 71e5e7db5..3cfe68a38 100644 --- a/scripts/util_functions.sh +++ b/scripts/util_functions.sh @@ -219,9 +219,9 @@ find_dtbo_image() { patch_dtbo_image() { if [ ! -z $DTBOIMAGE ]; then if $MAGISKBIN/magiskboot --dtb-test $DTBOIMAGE; then - ui_print "- Backing up stock dtbo image" + ui_print "- Backing up stock DTBO image" $MAGISKBIN/magiskboot --compress $DTBOIMAGE $MAGISKBIN/stock_dtbo.img.gz - ui_print "- Patching fstab in dtbo to remove avb-verity" + ui_print "- Patching DTBO to remove avb-verity" $MAGISKBIN/magiskboot --dtb-patch $DTBOIMAGE return 0 fi