[Samsung Galaxy S7 Questions and Answers] sixtyfootmalcolm:
Hi all, long lurking rom-installer who can self-fix most problems here. Got a problem I can't fix that's bothering me. Recently upgraded to an S7 so naturally rooted it on day one and been trying to get it my-kind-of-working fully ever since. I do like to bugger about with things in a vain attempt to shield some private data from some orgs and realise I'm in a particularly specific hole that I'll probably have to climb out of on my own, but if you don't ask... :)

Internet using apps pretend to work, sometimes for days, then just refuse to open. Screenshot example of the second and persistent error (after simply "Lightning has stopped" the first time) is attached.

Model: G930F

Current ROM: ambasadii 7.0 TW Nougat (here)

Xposed: 88.2

Root: Magisk

Significant mods:

1) use xPrivacy

2) disabled significant number of remaining packages using Package Disabler Pro (list attached)

3) run Orbot

4) run AFWall

5) modify app permissions in Settings/Apps to restrict where I think I safely can

6) run BackgroundRestrictor

The behaviour still emerges even if I don't apply 4), 5) or 6), it has started prior to me finishing my tweaking.

I know xPrivacy is not supported for Nougat but it seems to work ok for the most part with some retweaking of settings since moving from Marshmallow on my old phone. I understand it could be the cause of the problem but I'm wedded to (some of) my privacy enough to persevere before abandoning it. For the record I've checked the usage log for restrictions on any calls around e.g. internet that might be interfering but I've been unusually generous with permissions trying to fix this and there's no restrictions on any apps with internet access around that, or much else really at this point. I've also had a look in general usage log rather than app specific, looking for system components that may be working alongside the app and failing with a restriction but can't see anything being denied. Any system apps haven't been touched by me, I fetched what I could from xprivacy crowdsourced restrictions on the base ROM apps and then only applied my template to apps I've downloaded myself.

Some other background on the problem: everything will be set up as I like it - ROM installed, debloated, all the rest of above modding applied. It will be working super-fine. Nice and fast, little bloat left, just enough Google to get Play Store, apps installed and working, all will be and appear fine. After an undetermined & fluctuating length of time all of the internet-facing apps will suddenly not open. This includes but isn't limited to the Browser (stock and Lightning, Brave, Pale Moon, etc.), Twitter, Signal and the Official TWRP App.

Interestingly, internet-connecting apps that will connect on demand but don't seem to make a call on every app open (mostly due to prior settings changes) do not fail. They will still open fine and work fine, connecting when asked and not crashing. For example, K9 Mail and Pocket.

Another weird data-point: Signal will fail but will often do so later than the other internet-connected apps - possibly it has a token with GCM or something that when it expires will try to renew on app open which is when it starts to fail like the others?

The apps will work again if uninstalled and reinstalled but once the behaviour starts again, and it will, it will repeat. Sometimes twice or more in a day. So reinstalling every time is not going to make for a usable phone. It's like they have an error renewing their wifi lease or something.

It can take up to three days to begin - this build it worked fine for days whilst I was away and slowly, progressively building the system back up with regular TWRP backups. I can restore a TWRP backup from about 6 hours before the problem started and it'll work fine again, but still wait a random amount of time before the problem begins again.

I did think it may be something to do with the router here and home WiFi as it behaved much better whilst away and didn't break until my return, though that is likely coincidence. I'm in pattern-observing mindframe so false positives are everywhere. I thought it was connecting to the PC via USB that was doing it at one point.

Last data point: it's happened with a different base rom too (Decent here), same thing, but came on sooner each time. I would change the base rom again to see if it's something there but I suspect that should be one of the last things I try given it's happened across two roms now.

Anyway, if anyone has any insight on Nougat TW ROMs on an S7 with this kind of set up and/or any clues or ideas as to why internet connects would suddenly be crashing all these apps... I'd be grateful. Otherwise I have many reinstalls and possibilities to eliminate. Which means waiting many sets of days before I can repeat, which makes progress frustratingly slow when you depend on the phone (Signal particularly) to connect with people.