Skip to content

Explain what Samsung Health+ needs to sync: its own consent and background starts - #46

Merged
FacuM merged 2 commits into
LibreStatic:mainfrom
Frossic:docs/health-plus-consent
Nov 29, 2026
Merged

FacuM merged 2 commits into
LibreStatic:mainfrom
Frossic:docs/health-plus-consent

Conversation

@Frossic

@Frossic Frossic commented Nov 26, 2026 •

Copy link
Copy Markdown

Summary

Samsung Health+ never synced with the Samsung cloud on my setup (Xiaomi 12, Galaxy Watch7). The cause is not the cloud round trip of #9 but a consent: Samsung keeps the health data consents per app, so Samsung Health+ does not inherit the ones given in the stock Samsung Health. With them off, every sync is skipped on purpose.

This PR only documents it: a step in the Samsung Health+ section and a Note under the #9 known issue. No code changes.

What I saw

  • Log of <prefix>.shealth:remote on every sync attempt:
    I Health.Server.Data: performSync start...
    E Health.Server.Data: Withdrawn to shd
    
    and getLastSync minUpload: 1969 (never synced).
  • In the app: Settings → Sync with Samsung account = "No sync history"; the home banner said the data had not synced for 3 days and suggested Wi-Fi or the sync settings.
  • Settings → Privacy: the health and wellness, cycle tracking and medication consents were all off.

Why it blocks the sync

From the 7.2.0.041 code: SyncHelper.performSync stops with Withdrawn to shd when SyncStatusProvider.isAllShdWithdrawn() is true (and the request is not a forced download). That is true when every ShdCategory (HealthWellness, Cycle, Medication) reads pref_is_withdrawn_to_shd_<category> as true, and the default of that preference is true outside China. Accepting the health and wellness consent goes through setAgree → ServerSyncControl.setWithdrawnToShd(HealthWellness, false).

Verified

After turning on Consent to the processing of health and wellness data in Samsung Health+ and tapping Sync, the first sync downloaded the whole history (≈9.5k step records, 4.1k sleep stages, 4k heart rate, plus HRV, SpO2, respiratory rate, calories) and the settings show the last sync time.

I deliberately did not patch the check out: it would make the app process sensitive health data without the user's consent.

Update: the cloud round trip itself is fast

Once the consent is on and the apps may start in the background, new watch data reaches Samsung Health+ in about a minute. The stock app uploads within minutes (upload=true LOCAL syncs), and the server then pushes a sync request to Samsung Health+ (sync_type=PUSH, down_sync_only=true, with the changed manifests):

Time Event
14:36:15 stock Samsung Health uploads the new steps
14:37:18 push sync request reaches Samsung Health+ (manifest_list=…pedometer_step_count,…step_count)
14:37:21 Samsung Health+ downloads 7 new step_count rows

On Xiaomi phones both hops were blocked by HyperOS: background autostart is off by default for these apps and gets turned off again, so the stock app neither uploaded nor reacted, and Samsung Health+ missed the pushes. The second commit adds that to the Samsung Health+ section (with the HyperOS setting names) and points to it from the #9 note.

🤖 Generated with Claude Code

Samsung keeps the health data consents per app, so Samsung Health+ does not
inherit the ones given in the stock app. With the health and wellness
consent off, its server sync stops at once for every category ('Withdrawn
to shd': SyncStatusProvider.isAllShdWithdrawn, whose per-category default is
'withdrawn' outside China), Settings > Sync with Samsung account shows 'No
sync history' and the home banner only blames the network. Seen on a Xiaomi
12: after turning the consent on, the first sync downloaded the full
history (steps, sleep stages, heart rate, HRV, SpO2, ...).

Adds the step to the Samsung Health+ section and a note to the LibreStatic#9 entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 31 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a2d3e631-9713-4be6-ae69-191b09cdb8bf
Commits

Reviewing files that changed from the base of the PR and between 728223c and d04d440.

Files selected for processing: 1

  • README.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

The cloud path is not slow by itself: the stock app uploads within minutes
and the server pushes a sync request to Samsung Health+ (sync_type=PUSH with
the changed manifests), which downloads the new rows. Measured on a Xiaomi
12 with a Galaxy Watch7: steps uploaded at 14:36:15, push at 14:37:18, 7 new
step_count rows in Samsung Health+ at 14:37:21. Both hops need background
starts, which HyperOS blocks by default (autostart) and turns off again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Frossic Frossic changed the title Explain that Samsung Health+ needs its own health data consent to sync Explain what Samsung Health+ needs to sync: its own consent and background starts Nov 26, 2026
@FacuM
FacuM merged commit 3d88261 into LibreStatic:main Nov 29, 2026
1 check passed
@FacuM

FacuM commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

Thank you @Frossic! Merged into main, and it ships in 0.11.3. The explanation of the Samsung Health+ consent and background starts should save people a lot of guessing about why nothing syncs.

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