A modern, lightweight, and robust DNS-based Ad-Blocker for Android.
Features • Architecture • Building • Contributing
AdsBlock is an on-device VPN application designed to intercept and filter DNS requests in real-time, effectively blocking ads, trackers, and malicious domains before they even load. Built entirely with Jetpack Compose and modern Kotlin coroutines, it provides a slick, localized, and ultra-fast user experience with deep transparency into exactly what is happening under the hood.
Developed by ed apps.
- Real-Time DNS Tunneling: Parses Raw IPv4 and UDP packets to inspect DNS queries on-the-fly using
dnsjava. - Zero-Logging VPN: All filtering happens locally on your device. No traffic is sent to remote servers for inspection.
- Query Logs & Transparency: View exactly which domains are being requested and blocked in real-time via the built-in Logs screen.
- Dynamic Pause & Resume: Need to bypass a strict firewall? Pause the blocker for 15, 30, or 60 minutes with background notification controls.
- Full Localization Support: Completely localized UI, system strings, and RTL (Right-to-Left) layout support.
- Modern Jetpack Compose UI: Built entirely using Material 3 dynamic theming, smooth animations, and dark/light modes.
- Optimized & Lightweight: Heavily minified with aggressive R8 proguard rules and resource shrinking for minimal battery and storage footprint.
AdsBlock leverages modern Android architecture patterns to ensure strict safety, low overhead, and scalability:
- UI Layer: Jetpack Compose (
Material 3,NavHost) - State Management:
StateFlowandDataStore Preferences - Networking Core:
VpnServicewith raw socket packet parsing via customDatagramSockettunneling. - DNS Parsing: Integrated
dnsjavafor robust packet decoding and manipulation. - Asynchrony:
Kotlin Coroutines(Dispatchers.IO) for high-throughput packet processing.
To build AdsBlock locally, you need Android Studio installed.
-
Clone the repository:
git clone https://github.com/sudo-py-dev/adsblock.git cd AdsBlock -
Open in Android Studio: Open the project directory in Android Studio. Gradle will automatically sync the dependencies.
-
Build the APK: To build a heavily optimized release APK, ensure you have your keystore properties set up in
local.properties, or simply build the debug variant:./gradlew assembleDebug
AdsBlock natively supports multiple languages. The app strictly enforces layout directions (LTR/RTL) across Jetpack Compose automatically based on active locales. If you wish to contribute a translation, please submit a PR modifying the strings.xml resources!
Copyright © ed apps. All rights reserved.