Replies: 4 comments
|
The ideal solution would be to block using root, but with the ability to add applications to blocking exceptions.From what I've noticed, probably all applications that block using root don't have this option. The only app I know of that uses root and has this capability is Adguard. Unfortunately, I'm not a technical expert, so I could be wrong. |
|
Hi @Klusek1983, |
|
Hi @Rootalith and @Klusek1983 I was develop this feature, could you please give a try on debug version then tell me your feedback:https://github.com/pass-with-high-score/blockads-android/actions/runs/23554538716 |


Uh oh!
There was an error while loading. Please reload this page.
First of all, great work on this project! The current implementation using a Local VpnService is an excellent, privacy-friendly approach for non-rooted devices.
However, I'd like to propose introducing an alternative Root Mode for users with rooted devices. While the VPN method is effective, a root-based approach would solve several inherent limitations of Android's VPN API.
Here is why adding a Root Mode would take this project to the next level:
1. Zero Battery & RAM Drain (Kernel-Level Filtering)
Currently, the VpnService requires a persistent Foreground Service and wakelocks, which prevents the device from entering deep sleep and consumes battery/RAM. By using root privileges, we can push the filtering rules directly to the kernel level. This means the system will drop ad requests automatically with virtually zero battery consumption or background overhead.
2. Freeing Up the Android VPN Slot
Android only allows one active VPN connection at a time. If a user is running this app, they cannot use a traditional VPN for encryption or geo-unblocking. A root implementation bypasses the need for the VPN API entirely, allowing users to block ads while simultaneously using their preferred VPN provider.
3. Catching Hardcoded DNS (Rebellious Apps)
Some applications ignore the system's DNS settings and use their own hardcoded DNS servers. The standard local VPN might miss these requests. With root access, we can force all traffic (specifically Port 53) to pass through the filter, ensuring total coverage.
Proposed Implementation Ideas:
iptables Integration: Execute root commands to configure iptables firewalls, dropping traffic to known ad servers or redirecting port 53 traffic to a local blackhole.
Systemless hosts Modification: Generate a comprehensive hosts file from the blocklists and mount it systemlessly (compatible with Magisk / KernelSU) to avoid modifying the read-only system partition.
Ideally, the app could feature a "Hybrid Toggle" in the settings, allowing users to choose between VPN Mode (default) and Root Mode.
Looking forward to hearing your thoughts on this!
All reactions