Skip to content
ํ”„๋กœ์ ํŠธ

mikropsoft/StevenBlock has 313 GitHub stars and 5 forks. Star changes are not measured yet. Last checked 2026-11-13 17:21 UTC. Last push 2026-11-11.

์ด ์ˆ˜์น˜๋ฅผ ์ธก์ •ํ•˜๋Š” ๋ฐฉ๋ฒ•

์ธก์ •๋œ ์Šคํƒ€ ์ฆ๊ฐ€

in 24h
๊ธฐ๋ก ์ˆ˜์ง‘ ์ค‘
in 7 days
๊ธฐ๋ก ์ˆ˜์ง‘ ์ค‘
in 15 days
๊ธฐ๋ก ์ˆ˜์ง‘ ์ค‘
in 1 month
๊ธฐ๋ก ์ˆ˜์ง‘ ์ค‘

์„œ๋กœ ๊ฒน์น˜๋Š” ๊ธฐ๊ฐ„์˜ ์ˆœ์ฆ๊ฐ€๋Ÿ‰์ด๋ฉฐ ์ผ๋ณ„ ํ•ฉ๊ณ„๊ฐ€ ์•„๋‹™๋‹ˆ๋‹ค. ์ธก์ •๊ฐ’์ด ์—†์œผ๋ฉด ๋น„์›Œ ๋‘ก๋‹ˆ๋‹ค. ์Šคํƒ€๋Š” ๊ด€์‹ฌ๋„๋ฅผ ๋‚˜ํƒ€๋‚ด๋ฉฐ ํ’ˆ์งˆ์„ ๋ณด์žฅํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

์†Œ๊ฐœ

๐Ÿšซ Advanced Ad-Blocking Module for Android | Compatible with Magisk, KernelSU, and APatch ๐Ÿ”’

๋ณด์•ˆ

README.md

Original

๐Ÿ›ก๏ธ StevenBlock: The Zero-Bloat Digital Guardian ๐Ÿ›ก๏ธ

StevenBlock: systemless ad blocking for rooted Android with a WebUI, 7 curated blocklists and your own domain rules

Downloads Release Stars Android Magisk KernelSU APatch

Welcome to StevenBlock v2.0 โ€” the zero-bloat ad blocker for rooted Android, now smarter, lighter and reboot-free. ๐Ÿš€

StevenBlock blocks ads, trackers and malware across your entire device with one carefully built /system/etc/hosts file. Your root manager mounts it systemlessly, so /system is never touched. There is no VPN to keep alive, no extra app to install and no background process unless you ask for one โ€” just a clean hosts file and a polished WebUI to control it.

Pick one of 7 curated main lists, stack 14 optional add-ons or your own lists on top, write Allow / Block rules with wildcard support, and watch every step in real time. With โšก live apply, most changes are active the moment you tap โ€” no reboot. Every change is downloaded, verified, optimized and installed with automatic backups, checksums and rollback, so a bad download can never leave you with a broken hosts file. ๐Ÿ›Ÿ

[!NOTE] New in v2.0: โšก live apply without rebooting, โž• add-on lists, ๐Ÿ”— custom lists, ๐Ÿ”„ optional auto-update, โœณ๏ธ wildcard allow rules, ๐Ÿ” domain lookup, ๐Ÿ“ฅ rule import and export, ๐Ÿฉบ a health check with one-tap repair and a ๐Ÿ” Private DNS guard. Coming from v1.0? Your list, rules and settings are kept โ€” read โฌ†๏ธ Upgrading.

๐Ÿ“‘ Table of Contents

๐Ÿš€ Why StevenBlock

  • ๐Ÿ–ฅ๏ธ A real WebUI. Switch lists, toggle add-ons, manage domain rules, look up domains, check your setup's health and read logs from a fast, modern interface with dark and light themes. It opens right inside KernelSU, KernelSU Next, SukiSU and APatch, and from the Action button on Magisk.
  • โšก Live apply. StevenBlock writes changes straight into the hosts file that is already mounted, then checks that Android really sees them. In most setups a new list or rule is active immediately. When that isn't possible, StevenBlock says so and asks for a reboot โ€” it never pretends.
  • ๐Ÿ”‹ Zero-bloat by default. Blocking is a static hosts file. The local WebUI server only runs while you use it and shuts itself down after 10 minutes without activity. The only optional background process is the auto-update scheduler, and it is off until you turn it on.
  • ๐ŸŽฏ 7 curated main lists. From the gentle, battle-tested StevenBlack list to HaGeZi Ultimate, each with a clear strength level, live entry count and last-update date.
  • โž• 14 add-ons and your own lists. Stack content categories, security feeds and device tracker lists on top of your main list, or add any HTTPS hosts list by its address. Duplicates across lists are merged automatically.
  • ๐Ÿงฉ Smart domain rules. Always allow a domain a list blocks by mistake, allow a whole domain with *.example.com, or block one the lists miss. Paste a full URL and StevenBlock extracts the domain for you.
  • ๐Ÿ” Domain lookup. Ask whether a domain is blocked and by which list or rule, search your blocklist by keyword, and fix things with one tap.
  • ๐Ÿ”„ Optional auto-update. Check your lists daily, every 3 days or weekly. Only lists that actually changed are downloaded, with compressed transfers that use about 75% less data.
  • ๐Ÿ›Ÿ Backed-up, verified updates. Every download is validated before it can touch your hosts file. Changes are staged, written, verified and checksummed. If anything fails, the previous state is restored automatically.
  • ๐Ÿฉบ Health check and repair. One tap checks the hosts file, the mount, your lists, the downloader and the network โ€” and one more tap rebuilds everything from the cache.
  • ๐Ÿ” Private DNS guard. If you use Android's Private DNS with a provider hostname, StevenBlock never blocks that provider, even when a list contains it.
  • ๐Ÿ”— Works with or without a metamodule. At every boot StevenBlock checks that Android really uses its hosts file. If your root manager didn't mount it, StevenBlock mounts it itself.
  • ๐Ÿ”’ Private by design. Local only, token-protected, zero telemetry, and the WebUI loads nothing from the internet โ€” not even fonts.
  • ๐Ÿ›ก๏ธ Safe by construction. Every entry from every list is rewritten to 0.0.0.0, so a list can only ever block a domain โ€” it can never redirect you somewhere else.

