Skip to content

WIP: road to pair my TicWatch#3204

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

WIP: road to pair my TicWatch#3204
deadYokai wants to merge 16 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

So I got the same kind of disconnects as you do. Much worse is that I've discovered that it's incredibly painful to test the pairing process as the watch has to do a factory reset before being able to initiate another pairing attempt which takes ages. My guess is that the rfcomm server crashes because we send garbage data, but I can't test that as I can only activate ADB on the watch once it's set up. Perhaps we can, for now wrap the I/O code in try catch blocks and try a reconnect. Maybe that gets the watch to pair? Will test that later.

I also tried to transfer the watch from a GMS phone to my microg test phone, which lets me see the logs from GMS on the watch. However, that leads to an entirely different nest of problems, and I'm not sure where that goes wrong.

Out of frustration and to help development, I've started to build some very simple UI to debug the state of the wear service. Currently, it can only display stored connection configs.

screenshots

That was quite fun, so I'm hooked now xD

@deadYokai
Copy link
Contributor Author

deadYokai commented Feb 28, 2026

@teccheck i can change my flash of ticwatch, but developer options is locked by function checkDebuggingDisallowed() in ClockworkSettings.apk and i dont know how to resign or/and replace it without bootloop

function content

    private boolean checkDebuggingDisallowed() {
        RestrictedLockUtils.EnforcedAdmin enforcedAdmin = getEnforcedAdmin();
        if (enforcedAdmin != null) {
            RestrictedLockUtils.sendShowAdminSupportDetailsIntent(getActivity(), enforcedAdmin);
            return true;
        }
        if (!isUserBuild() || isSetupWizardCompleted()) {
            return isUserBuild() && isOemDebugRequired() && !isOemDebugEnabled();
        }
        return true;
    }

    RestrictedLockUtils.EnforcedAdmin getEnforcedAdmin() {
        return RestrictedLockUtilsInternal.checkIfRestrictionEnforced(getActivity(), "no_debugging_features", UserHandle.myUserId());
    }

    boolean isUserBuild() {
        return Build.IS_USER;
    }

    boolean isSetupWizardCompleted() {
        return Settings.System.getInt(getContext().getContentResolver(), "setup_wizard_has_run", 0) == 1;
    }

    boolean isOemDebugRequired() {
        return getContext().getResources().getBoolean(R.bool.config_requireOemDebug);
    }

    boolean isOemDebugEnabled() {
        return SystemProperties.getBoolean("ro.boot.oemdebug", false);
    }

i tried changing init.rc params, but still cannot enable adb in setup

Edit:
when I bought TicWatch, it had WearOS 3, and there I could open the developer settings and adb,
but i updated to WearOS 4 and developer settings is locked and i cant find any ota with wearos3

maybe pixelwatch has some ota with wearos3

@teccheck
Copy link

Unfortunately, my Pixel Watch 1 died, so I have a Pixel Watch 2 now. In Theory, I could unlock the bootloader and flash anything I want, but that seems a bit too risky to me. I have found a problem where the Watch App on my phone tries to open a channel, but the watch doesn't ack that. I'll see what I can do about that. Maybe that's the solution or at least one part of it...

@teccheck
Copy link

teccheck commented Mar 1, 2026

I'm relatively sure now that the disconnects have something to do with opening a channel:
grafik

The socket is always closed as soon as the channelRequest is sent. I don't think, there's anything wrong with the proto, but perhaps the values of the request are invalid somehow?

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