knowledgeC.db and Biome: iOS Pattern of Life
iOS pattern-of-life data: app focus, lock state, backlight and charging in knowledgeC.db and Biome SEGB streams, with paths, epochs and parsers.
- Location
- /private/var/mobile/Library/CoreDuet/Knowledge/knowledgeC.db and /private/var/mobile/Library/Biome/streams/
- Evidence area
- Proves
- When the device was unlocked, lit and charging, which app was in the foreground and for how long, and other usage signals, per interval
- Timestamps
- knowledgeC.db: Cocoa time in seconds, UTC, with ZSECONDSFROMGMT offset. Biome SEGB: Cocoa time in record headers; payload times vary by stream
- Acquisition
- Full file system extraction only (not in iTunes / Finder backups); the device should be AFU so the protected files are readable
- Retention
- Weeks rather than months: roughly four weeks is commonly observed for knowledgeC.db, and Biome streams are pruned per stream. Measure on the evidence
- Collection
- Full file system extraction
Tools
Compare all toolsWhat it is
Apple's pattern-of-life stores record the device's state over time as intervals: an app in focus from 18:02:40 to 18:04:14, the screen lit, the device locked, plugged in, playing media, connected to a car. For an investigator they answer questions no message database can: was the owner using the phone at 23:10, which app was open when the photo was taken, was the device locked during the call.
Two generations coexist on the releases this site covers:
- knowledgeC.db, a Core Data SQLite store written by the CoreDuet framework, organised in named streams (
/app/inFocus,/device/isLocked, and so on). - Biome, a newer storage framework that writes per-stream files in the SEGB format. From around iOS 16, streams that analysts relied on in knowledgeC.db, including app focus, are reported to live mainly in Biome, and a recent knowledgeC.db can be sparse.
Always examine both. The mix of streams changes with every major release.
Where it lives
| Store | Path | Notes |
|---|---|---|
| knowledgeC.db | /private/var/mobile/Library/CoreDuet/Knowledge/knowledgeC.db (+ -wal, -shm) | WAL mode; recent events often only in the WAL |
| Biome (user) | /private/var/mobile/Library/Biome/streams/restricted/<Stream>/local/ and .../public/<Stream>/local/ | One or more SEGB files per stream |
| Biome (system) | /private/var/db/biome/streams/... | System-level streams |
| Related | /private/var/mobile/Library/CoreDuet/People/interactionC.db | Contact interactions, a separate CoreDuet store |
None of these are included in iTunes or Finder backups. They require a full file system extraction, and because they are protected by data protection classes tied to the passcode, a device in BFU state will yield little or nothing.
What it proves
- App foreground use per bundle ID and duration (
/app/inFocusin knowledgeC.db,App.InFocusin Biome on recent releases). - Screen backlight (
/display/isBacklit), lock state (/device/isLocked), charging (/device/isPluggedIn) and battery level. - Media playback, notifications, Siri intents and Safari history streams, where present on the version examined.
It does not prove that a specific person was holding the phone. An app in focus on an unlocked device shows use by someone who could unlock it or who picked it up while it was unlocked.
Key fields
knowledgeC.db, table ZOBJECT (one row per interval):
| Column | Meaning |
|---|---|
ZSTREAMNAME | Stream, e.g. /app/inFocus, /device/isLocked |
ZVALUESTRING | Main value, usually a bundle ID |
ZVALUEINTEGER / ZVALUEDOUBLE | Numeric value (1 = on / locked / plugged in) |
ZSTARTDATE, ZENDDATE | Interval start and end |
ZCREATIONDATE | When the row was written |
ZSECONDSFROMGMT | Device UTC offset at event time |
ZSOURCE, ZSTRUCTUREDMETADATA | Foreign keys to producer details and stream-specific metadata |
Biome SEGB files contain a header and a sequence of records; each record carries timestamps and a protobuf payload whose schema depends on the stream. There is no public schema: parsers map fields per stream and per version.
Timestamps
knowledgeC.db dates are Cocoa time in seconds (UTC). ZSECONDSFROMGMT gives the local offset used at the time, which is also a useful travel indicator.
SELECT ZSTREAMNAME,
datetime(ZSTARTDATE + 978307200, 'unixepoch') AS start_utc,
datetime(ZENDDATE + 978307200, 'unixepoch') AS end_utc,
ZENDDATE - ZSTARTDATE AS seconds,
ZVALUESTRING, ZVALUEINTEGER, ZSECONDSFROMGMT
FROM ZOBJECT
WHERE ZSTREAMNAME IN ('/app/inFocus', '/device/isLocked', '/display/isBacklit')
ORDER BY ZSTARTDATE;
Biome record timestamps are also Cocoa-based in the parsers published so far, but payload fields vary. Validate a few records against a known event (a test unlock, a test app launch) before relying on a stream.
Retention
Roughly four weeks of events is the figure most often observed for knowledgeC.db, but pruning is per stream and changes between releases. Biome files are rotated per stream as well. Report the oldest and newest timestamp per stream you actually found, not a generic number.
Collection
- Acquire a full file system from an AFU device (see the acquisition guide).
- Export
knowledgeC.dbwith its-waland-shm, the wholeBiomedirectory tree and/private/var/db/biome. - Keep original paths: Biome stream names come from the directory names, and parsers depend on them.
Parsing
- APOLLO runs SQL modules for knowledgeC.db and other pattern-of-life databases and merges them into one timeline.
- iLEAPP has knowledgeC modules and a growing set of Biome parsers.
- ccl-segb reads SEGB files (both known versions) so you can inspect records that other tools do not decode yet.
sqlite3for knowledgeC.db, starting with a stream inventory:
SELECT ZSTREAMNAME, COUNT(*),
datetime(MIN(ZSTARTDATE) + 978307200, 'unixepoch') AS first_utc,
datetime(MAX(ZSTARTDATE) + 978307200, 'unixepoch') AS last_utc
FROM ZOBJECT GROUP BY ZSTREAMNAME ORDER BY 2 DESC;
Investigator tips
- A near-empty
/app/inFocuson a recent iOS version is expected. Look in Biome before writing "no app usage". - Combine app focus with
/device/isLockedand backlight: focus on a locked, dark screen is weak evidence of use. - Rows can come from other devices on the same Apple Account where synced streams exist. Check the source device fields before attributing.
- Put sms.db reads, Safari visits and Significant Locations visits on the same UTC axis as these intervals: that is where pattern of life earns its keep.
- Missing WAL files are the most common reason for "no recent activity". Say whether they were collected.
See also
Related artifacts
- sms.db: iMessage and SMS Database on iOS
- Safari History.db on iOS: Browsing History Forensics
- Significant Locations: iOS routined Databases
- CallHistory.storedata: iOS Call Log Database
- Biome Streams on iOS: App.InFocus and Beyond
- PowerLog (CurrentPowerlog.PLSQL) on iOS
- Screen Time (RMAdminStore) on iOS
- interactionC.db: iOS Contact Interactions