โœจ What's New in v2.0

v1.0 v2.0
Applying changes ๐Ÿ” Reboot after every change โšก Live apply, with an honest reboot fallback
Lists ๐ŸŽฏ One of 7 lists ๐ŸŽฏ One of 7 main lists โž• 14 add-ons ๐Ÿ”— up to 8 custom lists
Updates ๐Ÿ”„ Manual ๐Ÿ”„ Manual or scheduled, compressed, only what changed
Allow rules โœ… Exact domains โœ… Exact domains and *.example.com wildcards
Rule tools โ€” ๐Ÿ” Lookup and keyword search, ๐Ÿ“ฅ import, ๐Ÿ“ค export, ๐Ÿ”Ž filter
Diagnostics ๐Ÿ“Š Check Status ๐Ÿ“Š Check Status, ๐Ÿฉบ Health Check, ๐Ÿ› ๏ธ Repair, ๐Ÿ“‹ copyable report
Integrity โœ… Verified after writing โœ… Verified after writing and by checksum at every boot
Backups ๐Ÿ—‚๏ธ 3 full copies ๐Ÿ—‚๏ธ 3 compressed copies, about 70% less storage in our measurements
Private DNS โ€” ๐Ÿ” Your provider is never blocked
Automation โ€” ๐Ÿ’ป Documented command line with JSON output

The full list of changes, fixes and measurements is in CHANGELOG.md.

โš–๏ธ How It Compares

Every approach has trade-offs. Here is an honest look at how a systemless hosts file stacks up against the other common ways to block ads on Android:

๐Ÿ›ก๏ธ StevenBlock (hosts) ๐Ÿ” VPN-based blockers ๐ŸŒ Private DNS ๐Ÿงญ Browser extensions
System-wide โœ… Yes, for apps that use Android's resolver โœ… Yes, for traffic routed through the VPN โœ… Yes, for apps that use Android's resolver โŒ Only inside that browser
VPN slot โœ… Stays free โŒ Occupied, so no other VPN at the same time โœ… Stays free โœ… Stays free
Battery โœ… No background service for blocking โš ๏ธ A service handles traffic all the time โœ… Negligible โœ… Minimal
Customization โœ… 7 main lists, add-ons, custom lists, allow and block rules โœ… Usually extensive โš ๏ธ Depends on the provider โœ… Extensive, including cosmetic filtering
Root required โš ๏ธ Yes โœ… No โœ… No โœ… No

[!TIP] A hosts file blocks whole domains. It can't hide page elements (cosmetic filtering) or block ads served from the same domain as the content. A browser with a built-in or extension-based blocker is a great companion for that โ€” it works alongside StevenBlock.

๐ŸŽฏ Blocklists

Your main list is the foundation. All lists are downloaded straight from their official sources. Pick one in ๐Ÿ“‹ Lists โ€” the WebUI shows each list's live entry count and last-update date, read from the list's own header without downloading the whole file.

# List Type Level Approx. entries* Best for
1 StevenBlack Main Unified list (default) ๐ŸŸข Balanced ~78K Everyone. The safe, battle-tested default.
2 hBlock Mixed list built from many sources ๐Ÿ”ต Mixed Varies Broad coverage from many public lists in one file.
3 HaGeZi Light Basic protection ๐ŸŸข Basic ~161K Zero-hassle blocking that shouldn't break anything.
4 HaGeZi Normal All-round protection ๐Ÿ”ต All-round ~427K Stronger everyday protection, rarely breaks anything.
5 HaGeZi Pro Extended protection ๐ŸŸก Extended ~497K Power users who don't mind an occasional allow rule.
6 HaGeZi Pro++ Aggressive ๐ŸŸ  Aggressive ~561K Experienced users. Some legitimate sites may break.
7 HaGeZi Ultimate Most aggressive ๐Ÿ”ด Maximum ~614K Maximum blocking. Can restrict app and site features.

*As of November 2026. Lists update often, so the WebUI always shows the current numbers.

[!WARNING] ๐ŸŸ  Pro++ and ๐Ÿ”ด Ultimate are strict on purpose. If something stops working, use ๐Ÿ” Check this domain to find the culprit, add it as an โœ… Allow rule, or step down to a lighter list.

โž• Add-ons

Add-ons are optional lists that are stacked on top of your main list. Flip the switches you want in ๐Ÿ“‹ Lists โ†’ โž• Add-ons, tap โœ… Apply, and StevenBlock downloads, merges and de-duplicates everything in one go. Each add-on shows how many entries it has and how many of them are actually new on top of your main list.

