Block ads system-wide on Android using local VPN-based DNS filtering. No root needed. No data collection.
1,978
stars
510
commits
Kotlin
primary language
Sep 10, 2026
updated
BlockAds is a free, open-source ad blocker for Android.
It blocks ads, trackers, and malware system-wide using local VPN-based DNS filtering — no root required, no data collection.
Built with Jetpack Compose and Material 3 for a modern, premium experience.
If you enjoy BlockAds, consider supporting the project! Your sponsorship helps us maintain and improve the app.
Clone the repository:
git clone https://github.com/pass-with-high-score/blockads-android.git
cd blockads-android
Initialize gomobile (one-time setup):
go install golang.org/x/mobile/cmd/gomobile@v0.0.0-20240404231514-09dbf07665ed
export PATH=$PATH:$(go env GOPATH)/bin
gomobile init
(Optional) Build the Go tunnel AAR/JAR (with Android 15 16KB page size support):
./scripts/build_tunnel.sh
Or
./gradlew buildGoTunnel
Note: A pre-built version is already included in app/libs/.
Open the project in Android Studio
Sync Gradle and run the app on a device or emulator
Build from command line:
./gradlew assembleDebug
./gradlew bundleRelease # requires signing key
BlockAds routes DNS queries locally either through a VpnService (Vpn Mode) or via iptables redirection (Root Proxy Mode). These queries are matched against loaded filter lists using a memory-efficient Trie data structure. Matching queries are blocked locally, while all other traffic passes through normally — no data leaves your device.
When HTTPS Filtering is enabled, a userspace TCP/IP stack (gVisor netstack via tun2socks) terminates each TCP/UDP flow in Go, looks up the owning app UID via Android's ConnectivityManager.getConnectionOwnerUid(), and only MITMs flows from selected browsers. Cert-pinned apps and the 284-domain curated passthrough list bypass MITM cleanly. Cosmetic CSS rules and EasyList ##+js(…) / AdGuard #%#//scriptlet(…) scriptlets are injected into HTML responses via a tiny in-memory local asset host.
This project is licensed under the GNU General Public License v3.0.
You are free to use, modify, and distribute it under the terms of the license.
See the full LICENSE file for details.
Pull requests and issue reports are welcome.
Help us improve BlockAds!
Want to see BlockAds in your language?
Open an issue or submit a PR with your translations.
Kotlin
82.0%
Go
17.3%
Block ads system-wide on Android using local VPN-based DNS filtering. No root needed. No data collection.
1,978
stars
510
commits
Kotlin
primary language
Sep 10, 2026
updated
BlockAds is a free, open-source ad blocker for Android.
It blocks ads, trackers, and malware system-wide using local VPN-based DNS filtering — no root required, no data collection.
Built with Jetpack Compose and Material 3 for a modern, premium experience.
If you enjoy BlockAds, consider supporting the project! Your sponsorship helps us maintain and improve the app.
Clone the repository:
git clone https://github.com/pass-with-high-score/blockads-android.git
cd blockads-android
Initialize gomobile (one-time setup):
go install golang.org/x/mobile/cmd/gomobile@v0.0.0-20240404231514-09dbf07665ed
export PATH=$PATH:$(go env GOPATH)/bin
gomobile init
(Optional) Build the Go tunnel AAR/JAR (with Android 15 16KB page size support):
./scripts/build_tunnel.sh
Or
./gradlew buildGoTunnel
Note: A pre-built version is already included in app/libs/.
Open the project in Android Studio
Sync Gradle and run the app on a device or emulator
Build from command line:
./gradlew assembleDebug
./gradlew bundleRelease # requires signing key
BlockAds routes DNS queries locally either through a VpnService (Vpn Mode) or via iptables redirection (Root Proxy Mode). These queries are matched against loaded filter lists using a memory-efficient Trie data structure. Matching queries are blocked locally, while all other traffic passes through normally — no data leaves your device.
When HTTPS Filtering is enabled, a userspace TCP/IP stack (gVisor netstack via tun2socks) terminates each TCP/UDP flow in Go, looks up the owning app UID via Android's ConnectivityManager.getConnectionOwnerUid(), and only MITMs flows from selected browsers. Cert-pinned apps and the 284-domain curated passthrough list bypass MITM cleanly. Cosmetic CSS rules and EasyList ##+js(…) / AdGuard #%#//scriptlet(…) scriptlets are injected into HTML responses via a tiny in-memory local asset host.
This project is licensed under the GNU General Public License v3.0.
You are free to use, modify, and distribute it under the terms of the license.
See the full LICENSE file for details.
Pull requests and issue reports are welcome.
Help us improve BlockAds!
Want to see BlockAds in your language?
Open an issue or submit a PR with your translations.
Kotlin
82.0%
Go
17.3%