From b8ae32b44ee6a978624daa32015e5d66ca83f765 Mon Sep 17 00:00:00 2001 From: huanli233 <2720791562@qq.com> Date: Sat, 23 Mar 2024 21:53:59 +0800 Subject: [PATCH] Add move result file --- .../huanli233/magiskpatcher/patcher/MagiskPatcher.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/com/huanli233/magiskpatcher/patcher/MagiskPatcher.java b/src/main/java/com/huanli233/magiskpatcher/patcher/MagiskPatcher.java index 5b3048b..1407636 100644 --- a/src/main/java/com/huanli233/magiskpatcher/patcher/MagiskPatcher.java +++ b/src/main/java/com/huanli233/magiskpatcher/patcher/MagiskPatcher.java @@ -467,6 +467,14 @@ public int patch(File bootimg, File result) { } this.clean(); + + File patched = new File(fileTempPath, "new-boot.img"); + if (!(result == null)) { + logger.info("- 移动修补后的 boot 文件"); + copyFile(patched, result); + rmFile(patched); + } + logger.info("- 完成!"); return 0;