This commit is contained in:
Yawasau
2025-04-26 16:32:18 +08:00
parent c7dd741657
commit 705f2b67e6
2 changed files with 34 additions and 14 deletions

View File

@@ -1,7 +1,7 @@
#0關閉音量鍵選擇 (如選項未設置,則強制使用音量鍵選擇) #0關閉音量鍵選擇 (如選項未設置,則強制使用音量鍵選擇)
#1開啟音量鍵選擇 (如選項已設置,則跳過該選項提示) #1開啟音量鍵選擇 (如選項已設置,則跳過該選項提示)
#2使用鍵盤輸入適用於無音量鍵可用設備選擇 (如選項未設置,則強制使用鍵盤輸入) #2使用鍵盤輸入適用於無音量鍵可用設備選擇 (如選項未設置,則強制使用鍵盤輸入)
Lo=0 Lo=1
#後台執行腳本 #後台執行腳本
0不能關閉當前終端有壓縮速率 0不能關閉當前終端有壓縮速率
@@ -12,6 +12,10 @@ background_execution=0
#1簡體中文 0繁體中文 #1簡體中文 0繁體中文
Shell_LANG= Shell_LANG=
#備份開始後偽裝亮屏
#1開啟 0關閉
setDisplayPowerMode=0
#自定義備份文件輸出位置 支持相對路徑(留空則默認當前路徑) #自定義備份文件輸出位置 支持相對路徑(留空則默認當前路徑)
Output_path="" Output_path=""
@@ -22,6 +26,12 @@ list_location=""
#1開啟 0關閉 #1開啟 0關閉
update=1 update=1
#自動更新的cdn節點針對國內用戶使用無牆或是使用VPN請設置0
#0 直鏈下載
#1 https://ghfast.top
#2 https://shrill-pond-3e81.hunsh.workers.dev
cdn=
#自定義屏蔽外部掛載點 例OTG 虛擬SD等 多個掛載點請使用 | 區隔 #自定義屏蔽外部掛載點 例OTG 虛擬SD等 多個掛載點請使用 | 區隔
#屏蔽後不會提示音量鍵選擇不影響Output_path指定外置存儲位置 #屏蔽後不會提示音量鍵選擇不影響Output_path指定外置存儲位置
mount_point="rannki|0000-1" mount_point="rannki|0000-1"
@@ -57,9 +67,10 @@ debug_list=0
#添加自定義備份路徑 例Download DCIM等文件夾 請使用絕對路徑,請勿刪除"" #添加自定義備份路徑 例Download DCIM等文件夾 請使用絕對路徑,請勿刪除""
Custom_path=" Custom_path="
/storage/emulated/0/Pictures/ #/storage/emulated/0/Pictures/
/storage/emulated/0/Download/ #/storage/emulated/0/Download/
/storage/emulated/0/DCIM/ #/storage/emulated/0/Music
#/storage/emulated/0/DCIM/
/data/adb /data/adb
" "
@@ -68,8 +79,7 @@ blacklist_mode=0
#備份黑名單(備份策略由「黑名單模式」控制,此處只作為黑名單應用列表) #備份黑名單(備份策略由「黑名單模式」控制,此處只作為黑名單應用列表)
blacklist=" blacklist="
com.esunbank #com.esunbank
com.esunbank.ESUNWALLET
#com.chailease.tw.app.android.ccfappcust" #com.chailease.tw.app.android.ccfappcust"
#位於data的預裝應用白名單 例:相冊 錄音機 天氣 計算器等(默認屏蔽備份預裝應用,如需備份請添加預裝應用白名單) #位於data的預裝應用白名單 例:相冊 錄音機 天氣 計算器等(默認屏蔽備份預裝應用,如需備份請添加預裝應用白名單)

View File