Group Add-on Source Approx. entries* What it blocks
๐ŸŽญ Content ๐Ÿ—ž๏ธ Fake news StevenBlack ~2.2K Sites known for publishing fabricated news stories.
๐ŸŽญ Content ๐ŸŽฐ Gambling StevenBlack ~6.7K Online casinos, betting and lottery sites.
๐ŸŽญ Content ๐Ÿ”ž Adult content StevenBlack ~77K Pornography and other adult sites.
๐ŸŽญ Content ๐Ÿ‘ฅ Social networks StevenBlack ~3.8K The social networks themselves, such as Facebook, Instagram and X.
๐Ÿ” Security ๐Ÿ” Encrypted DNS bypass HaGeZi ~4K Public DNS-over-HTTPS servers, so apps can't sidestep your hosts file.
๐Ÿ” Security ๐Ÿฆ  Threat Intelligence HaGeZi ~1.1M Malware, phishing and scam domains.
๐Ÿ“ฑ Trackers ๐Ÿ“ฑ Xiaomi HaGeZi ~470 Telemetry built into Xiaomi, Redmi and POCO devices.
๐Ÿ“ฑ Trackers ๐Ÿ“ฑ Samsung HaGeZi ~270 Telemetry built into Samsung devices.
๐Ÿ“ฑ Trackers ๐Ÿ“ฑ Huawei HaGeZi ~180 Telemetry built into Huawei and Honor devices.
๐Ÿ“ฑ Trackers ๐Ÿ“ฑ OPPO & Realme HaGeZi ~590 Telemetry built into OPPO, Realme and OnePlus devices.
๐Ÿ“ฑ Trackers ๐Ÿ“ฑ Vivo HaGeZi ~250 Telemetry built into Vivo and iQOO devices.
๐Ÿ“ฑ Trackers ๐Ÿ“ฆ Amazon HaGeZi ~740 Tracking built into Amazon devices and apps.
๐Ÿ“ฑ Trackers ๐ŸŽต TikTok HaGeZi ~550 Tracking and fingerprinting domains used by TikTok.
๐Ÿ“ฑ Trackers ๐ŸชŸ Microsoft HaGeZi ~730 Telemetry from Windows, Office and other Microsoft apps.

*As of November 2026.

  • โœจ For your device. StevenBlock reads your device's brand and marks the matching tracker add-on with โœจ For your device.
  • ๐Ÿงฎ No double counting. The device tracker add-ons are almost completely contained in HaGeZi Pro, Pro++ and Ultimate. They add the most on top of StevenBlack Main, hBlock, HaGeZi Light and HaGeZi Normal โ€” the โž• new number on each row tells you exactly how much.
  • ๐Ÿ” Encrypted DNS bypass makes browsers and apps with their own secure DNS fall back to the system resolver, where your hosts file applies. Your Android Private DNS provider is kept reachable automatically โ€” see ๐Ÿ” the Private DNS guard.
  • ๐Ÿ˜ Threat Intelligence is very large. Some ROMs read the whole hosts file on every lookup, so more than a million extra entries can make name resolution slower. Turn it off again if your device feels sluggish.
  • ๐Ÿ‘ฅ Social networks blocks the networks themselves. Their apps and websites stop working.

๐Ÿ”— Your own lists

Tap โž• Add a list and paste the HTTPS address of any hosts file. StevenBlock understands classic hosts files, plain domain lists (one domain per line) and simple ||domain^ lists. You can add up to 8 custom lists, each up to 64 MB.

[!IMPORTANT] A hosts file has no wildcards. When a list was written for wildcard-capable blockers โ€” plain domain lists and ||domain^ lists usually are โ€” StevenBlock blocks exactly the domains that are listed, not their subdomains. Lists published in hosts format work best.

๐Ÿ“ฑ Compatibility

Root manager WebUI Action button How to open the WebUI
Magisk v28+ ๐ŸŒ In your browser โœ… Tap Action โ–ถ๏ธ on the StevenBlock card. The WebUI opens in your browser through a private local server.
KernelSU โœ… Built in โœ… Tap WebUI on the StevenBlock card.
KernelSU Next โœ… Built in โœ… Tap WebUI on the StevenBlock card.
SukiSU โœ… Built in โœ… Tap WebUI on the StevenBlock card.
APatch โœ… Built in โœ… Tap WebUI on the StevenBlock card.
  • ๐ŸŒ Magisk has no built-in module WebUI. The Action button (Magisk v28+) starts a private server on 127.0.0.1:9090 and opens the WebUI in your browser. You can also open the WebUI natively with KsuWebUI, MMRL or WebUI X. Installing needs Magisk v20.4 or newer.
  • โ–ถ๏ธ On KernelSU, KernelSU Next, SukiSU and APatch the Action button works too: it opens the same WebUI in your browser.
  • ๐Ÿ”— Metamodules: recent KernelSU, SukiSU and APatch releases leave module mounting to a metamodule (such as meta-overlayfs). StevenBlock doesn't depend on one: right after the boot-time mount, and again when boot finishes, it checks that /system/etc/hosts really is its file and bind-mounts the file itself if not.
  • ๐Ÿงฐ StevenBlock uses the BusyBox that ships with your root manager for every task, including requests from the browser WebUI. It downloads with curl when available, otherwise with BusyBox wget. Without a root manager BusyBox it falls back to Android's own tools.

๐Ÿ› ๏ธ Installation

  1. ๐Ÿ“ฅ Download StevenBlock.zip from the StevenBlock repository.
  2. ๐Ÿ“ฆ Install it from your root manager: Modules โ†’ Install from storage โ†’ select the zip.
  3. โ˜• Sit back. The installer runs on its own:
    • โœ… detects your root manager, BusyBox and downloader,
    • ๐Ÿงฉ warns you about conflicting hosts blockers (installation continues),
    • ๐Ÿงน moves v1.0 data to the new layout and removes leftovers from v5.0,
    • ๐Ÿ’พ keeps a copy of your original hosts file,
    • โฌ‡๏ธ downloads, verifies and installs StevenBlack Main โ€” or rebuilds your existing setup without downloading anything.
  4. ๐Ÿ” Reboot. Installing or updating the module itself is the one thing that always needs a restart.
  5. ๐Ÿ–ฅ๏ธ Open the WebUI โ€” see ๐Ÿ“ฑ Compatibility for your root manager.

