APatch Manager crashes when saving logs
Maintainers usually reply within 4 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 48/100
Research direction
Start with the Settings “Save logs” flow and the log export step that reads /data/user/0/me.bmax.apatch/cache/APatch_bugreport_2026-01-28_15_32.tar.gz and writes to the selected directory. Reproduce on Android 8.1 with Android Patch installed, then use the FileNotFoundException and permission-denied trace to investigate. Done means a non-empty log is exported without a crash.
Written by the indexing model from the issue text.
Description
Please check before submitting an issue | 在提交 Issue 前请检查
- I searched the issues and didn't found anything relevant | 我已经搜索了 Issues 列表,没有发现于本问题相关内容
- If the patch fails or the image cannot be booted after flashing the new boot.img, visit KernelPatch to clarify your doubts | 修复失败或刷入修补后镜像不能启动,请前往 KernelPatch 提问
- I will upload the bug report file in APatch Manager > Settings > Send logs | 我会上传 Bug Report 文件从 APatch 管理器 > 设置 > 发送日志
- I know how to reproduce the issue, which might not be specific to my device | 我知道如何重新复现这个问题
Version requirements | 版本要求
- I'm using the latest CI version of APatch Manager | 我正在使用最新 CI 版本
Bug description | 描述 Bug
APatch Manager crashes immediately when tapping “Save logs”. A complete log file is generated in /data/user/0/me.bmax.apatch/cache/, but the exported file in the selected directory /storage/emulated/0/Download/ is 0 bytes.
This issue occurs only after installing Android Patch. When only KernelPatch is installed, the log saving function works normally without crashing.
点击“保存日志”时,APatch Manager 会立即崩溃。经检查,/data/user/0/me.bmax.apatch/cache/ 目录中生成了完整日志文件,但选定导出目录 /storage/emulated/0/Download/ 中的日志文件大小为 0 字节。
该问题仅在安装系统补丁后出现,仅安装 KernelPatch 时日志保存功能正常。
Reproduce method | 复现方法
- Patch and flash boot image
- Install Android Patch
- Go to Settings
- Tap “Save logs”
- The app crashes immediately
- 修补并刷入 boot 镜像
- 安装系统补丁
- 前往设置
- 点击“保存日志”
- App 立即崩溃
Expected behavior | 预期行为
The log file should be successfully exported to the selected directory without causing the application to crash.
日志文件应当能够正常导出到指定目录,且应用程序不应崩溃。
Actual behavior | 实际行为
The app crashes during the saving logs process.
在保存日志过程中应用发生崩溃。
Screenshots | 截图
Logs | 日志
APatch version: 18d4391 (11182)
Brand: SMARTISAN
Model: DE106
SDK Level: 27
Time: 2026-01-28 15:32:32
Thread: DefaultDispatcher-worker-1
Crash Info:
java.io.FileNotFoundException: /data/user/0/me.bmax.apatch/cache/APatch_bugreport_2026-01-28_15_32.tar.gz (Permission denied)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:200)
at java.io.FileInputStream.<init>(FileInputStream.java:150)
at sb.t(r8-map-id-7bd2cefab491f049109486efe5f30df568d18481caa4ee5dd585dbdcb1972771:138)
at fo.g(r8-map-id-7bd2cefab491f049109486efe5f30df568d18481caa4ee5dd585dbdcb1972771:6)
at sd0.run(r8-map-id-7bd2cefab491f049109486efe5f30df568d18481caa4ee5dd585dbdcb1972771:112)
at z4.run(r8-map-id-7bd2cefab491f049109486efe5f30df568d18481caa4ee5dd585dbdcb1972771:21)
at ru2.run(r8-map-id-7bd2cefab491f049109486efe5f30df568d18481caa4ee5dd585dbdcb1972771:3)
at v60.run(r8-map-id-7bd2cefab491f049109486efe5f30df568d18481caa4ee5dd585dbdcb1972771:83)
Suppressed: bc0: [el1@8c56480, le@baafab9, ga0{Cancelling}@4474efe, Dispatchers.IO]
Device name | 设备名称
Smartisan R1
OS version | 系统版本
Android 8.1
APatch version | APatch 版本
11182
Kernel version | 内核版本
4.9.65
KernelPatch version | KernelPatch 版本
0.13.0
Other information | 其他信息
- Dominant language
- Kotlin
- Stars
- 8.2k
- Forks
- 809
- Avg merge
- 7d 17h
- Merged PRs (30d)
- 1
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bmax121/APatch
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 4 days
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 85/100
bmax121/APatch#1669 · 2 comments ·
Maintainers usually reply within 4 days
-
Direct Install reports success when boot partition write failsMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 4 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 4 days
-
boot_patch.sh: flash guard precedence allows flash attempt on missing new-boot.imgMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 4 days
Similar issues
-
enhancement good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
getsotto/sotto-authenticator#68 ·
Maintainers usually reply within 1 day
-
mobile prio:low
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
digitalfabrik/entitlementcard#3324 ·
Maintainers usually reply within 2 days
-
Contributions are welcome Type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
owncloud/android#5065 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
sameerasw/essentials#1913 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
micronaut-projects/micronaut-core#14585 ·
Maintainers usually reply within 1 day