Skip to content

Android Ad Blocking Guide

🛡️ Block Ads System-Wide with Root Access

The complete guide to eliminating ads across your Android system using hosts-based solutions

Root RequiredAdAway CompatibleSystemless

NOTE

Not rooted? See the non-root alternatives guide for Private DNS, RethinkDNS, browser-based blocking, and patched-app options.


Table of Contents ​


Why Root-Based Ad Blocking? ​

Root access enables system-level ad blocking that surpasses traditional methods:

✅ Advantages of Root Ad Blocking ​

  • System-wide protection - Blocks ads in all apps, browsers, and system components
  • No battery drain - Unlike VPN-based blockers, hosts blocking adds no extra battery consumption
  • No network overhead - Ads are blocked at the hosts file level before network requests
  • Works offline - Continues working without internet connectivity
  • Fewer ad requests - Pages and apps load without fetching ad content

🔄 How Root Ad Blocking Works ​

Root ad blocking operates by modifying the hosts file (/system/etc/hosts), which acts as a local DNS resolver. When an app tries to connect to an ad server:

  1. The system checks the hosts file first
  2. Ad domains are redirected to 0.0.0.0 or 127.0.0.1 (localhost)
  3. The connection fails instantly, blocking the ad
  4. Content loads without waiting for ad network requests

Honest limits: apps that use hardcoded DNS or DNS-over-HTTPS can bypass hosts blocking, and some first-party ads are served from the same domains as content. Pair hosts blocking with a DNS filter for those cases.


Requirements ​

📱 Device Requirements ​

  • ✅ Rooted Android device (complete rooting guide)
  • ✅ Magisk, KernelSU, or APatch installed (compare methods)
  • ✅ Working root access (verify with a terminal: su -c whoami should print root)

🔧 Supported Root Managers ​

Root ManagerAdAwayBindhostsNotes
Magisk✅ Systemless✅ Magic mount (no WebUI)Widest compatibility
KernelSU⚠️ Needs helper module✅ OverlayFS default, SuSFS modesUse the systemless hosts module or AdAway Helper for AdAway
APatch⚠️ Needs helper module✅ hosts_file_redirect modeKernel redirect module available

TIP

On KernelSU and APatch, AdAway needs the systemless hosts module or AdAway Helper to write the hosts file. Bindhosts works on all three managers without helpers.

⚠️ Important Notes ​

  • Always know how to revert changes before proceeding
  • Some banking and payment apps may require whitelisting
  • OTA updates can reset direct system modifications; systemless methods survive them

Ad Blocking Methods Comparison ​

FeatureAdAwayBindhosts
Ease of Use⭐⭐⭐⭐⭐⭐⭐⭐
User InterfaceNative Android appWeb UI + action button + terminal
Host SourcesMultiple built-inExtensive collection
CustomizationGoodExcellent
Root HidingBasicAdvanced (SuSFS, redirect modes)
Update MethodBuilt-in auto-updaterSelf-updating
Best ForMost usersPower users, KernelSU/APatch

AdAway is the most user-friendly root ad blocker for Android. It writes a merged hosts file systemlessly and also offers a local VPN mode for non-rooted devices. Also available in our ad blocker collection.

📥 Installation ​

⚙️ Initial Setup ​

  1. Launch AdAway and grant root permissions when prompted
  2. Choose blocking method:
    • Root method (recommended on rooted devices): writes the hosts file systemlessly
    • VPN method: local VPN that filters DNS requests, no root needed
  3. Configure hosts sources (see below)
  4. Apply changes - AdAway downloads and merges the lists

📋 Hosts Sources Setup ​

Navigate to Hosts Sources. AdAway ships with defaults (AdAway hosts, StevenBlack, Peter Lowe). Valid hosts-format sources you can add:

text
• AdAway default: https://adaway.org/hosts.txt
• StevenBlack Unified: https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
• StevenBlack with social/fakenews/gambling/porn extensions:
  https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts
• Peter Lowe ad servers:
  https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext
• AdGuard DNS filter (hosts format):
  https://adguardteam.github.io/HostlistsRegistry/assets/filter_1.txt

WARNING

Only use hosts-format sources. Adblock-syntax lists such as EasyList and EasyPrivacy are for browser blockers and do not work in AdAway.

🔧 Optimal Configuration ​

  • Enable automatic updates in settings (daily or weekly)
  • Configure the whitelist for apps that break when their domains are blocked
  • Check the blocked domain count after applying to confirm lists loaded

Method 2: Bindhosts (Advanced) ​

Bindhosts provides systemless hosts blocking with auto-updating, AdAway coexistence, and multiple redirect methods for stronger root hiding. Find it in our ad blocking modules.

🎯 Why Choose Bindhosts? ​

  • Fully systemless - no permanent system modifications
  • Self-updating - maintains current hosts lists automatically
  • Advanced root hiding - SuSFS bind mounts and in-kernel redirect methods
  • Web UI management on KernelSU and APatch (Magisk uses the action button and terminal)
  • AdAway coexistence - can run alongside AdAway

📥 Installation ​

  1. Download the module zip from GitHub releases
  2. Flash it in your root manager (Magisk, KernelSU, or APatch)
  3. Reboot, then open the module action button or Web UI

⚙️ Operating Modes ​

Bindhosts probes the best mode automatically. You can override it in the developer options:

