• 1 Post
  • 6 Comments
Joined 4 years ago
cake
Cake day: January 21st, 2021

help-circle
  • Netguard also has a separate lockdown mode (which only enables a few apps, or none, to go through) that if toggled automatically based on connected network would enable you to dictate which apps can use untrusted networks.

    While there are lots of apps that automate some sort of action based on the name of the WiFi network, activating the lockdown mode in Netguard is more specific, and I doubted if it’s even possible. To start, I came up with a Termux command invocation that toggles the lockdown mode in Netguard. After customizing the quick settings (near the notification area) this adb command confirms that this method for toggling Netguard’s lockdown mode really works:

    adb shell cmd statusbar click-tile eu.faircode.netguard/.WidgetLockdown
    

    Default Termux doesn’t request the necessary permission which impeded the command from running, however:

    java.lang.SecurityException: StatusBarManagerService: Neither user 10472 nor current process has android.permission.EXPAND_STATUS_BAR.
    

    So this is where I’m at, I could probably just use Tasker to like some people do to run the cmd statusbar command, but I also wanted to call some attention to the issue report on the Termux repository regarding this permission.

    EDIT: There’s a high likelyhood it won’t work on Tasker without root, and on termux it also wouldn’t work even if you managed to request the permission.


  • For the record, in almost all versions of Android you can install apps in a isolated environment through Shelter. Apps in this environment get icons in your home screen just like the rest, but don’t share the vpn/firewall connection that you might have active through RethinkDNS, among other things.

    You effectively have two sets of apps with different firewall settings. And if you figure out a way to automate the locking down of RethinkDNS (through something like Tasker or Schröder’s Automation,) you would effectively have a mechanism that only lets the small number of apps in the isolated environment work while connected to an untrusted network.