• General
  • Any way to control WIFI and Mobile Data on/off automated?

Hey, before using GOS I automatically disabled WIFI and mobile data when my screen was off to save data and battery. Gave me pretty decent battery life on my earlier device. Had a job running to turn data on every 15 minutes for a few seconds to check if I got new Signal messages.

I Used

svc wifi enable
svc wifi disable
svc data enable
svc data disable

in a root shell to achieve the toggles, automated with Tasker.

Now I am searching for a way to achieve this with GOS. Is it possible somehow?
Is there any interface I could use for that available or is it impossible?

Thank you.

    a month later
    • [deleted]

    • Edited

    wonder75
    In GOS there's only an option to automatically turn off Bluetooth and/ or Wi-fi after defined time period when the network is not available. This is very helpful (for me) but it doesn't solve what you are trying to achieve.

    Without root I do not think that you will find anything that could override system toggle for network. Such a timer is something that could be enabled and included within Digital wellbeing by Google, but I'm not aware of any present functional non-root options.

    But when I am thinking about it, it is necessary to start data every 15 minutes to check for Signal messages? GOS has a "firewall" and you can deny network access to any app. So you could allow just Signal (if that's what you want) and leave the data on. Battery won't be affected by this (the exception would be if you had 5G on and would be in area when the 5G is weak - than the permanent switching from 5G to LTE. In such a case it would be recommended to disable 5G).

    • N1b likes this.

    wonder75 Is it possible somehow?

    Short answer - no

    Another short be answer - if rooted then you're not running GraphoeneOS
    Search this forum for longer and detailed explanations

    7 months later

    Automation functionality would be amazing. I use tasker at moment to automatically turn off my WiFi at a certain time and back on at another time. And this not being possible without root is going to make it hard to switch to GOS

    2 months later

    I want something like this too, but it doesn't seem like there's a good solution for it ATM, as others have already pointed out.

    Best solution for me that I could figure out was to use a short timeout for Settings -> Network and internet -> Internet -> Network preferences -> Turn off Wi-Fi automatically to turn off my wifi when I'm not connected to a network, and https://f-droid.org/en/packages/de.j4velin.wifiAutoOff/ to turn on my wifi every so often.

    That way my wifi is only on for short periods, and will automatically connect to the networks I want in that time if they're available. This solution uses as much built in GrapheneOS functionality as possible, and doesn't require location permissions + having my location services constantly enabled as I would if I used Tasker / Easer / any other automation app I know of.

    I've opted to just turn mobile data on/off manually, since any solution to toggle that would require root. However, it seems like turning off Settings -> System -> Developer options -> Mobile data always active might help to save some battery / mobile data allowance in the event I forget to turn off mobile data.

    Not sure how much of an impact all this is really going to have on battery life though, since I'm mostly at home and connected to my home wifi. I suppose I could just leave my wifi on all the time and it wouldn't make much of a difference.

    Probably not the best approach for privacy either. The best option there for now would be to just get better at managing stuff manually, at least until there is some kind of network location service implemented in GrapheneOS to make the built in wifi automation work properly. But I'm willing to make the trade for convenience in that regard.