Skip to content

Commit

Permalink
try to fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
AkinaAcct committed Jun 3, 2024
1 parent 3a53065 commit ecc381a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion new/AAP-New.sh
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ fi

# 清理可能存在的上次运行文件
rm -rf /tmp/LuoYanTmp_*
rm -rf ./LuoYanTmp_*
mkdir -p "${WORKDIR}"

log_info "Downloading function file from GitHub..."
Expand Down Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions new/AAPFunction
Original file line number Diff line number Diff line change
@@ -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..."
Expand Down Expand Up @@ -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!"
Expand Down Expand Up @@ -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."
}
Expand Down

0 comments on commit ecc381a

Please sign in to comment.