[!TIP] No internet during install? No problem. StevenBlock writes a clean localhost-only hosts file and finishes the installation anyway. After you reboot, it retries the download automatically as soon as you're online โ€” at this boot and at every later one โ€” and you can also tap โฌ‡๏ธ Download now in the WebUI.

[!NOTE] Updating keeps your main list, add-ons, custom lists, domain rules, settings and your enabled or disabled state.

๐Ÿ–ฅ๏ธ WebUI Tour

๐Ÿ›ก๏ธ Header

The StevenBlock logo, the version and a live status badge: ๐ŸŸข Active, ๐Ÿ”ด Disabled, ๐ŸŸก Reboot required, โš ๏ธ Overridden or ๐Ÿ”ด Not active. The ๐ŸŒ™ / โ˜€๏ธ button switches between the dark (default) and light themes and remembers your choice. Right below, quick links jump to every section.

๐Ÿ” Reboot banner

It only appears when saved changes really are waiting for a reboot, with a ๐Ÿ” Reboot now button that always asks for confirmation first. With live apply you will rarely see it.

๐Ÿ“Š Protection overview

The number of blocked domains, the main list with its level, how many add-ons are stacked on top, your rule counts, when the lists were last updated and whether the hosts file is actually applied to the system. Small tags show whether โšก live apply and ๐Ÿ”„ auto-update are on and whether your ๐Ÿ” Private DNS provider is protected. The update time turns amber when your lists are more than a week old.

๐Ÿ“‹ Lists

Every main list as a card with its name, a short description, a level badge (๐ŸŸข / ๐Ÿ”ต / ๐ŸŸก / ๐ŸŸ  / ๐Ÿ”ด), the entry count and the last-update date. The active list is highlighted with a โœ… Active badge and a colored border.

  • โฌ‡๏ธ Use this list opens a confirmation with the list's details, then shows live progress: โฌ‡๏ธ Download โ†’ ๐Ÿ” Verify โ†’ ๐Ÿงน Optimize โ†’ ๐Ÿ“ฆ Install, with percentage, size and speed. Your add-ons and rules are kept.
  • โœ–๏ธ Cancel stops a download safely โ€” nothing is changed.
  • ๐Ÿ”ฝ Hide tucks the progress into a small bar at the bottom while you keep exploring. Close the WebUI and come back later โ€” a running task is still shown.
  • ๐Ÿ”„ Refresh re-reads entry counts and dates. They are cached for 6 hours.
  • If a count can't be fetched, the card says โŒ Couldn't fetch entry count with a ๐Ÿ” Retry button.

โž• Add-ons

Below the main lists: one row per add-on with a switch, grouped into ๐ŸŽญ Content categories, ๐Ÿ” Security, ๐Ÿ“ฑ Device & app trackers and ๐Ÿ”— Your own lists. Flip as many switches as you like โ€” a bar appears with โ†ฉ๏ธ Reset and โœ… Apply, and the confirmation lists exactly what will be turned on and off, including any warnings. When several lists are downloaded, the progress shows which one is in flight, for example Downloading Gambling (2 of 3).

๐Ÿงฉ Domain Rules

Type a domain or paste a full URL, then tap โœ… Allow Domain or โ›” Block Domain. ๐Ÿ” Check this domain tells you whether and why a domain is blocked. Your rules appear in two tabs with a ๐Ÿ—‘๏ธ button to remove each one, a filter box once the list gets long, and ๐Ÿ“ฅ Import rules / ๐Ÿ“ค Export rules at the bottom. See the ๐Ÿงฉ Domain Rules Guide.

โšก Actions

  • ๐Ÿ”„ Update Lists โ€” checks your main list and every add-on, and only downloads what changed. Otherwise you'll see โœ… Already up to date.
  • ๐Ÿ“Š Check Status โ€” the main list, add-ons, enabled state, total blocked domains, rule counts, last update, auto-update and live apply, whether a reboot is pending, how the hosts file is mounted, your Private DNS provider, the hosts file size, your root manager and the module version.
  • โป Disable / Enable Blocker โ€” Disable swaps in a clean localhost-only hosts file but keeps your lists and rules. Enable rebuilds the hosts file from the cache instantly, without downloading again.
  • ๐Ÿฉบ Health Check โ€” verifies the hosts file line by line and by checksum, the mount, conflicting modules, the cache, list age, the scheduler, the downloader, the connection to the list server, BusyBox, free storage and your Private DNS provider. ๐Ÿ“‹ Report turns it all into text you can copy into a bug report.
  • โš™๏ธ Settings โ€” โšก Live apply on or off, and the ๐Ÿ”„ Auto-update interval.
  • ๐Ÿ› ๏ธ Repair โ€” rebuilds the hosts file from your cached lists and rules, checks it again and mounts it if needed. Nothing is downloaded.

๐Ÿ“œ Logs

Every operation is logged with a timestamp and a level โ€” โ„น๏ธ INFO, โš ๏ธ WARN or โŒ ERROR โ€” color-coded and scrolled to the newest entry. Filter by โš ๏ธ Warnings or โŒ Errors, copy the log with ๐Ÿ“‹, or ๐Ÿงน Clear logs after a confirmation. The log keeps the latest 500 lines.

๐Ÿ™Œ Credits

Links to the developer's GitHub and the Telegram group, plus the blocklist and font projects StevenBlock is built on. Links open in your browser.

โšก Live Apply

