Skip to content

WIP: watch pairing implementation - #3204

Open
deadYokai wants to merge 104 commits into
microg:masterfrom
deadYokai:wearable_tos
Open

deadYokai wants to merge 104 commits into
microg:masterfrom
deadYokai:wearable_tos

Conversation

@deadYokai

@deadYokai deadYokai commented Dec 25, 2025 •

Copy link
Copy Markdown
Contributor

Stage: Paired

  • full pair process (still with bugs)
  • test watchfaces
  • test sensors
  • refactor/cleanup

recommended todo:

  • fix long pair time / check thread races
  • make RPC requests better
  • polish/clean/refactor code
  • make working account auth ( 🫪 blocked, need implement SMARTDEVICE_SOURCE_DIRECT_TRANSFER (part of com.google.android.gms.smartdevice))

working:

  • notifications sync
  • watchface change

Added some callbacks

Added feature list to WearableService.java

Added android:exported="true", required by android 12, for TOS only, cuz i don't know if in other needed true or false
@deadYokai deadYokai changed the title Added bare layout for wearable TOS WIP: wearable TOS Dec 26, 2025
@deadYokai
deadYokai marked this pull request as draft December 27, 2025 05:30
@deadYokai

deadYokai commented Dec 28, 2025 •

Copy link
Copy Markdown
Contributor Author

now maybe fixes #2444 ,

at least my Mobvoi Health going to pair screen (after TOS)

but code in rough state for now

@deadYokai

Copy link
Copy Markdown
Contributor Author

now, my device is trying to pair via Mobvoi Health

