Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bedtime Mode not being synced on Pixel Watch #1

Open
Dave247 opened this issue Sep 14, 2023 · 18 comments
Open

Bedtime Mode not being synced on Pixel Watch #1

Dave247 opened this issue Sep 14, 2023 · 18 comments

Comments

@Dave247
Copy link

Dave247 commented Sep 14, 2023

(Follow on from rhaeus#11)

I tried version 2.2 which does seem to work a lot better then I remember the app used to. However, I don't think Bedtime mode still gets set correctly on the synced device, mine being a Pixel Watch and Pixel 7 Pro.

When enabling Bedtime mode using the quick settings tile on either the watch or phone, Do not Disturb is correctly turned on, but the Bedtime mode tile on the synced device doesn't change to indicate that the mode is turned on.

Honestly though as the mode isn't explained all that well, I'm not sure exactly what difference it even makes, or if it even matters.

@DreadedLama
Copy link
Owner

The bedtime mode sync is a one-way sync and not a 2-way sync like DND, it works only from mobile to watch, not the other way around.
I have tested it on a Galaxy watch 4, and not on a pixel watch as I don't have one.

Can you try turning on bedtime mode on your mobile and check if it syncs to your Pixel watch?

@Dave247 Dave247 changed the title Bedtime Mode not being set on synced device Bedtime Mode not being set on Pixel Watch Sep 14, 2023
@Dave247 Dave247 changed the title Bedtime Mode not being set on Pixel Watch Bedtime Mode not being set on phone from Pixel Watch Sep 14, 2023
@Dave247
Copy link
Author

Dave247 commented Sep 14, 2023

Ah hmm, good to know, that narrows it down what I should be testing and looking for.

Unfortunately though the result is the same, turning on Bedtime mode on my Pixel watch only turns on DND on my phone, but not Bedtime mode.

What phone are your trying it on with your Galaxy Watch? As maybe it might not just be something with the watch, but also because I have a Pixel 7, where Digital Wellbeing is integrated pretty heavily into the stock ROM. On top of that, I'm also using the beta version in case that adds any difference. According to the appinfo, I have version 1.6.551070056.beta (529558) of Digital Wellbeing installed.

@DreadedLama
Copy link
Owner

I have a Pixel 7 paired to my Galaxy watch. I'm too on Android 14 Beta.

The watch is supposed to turn to bedtime mode if I turn my phone to bedtime mode and not the other way around. BetimeMode feature is a one way sync only(from mobile to watch).

Once you turn bedtime mode on mobile, it sends an intent to watch, and upon receiving it the watch app changes the SECURE_SETTING "setting_bedtime_mode_running_state" setting value from 0 to 1. Galaxy watch uses this secure setting value to change its bedtime mode, not sure if the Pixel watch has the same setting for bedtime mode. Maybe you can test it and confirm if it works in the desired way.

On the contrary, changing the bedtime mode on the watch does not send any intent to the mobile app. It is because I was unable to find any SECURE_SETTING on mobile which can be overwritten to change the bedtime mode. The one way that I can think of is to use accessibility service for it on mobile(to mimick input swipes), which I personally don't want to.

Though there are workaround to it, like just turning the mobile to grayscale mode, which I think can be done without mimicking input swipes (you can find this option in Accessibility->Colour Correction), which in a sense is what bedtime mode does, it turns your phone black and white. But this approach also has a few issues from an implementation perspective. I'm still looking to a viable approach for this (if possible)

@Dave247 Dave247 changed the title Bedtime Mode not being set on phone from Pixel Watch Bedtime Mode not being synced on Pixel Watch Sep 14, 2023
@Dave247
Copy link
Author

Dave247 commented Sep 14, 2023

Oh sorry, I misunderstood and had it the wrong way around. The result is still the same though, I don't see the little bedtime mode tile on my watch light up when toggling it on my phone. It only toggles DND.

I did grant the secure settings permission which shows as enabled on the app on the watch though, as well as of course toggling the setting for bedtime mode on. I didn't get any error when running the command over adb so I assumed for it to have worked.

How would I go about looking for the setting in the rom on my watch? While I don't know the ins and outs of Android in intricate detail, I know enough to be able to follow instructions and find the answer out for myself, as long as I know what I should be doing.

@DreadedLama
Copy link
Owner

I used autowear for this, you can install autowear on both mobile and watch from Play Store, grant it necessary permissions. I guess you get 7 days of free access before you need to buy it (not sure though as I have premium version).
Grant the watch app adb WRITE_SECURE_SETTINGS permission using the following command-
"adb shell pm grant com.joaomgcd.autowear android.permission.WRITE_SECURE_SETTINGS"

Once you have installed the apps and granted the permissions, these are the steps -

  1. In the mobile app, there is an option known as "Secure Settings. Open it and click on "+"
  2. Click "Automatic Setup"
  3. Now change some setting on the watch, in this case, set the watch to Bedtime mode.
  4. Click "ok" on mobile.
  5. On the mobile app it will show the changed secure settings which have been modified on the watch.

You can refer to this video for reference -
https://youtu.be/Rej1y5r34Bw?t=216

Once you get all the settings, can you please post a screenshot of them here for reference?

Do let me know if you run into any issues.

@Dave247
Copy link
Author

Dave247 commented Sep 15, 2023

Oh wow, that's amazing. I was fully expecting needing to do some complex dump and have to shift through looking for what I needed, but this app is great. I didn't even need to activate the trial to be able to use the secure settings feature. I should spend some more time looking into the app later and see if there is anything I want to do that I could use it for.

Anyway so here is the screenshot. It looks like the flag has a different name on the Pixel Watch, hence why it wasn't working.
It also seems to toggle mobile data, though I don't have the LTE variant so that shouldn't even be a thing for me, but I guess the flag is still there because the rom would be basically the same.
There is also an extra zen_mode, but from what I found online about it that's a OnePlus feature, so I'm not sure what it is doing here. Unless what it actually is is Focus mode? As that seems to be the closest comparable thing.
Also I did it several times to be sure, including restarting the watch and trying it again, but the zen mode etag value will always change between those two numbers and nothing else, whatever that even means.
Pixel Watch Secure Settings Screenshot

@DreadedLama
Copy link
Owner

DreadedLama commented Sep 15, 2023

Zen_mode is for DND ( I see that flag toggle when I turn on DND on my watch), it is there on Galaxy watch too, but directly setting it using secure setting doesn't seem to work for me. Thanks for the quick update though.
I still have to think about how can I possibly differentiate between the galaxy and pixel watch on the watch app to know which one is which. Maybe I'll just simple set both the Galaxy watch and pixel watch flags and hope it works on both. Will have to try it to know for sure.
I'm currently busy with some other stuff so will update the app once I get time.

Autowear(Watch automation) is a gem and so is Tasker(mobile automation). The combo together can nearly do anything you wish.

This app is for people who don't want to go into such great depths and just want a few basic features which logically should have been in wearos by default.

@Dave247
Copy link
Author

Dave247 commented Sep 15, 2023

Yeah, this really should be an option built into Android itself. I think the idea has been floated and talked about over the years, but nothing ever seems to have come of it sadly.

As for differentiating between the two, you should be able to get the model/code name seeing as it's still just Android right? Or is that not so simple?

And yeah I get being busy, don't worry about it. Just post back in here when you do it, or have any other ideas you'd like me to try and I'll get an email notification for it so I won't miss it.

@DreadedLama
Copy link
Owner

I haven't tried to get model. Will try to see how easy it is. Will update here on any progress

@Dave247
Copy link
Author

Dave247 commented Sep 15, 2023

Also one other thing I just thought of, there's also this app which might make things easier to access certain root API's. Though it would probably require some major rewriting of the code though to use it.
https://shizuku.rikka.app/

@DreadedLama
Copy link
Owner

Shizuku is really cool for mobile but its not so focused for wear os as of now. I only found 1 app till now on wearos which uses shizuku and it was to use a galaxy watch exploit if I remember correctly. Wearos developers don't use it as of now. For now, I don't have any plan to use it because as you mentioned it will require major changes in code.

@Dave247
Copy link
Author

Dave247 commented Sep 15, 2023

Yeah I figured it probably wouldn't work on Wear OS, and seeing as most of what you want to do is on the watch side of things, it wouldn't really be of much use. Ah well, there is only so much you can do. At least syncing DND alone is nice without needing to fuss around with another app such as Autowear.

@WaleedAshraf
Copy link

WaleedAshraf commented Dec 18, 2023

Hi Both,

I have Nothing Phone with Pixel Watch 2. I have the same issue,

  • DND Sync works perfectly.
  • Bedtime sync turns on/off DND instead.

Were you able to find a fix for it?

@DreadedLama
Copy link
Owner

HI @Dave247 @WaleedAshraf,
I have done a new release with changes to sync bedtime mode on pixel watches, can you please test it and let me know if it works as expected?
Please use the latest mobile and wear os apps
V2.3

@Dave247
Copy link
Author

Dave247 commented Dec 29, 2023

HI @Dave247 @WaleedAshraf,
I have done a new release with changes to sync bedtime mode on pixel watches, can you please test it and let me know if it works as expected?
Please use the latest mobile and wear os apps
V2.3

Unfortunately as I have given my Pixel watch away to a family member I am unable to test it.

@WaleedAshraf
Copy link

Thanks @DreadedLama. I'll test it in coming days and will update here.

@d3ighty
Copy link

d3ighty commented Mar 4, 2024

i just tested it. Doesnt work for me. Still just puts on dnd mode and not sleepmode. Tested on op12 and pw1

@arjunambati
Copy link

I tested V2.3 to sync (one way) bedtime mode from S24 Ultra to Pixel Watch 2. It didn't work for me. DND works perfectly.

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

No branches or pull requests

5 participants