In v1.0 every change needed a reboot. v2.0 removes that wait whenever your device allows it:

  1. โœ๏ธ Write in place. The new hosts file is first built and checked next to the old one, then written into the very file that is already mounted over /system/etc/hosts. Everything that reads the hosts file sees the new content right away.
  2. ๐Ÿ” Check the result. StevenBlock compares the live /system/etc/hosts with its own file. Only when they match does it report Active now.
  3. ๐Ÿ”— Mount directly if needed. If Android is using a stale copy โ€” some metamodules mount a copy made at install time โ€” and no other module provides a hosts file, StevenBlock bind-mounts its own file.
  4. ๐Ÿ” Fall back honestly. If none of that works, for example because another module owns the hosts file, you get the familiar ๐ŸŸก Reboot required banner. Your change is saved either way.
  • ๐Ÿงฝ After a live change StevenBlock asks Android to flush its DNS cache where the system supports it. Apps that were already open can hold on to old answers for a little while โ€” close and reopen them if a change doesn't seem to arrive.
  • ๐Ÿงฑ Prefer the classic behaviour? Turn โšก Live apply off in โš™๏ธ Settings. StevenBlock then swaps the hosts file atomically and waits for a reboot, exactly like v1.0.
  • ๐Ÿ“ฆ Installing or updating the module itself always needs a reboot, because your root manager only activates new module files at boot.

๐Ÿ”„ Auto-update

Auto-update is off by default. Turn it on in โš™๏ธ Settings and choose Daily, 3 days or Weekly.

  • ๐Ÿ˜ด One small sleeping process. While auto-update is on, a single shell process wakes up every 15 minutes, sees whether a check is due and goes back to sleep. Turn the setting off and the process ends.
  • ๐Ÿ”Ž Cheap checks. A check asks each list's server for the first 8 KB only and compares the list's version with the one you have. A list is downloaded only when it actually changed.
  • ๐Ÿ—œ๏ธ Compressed downloads. With curl, lists are transferred compressed โ€” in our measurements about 75โ€“79% less data than the plain file. HaGeZi Ultimate, for example, came down from about 21 MB to about 4.5 MB.
  • โšก No reboot. With live apply, an updated list is active as soon as it is installed.
  • ๐Ÿ›‘ Polite on failure. If an update fails, for example because you're offline, StevenBlock waits about an hour before trying again and logs it once.
  • ๐Ÿ“ถ Some lists change several times a day. If you're on a metered connection, Weekly keeps data use low.

๐Ÿงฉ Domain Rules Guide

Domain rules sit on top of your lists, and they stay when you switch lists or change add-ons.

You want toโ€ฆ Rule Example
Unblock a domain your lists block by mistake โœ… Allow links.newsletter-service.com
Unblock a domain together with all of its subdomains โœ… Allow with a wildcard *.example.com
Block a domain your lists don't cover โ›” Block ads.annoying-site.net
  • ๐Ÿ”— Paste anything. https://Shop.Example.com/cart?id=42 becomes shop.example.com automatically.
  • ๐Ÿ”ก Lowercase is automatic, and international domain names are converted to their xn-- form.
  • โœณ๏ธ Wildcard allow rules. *.example.com allows example.com and every subdomain your lists would block. Only allow rules can use a wildcard, and only at the very start.
  • ๐Ÿšซ Not accepted: spaces, ports (example.com:8080), IP addresses, wildcards in block rules and wildcards in the middle of a domain.
  • โš–๏ธ No contradictions. A domain can't be both allowed and blocked. That includes wildcards: you can't block ads.example.com while *.example.com is allowed, and you can't allow *.example.com while one of its subdomains is in your Block list. StevenBlock tells you which rule is in the way.
  • ๐Ÿ“ฆ Up to 1,000 allow rules and 1,000 block rules.

[!IMPORTANT] Hosts files have no wildcard support, so a Block rule matches exactly the domain you enter: blocking ads.example.com does not block tracker.ads.example.com. Wildcard allow rules work because StevenBlock removes the matching entries while it builds the hosts file.

๐Ÿ” Check a domain

Type a domain, a URL or just a keyword and tap ๐Ÿ” Check this domain:

  • โ›” Blocked โ€” and by which list, add-on or rule. One tap on โœ… Allow it fixes a false positive.
  • โœ… Allowed by one of your rules โ€” including which lists would block it otherwise.
  • โœ… Not blocked โ€” with โ›” Block it right there, and a count of blocked subdomains if there are any, plus โœ… Allow all subdomains.
  • ๐Ÿ”Ž A keyword such as facebook lists the blocked domains that contain it. Tap one to check it.

๐Ÿ“ฅ Import and ๐Ÿ“ค export

๐Ÿ“ค Export rules shows all of your rules as plain text to copy and keep. ๐Ÿ“ฅ Import rules takes that text back โ€” or any list of domains:

allow example.com
allow *.cdn.example.com
block ads.example.net

Lines without allow or block are imported as the type you choose. Lines from a hosts file (0.0.0.0 domain) are imported as block rules, +domain as allow and -domain as block. You decide whether the import is โž• added to your current rules or โ™ป๏ธ replaces them, and the WebUI shows how many entries are valid before anything is saved.

After any rule change, StevenBlock rebuilds the hosts file from its cached copy of your lists โ€” no download needed.

๐Ÿ›Ÿ Safety Net

