bugfix
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
Lo=0
|
||||
|
||||
#備份時檢查資料夾是否存在已經卸載應用 有則音量鍵選擇刪除或是移動到恢復資料夾/被卸載的應用
|
||||
delete_folder=1
|
||||
delete_folder=0
|
||||
|
||||
#自定義備份目錄輸出位置 (忽略為空將默認腳本路徑中)
|
||||
Output_path=
|
||||
|
||||
@@ -20,7 +20,7 @@ else
|
||||
echo "Magisk busybox Path does not exist"
|
||||
fi
|
||||
export PATH="$PATH"
|
||||
backup_version="V14.4"
|
||||
backup_version="V14.5"
|
||||
#設置二進制命令目錄位置
|
||||
[[ $bin_path = "" ]] && echo "未正確指定bin.sh位置" && exit 2
|
||||
#bin_path="${bin_path/'/storage/emulated/'/'/data/media/'}"
|
||||
|
||||
@@ -497,6 +497,7 @@ backup)
|
||||
#備份user數據
|
||||
[[ $Backup_user_data = true ]] && Backup_data "user"
|
||||
[[ $name2 = github.tornaco.android.thanos ]] && Backup_data "thanox" "$(find "/data/system" -name "thanos*" -maxdepth 1 -type d)"
|
||||
[[ $name2 = moe.shizuku.redirectstorage ]] && Backup_data "storage-isolation" "/data/adb/storage-isolation"
|
||||
fi
|
||||
endtime 2 "$name1備份" "3"
|
||||
Occupation_status="$(df -h "${Backup%/*}" | sed -n 's|% /.*|%|p' | awk '{print $(NF-1),$(NF)}')"
|
||||
@@ -660,6 +661,7 @@ Restore)
|
||||
;;
|
||||
*)
|
||||
[[ $FILE_NAME2 = thanox ]] && rm -rf "$(find "/data/system" -name "thanos*" -maxdepth 1 -type d)"
|
||||
[[ $FILE_NAME2 = storage-isolation ]] && rm -rf "/data/adb/storage-isolation"
|
||||
case ${FILE_NAME##*.} in
|
||||
lz4 | zst) pv "$tar_path" | tar -I zstd -xmPpf - ;;
|
||||
tar) pv "$tar_path" | tar -xPpf - ;;
|
||||
@@ -706,6 +708,10 @@ Restore)
|
||||
restorecon -RF "$(find "/data/system" -name "thanos*" -maxdepth 1 -type d)/" >/dev/null 2>&1
|
||||
echo_log "selinux上下文設置" && echoRgb "警告 thanox配置恢復後務必重啟\n -否則不生效" "0"
|
||||
;;
|
||||
storage-isolation)
|
||||
restorecon -RF "/data/adb/storage-isolation/" >/dev/null 2>&1
|
||||
echo_log "selinux上下文設置"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
@@ -929,6 +935,7 @@ Restore2)
|
||||
fi
|
||||
else
|
||||
[[ $FILE_NAME2 = thanox ]] && rm -rf "$(find "/data/system" -name "thanos*" -maxdepth 1 -type d)"
|
||||
[[ $FILE_NAME2 = storage-isolation ]] && rm -rf "/data/adb/storage-isolation"
|
||||
case ${FILE_NAME##*.} in
|
||||
lz4 | zst) pv "$tar_path" | tar --recursive-unlink -I zstd -xmPpf - ;;
|
||||
tar) pv "$tar_path" | tar --recursive-unlink -xmPpf - ;;
|
||||
@@ -970,6 +977,10 @@ Restore2)
|
||||
restorecon -RF "$(find "/data/system" -name "thanos*" -maxdepth 1 -type d)/" >/dev/null 2>&1
|
||||
echo_log "selinux上下文設置" && echoRgb "警告 thanox配置恢復後務必重啟\n -否則不生效" "0"
|
||||
;;
|
||||
storage-isolation)
|
||||
restorecon -RF "/data/adb/storage-isolation/" >/dev/null 2>&1
|
||||
echo_log "selinux上下文設置"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
|
||||
BIN
tools/bin/zstd
BIN
tools/bin/zstd
Binary file not shown.
Reference in New Issue
Block a user