app: parse the Shizuku dumps into link.ra_source and sec.arp_watch

Pure-Kotlin parsers over the captures the battery already makes, tested
against the real archived dumps from both devices - including the
Lenovo's 1000000015 route tables (table ids stay strings), the OnePlus's
stray uid=2000 prefix and mid-line hoplimit, and an ip_monitor that only
ever said EXEC_TIMEOUT. ShizukuProbe now returns three tests; a failed
capture is SKIPPED with its reason so no test type silently vanishes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
mrambossek
2026-08-02 13:34:52 +02:00
co-authored by Claude Opus 5
parent 515a6aef04
commit 3214cc877a
6 changed files with 647 additions and 17 deletions
@@ -451,19 +451,25 @@ class RunViewModel(app: Application) : AndroidViewModel(app) {
remainingMs -= p.estimatedMs
}
// Shizuku shell tier — self-degrades to UNSUPPORTED when Shizuku isn't running.
// Shizuku shell tier — self-degrades to UNSUPPORTED when Shizuku isn't running. One
// battery, three tests: the raw captures plus the parsed ra_source/arp_watch views.
step("link.ip_monitor (shizuku)", done = probes.size, total = totalSteps, etaMs = shizukuEstimateMs)
val shizukuTest = try {
val shizukuTests = try {
ShizukuProbe().run(ctx, ids::uuid, ids::monoNs)
} catch (t: Throwable) {
Test(
listOf(Test(
id = ids.uuid(), type = TestType.LINK_IP_MONITOR, tier = Tier.SHIZUKU,
startedMonoNs = ids.monoNs(), endedMonoNs = ids.monoNs(),
status = TestStatus.FAILED, error = TestError("uncaught", t.message ?: t.javaClass.simpleName),
)
))
}
tests.addAll(shizukuTests); collected.addAll(shizukuTests)
// "Shizuku tier ran" is the battery's verdict — the derived tests can be PARTIAL on a
// perfectly healthy shell tier (e.g. an RA-less v4-only link).
runShizukuOk = shizukuTests.any {
it.type == TestType.LINK_IP_MONITOR &&
(it.status == TestStatus.OK || it.status == TestStatus.PARTIAL)
}
tests.add(shizukuTest); collected.add(shizukuTest)
runShizukuOk = shizukuTest.status == TestStatus.OK || shizukuTest.status == TestStatus.PARTIAL
return buildDocument(tests)
}