app: core-shizuku — dual-path shell-tier executor + probe, wired into the app
Ports the prober's validated Shizuku tier: AIDL UserService, the build-4 dual-path ShizukuRunner (UserService bind where it works, legacy newProcess reflection fallback where it doesn't — exec_path records which), and ShizukuProbe running the shell command battery, emitting a shizuku-tier link.ip_monitor Test with per-device dumps as evidence. Self-degrades to UNSUPPORTED without Shizuku. Wired into RunViewModel (sets tiers.shizuku); app APK assembles. On-device verification deferred — no device reachable at build time (flaky LAN dropped the tablet, phone debugging off). Expect UserService on OnePlus, newProcess on Lenovo per the prober. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
9809ae57b4
commit
aaed22dd3f
@@ -37,6 +37,7 @@ dependencies {
|
||||
implementation(project(":core-protocol"))
|
||||
implementation(project(":core-engine"))
|
||||
implementation(project(":core-probe"))
|
||||
implementation(project(":core-shizuku"))
|
||||
|
||||
implementation(libs.kotlinx.serialization.json)
|
||||
implementation(libs.kotlinx.coroutines.android)
|
||||
|
||||
@@ -16,6 +16,7 @@ import app.echo_lot.probe.LinkSnapshotProbe
|
||||
import app.echo_lot.probe.NetworkInventory
|
||||
import app.echo_lot.probe.Probe
|
||||
import app.echo_lot.probe.ProbeIds
|
||||
import app.echo_lot.shizuku.ShizukuProbe
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
@@ -87,6 +88,20 @@ class RunViewModel(app: Application) : AndroidViewModel(app) {
|
||||
)
|
||||
}
|
||||
|
||||
// Shizuku shell tier — self-degrades to UNSUPPORTED when Shizuku isn't running.
|
||||
step("shizuku.command_battery")
|
||||
val shizukuTest = try {
|
||||
ShizukuProbe().run(ctx, ids::uuid, ids::monoNs)
|
||||
} catch (t: Throwable) {
|
||||
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.add(shizukuTest)
|
||||
val shizukuAvailable = shizukuTest.status == TestStatus.OK || shizukuTest.status == TestStatus.PARTIAL
|
||||
|
||||
val findings = deriveFindings(tests)
|
||||
val summary = Verdicts.derive(tests, findings)
|
||||
|
||||
@@ -102,7 +117,7 @@ class RunViewModel(app: Application) : AndroidViewModel(app) {
|
||||
manufacturer = Build.MANUFACTURER, model = Build.MODEL,
|
||||
androidSdk = Build.VERSION.SDK_INT, androidRelease = Build.VERSION.RELEASE,
|
||||
),
|
||||
tiers = Tiers(app = true),
|
||||
tiers = Tiers(app = true, shizuku = shizukuAvailable),
|
||||
),
|
||||
networks = networks,
|
||||
tests = tests,
|
||||
|
||||
Reference in New Issue
Block a user