bugfix
This commit is contained in:
@@ -24,6 +24,9 @@ USBdefault=0
|
|||||||
#選擇是否只備份split apk(分割apk檔,1備份split apk 0混合備份)
|
#選擇是否只備份split apk(分割apk檔,1備份split apk 0混合備份)
|
||||||
Splist=0
|
Splist=0
|
||||||
|
|
||||||
|
#使用者
|
||||||
|
user=
|
||||||
|
|
||||||
#是否備份使用者數據 (1備份0不備份)
|
#是否備份使用者數據 (1備份0不備份)
|
||||||
Backup_user_data=1
|
Backup_user_data=1
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ else
|
|||||||
echo "Magisk busybox Path does not exist"
|
echo "Magisk busybox Path does not exist"
|
||||||
fi
|
fi
|
||||||
export PATH="$PATH"
|
export PATH="$PATH"
|
||||||
backup_version="V15.3"
|
backup_version="V15.5"
|
||||||
#設置二進制命令目錄位置
|
#設置二進制命令目錄位置
|
||||||
if [[ $bin_path = "" ]]; then
|
if [[ $bin_path = "" ]]; then
|
||||||
echoRgb "未正確指定bin.sh位置" "0"
|
echoRgb "未正確指定bin.sh位置" "0"
|
||||||
@@ -234,6 +234,7 @@ update_script() {
|
|||||||
mv "$MODDIR/tools" "${MODDIR%/*}"
|
mv "$MODDIR/tools" "${MODDIR%/*}"
|
||||||
echoRgb "更新當前${MODDIR##*/}目錄下恢復相關腳本+外部tools目錄與腳本"
|
echoRgb "更新當前${MODDIR##*/}目錄下恢復相關腳本+外部tools目錄與腳本"
|
||||||
cp -r "$tools_path/script/Get_DirName" "${MODDIR%/*}/重新生成應用列表.sh"
|
cp -r "$tools_path/script/Get_DirName" "${MODDIR%/*}/重新生成應用列表.sh"
|
||||||
|
cp -r "$tools_path/script/convert" "${MODDIR%/*}/轉換資料夾名稱.sh"
|
||||||
cp -r "$tools_path/script/restore" "${MODDIR%/*}/恢復備份.sh"
|
cp -r "$tools_path/script/restore" "${MODDIR%/*}/恢復備份.sh"
|
||||||
cp -r "$MODDIR/終止腳本.sh" "${MODDIR%/*}/終止腳本.sh"
|
cp -r "$MODDIR/終止腳本.sh" "${MODDIR%/*}/終止腳本.sh"
|
||||||
[[ -d ${MODDIR%/*}/Media ]] && cp -r "$tools_path/script/restore3" "${MODDIR%/*}/恢復自定義資料夾.sh"
|
[[ -d ${MODDIR%/*}/Media ]] && cp -r "$tools_path/script/restore3" "${MODDIR%/*}/恢復自定義資料夾.sh"
|
||||||
@@ -263,6 +264,7 @@ update_script() {
|
|||||||
else
|
else
|
||||||
echoRgb "更新當前${MODDIR##*/}目錄下恢復相關腳本+tools目錄"
|
echoRgb "更新當前${MODDIR##*/}目錄下恢復相關腳本+tools目錄"
|
||||||
cp -r "$tools_path/script/Get_DirName" "$MODDIR/重新生成應用列表.sh"
|
cp -r "$tools_path/script/Get_DirName" "$MODDIR/重新生成應用列表.sh"
|
||||||
|
cp -r "$tools_path/script/convert" "$MODDIR/轉換資料夾名稱.sh"
|
||||||
cp -r "$tools_path/script/restore" "$MODDIR/恢復備份.sh"
|
cp -r "$tools_path/script/restore" "$MODDIR/恢復備份.sh"
|
||||||
[[ -d $MODDIR/Media ]] && cp -r "$tools_path/script/restore3" "$MODDIR/恢復自定義資料夾.sh"
|
[[ -d $MODDIR/Media ]] && cp -r "$tools_path/script/restore3" "$MODDIR/恢復自定義資料夾.sh"
|
||||||
find "$MODDIR" -maxdepth 1 -type d | sort | while read; do
|
find "$MODDIR" -maxdepth 1 -type d | sort | while read; do
|
||||||
@@ -299,6 +301,7 @@ update_script() {
|
|||||||
cp -r "$tools_path" "$backup_path" && rm -rf "$backup_path/tools/bin/zip" "$backup_path/tools/script"
|
cp -r "$tools_path" "$backup_path" && rm -rf "$backup_path/tools/bin/zip" "$backup_path/tools/script"
|
||||||
cp -r "$tools_path/script/restore" "$backup_path/恢復備份.sh"
|
cp -r "$tools_path/script/restore" "$backup_path/恢復備份.sh"
|
||||||
cp -r "$tools_path/script/Get_DirName" "$backup_path/重新生成應用列表.sh"
|
cp -r "$tools_path/script/Get_DirName" "$backup_path/重新生成應用列表.sh"
|
||||||
|
cp -r "$tools_path/script/convert" "$backup_path/轉換資料夾名稱.sh"
|
||||||
cp -r "$MODDIR/終止腳本.sh" "$backup_path/終止腳本.sh"
|
cp -r "$MODDIR/終止腳本.sh" "$backup_path/終止腳本.sh"
|
||||||
[[ -d $backup_path/Media ]] && cp -r "$tools_path/script/restore3" "$backup_path/恢復自定義資料夾.sh"
|
[[ -d $backup_path/Media ]] && cp -r "$tools_path/script/restore3" "$backup_path/恢復自定義資料夾.sh"
|
||||||
find "$MODDIR" -maxdepth 2 -type d | sort | while read; do
|
find "$MODDIR" -maxdepth 2 -type d | sort | while read; do
|
||||||
|
|||||||
BIN
tools/bin/bindfs
Normal file
BIN
tools/bin/bindfs
Normal file
Binary file not shown.
@@ -46,7 +46,7 @@ if [[ $toast_info = true ]]; then
|
|||||||
pm enable "ice.message" &>/dev/null
|
pm enable "ice.message" &>/dev/null
|
||||||
if [[ $(pm path --user "$user" ice.message 2>/dev/null) = "" ]]; then
|
if [[ $(pm path --user "$user" ice.message 2>/dev/null) = "" ]]; then
|
||||||
echoRgb "未安裝toast 開始安裝" "0"
|
echoRgb "未安裝toast 開始安裝" "0"
|
||||||
cp -r "${bin_path%/*}/apk"/*.apk "$TMPDIR" && pm install --user 0 -r -t "$TMPDIR"/*.apk &>/dev/null && rm -rf "$TMPDIR"/*
|
cp -r "${bin_path%/*}/apk"/*.apk "$TMPDIR" && pm install --user "$user" -r -t "$TMPDIR"/*.apk &>/dev/null && rm -rf "$TMPDIR"/*
|
||||||
[[ $? = 0 ]] && echoRgb "安裝toast成功" "1" || echoRgb "安裝toast失敗" "0"
|
[[ $? = 0 ]] && echoRgb "安裝toast成功" "1" || echoRgb "安裝toast失敗" "0"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@@ -158,10 +158,10 @@ fi
|
|||||||
backup_path() {
|
backup_path() {
|
||||||
if [[ $Output_path != "" ]]; then
|
if [[ $Output_path != "" ]]; then
|
||||||
[[ ${Output_path: -1} = / ]] && Output_path="${Output_path%?}"
|
[[ ${Output_path: -1} = / ]] && Output_path="${Output_path%?}"
|
||||||
Backup="$Output_path/Backup_$Compression_method"
|
Backup="$Output_path/Backup_${Compression_method}_$user"
|
||||||
outshow="使用自定義目錄"
|
outshow="使用自定義目錄"
|
||||||
else
|
else
|
||||||
Backup="$MODDIR/Backup_$Compression_method"
|
Backup="$MODDIR/Backup_${Compression_method}_$user"
|
||||||
outshow="使用當前路徑作為備份目錄"
|
outshow="使用當前路徑作為備份目錄"
|
||||||
fi
|
fi
|
||||||
PU="$(ls /dev/block/vold 2>/dev/null | grep public)"
|
PU="$(ls /dev/block/vold 2>/dev/null | grep public)"
|
||||||
@@ -176,7 +176,7 @@ backup_path() {
|
|||||||
[[ $branch = true ]] && hx="USB"
|
[[ $branch = true ]] && hx="USB"
|
||||||
fi
|
fi
|
||||||
if [[ $hx = USB ]]; then
|
if [[ $hx = USB ]]; then
|
||||||
Backup="$PT/Backup_$Compression_method"
|
Backup="$PT/Backup_${Compression_method}_$user"
|
||||||
data="/dev/block/vold/$PU"
|
data="/dev/block/vold/$PU"
|
||||||
mountinfo="$(df -T "${Backup%/*}" | sed -n 's|% /.*|%|p' | awk '{print $(NF-4)}')"
|
mountinfo="$(df -T "${Backup%/*}" | sed -n 's|% /.*|%|p' | awk '{print $(NF-4)}')"
|
||||||
case $mountinfo in
|
case $mountinfo in
|
||||||
@@ -417,7 +417,7 @@ Release_data() {
|
|||||||
if [[ $G != "" ]]; then
|
if [[ $G != "" ]]; then
|
||||||
echoRgb "路徑:$X"
|
echoRgb "路徑:$X"
|
||||||
Path_details="$(stat -c "%A/%a %U/%G" "$X")"
|
Path_details="$(stat -c "%A/%a %U/%G" "$X")"
|
||||||
chown -hR "$G:$G" "$X/"
|
[[ $user = 0 ]] && chown -hR "$G:$G" "$X/" || chown -hR "$user$G:$user$G" "$X/"
|
||||||
echo_log "設置用戶組:$(echo "$Path_details" | awk '{print $2}')"
|
echo_log "設置用戶組:$(echo "$Path_details" | awk '{print $2}')"
|
||||||
restorecon -RFD "$X/" 2>/dev/null
|
restorecon -RFD "$X/" 2>/dev/null
|
||||||
echo_log "selinux上下文設置"
|
echo_log "selinux上下文設置"
|
||||||
|
|||||||
BIN
tools/bin/zstd
BIN
tools/bin/zstd
Binary file not shown.
7
tools/script/convert
Normal file
7
tools/script/convert
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
if [ -f "${0%/*}/tools/bin/tools.sh" ]; then
|
||||||
|
MODDIR="${0%/*}"
|
||||||
|
operate="convert"
|
||||||
|
. "${0%/*}/tools/bin/tools.sh"
|
||||||
|
else
|
||||||
|
echo "${0%/*}/tools/bin/tools.sh遺失"
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user