Your hosts file is too important to gamble with, so StevenBlock checks everything twice:

  1. ๐Ÿ”’ One task at a time. A lock (with stale-lock detection) prevents two operations from colliding. Quick actions wait their turn for a moment; long downloads make the busy buttons unavailable.
  2. ๐Ÿ’พ Free space check before every download.
  3. ๐Ÿ” Download validation. The server must answer HTTP 200, the file can't be empty or an HTML error page, it must contain enough valid entries (at least 1,000 for a main list), it can't be larger than 64 MB, and its size must match what the server announced. With curl, lists must come over HTTPS all the way โ€” a redirect to plain HTTP is refused.
  4. ๐Ÿงน One-pass normalization with awk: comments, blank lines and CRLF line endings are removed, every redirect becomes 0.0.0.0, localhost and other system entries are skipped, invalid domains are dropped, and everything is lowercased and de-duplicated โ€” within each list and across all of your lists.
  5. ๐Ÿงฑ Staged changes. New lists are prepared on the side. Nothing โ€” not the cache, not your settings โ€” is replaced until the new hosts file has been written and verified. If one add-on can't be refreshed during an update, its previous version stays in use and you're told about it.
  6. ๐Ÿ—‚๏ธ Backups. Before every list change the current hosts file is backed up, compressed. The last 3 backups are kept, and if the newest one is unusable the older ones are tried.
  7. โœ… Verification. The new file must start with the 127.0.0.1 localhost and ::1 localhost ip6-localhost lines and contain exactly the expected number of entries. If not, the backup is restored automatically.
  8. ๐Ÿงพ Checksum at every boot. StevenBlock records a checksum after each change and compares it at boot. A truncated, tampered or missing hosts file is rebuilt from the cache before it is mounted.
  9. ๐Ÿ”— Mount check at every boot. If Android isn't using StevenBlock's file and no other module provides one, StevenBlock bind-mounts it directly โ€” /system itself is never written.
  10. ๐Ÿ” Private DNS guard. If Android's Private DNS is set to a provider hostname, that hostname is left out of the blocklist, so a list can never cut you off from your own DNS provider. Your own Block rule still wins if you add one.
  11. ๐Ÿงฝ DNS cache flush. StevenBlock tries the ndc resolver methods your Android version supports after a live change.
  12. ๐Ÿ“œ Nothing fails silently. Every error appears in the WebUI and in the log, and ๐Ÿฉบ Health Check re-verifies the whole setup whenever you ask.

๐Ÿ”’ Privacy & Security

  • ๐Ÿ  Local only. When you open the WebUI with the Action button, its server listens on 127.0.0.1:9090 only โ€” never on your network โ€” and only while you use it. The built-in WebUI of KernelSU, KernelSU Next, SukiSU and APatch needs no server at all.
  • ๐Ÿ”‘ Token protected. Every server start creates a fresh random session token. It reaches your browser in the fragment of the link โ€” the part browsers never send to a server โ€” is removed from the address bar right away, and travels in the request body from then on. Requests without the right token, with a foreign Host or Referer, or with an unexpected method are rejected, so other apps and websites can't control StevenBlock.
  • ๐Ÿ–ผ๏ธ No framing. In a browser, the WebUI refuses to run inside another page.
  • ๐Ÿงฑ Locked-down backend. The WebUI can only call a fixed list of commands. It never sends file paths or shell commands, and every input is validated again on the device. The only addresses it can pass along are the custom lists you add yourself: HTTPS only, a real domain name, a strict character set, and still nothing but 0.0.0.0 entries can come out of them.
  • ๐Ÿ“ต Zero telemetry. No analytics, no tracking, no accounts.
  • ๐Ÿ”ค No external requests from the WebUI. Fonts, icons and code are all bundled in the module.
  • ๐ŸŒ The only network traffic is downloading the lists you chose โ€” and reading their first 8 KB for entry counts, dates and update checks โ€” from their official sources.
  • ๐ŸŽฏ Lists can only block. Every entry is rewritten to 0.0.0.0, so even a tampered list can't redirect a domain to another server.
  • ๐Ÿ” Transport. curl verifies the server's certificate. BusyBox wget, which is only used on devices without curl, can't do that โ€” which is exactly why lists can only block and never redirect.
  • ๐Ÿ—„๏ธ Systemless. StevenBlock never writes to /system. Its data lives in /data/adb/stevenblock/ and is readable by root only.

๐Ÿ’ป Command Line

Everything the WebUI does is available from a root shell โ€” handy for Tasker, Termux or your own scripts:

su -c 'sh /data/adb/modules/stevenblock/sb.sh help'

Every command except help prints exactly one line of JSON โ€” {"ok":โ€ฆ,"code":"โ€ฆ","message":"โ€ฆ","data":{โ€ฆ}} โ€” and exits with 0 on success and 1 on failure.

Command What it does
status Overall state: lists, counts, applied state, settings.
lists The catalog of main lists and add-ons.
apply <list> Switch the main list, for example apply hagezi-pro.
update Check every active list and download what changed.
addons <id,id,โ€ฆ> Set the active add-ons, for example addons sb-gambling,hz-doh. An empty value turns all of them off.
source-add <https-url> [name] ยท source-del <id> Add or remove a custom list.
progress ยท wait [seconds] ยท cancel Follow, wait for or cancel the running task.
rules ยท rule-add <allow|block> <domain> ยท rule-del <allow|block> <domain> Manage domain rules.
rules-import <allow,csv> <block,csv> [replace] Import rules in bulk.
lookup <domain|keyword> Explain whether and why a domain is blocked.
enable ยท disable Turn blocking on or off.
settings ยท set live <0|1> ยท set autoupdate <0|1|3|7> Read and change settings.
diag ยท repair Run the health check, rebuild the hosts file.
logs ยท logs-clear ยท reboot Housekeeping.

Downloads run in the background. A typical script looks like this:

SB='sh /data/adb/modules/stevenblock/sb.sh'
su -c "$SB update" && su -c "$SB wait 300"

โฌ†๏ธ Upgrading

From v1.0

