From ecc381ac8a2e173f8391a0ea6f3465b569cfdc92 Mon Sep 17 00:00:00 2001 From: Atopes Sayuri <108107785+AtopesSayuri@users.noreply.github.com> Date: Mon, 3 Jun 2024 23:59:04 +0800 Subject: [PATCH] try to fix bug --- new/AAP-New.sh | 3 ++- new/AAPFunction | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/new/AAP-New.sh b/new/AAP-New.sh index a8add55..e4a67c1 100755 --- a/new/AAP-New.sh +++ b/new/AAP-New.sh @@ -144,6 +144,7 @@ fi # 清理可能存在的上次运行文件 rm -rf /tmp/LuoYanTmp_* +rm -rf ./LuoYanTmp_* mkdir -p "${WORKDIR}" log_info "Downloading function file from GitHub..." @@ -179,7 +180,7 @@ if [[ -n ${NOINSTALL} ]]; then log_warn "The -n parameter was received. Won't install patched image." if [[ "${OS}" == "android" ]]; then log_info "Now copying patched image to /storage/emulated/0/patched_boot.img..." - mv ${WORKDIR}/new-boot.img /storage/emulated/0/patched_boot.img + mv ${WORKDIR}/patched_boot.img /storage/emulated/0/patched_boot.img else log_info "Now copying patched image to ${HOME}/patched_boot.img..." mv ${WORKDIR}/new-boot.img ${HOME}/patched_boot.img diff --git a/new/AAPFunction b/new/AAPFunction index 64be480..c4cb2a3 100755 --- a/new/AAPFunction +++ b/new/AAPFunction @@ -1,6 +1,6 @@ #!/bin/env bash -#by nya -#2024-02-04 +#by Akina +#2024-06-03 get_device_boot() { # 未指定boot路径时从设备boot分区获取boot镜像 log_info "Getting boot image..." @@ -55,7 +55,7 @@ get_tools() { # 从GitHub下载工具 fi log_info "Done." log_info "Downloading magiskboot..." - curl -LO --progress-bar "https://raw.githubusercontent.com/nya-main/APatchAutoPatchTool/main/bin/magiskboot" + curl -LO --progress-bar "https://raw.githubusercontent.com/AkinaAcct/APatchTool/main/bin/magiskboot" EXITSTATUS=$? if [[ $EXITSTATUS != 0 ]]; then log_err "DOWNLOAD FAILED!" @@ -92,11 +92,11 @@ patch_boot() { # 修补boot镜像 fi log_info "Done." log_info "Repacking..." - ./magiskboot repack boot${BOOTSUFFIX}.img + ./magiskboot repack boot${BOOTSUFFIX}.img patched_boot.img EXITSTATUS=$? if [[ $EXITSTATUS != 0 ]]; then log_err "REPACK FAILED!" - exit 1 t + exit 1 fi log_info "Done. Finished paching." }