Conversation
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
|
now maybe fixes #2444 , at least my Mobvoi Health going to pair screen (after TOS) but code in rough state for now |
|
now, my device is trying to pair via Mobvoi Health |
…dRequest`, `sendMessage` prepairing ConnectionConfiguration to bluetooth stuff, to proper pair devices filled some Parcable classes
and handshake some bluetooth stuff
|
now need to implement openChannel method (wip) for now only rfcomm client supported ble, network, server is not implemented |
still failed to pair
|
@deadYokai |
|
@ale5000-git as i mentioned before
|
|
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 |
|
Sorry I missed that point, then we have to wait for @mar-v-in for the decision of this thing. |
|
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
some Bluetooth changes moved some functions from WearableImpl to MessageHandler
- and some DataItem changes
|
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)? |
|
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 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: maybe pixelwatch has some ota with wearos3 |
|
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... |
|
managed unlock developer options by changing |
|
what i managed to get from watch, maybe in other day will read logs in detail |
With that you should be able to run |
|
That should be fixed. Did you recompile the protos? (I mean it should happen automatically). The problem was that channelId is sfixed64 |
oh, i tested still with int64, but in commit i set to sfixed64 |
|
@teccheck i think problem is missing implementation of NodeMigration, but i'm not sure |
Hm, I don't know… One other thing: Could you add my commits directly to your branch instead of a squashed commit? That would keep things clean and my involvement visible. That would be awesome :) EDIT: Two things for context:
|
| private RootMessage buildRootMessage(ChannelStateMachine ch, ChannelControlRequest ctrl) { | ||
| ChannelRequest cr = new ChannelRequest.Builder() | ||
| .channelControlRequest(ctrl) | ||
| .version(0) | ||
| .origin(0) | ||
| .build(); | ||
|
|
||
| Request req = new Request.Builder() | ||
| .requestId(requestIdCounter.getAndIncrement()) | ||
| .targetNodeId(ch.token.nodeId) | ||
| .sourceNodeId(localNodeId) | ||
| .packageName(ch.token.appKey.packageName) | ||
| .signatureDigest(ch.token.appKey.signatureDigest) | ||
| .path(ch.channelPath) | ||
| .request(cr) | ||
| .unknown5(0) | ||
| .generation(generationCounter.get()) | ||
| .build(); | ||
|
|
||
| return new RootMessage.Builder().channelRequest(req).build(); | ||
| } | ||
|
|
||
| private RootMessage buildDataRootMessage(ChannelStateMachine ch, ChannelDataRequest dataReq) { | ||
| ChannelRequest cr = new ChannelRequest.Builder() | ||
| .channelDataRequest(dataReq).version(1).origin(0).build(); | ||
| Request req = new Request.Builder() | ||
| .requestId(requestIdCounter.getAndIncrement()) | ||
| .targetNodeId(ch.token.nodeId) | ||
| .sourceNodeId(localNodeId) | ||
| .packageName(ch.token.appKey.packageName) | ||
| .signatureDigest(ch.token.appKey.signatureDigest) | ||
| .request(cr) | ||
| .generation(generationCounter.get()) | ||
| .build(); | ||
| return new RootMessage.Builder().channelRequest(req).build(); | ||
| } | ||
|
|
||
| private RootMessage buildAckRootMessage(ChannelStateMachine ch, ChannelDataAckRequest ack) { | ||
| ChannelRequest cr = new ChannelRequest.Builder() | ||
| .channelDataAckRequest(ack).version(1).origin(0).build(); | ||
| Request req = new Request.Builder() | ||
| .requestId(requestIdCounter.getAndIncrement()) | ||
| .targetNodeId(ch.token.nodeId) | ||
| .sourceNodeId(localNodeId) | ||
| .packageName(ch.token.appKey.packageName) | ||
| .signatureDigest(ch.token.appKey.signatureDigest) | ||
| .request(cr) | ||
| .generation(generationCounter.get()) | ||
| .build(); | ||
| return new RootMessage.Builder().channelRequest(req).build(); | ||
| } | ||
|
|
There was a problem hiding this comment.
I specifically merged all of those builders into one single method to avoid having redundant code. You could make this into
- buildRootMessage, just for the root message
- buildAckMessage, uses buildRootMessage and builds the ack
- buildDataMessage, same as ack for data
- buildControlMessage, sames as ack for control
I think that would be a better option
|
@teccheck check if okay, because i dont know git much |
|
discovered some proto differences |
First, thanks for making the effort! Though it's not completely clean, I'd say that should do. However, there's an easier solution to this: You can add my repo as a remote using Now every time you want to incorporate my changes, you can do If you have already pushed some commits to GitHub, you might need to do a force push. You can use In general, git rebase can help you reorder your commits which allows you to clean up your history. |
Nice! |
|
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 |
hopefully i made it correct |
|
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 If not, try 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 |
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 :) |
|
@teccheck check if this makes sense |




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