sl/unihertz OK, china.

netguard

NetGuard is the first free and open source no-root firewall for Android.

It’s not perfect, either.

don’t use an f-droid build

F-Droid builds are not supported because I have no control over if and when the F-Droid version of NetGuard will be updated, so I cannot guarantee timely updates, for example if there is a critical or security issue.

Read more here.

don’t use a google play store build

You need 3 packages (applications) enabled (use search in NetGuard to find them quickly):

com.android.vending (Play store)
com.google.android.gms (Play services)
com.android.providers.downloads (Download manager)

Read more here.

DO use a github build

https://github.com/M66B/NetGuard

DO block Adups

Unfortunately, in order to bypass Google, unihertz chose malware clowns Adups for FOTA updates. Please block:

com.adups.fota.overlay

Note: This will break FOTA updates.

ad blocking with hosts file

Blackhole DNS lookups for a lot of known ads/malware:

https://github.com/M66B/NetGuard/blob/master/ADBLOCKING.md

Test it here.

netguard keeps dying

A userland app is subject to being killed by the Android LMK, or by aggressive battery saving automation. These mechanisms are uniformly not very smart.

On most devices, NetGuard will keep running in the background with its foreground service. On some devices (in particular some Samsung models), where there are lots of applications competing for memory, Android may still stop NetGuard as a last resort.

You can workaround this problem by enabling the watchdog in the NetGuard advanced options to check every 10-15 minutes.

Or more frequently. On my Titan, netguard dies regularly, and without warning.

Read more here.

See also: dontkillmyapp.com

youtube app won’t load content

This may not be necessary, depending on what you have blocked. In my case, for some reason, killing YouTube, turning off NetGuard, and then turning NetGuard back on makes YouTube work again.

documentation

Netguard FAQ