From c3a6179a214111481f6e25a35f9733a0872f4f17 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Thu, 5 Jul 2018 17:29:13 +0800 Subject: [PATCH] Update scripts --- scripts/addon.d.sh | 2 +- scripts/util_functions.sh | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/addon.d.sh b/scripts/addon.d.sh index e978d098f..ee4c958be 100644 --- a/scripts/addon.d.sh +++ b/scripts/addon.d.sh @@ -124,7 +124,7 @@ case "$1" in # addon.d-v2 main_v2 else - OUTFD=1 + OUTFD= get_outfd # Run in background, hack for addon.d-v1 (main_v1) & diff --git a/scripts/util_functions.sh b/scripts/util_functions.sh index 3cfe68a38..706755173 100644 --- a/scripts/util_functions.sh +++ b/scripts/util_functions.sh @@ -23,7 +23,7 @@ BOOTSIGNER="/system/bin/dalvikvm -Xnodex2oat -Xnoimage-dex2oat -cp \$APK com.top BOOTSIGNED=false get_outfd() { - if [ $OUTFD -eq 1 ]; then + if [ -z $OUTFD ] || readlink /proc/self/fd/$OUTFD | grep -q /tmp; then # We will have to manually find out OUTFD for FD in `ls /proc/self/fd`; do if readlink /proc/self/fd/$FD | grep -q pipe; then @@ -162,11 +162,9 @@ run_migrations() { fi # Move the stock backups if [ -f /data/magisk/stock_boot* ]; then - rm -rf /data/stock_boot* mv /data/magisk/stock_boot* /data 2>/dev/null fi if [ -f /data/adb/magisk/stock_boot* ]; then - rm -rf /data/stock_boot* mv /data/adb/magisk/stock_boot* /data 2>/dev/null fi # Remove old dbs