Skip to content

Add Fitbit support for iOS - #2016

Merged
abrignoni merged 1 commit into
mainfrom
feat/fitbit-ios
Aug 20, 2026
Merged

Add Fitbit support for iOS#2016
abrignoni merged 1 commit into
mainfrom
feat/fitbit-ios

Conversation

@abrignoni

Copy link
Copy Markdown
Owner

Adds Fitbit support for iOS. Four artifacts: exercise locations, exercise sessions, heart rate and daily activity totals.

The locations are the substantial part: each point is joined to its exercise session through the location group the record names, and the artifact emits KML. On the tested device all 9,419 points joined to a named Run or Walk.

Dates are stored two different ways in this database. Location and session times are an eight byte BLOB holding a big endian double of Apple epoch seconds, so the usual numeric conversion cannot read them. Heart rate samples in the same database are ISO text written by a different code path, and their dates coincide with the span the points cover, which corroborates the BLOB reading rather than leaving it asserted. Dates far outside a plausible range are the app's absent marker and are left empty.

Distances and speeds ship as stored, because the records carry a unit system code that nothing in the extraction maps to a unit. Every copy of the database is read rather than the first found, proven against a two container tree.

Four artifacts for the Fitbit iOS app: exercise locations, exercise sessions,
heart rate and daily activity totals.

The location points are the substantial part. Each is joined to the session it
belongs to through the location group the record names, so a point carries the
name and start time of the exercise it came from; on the tested device all 9,419
points joined to a named Run or Walk. The artifact emits KML.

The dates in this database are stored two different ways and the difference
matters. Location points and session start times are an eight byte value holding
a big endian double of seconds since the 2001 Apple epoch, stored as a BLOB
rather than as a numeric column, so the usual numeric conversion cannot read
them. Heart rate samples in the same database are ISO text written by a different
code path, and their dates coincide with the span the points cover, which
corroborates the BLOB reading rather than leaving it asserted.

A stored date far outside a plausible range is the app's own absent marker and is
left empty rather than rendered as a first century date.

Distances and speeds are reported as stored, because the records separately carry
a unit system code and nothing in the extraction maps that code to a unit.

Every copy of the database in the extraction is read rather than the first one
found, so a device holding more than one app data container reports all of them;
proven against a tree with two containers, which reported exactly twice the rows.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@abrignoni
abrignoni merged commit eb22733 into main Aug 20, 2026
8 checks passed
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