@@ -9,7 +9,7 @@ MODDIR="$MODDIR"
MODDIR_NAME="${MODDIR##*/}" MODDIR_NAME="${MODDIR##*/}"
tools_path="$MODDIR/tools" tools_path="$MODDIR/tools"
script="${0##*/}" script="${0##*/}"
backup_version="202504260051" backup_version="202504261629"
[[ $SHELL = *mt* ]] && echo "請勿使用MT管理器拓展包環境執行,請更換系統環境" && exit 2 [[ $SHELL = *mt* ]] && echo "請勿使用MT管理器拓展包環境執行,請更換系統環境" && exit 2
update_backup_settings_conf() { update_backup_settings_conf() {
echo "#0關閉音量鍵選擇 (如選項未設置,則強制使用音量鍵選擇) echo "#0關閉音量鍵選擇 (如選項未設置,則強制使用音量鍵選擇)
@@ -40,6 +40,12 @@ list_location=\""$list_location"\"
#1開啟 0關閉 #1開啟 0關閉
update="${update:-1}" update="${update:-1}"
#自動更新的cdn節點針對國內用戶使用無牆或是使用VPN請設置0
#0 直鏈下載
#1 https://ghfast.top
#2 https://shrill-pond-3e81.hunsh.workers.dev
cdn=${cdn:-1}
#自定義屏蔽外部掛載點 例OTG 虛擬SD等 多個掛載點請使用 | 區隔 #自定義屏蔽外部掛載點 例OTG 虛擬SD等 多個掛載點請使用 | 區隔
#屏蔽後不會提示音量鍵選擇不影響Output_path指定外置存儲位置 #屏蔽後不會提示音量鍵選擇不影響Output_path指定外置存儲位置
mount_point=\""${mount_point:-rannki|0000-1}"\" mount_point=\""${mount_point:-rannki|0000-1}"\"
@@ -164,6 +170,12 @@ Shell_LANG="$Shell_LANG"
#自動更新腳本(留空強制選擇) #自動更新腳本(留空強制選擇)
update="${update:-1}" update="${update:-1}"
#自動更新的cdn節點針對國內用戶使用無牆或是使用VPN請設置0
#0 直鏈下載
#1 https://ghfast.top
#2 https://shrill-pond-3e81.hunsh.workers.dev
cdn=${cdn:-1}
#恢復模式(1恢復未安裝應用 0全恢復) #恢復模式(1恢復未安裝應用 0全恢復)
recovery_mode="${recovery_mode:-0}" recovery_mode="${recovery_mode:-0}"
@@ -759,7 +771,7 @@ update_script() {
echoRgb "$zipFile更新" echoRgb "$zipFile更新"
if [[ -d $path_hierarchy/tools ]]; then if [[ -d $path_hierarchy/tools ]]; then
mv "$path_hierarchy/tools" "$TMPDIR" mv "$path_hierarchy/tools" "$TMPDIR"
[[ -d $TMPDIR/tools ]] && { [[ -d $TMPDIR/tools ]] && {
unzip -o "$zipFile" tools/* -d "$path_hierarchy" | sed 's/inflating/釋放/g ; s/creating/創建/g ; s/Archive/解壓縮/g' unzip -o "$zipFile" tools/* -d "$path_hierarchy" | sed 's/inflating/釋放/g ; s/creating/創建/g ; s/Archive/解壓縮/g'
echo_log "解壓縮${zipFile##*/}" echo_log "解壓縮${zipFile##*/}"
if [[ $result = 0 ]]; then if [[ $result = 0 ]]; then
@@ -837,7 +849,6 @@ else
alias create="pm install-create -i com.android.vending --user $user -t 2>/dev/null" alias create="pm install-create -i com.android.vending --user $user -t 2>/dev/null"
fi fi
fi fi
cdn=2
#settings get system system_locales #settings get system system_locales
Language="https://api.github.com/repos/YAWAsau/backup_script/releases/latest" Language="https://api.github.com/repos/YAWAsau/backup_script/releases/latest"
if [[ $path_hierarchy != "" && $Script_target_language != "" ]]; then if [[ $path_hierarchy != "" && $Script_target_language != "" ]]; then
@@ -910,11 +921,10 @@ if [[ $json != "" ]]; then
if [[ $(expr "$(echo "$backup_version" | tr -d "a-zA-Z")" \> "$(echo "$tag" | tr -d "a-zA-Z")") -eq 0 ]]; then if [[ $(expr "$(echo "$backup_version" | tr -d "a-zA-Z")" \> "$(echo "$tag" | tr -d "a-zA-Z")") -eq 0 ]]; then
download="$(jq -r '.assets[].browser_download_url'<<< "$json")" download="$(jq -r '.assets[].browser_download_url'<<< "$json")"
case $cdn in case $cdn in
1) zip_url="http://huge.cf/download/?huge-url=$download" ;; 0) zip_url="$download" ;;
2) zip_url="https://github.moeyy.xyz/$download" ;; 1) zip_url="https://ghfast.top/$download" ;;
3) zip_url="https://gh.api.99988866.xyz/$download" ;; 2) zip_url="https://shrill-pond-3e81.hunsh.workers.dev/$download" ;;
4) zip_url="https://github.lx164.workers.dev/$download" ;; *) echoRgb "$conf_path cdn=設置錯誤 範圍只能是0-2" && exit 2 ;;
5) zip_url="https://shrill-pond-3e81.hunsh.workers.dev/$download" ;;
esac esac
if [[ $(expr "$(echo "$backup_version" | tr -d "a-zA-Z")" \> "$(echo "$download" | tr -d "a-zA-Z")") -eq 0 ]]; then if [[ $(expr "$(echo "$backup_version" | tr -d "a-zA-Z")" \> "$(echo "$download" | tr -d "a-zA-Z")") -eq 0 ]]; then
echoRgb "發現新版本:$tag" echoRgb "發現新版本:$tag"