In an iPhone backup, the file 516d7e19a4a0c9475c0015fae195626377b1b810 is healthdb_secure.sqlite. Apple Health's records: steps, heart rate, workouts, sleep and every other sample the Health app keeps.
| Real name | healthdb_secure.sqlite |
| Domain | HealthDomain |
| Path | Health/healthdb_secure.sqlite |
| In the backup folder | 51/516d7e19a4a0c9475c0015fae195626377b1b810 |
| Its name is the SHA-1 of | HealthDomain-Health/healthdb_secure.sqlite |
| App | Health |
| Seen in | iOS 13.3.1, 13.4.1, 15.3.1, 16.0, 16.1.2 and 17.3. |
| Needs an encrypted backup | Yes. Apple lists Health data among the things only an encrypted backup includes. |
| OpenExtract reads it | Not yet. |
healthdb_secure.sqlite holds the Health app's records. Each sample is a row in samples, with its type and its start and end times. The value of a measurement, such as a step count or a heart rate, is in quantity_samples, matched by data_id.
Health/healthdb.sqlite (fa2e5ac3b7a62c8b7cb21e440c79eedd218550ea): The Health database's other file. It doesn't hold the samples; its tables list the apps and devices the data came from (sources, source_devices) and which apps may use Health data (authorization). We saw it next to healthdb_secure.sqlite in iOS 13.3.1, 13.4.1, 15.3.1, 16.0, 16.1.2 and 17.3.
samples.data_id: The sample's id, shared with its row in quantity_samples.samples.start_date: When the sample starts.samples.end_date: When it ends.samples.data_type: What kind of sample it is, as a number.quantity_samples.data_id: The sample's id in samples.quantity_samples.quantity: The measured value.iOS 13.3.1 has 51 tables:
ACHAchievementsPlugin_earned_instances, ACHAchievementsPlugin_templates, account_owner_samples, activity_caches, activitysharing_competition_lists, activitysharing_competitions, allergy_record_samples, binary_samples, category_samples, cda_documents, clinical_accounts, clinical_authorization_sessions, clinical_credentials, clinical_deleted_accounts, clinical_gateways, clinical_record_samples, concept_index, condition_record_samples, correlations, data_provenances, data_series, devices, diagnostic_test_report_samples, diagnostic_test_result_samples, external_sync_ids, fitness_friend_achievements, fitness_friend_activity_snapshots, fitness_friend_workouts, key_value_secure, medical_records, medication_dispense_record_samples, medication_order_samples, medication_record_samples, metadata_keys, metadata_values, object_authorizations, objects, original_fhir_resources, original_fhir_resources_last_seen, pending_associations, procedure_record_samples, quantity_sample_series, quantity_sample_statistics, quantity_samples, samples, schema_user_versions, unit_strings, unknown_record_samples, vaccination_record_samples, workout_events, workouts
Then, version by version:
ad_hoc_concepts, cached_queries, ck_record_cache_secure, contributors, coverage_record_samples, ecg_samples, heart_sample_classifications, list_user_domain_concepts, location_series_data, medical_user_domain_concept_category_types, medical_user_domain_concept_mappings, medical_user_domain_concepts, original_signed_clinical_data_records, quantity_series_data, sample_aggregate_caches, shared_summaries, shared_summary_authorization_categories, shared_summary_object_types, shared_summary_transaction_metadata, shared_summary_transactions, sharing_authorizations, sharing_relationship, signed_clinical_data_issuer, signed_clinical_data_record_samples, sleep_schedule_samples, summary_sharing_entry, user_domain_concept_links, user_domain_concept_properties, user_domain_concepts, user_domain_medical_coding_strings, user_domain_medical_codings, verifiable_clinical_record_samples.RacePreviousRoute_concrete_cluster, RacePreviousRoute_generation_queue, RacePreviousRoute_location_series, RacePreviousRoute_route_snapshot, RacePreviousRoute_workout_cluster, RacePreviousRoute_workout_cluster_components, attachment_references, attachments, clinical_account_events, medication_dismissed_interactions, medication_dose_event_samples, medication_schedule_interval_data, medication_schedule_items, medication_schedules, medication_user_domain_concepts, user_domain_concept_education_content, user_domain_concept_education_content_section_data, user_domain_concept_education_content_section_data_strings, user_domain_concept_education_content_sections, user_domain_concept_localized_strings, user_domain_concept_named_quantities, vision_prescription, workout_activities, workout_statistics.RacePreviousRoute_workout, associations, clinical_note_record_samples, medical_downloadable_attachments, scored_assessment_samples, secure_kv_device_storage, state_of_mind_domains, state_of_mind_labels, state_of_mind_samples, workout_zones_associations, workout_zones_samples; drops correlations.The iOS 16.0 backup is encrypted with a password that isn't public, so only its list of files was checked, not its tables.
OpenExtract doesn't read it yet. OpenExtract doesn't have a Health screen yet.
Always encrypted on disk. This file is only in encrypted backups, so the copy in the backup folder is encrypted with a key of its own, which only the backup password unlocks. Nothing can open it until it's decrypted. Tools such as iphone_backup_decrypt, the open-source library OpenExtract uses, can decrypt a single file; then open the decrypted copy with any SQLite browser, such as DB Browser for SQLite.
Checked against public test backups from iOS 13.3.1, 13.4.1, 15.3.1, 16.1.2 and 17.3, and the file list of an iOS 16.0 backup, reading only file, table and column names. How we checked · All backup files