fix(android): use absolute logcat path · openclaw/openclaw@29a34e0
vincentkoc
·
2026-04-28
·
via Recent Commits to openclaw:main
File tree
apps/android/app/src/main/java/ai/openclaw/app/node
| Original file line number | Diff line number | Diff line change |
|---|
@@ -6,6 +6,8 @@ import ai.openclaw.app.gateway.DeviceIdentityStore
|
6 | 6 | import ai.openclaw.app.gateway.GatewaySession |
7 | 7 | import kotlinx.serialization.json.JsonPrimitive |
8 | 8 | |
| 9 | +private const val LOGCAT_PATH = "/system/bin/logcat" |
| 10 | + |
9 | 11 | class DebugHandler( |
10 | 12 | private val appContext: Context, |
11 | 13 | private val identityStore: DeviceIdentityStore, |
@@ -80,7 +82,7 @@ class DebugHandler(
|
80 | 82 | val logResult = try { |
81 | 83 | val tmpFile = java.io.File(appContext.cacheDir, "debug_logs.txt") |
82 | 84 | if (tmpFile.exists()) tmpFile.delete() |
83 | | -val pb = ProcessBuilder("logcat", "-d", "-t", "200", "--pid=$pid") |
| 85 | +val pb = ProcessBuilder(LOGCAT_PATH, "-d", "-t", "200", "--pid=$pid") |
84 | 86 | pb.redirectOutput(tmpFile) |
85 | 87 | pb.redirectErrorStream(true) |
86 | 88 | val proc = pb.start() |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。