Skip to content

feat(wear-os): add local fall detection diagnostics - #131

Merged
thlaure merged 1 commit into
mainfrom
feat/wear-detection-diagnostics
Oct 8, 2026
Merged

thlaure merged 1 commit into
mainfrom
feat/wear-detection-diagnostics

Conversation

@thlaure

@thlaure thlaure commented Oct 7, 2026

Copy link
Copy Markdown
Owner

Summary

Missed falls cannot currently be investigated on a signed Wear OS build because raw sensor readings, effective thresholds, and rejection criteria are unavailable. Add opt-in local diagnostics that record all delivered accelerometer samples, including sub-threshold events, without changing detection thresholds or watch-to-phone alert contracts.

Record read-only detector state, measurement/delivery timestamps, screen interactivity, registration details, heartbeats, and diagnostic losses. Write compressed batches off the sensor thread with a bounded queue and 64 MiB/72-hour retention limits. Add an English/French watch toggle and an ADB export provider protected by the platform DUMP permission and caller UID checks. Exports contain no credentials, location, or phone data.

Bump Wear OS to 1.1-diagnostics (version code 2), document collection/export, and ignore generated Kotlin cache files.

Validation

  • make -C apps/wear_os check: 27 JVM tests, Android lint, and Debug/Release builds passed.
  • git diff --check: passed.
  • Installed signed Release update on a physical SM-L300 using the existing certificate; configuration survived the update and recording remained enabled.
  • Exported and parsed a real archive: 2,266 samples, including 1,402 with a non-interactive screen, with no recorder drops or I/O errors reported.

Limitations

This instruments the existing detector; it does not improve fall sensitivity or establish clinical reliability. The sensor is non-wake-up and no monitoring wake lock is added. The short physical recording contained measurement gaps up to 882 ms and delivery delays up to 1,073 ms; long-term deep-sleep and battery behavior remain unvalidated. The byte cap can shorten retained history, and abrupt process termination can lose the latest in-memory batch. Export promptly after a spontaneous event; do not ask a vulnerable wearer to fall for testing.

@thlaure
thlaure merged commit c4a12d7 into main Oct 8, 2026
14 checks passed
@thlaure
thlaure deleted the feat/wear-detection-diagnostics branch October 8, 2026 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant