Skip to content

Save watch logs to the phone once a day - #337

Draft
adipascu wants to merge 2 commits into
coredevices:masterfrom
peblum:save-watch-logs
Draft

adipascu wants to merge 2 commits into
coredevices:masterfrom
peblum:save-watch-logs

Conversation

@adipascu

@adipascu adipascu commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

The watch only keeps a couple of days of logs, and getting them off currently needs a person: submitting a bug report, or sharing the report zip from the Bug Report screen. The pipelines that run on their own carry crash dumps and numeric metrics, not logs. So a firmware contributor collecting log data over a longer stretch, without access to the server side, has to remember to pull logs every couple of days or silently lose the oldest ones.

This adds an Auto-save watch logs toggle to the debug settings. When it is on, the daily background sync also gathers the connected watch's logs and keeps the newest 21 copies in the phone's Downloads folder under Pebble watch logs. If no watch is reachable it tries again on the next sync instead of skipping the day. Android 10 and newer write through MediaStore. Older Android versions and iOS fall back to app storage.

Off by default and hidden unless debug options are on, so nothing changes for regular users.

The other commit fixes the share sheet labeling the bug report zip as an audio file. share() was hardcoded to audio/wav from when recordings were its only payload, and now takes the type from the caller.

Written with AI assistance (Claude), and exercised on a Pixel 6 with a Pebble Time 2.


Aside: I am currently available for mobile or firmware contracting or full-time work. Contact: adrian@pascu.be.

@adipascu
adipascu force-pushed the save-watch-logs branch 3 times, most recently from d7bc89a to c3e7ea2 Compare August 11, 2026 07:05
@ericmigi

Copy link
Copy Markdown
Contributor

Screenshot_20260811-070549.png

This button already does this

@adipascu adipascu changed the title Add a Save Watch Logs entry to the watch debug menu Save watch logs to the phone once a day Aug 11, 2026
@adipascu

Copy link
Copy Markdown
Contributor Author

You're right, dropped it. What's left is the daily auto-save, so logs outlive the watch's small buffer without manual pulls, and a fix for the zip being shared as an audio file.

PlatformShareLauncher.share() was hardcoded to audio/wav from when
recordings were its only payload. It gains a mimeType parameter, so
each caller declares what it actually sends.
A developer collecting firmware logs over days has to remember to pull
them before the watch's 128 KB log ring wraps, which loses data when
they forget. When "Auto-save watch logs" is enabled the background
sync gathers logs from the connected watch daily and keeps the newest
21 copies.

Copies go to the phone's Downloads folder, under "Pebble watch logs",
so they can be opened, shared or copied off without a cable. Android
10 and newer write through MediaStore. Older releases and iOS fall
back to app storage.

The toggle is a debug setting, off by default, so nothing changes for
regular users.
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.

2 participants