This is an automated archive made by the Lemmit Bot.

The original was posted on /r/tasker by /u/mylastacntwascursed on 2025-08-22 21:54:57+00:00.


ADB lets you manage per-package network access with the following commands. All settings are lost after a reboot.

Toggle firewall:

cmd connectivity set-chain3-enabled [true|false]

Get firewall state:

cmd connectivity get-chain3-enabled

Manage network access for package:

cmd connectivity set-package-networking-enabled [true|false] [package name]

Get current setting for package:

cmd connectivity get-package-networking-enabled [package name]

For example, run these commands and watch how you can’t access websites with Chrome anymore:

cmd connectivity set-chain3-enabled true
cmd connectivity set-package-networking-enabled false com.android.chrome

Javadoc on chain3 (FIREWALL_CHAIN_OEM_DENY_3) in ConnectivityManager.java:

Firewall chain used for OEM-specific application restrictions.

Denylist of apps that will not have network access due to OEM-specific restrictions. If an app UID is placed on this chain, and the chain is enabled, the app’s packets will be dropped.

I found an app called NetWall that uses Shizuku instead of a local VPN to firewall apps, and as I have never seen this done before, I couldn’t rest before I knew how it did that! 😅 Hence this post, after some digging. The app itself is also pretty neat!

No ADB Wifi or Shizuku? You can use the Network Access action, which creates a local VPN to block traffic for selected apps.