Install v2.0 over v1.0 and reboot. That's it.

  • โ™ป๏ธ Everything is kept: your main list, your domain rules and your enabled or disabled state. The cached list is moved to the new layout, so nothing is downloaded again.
  • โšก New defaults: live apply is on, auto-update is off, and no add-ons are selected.
  • ๐Ÿงพ The hosts file has no comment header anymore. It now contains the two localhost lines and block entries only, which lets StevenBlock verify every single line.
  • ๐Ÿ—‚๏ธ Backups are compressed and taken before list changes. Rule changes can always be undone by removing the rule, so they no longer create a backup.
  • ๐Ÿ” The WebUI keeps working until you reboot, still on v1.0. After the reboot you're on v2.0.

From v5.0

StevenBlock v1.0 was a complete rewrite of v5.0, and v2.0 builds on it. Its version code (2000) is higher than v5.0's (500), so your root manager offers it as a normal update.

  • ๐Ÿงน The v5.0 files config.txt, hosts.bak and hosts.tmp in /data/adb/stevenblock/ are removed automatically during installation.
  • ๐ŸŽฏ Energized lists are no longer offered, so every v5.0 user starts with StevenBlack Main. Switch to any other list from the WebUI.
  • ๐Ÿ–ฅ๏ธ The terminal menu and the volume-key installer are gone. Everything is managed from the WebUI or the ๐Ÿ’ป command line.

๐Ÿ—‘๏ธ Uninstall

  1. Open your root manager โ†’ Modules โ†’ StevenBlock โ†’ Remove.
  2. Reboot.

On removal StevenBlock stops its WebUI server and the auto-update scheduler, then deletes /data/adb/stevenblock/ with all of its lists, rules and temporary files. Because /system was never modified, your original hosts file is back after the reboot โ€” no traces left. Want to keep your rules? Use ๐Ÿ“ค Export rules first.

๐Ÿง  FAQ

โ” Can I use StevenBlock together with AdAway or Magisk's โ€œSystemless hostsโ€?

Please don't. Only one module can provide /system/etc/hosts, so two hosts-based blockers fight over the same file. Turn off Systemless hosts in Magisk (it creates a module called โ€œSystemless Hostsโ€ โ€” remove it in the Modules tab) and don't use AdAway's root (hosts) mode alongside StevenBlock. The installer, ๐Ÿ“Š Check Status and ๐Ÿฉบ Health Check warn you when they spot a conflict.

โ” Do my changes still need a reboot?

Usually not. With โšก live apply, StevenBlock writes into the hosts file that is already mounted and then checks that Android really sees the new content. You only need a reboot when that check fails โ€” typically because another module provides the hosts file โ€” when you turned live apply off, or after installing or updating the module itself. The WebUI always tells you which case you're in. See โšก Live Apply.

โ” I use KernelSU, KernelSU Next, SukiSU or APatch and still see ads in Chrome. Why?

These managers can hide module changes from apps that aren't granted root โ€” the umount modules option. If it's active for your browser, the browser sees the original hosts file instead of StevenBlock's.

Fix: open your root manager โ†’ Superuser โ†’ select Chrome (or Brave, Edgeโ€ฆ) โ†’ Custom โ†’ uncheck โ€œumount modulesโ€. Then fully close and reopen the browser.

โ” Do browsers with โ€œSecure DNSโ€ bypass the hosts file?

They can. Chromium-based browsers (Chrome, Brave, Edge and others) have a built-in Secure DNS (DNS-over-HTTPS) option that can resolve domains on its own instead of through Android's resolver, which means your hosts file may be skipped.

Fix in Chrome: Settings โ†’ Privacy and security โ†’ Use secure DNS โ†’ turn it off. Or turn on the ๐Ÿ” Encrypted DNS bypass add-on, which blocks the public DNS-over-HTTPS servers these browsers use. Android's own Private DNS setting is different: it doesn't bypass the hosts file, so you can keep using it โ€” and StevenBlock makes sure your provider is never blocked.

โ” Is a bigger list always better?

No. Stricter lists block more but also break more, and size has a cost of its own: some ROMs read the whole hosts file on every lookup, so a file with more than a million entries can make name resolution noticeably slower. Start with a list that fits your needs, add the add-ons you actually want, and use ๐Ÿ” Check this domain when something breaks. Processing a very large setup also takes longer: on our test machine a rule change took about a second with 600,000 entries and about five seconds with 1.6 million.

โ” Why does the official YouTube app still show video ads?

Those ads are served from the same servers as the videos themselves. A hosts file blocks whole domains, so blocking them would also block the videos. That's a limitation of every hosts-based blocker. For ad-free YouTube, use a client with built-in ad blocking such as ReVanced. StevenBlock keeps handling everything else on your device.

โ” A website or app broke. What now?
  1. ๐Ÿ” Type the site's domain into ๐Ÿงฉ Domain Rules and tap ๐Ÿ” Check this domain. If it or one of its subdomains is blocked, tap โœ… Allow it or โœ… Allow all subdomains.
  2. ๐Ÿงช Not sure which domain it is? โป Disable Blocker for a moment and try again โ€” with live apply that takes a second and no reboot. Enable it again afterwards.
  3. ๐Ÿ”Ž The error message, a browser's network inspector or the app's support pages often name the blocked domain. A keyword search such as paypal in ๐Ÿ” Check this domain helps too.
  4. ๐ŸŽš๏ธ Using ๐ŸŸ  Pro++ or ๐Ÿ”ด Ultimate? Step down to ๐ŸŸก Pro or ๐Ÿ”ต Normal โ€” the stricter lists trade compatibility for blocking power.
โ” Do I need a metamodule on KernelSU, SukiSU or APatch?

No. Recent releases of these root managers only mount module files through a metamodule, and some metamodules mount a copy of the module that was made during installation โ€” so later list changes would never reach the system. StevenBlock checks at every boot, and after every change, whether /system/etc/hosts is its current file. If it isn't, and no other module provides a hosts file, StevenBlock bind-mounts its own file directly. ๐Ÿ“Š Check Status shows who mounted it under ๐Ÿ”— Mounted by.

