Skip to content

WIP: road to pair my TicWatch#3204

Draft
deadYokai wants to merge 29 commits intomicrog:masterfrom
deadYokai:wearable_tos
Draft

WIP: road to pair my TicWatch#3204
deadYokai wants to merge 29 commits intomicrog:masterfrom
deadYokai:wearable_tos

Conversation

@deadYokai
Copy link
Contributor

@deadYokai deadYokai commented Dec 25, 2025

Just trying to make a pair with my watch, no more

Many parts of code is just stubs, or workarounds, needed proper implementation

After 465f5f0 requires merging PR microg/Wearable#3 and pushing to maven (not relevant after 63a77a0)

P.S. maybe needed code cleanup

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
Copy link
Contributor Author

deadYokai commented Dec 28, 2025

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
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
Copy link
Contributor Author

deadYokai commented Dec 31, 2025

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
Member

@deadYokai
Copy link
Contributor Author

@ale5000-git as i mentioned before

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

@deadYokai
Copy link
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
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
Copy link
Member

mar-v-in commented Jan 5, 2026

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
Copy link
Contributor Author

deadYokai commented Jan 5, 2026

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
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
Copy link

teccheck commented Feb 27, 2026

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 :)

@teccheck
Copy link

teccheck commented Mar 2, 2026

discovered some proto differences for example, reversed from GMS

Nice!

@teccheck
Copy link

teccheck commented Mar 2, 2026

I've made a clean version of the history in my branch. If you want, you can use that. If you want, you can even resign your last two commits (the code update commit is just your code update + fixes by @teccheck but without my edits)

@deadYokai
Copy link
Contributor Author

I've made a clean version of the history in my branch. If you want, you can use that. If you want, you can even resign your last two commits (the code update commit is just your code update + fixes by @teccheck but without my edits)

hopefully i made it correct

@teccheck
Copy link

teccheck commented Mar 2, 2026

Yes, almost. I think the last two commits are not needed. The revert commit is definitely not needed, as the commit it reverts does not exist in the history anymore.

I'm not sure what Clean history does. Did you make any changes after node migration update?

If not, try git reset HEAD~2 --hard. This removes the last two commits from the history completely and resets your working directory to node migration update. This will require a force push

Also, I'm sorry for causing all this trouble. I hope this is ok for you…

@deadYokai
Copy link
Contributor Author

deadYokai commented Mar 2, 2026

Yes, almost. I think the last two commits are not needed. The revert commit is definitely not needed, as the commit it reverts does not exist in the history anymore.

I'm not sure what Clean history does. Did you make any changes after node migration update?

If not, try git reset HEAD~2 --hard. This removes the last two commits from the history completely and resets your working directory to node migration update. This will require a force push

Also, I'm sorry for causing all this trouble. I hope this is ok for you…

its ok, i just not good at git

Edit: maybe i need take courses on git

@teccheck
Copy link

teccheck commented Mar 2, 2026

its ok, i just not good at git

That is totally fine. Thanks a bunch for doing the work anyway! Also, if you need help, I'm glad to help. I only learned a lot of my git skills because a friend showed me recently :)

@deadYokai
Copy link
Contributor Author

@teccheck check if this makes sense

https://pastebin.com/KKDJtd4y

@deadYokai
Copy link
Contributor Author

@teccheck can you check proto communication in last commit?

@teccheck
Copy link

teccheck commented Mar 4, 2026

@teccheck can you check proto communication in last commit?

I have a few exams coming up, so I don't have that much time rn.

But I took a quick look at this anyway, and there are a few errors:

  • ChannelTransferInfo: This is an incorrect and renamed version of ChannelDataHeader
  • ChannelTransferRequest: Renamed version of ChannelDataRequest
  • ChannelCloseRequest: Renamed version of ChannelDataAckRequest
  • ChannelRequest: the sub message types changed to the ones above, status_code and error_code should stay origin and minVersion
  • FetchAsset: was correct before, field names are wrong now
  • FilePiece: was correct before, field names are wrong now

However, you did get some things right:

  • Using Enums is a good idea, and I've tested that, but there seems to be a problem with them (Maybe it's a problem with Wire, the protobuf lib we're using. When I use them, the decoding is messed up
  • Connect mostly looks good to me

Please don't take this personal, but did you use some AI to generate that? I'm asking because a lot of this seems quite messy. All the renaming of things that worked perfectly fine before seems like a human wouldn't do that without thinking twice about it. Especially because these names were established before and they don't come out of nowhere…

So I checked GMS again and made some changes to wearable.proto. I will test them later or tomorrow and commit them once they're ready.

@deadYokai
Copy link
Contributor Author

deadYokai commented Mar 4, 2026

some AI to generate that
these names were established before and they don't come out of nowhere…

i used for reconstructing proto file from gms code

Edit: maybe i going to revert last 2 commits

@teccheck
Copy link

teccheck commented Mar 4, 2026

some AI to generate that
these names were established before and they don't come out of nowhere…

i used for reconstructing proto file from gms code

Edit: maybe i going to revert last 2 commits

No worries and don't revert them just yet ;)
EDIT: Never mind, it's fine :D

From a quick look, I think you should at least keep WearableReader and WearableWriter. And maybe move NetworkConnectionX into their own package, as I don't think bluetooth is quite right here.

@deadYokai
Copy link
Contributor Author

some AI to generate that
these names were established before and they don't come out of nowhere…

i used for reconstructing proto file from gms code
Edit: maybe i going to revert last 2 commits

No worries and don't revert them just yet ;) EDIT: Never mind, it's fine :D

From a quick look, I think you should at least keep WearableReader and WearableWriter. And maybe move NetworkConnectionX into their own package, as I don't think bluetooth is quite right here.

because of this i commited revert, instead of rebasing

@teccheck
Copy link

teccheck commented Mar 4, 2026

In general, you might want to keep your commits small. That way you can only revert specific things. For example, you could make a commit for just WearableReader and WearableWriter. I'm sure, you'll get the hang of it. Keep at it 👍

@teccheck
Copy link

teccheck commented Mar 4, 2026

I've committed a few things to my branch. Please don't include them into your branch yet. I'll try to incorporate the good changes from 65a1e42

@teccheck
Copy link

teccheck commented Mar 4, 2026

I've added 3 commits to my branch containing all of your changes unrelated to proto. Feel free to take a look. If you want to cleanly include them in your branch, you can do so via git reset --hard HEAD~3 and git pull [remote name of my repo] wearable. Cheers :D

@teccheck
Copy link

teccheck commented Mar 4, 2026

I just noticed, that I made a mistake with the ChannelControl Type in proto. They should be:

CHANNEL_CONTROL_OPEN = 1;
CHANNEL_CONTROL_OPEN_ACK = 2;
CHANNEL_CONTROL_CLOSE = 3;

This was correct in the constants in ChannelManager, but with your last two commits that changed.

@deadYokai
Copy link
Contributor Author

I just noticed, that I made a mistake with the ChannelControl Type in proto. They should be:

CHANNEL_CONTROL_OPEN = 1;
CHANNEL_CONTROL_OPEN_ACK = 2;
CHANNEL_CONTROL_CLOSE = 3;

This was correct in the constants in ChannelManager, but with your last two commits that changed.

image

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.

4 participants