From a3c9842d68fd2840a5fc949e9cd9abe01b99ee91 Mon Sep 17 00:00:00 2001 From: Howard20181 <40033067+Howard20181@users.noreply.github.com> Date: Fri, 26 Aug 2022 02:52:16 +0800 Subject: [PATCH] Fix Magisk file path error. --- scripts/run.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/run.sh b/scripts/run.sh index 0cf101f..f11ea04 100755 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -294,8 +294,8 @@ fi if [ -d "$WORK_DIR"/magisk ]; then SYSTEM_SIZE=$(( SYSTEM_SIZE + $(du --apparent-size -sB512 "$WORK_DIR"/magisk/magisk | cut -f1) )) fi -if [ -f "$DOWNLOAD_DIR"/magisk.zip ]; then - SYSTEM_SIZE=$(( SYSTEM_SIZE + $(du --apparent-size -sB512 "$DOWNLOAD_DIR"/magisk.zip | cut -f1) )) +if [ -f "$MAGISK_PATH" ]; then + SYSTEM_SIZE=$(( SYSTEM_SIZE + $(du --apparent-size -sB512 "$MAGISK_PATH" | cut -f1) )) fi if [ -d "../$ARCH/system" ]; then SYSTEM_SIZE=$(( SYSTEM_SIZE + $(du --apparent-size -sB512 "../$ARCH/system" | cut -f1) )) @@ -328,7 +328,7 @@ if [ "$ROOT_SOL" = 'magisk' ] || [ "$ROOT_SOL" = '' ]; then sudo chown root:root "$MOUNT_DIR"/sbin sudo chmod 0700 "$MOUNT_DIR"/sbin sudo cp "$WORK_DIR"/magisk/magisk/* "$MOUNT_DIR"/sbin/ - sudo cp "$DOWNLOAD_DIR"/magisk.zip "$MOUNT_DIR"/sbin/magisk.apk + sudo cp "$MAGISK_PATH" "$MOUNT_DIR"/sbin/magisk.apk sudo tee -a "$MOUNT_DIR"/sbin/loadpolicy.sh <