ModeMethodRoot ManagerNotes
0 (default)Magic mount / OverlayFS + path_umountAllAutomatic; AdAway compatible on Magisk and APatch
1SuSFS assisted bind mountKernelSURequires a SuSFS-patched kernel
2Plain bind mountAllHighest compatibility; leaks a mount if unassisted
3hosts_file_redirectAPatchIn-kernel redirect; requires the KPM
4ZN-hostsredirectAll with ZygiskNextNo mount; recommended by the author

Higher SuSFS modes (overlay, bind + spoof, source mod) exist for KernelSU. See the official modes documentation for the full table.

🖥️ Web UI and Terminal ​

The Web UI (KernelSU and APatch) manages custom rules, sources, whitelists, and blacklists. From a root shell or Termux:

bash
su
bindhosts                  # interactive menu
bindhosts --action         # toggle apply/reset
bindhosts --force-update   # update lists now
bindhosts --query doubleclick.net   # check a domain
bindhosts --tcpdump        # sniff active IPs (no DNS filter running)
bindhosts --custom-cron    # set update hour
bindhosts --enable-cron    # enable scheduled updates
bindhosts --force-reset    # reset the hosts file

📋 Custom Sources ​

Add hosts-format sources in the Web UI, or append them to the module's sources file, then run bindhosts --force-update.


Configuration & Optimization ​

🎛️ Whitelist Management ​

Apps that may need whitelisting when they break:

text
• Banking and payment apps (PayPal, Google Pay, Samsung Pay, regional banks)
• Social media (Facebook, Instagram) if feeds misbehave
• Google services (Gmail, Drive) if sync fails
• YouTube if in-app features break

AdAway custom rules: Your Lists → Allowed/Blocked Hosts. Bindhosts custom rules: add them in the Web UI.

📱 App-Specific Configuration ​

Chrome or WebView still showing ads on KernelSU: open KernelSU Manager → Superuser → Chrome (and Android System WebView) and disable Umount modules, so the browser sees the modified hosts file.


Troubleshooting ​

🔧 Common Issues & Solutions ​

Issue: Ads Still Appearing ​

  1. Confirm the blocker applied: check the blocked domain count in AdAway or run bindhosts --query doubleclick.net
  2. Reboot the device after applying
  3. Check the Chrome/WebView umount setting on KernelSU (see above)
  4. Hardcoded DNS apps: apps using DoH or fixed DNS servers bypass hosts blocking; use a DNS filter such as RethinkDNS for those

Issue: Apps Crashing or Not Working ​

  1. Whitelist the domains the app needs in AdAway or Bindhosts
  2. Remove conflicting sources that block content delivery networks

Issue: Banking Apps Fail ​

  1. Whitelist the bank's domains
  2. Configure root hiding (Zygisk denylist, Shamiko, ZygiskNext, or SuSFS)
  3. Some apps still refuse to run on rooted devices; this is not fixable by whitelisting

Issue: Slow Browsing ​

  1. Reduce sources: fewer, focused lists beat many large ones
  2. Remove duplicate sources that overlap heavily

🔍 Diagnostics ​

bash
# Verify root works
su -c whoami

# View the effective hosts file
su -c head /system/etc/hosts

# Check whether a domain is blocked (bindhosts)
bindhosts --query doubleclick.net

Advanced Tips ​

🔐 Malware and Tracker Blocking ​

Hosts lists focus on ads. For malware and phishing, pair your blocker with a DNS filter (RethinkDNS, AdGuard DNS, or NextDNS), or use StevenBlack's alternate lists that bundle the social tracking extension.

🔄 Backup and Restore ​

  • AdAway: use the built-in backup/export in settings
  • Bindhosts: settings and sources live in the module folder under /data/adb/modules/bindhosts/

🧩 Complementary Root Tools ​


FAQ ​

❓ Frequently Asked Questions ​

Q: Will ad blocking affect app functionality? A: Most apps work normally. Whitelist domains for apps that rely on blocked networks.

Q: Can I run AdAway and Bindhosts together? A: Bindhosts supports AdAway coexistence, but a single active hosts writer avoids conflicts. Do not run two hosts writers in competition.

Q: Do I need to update hosts files manually? A: AdAway has a built-in auto-updater, and Bindhosts self-updates on a schedule. Manual updates are a fallback.

Q: Will this work with a VPN? A: Yes. Hosts-based blocking operates below the VPN layer and works alongside VPN apps, unlike VPN-slot blockers.

Q: How much storage do hosts files use? A: Typically 1-3 MB depending on the sources. Very large lists can slow DNS lookups slightly.

Q: Does this work on mobile data? A: Yes, hosts blocking applies to Wi-Fi and mobile data alike.

Q: Will OTA updates remove ad blocking? A: Systemless methods (AdAway root mode, Bindhosts) survive OTA updates. Direct writes to /system do not.

Q: What about non-root ad blocking? A: See the non-root alternatives guide for Private DNS, RethinkDNS, browser extensions, and patched apps.



Conclusion ​

Root-based ad blocking provides the most comprehensive way to eliminate advertisements across your Android system. AdAway suits most users with its simple interface and built-in updater, while Bindhosts suits power users who want SuSFS hiding, redirect methods, and KernelSU/APatch optimization.

Remember to:

  • ✅ Keep your hosts sources updated
  • ✅ Maintain a whitelist for essential apps
  • ✅ Pair with a DNS filter for hardcoded-DNS apps
  • ✅ Back up your configuration

📚 Part of the Awesome Android Root collection

Star on GitHub