โ” Does StevenBlock slow down my phone or drain my battery?

No background service runs for blocking โ€” it's a static file read by Android's resolver. Downloading and processing a list takes a few seconds and only happens when you switch or update. The WebUI server only runs while you use it. If you turn on auto-update, one sleeping shell process wakes up every 15 minutes for a moment; without it, nothing runs at all.

โ” How much storage does it use?

Roughly the size of your hosts file plus a cache of similar size and three compressed backups. In our measurement with HaGeZi Ultimate, v2.0 used about 17 MB of data where v1.0 used about 56 MB.

๐Ÿฉบ Troubleshooting

Start with ๐Ÿฉบ Health Check โ€” it finds most problems on its own โ€” and try ๐Ÿ› ๏ธ Repair when it reports one.

Symptom Solution
๐ŸŸก โ€œNot applied yet โ€” reboot requiredโ€ Reboot. This appears when live apply is off or when Android couldn't be switched to the new file right away.
โš ๏ธ โ€œOverridden by another moduleโ€ Another module provides /system/etc/hosts (often Magisk's Systemless hosts or AdAway). Remove or disable it and reboot. ๐Ÿ“Š Check Status lists the conflicting modules.
๐Ÿ”ด โ€œNot activeโ€ Android isn't using StevenBlock's hosts file. Tap ๐Ÿ› ๏ธ Repair, or reboot โ€” StevenBlock mounts it at startup. If it stays, share the ๐Ÿ“‹ Report from ๐Ÿฉบ Health Check in the Telegram group.
๐Ÿงพ โ€œThe hosts file doesn't match what StevenBlock builtโ€ Something else changed the file. Tap ๐Ÿ› ๏ธ Repair.
๐Ÿ” โ€œYour Private DNS provider โ€ฆ is blocked right nowโ€ Tap ๐Ÿ› ๏ธ Repair. StevenBlock picks up the provider you set in Android and leaves it out of the blocklist.
๐Ÿ”Œ โ€œWebUI server stoppedโ€ in the browser The server stops after 10 minutes without activity. Tap Action โ–ถ๏ธ again.
๐Ÿ”‘ โ€œSession expiredโ€ or โ€œSecure session requiredโ€ Open the WebUI from the Action โ–ถ๏ธ button โ€” each press creates a new secure link.
โŒ โ€œPort 9090 is already in use by another appโ€ Another app is using port 9090. Close it (or reboot) and press Action โ–ถ๏ธ again.
โŒ โ€œBusyBox httpd isn't availableโ€ Your BusyBox lacks httpd. Open the WebUI with KsuWebUI, MMRL or WebUI X instead.
๐ŸŒ โ€œCouldn't reach the list serverโ€ Check your connection and try again. Your previous hosts file stays in place.
๐Ÿงฑ โ€œThe server sent a web page instead of a hosts listโ€ A captive portal or network filter answered instead of the list server. Sign in to the network or switch networks, then retry.
๐Ÿ˜ โ€œโ€ฆ is larger than 64 MBโ€ The list is too big for a hosts file. Pick a smaller edition of it.
๐Ÿ“‰ โ€œOnly โ€ฆ valid entries were foundโ€ The address doesn't point to a list StevenBlock can read. Use the list's hosts-format address.
โณ โ€œSetup pendingโ€ after installing offline Connect to the internet โ€” StevenBlock retries automatically at boot โ€” or tap โฌ‡๏ธ Download now.
โŒ โ€œCouldn't fetch entry countโ€ on a card Tap ๐Ÿ” Retry on the card or ๐Ÿ”„ Refresh at the top of the list section.
๐Ÿ”„ Auto-update is on but โ€œthe scheduler isn't runningโ€ It starts at boot. Open โš™๏ธ Settings and pick the interval again to start it right now.
๐Ÿ“บ Ads still show in a browser See the FAQ entries on umount modules and Secure DNS.

Still stuck? Open ๐Ÿฉบ Health Check โ†’ ๐Ÿ“‹ Report, copy it and ask in the Telegram group.

๐Ÿ™Œ Credits

StevenBlock stands on the shoulders of these outstanding open-source projects:

  • StevenBlack โ€” the unified hosts list behind our default, StevenBlack Main, and the fake news, gambling, adult content and social network extensions.
  • hBlock โ€” merges many reputable blocklists into one hosts file.
  • HaGeZi โ€” the Light, Normal, Pro, Pro++ and Ultimate lists, the Encrypted DNS bypass and Threat Intelligence feeds and the native tracker lists.
  • Inter by Rasmus Andersson โ€” the typeface of the WebUI, bundled under the SIL Open Font License 1.1.

๐Ÿ“„ License

StevenBlock is released under the GNU General Public License v2.0 โ€” see LICENSE. The blocklists belong to their maintainers and are downloaded directly from their official sources. The Inter font is distributed under the SIL Open Font License 1.1; its license is included in webroot/fonts/LICENSE.txt.

๐Ÿ’– Support

StevenBlock is built and maintained in spare time. If it keeps your phone clean, fast and private, you can help:

  • โญ Star the repository โ€” it helps others find StevenBlock.
  • ๐Ÿ“ฃ Share it with friends who root their phones.
  • ๐Ÿž Report bugs with the ๐Ÿ“‹ Report from ๐Ÿฉบ Health Check โ€” it contains everything that's needed and nothing personal.

๐Ÿ’ฌ Community

Questions, ideas or just want to hang out with fellow performance purists? Join our Telegram group! ๐ŸŽ‰


๐Ÿ† Watch Us Grow


โญ Star History


๊ด€๋ จ ํ”„๋กœ์ ํŠธ ์‚ดํŽด๋ณด๊ธฐ