@deadYokai deadYokai changed the title WIP: wearable TOS WIP: road to pair my TicWatch Dec 29, 2025
…dRequest`, `sendMessage`

prepairing ConnectionConfiguration to bluetooth stuff, to proper pair devices

filled some Parcable classes
and handshake

some bluetooth stuff
@deadYokai

deadYokai commented Dec 31, 2025 •

Copy link
Copy Markdown
Contributor Author

now need to implement openChannel method (wip)

for now only rfcomm client supported

ble, network, server is not implemented

still failed to pair
@ale5000-git

Copy link
Copy Markdown
Member

@deadYokai

Copy link
Copy Markdown
Contributor Author

@ale5000-git as i mentioned before

After 465f5f0 requires merging PR microg/Wearable#3 and pushing to maven

@deadYokai

Copy link
Copy Markdown
Contributor Author

or i can try to move https://github.com/microg/Wearable/ into GmsCore repo and get rid of dependence

https://mvnrepository.com/artifact/org.microg/wearable/0.1.1

@ale5000-git

Copy link
Copy Markdown
Member

Sorry I missed that point, then we have to wait for @mar-v-in for the decision of this thing.
In the meanwhile go ahead with the other parts you are working, thanks.

@mar-v-in

mar-v-in commented Jan 5, 2026

Copy link
Copy Markdown
Member

I'd suggest to entirely move the content of the microg/Wearable repo into play-services-wearable/core module in this repo and then we can archive the microg/Wearable repo entirely.

and some bluetooth changes
@deadYokai

deadYokai commented Jan 5, 2026 •

Copy link
Copy Markdown
Contributor Author

just sharing with good looking logs, in my opinion (logcat)

P.s. still not paired yet

image

some Bluetooth changes

moved some functions from WearableImpl to MessageHandler
- and some DataItem changes
@deadYokai

Copy link
Copy Markdown
Contributor Author

i cannot pinpoint why connection closing when channel tries to open

can anybody help me? like some logs maybe logs from watch (i cannot capture from my)?

@teccheck

teccheck commented Feb 27, 2026 •

Copy link
Copy Markdown

Just looked at your code quickly, and you're the first who even got the Bluetooth UUID right. Looks very promising, keep it up. 👍

I'll try to test your code, as soon as I can with my Pixel Watch.

EDIT: If you need more information about the protocol, hit me up. I'm happy to help :)

hitchman007 added a commit to hitchman007/GmsCore that referenced this pull request Sep 28, 2026
Replace the Wire 1.x wearable binary with Apache-2.0 source from microg/Wearable 137a09912aaa6d6fbbe6689ecf588059b89ae7a2 and generate its messages with GmsCore's Wire 6.4.6. Use generated adapters for socket framing. Reject negative frame lengths before allocation.

Expose requiresResponse and senderRequestId using the experimental schema referenced in microg#3204. Document the source and limits; no setup response or FRP status is fabricated.

Validated locally: wearable-core assembleDebug, testDebugUnitTest (12 tests, zero failures), lintDebug. Six new fixture tests cover legacy encoding/framing, RPC correlation fields, unknown fields and malformed frames. No hardware pairing validation; not a completed bounty submission.
@deadYokai

Copy link
Copy Markdown
Contributor Author

i did it

2026-09-30-12-49-36-313

@deadYokai
deadYokai marked this pull request as ready for review September 30, 2026 09:51
@woahwhattheheck

Copy link
Copy Markdown

At current PR head eaf3b07, the consent UI and service state appear disconnected: TermsOfServiceActivity returns acceptance extras without persisting them, the normal getConsentStatus path returns hasTosConsent=true (its exception path returns status 13 and false flags), and addAccountToConsent returns success without recording consentGranted. That can make a declined or fresh setup indistinguishable from an accepted one when the companion asks for status. The consent files cited here are unchanged from the previously inspected 7dc49aac snapshot; the intervening PR commit changes only WearableImpl.java and Bluetooth connection files.

For a focused persistence patch, is there an existing reference or redacted Binder/parcel capture that establishes:

  • The meanings of AcceptTermsRequest fields 2–8 and RecordTermConsentRequest fields 1–6, which currently retain unk* names.
  • The parcelable item type expected in ConsentResponse.accountConsentRecords.
  • The intended account/node scope and the relationship between the activity result and getConsentStatusForRequest's string field.

The useful regression cases would be fresh state, explicit acceptance, decline/revocation, process restart, and isolation between distinct account/node contexts.

@jun10r4lm31d4

Copy link
Copy Markdown

i did it
2026-09-30-12-49-36-313

You cloud add google account to wear? Here not possible set lockscreen pin and add google account

woahwhattheheck added a commit to woahwhattheheck/GmsCore that referenced this pull request Oct 4, 2026
The output stream API accepts length=0, but the no-progress guard returned before its existing empty-final-frame path. Keep waiting when input is unavailable, while allowing an exhausted zero length through the existing send and ACK lifecycle.

One production guard and one regression in the existing ChannelBehaviorTest. The complete current ChannelStateMachine and candidate test compiled against the retained Wear runtime. Only zeroLengthSendEmitsFinalFrameAndClosesOnlyAfterAck ran under offline Robolectric (SDK 29): unchanged source failed because it emitted 0 frames; candidate passed. With offset=0 and length=0, it performs no transport read, emits one empty final frame, waits for the ACK without another pump send, then clears the timeout and closes the sender. The test uses a recording manager/transport; it does not assert physical-watch transport, APK acceptance or whole-channel closure.

Nonzero offsets retain existing skipBytes behavior. Existing timeout/retry semantics remain in place; this change does not establish exactly-once delivery across timeouts.

Additive integration-branch continuation on ea71500; preserves the initialization callback and asset storage fixes. Original Wear microg#2843 / PR microg#3204 and 998E integration ownership remain canonical. No upstream merge or bounty payment claim.

Attribution: ASTRA-3C24-BH, GPT-6 Astra Pro, ChatGPT cloud harness.
Coordination: https://tokenjunkielabs.slack.com/archives/C0BU51F1PL3/p1791105968382479
@deadYokai

Copy link
Copy Markdown
Contributor Author

@jun10r4lm31d4

You cloud add google account to wear? Here not possible set lockscreen pin and add google account

i'm working on wifiSync where it crashes when connecting to google account, maybe it fix this

@deadYokai

Copy link
Copy Markdown
Contributor Author

currently account connection not working, need to implement SMARTDEVICE_SOURCE_DIRECT_TRANSFER

@deadYokai

Copy link
Copy Markdown
Contributor Author

@teccheck @ale5000-git could you give it a quick test?

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.

6 participants