diff --git a/DOCS-bypass.md b/DOCS-bypass.md index a126512..95aa5fa 100644 --- a/DOCS-bypass.md +++ b/DOCS-bypass.md @@ -102,6 +102,9 @@ debug manifest only). Release builds never set the define. 2. Write a dummy passphrase to `files/passphrase` under the app's `Android/data//` dir; the probe moves it into the keystore on launch (`probe_passphrase.dart`). Without one every push is `sync locked`. + A probe's `-t` file must re-export the headless entrypoints + (`publishNowMain`, ...): Kotlin resolves them by name in the root library, + and without them the bypass publish never ran. 3. After the bypass: `HOME= PYTHONUSERBASE=~/.local /usr/bin/python3 scripts/emu_published.py http://127.0.0.1:9000 out.json`, then `_fallback --dry-run --at diff --git a/phone_app/lib/main_session_probe.dart b/phone_app/lib/main_session_probe.dart index 9054aed..64c3100 100644 --- a/phone_app/lib/main_session_probe.dart +++ b/phone_app/lib/main_session_probe.dart @@ -1,6 +1,6 @@ import 'package:material_ui/material_ui.dart'; -import 'package:wake_alarm_sync/main.dart'; +import 'package:wake_alarm_sync/main.dart' as app; import 'package:wake_alarm_sync/probe/file_driven_scheduler.dart'; import 'package:wake_alarm_sync/probe/probe_passphrase.dart'; import 'package:wake_alarm_sync/services/alarm_scheduler.dart'; @@ -33,5 +33,22 @@ Future main() async { await SessionTagSettings.saveTagAt(SessionTagSlot.desk, 'desk'); final scheduler = AlarmScheduler(); if (!await scheduler.morningLive()) await scheduler.ringNow(); - runApp(const WakeAlarmSyncApp(newScheduler: FileDrivenScheduler.new)); + runApp(const app.WakeAlarmSyncApp(newScheduler: FileDrivenScheduler.new)); } + +// Kotlin starts the headless engines by entrypoint *name*, resolved in the +// root library: the `-t` file. Without these the probe build's bypass, +// ring_started and pool-sync engines failed with "Could not resolve main +// entrypoint function" and published nothing (C6, emulator 2026-11-22). + +/// See `main.dart`'s [app.ringStartedMain]. +@pragma('vm:entry-point') +Future ringStartedMain() => app.ringStartedMain(); + +/// See `main.dart`'s [app.publishNowMain]. +@pragma('vm:entry-point') +Future publishNowMain() => app.publishNowMain(); + +/// See `main.dart`'s [app.poolSyncMain]. +@pragma('vm:entry-point') +Future poolSyncMain() => app.poolSyncMain();