Overview
Maintained by the bindhosts open-source team, Bindhosts is the modern successor to traditional hosts adblockers on rooted Android devices.
While legacy tools like AdAway required complex local web servers or full partition remounts, Bindhosts uses direct Linux kernel bind mounts (mount --bind). It compiles millions of verified ad, tracker, telemetry, and malware domains into a single unified /system/etc/hosts table that the Android Bionic libc DNS resolver uses natively across all applications.
Technical Architecture & How It Works
The Systemless Bind Mount
- Compilation Phase: Bindhosts fetches curated domain blocklists from high-reputation providers (StevenBlack, OISD, 1Hosts).
- Deduplication & Sanitization: The internal engine deduplicates entries, removes invalid syntax, merges user custom rules from
custom.txt, and strips any domains specified inwhitelist.txt. - Loop Mount Staging: The compiled hosts file is written to
/data/adb/bindhosts/hosts. - Namespace Redirection: During the early boot phase (
post-fs-data.shandservice.sh), Bindhosts executes:mount --bind /data/adb/bindhosts/hosts /system/etc/hosts - Universal Enforcement: Because
/system/etc/hostsis read by Android’s DNS resolver for every outbound network call, ads, trackers, and telemetry pings fail to resolve instantly with zero CPU latency.
Installation & Setup
- Open your root manager (Magisk, KernelSU, or APatch).
- Download and flash the latest
bindhosts-vX.zip. - Reboot your device.
- Open a terminal app (like Termux) and run the initialization command:
su -c bindhosts -r - Bindhosts will download the latest upstream lists, merge them, and apply the new hosts file immediately without requiring a reboot.
Configuration & Custom Rules
All configuration files reside in /data/adb/bindhosts/:
custom.txt: Add custom domains you want blocked:0.0.0.0 telemetry.example.com 0.0.0.0 ads.targetapp.comwhitelist.txt: Add false-positive domains you want unblocked:s.youtube.com login.live.com- Updating via CLI:
# Quick update su -c bindhosts -r # Check active hosts file size & count su -c bindhosts -s # Temporarily disable adblocking su -c bindhosts -d # Re-enable adblocking su -c bindhosts -e