Malwack

Person0z

Magisk KernelSU APatch
Malwack
Version
Mar 4, 2025
Updated

Module Info

  • Contributors Person0z, ZG089
  • Source Code View Repository
  • Tags
    #Malwack #Hosts File #Ad Blocking #Tracker Blocking #Magisk Module #KernelSU #APatch

About this module

Malwack is a systemless hosts-file module that maps listed advertising, tracking, and malicious domains to non-routable addresses, then refreshes its merged blocklist on a configurable schedule.

Local Domain Blocking

Blocking occurs through Android's hosts resolution path and does not require a local VPN service.

Systemless Hosts

A module overlay supplies /system/etc/hosts without writing the original system partition.

Scheduled Updates

BusyBox crond runs the updater after boot and at the interval stored in minutes.txt, with 1,440 minutes as the default and maximum.

Terminal Controls

The malwack command can restore a minimal or default list, add an optional adult-content list, and remove an exact domain entry.

Update Process

  1. After Android finishes booting, the service locates the BusyBox binary provided by Magisk, KernelSU, or APatch.
  2. It copies the updater to writable temporary storage, creates a root cron entry, and runs an immediate update.
  3. The updater downloads every active source in urls.txt, removes blank and comment lines, sorts the records, and keeps unique entries.
  4. The merged result replaces the module's hosts overlay and is assigned root ownership with mode 0644.
  5. The script sets net.dns1 and net.dns2 to Google's public DNS addresses, updates the module description, and records activity in /data/adb/malwack.log.

Installation and Controls

  1. Install the module ZIP from the Modules screen in the supported root manager.
  2. Reboot and confirm that /data/adb/malwack.log reports a successful list update and cron startup.
  3. Reboot again after a hosts update if applications continue using cached resolution results.
  4. Run su -c malwack --help in a terminal to review the supported restore and whitelist options.
malwack --restore-original
malwack --restore-default
malwack --whitelist example.com

Coverage and Limits

Hosts blocking affects only exact hostnames resolved through the operating system's normal resolver. It cannot reliably stop first-party advertisements, direct IP connections, applications with embedded resolution, or traffic sent through independent DNS-over-HTTPS. Large third-party lists can also block login, telemetry, payment, or content-delivery domains that an application needs.