Magisk-Ad-Blocking-Module icon indicating copy to clipboard operation
Magisk-Ad-Blocking-Module copied to clipboard

/etc/hosts not being modified

Open 4W4I5 opened this issue 2 years ago • 1 comments

I have tried using 2.11, 2.10, 2.9, and 2.8 installed with Magisk 27 and lsposed. The hosts file is not being updated i.e. using 'cat /etc/hosts' prints the 2 default hosts entries.

QUICK_FIX (i am not responsible for any damages caused by not following precautions of being root): Since this is a magisk module it is safe to assume that root privileges are possible.

  • Get root in termux with su
  • Download the latest module on your phone and unzip it
  • the AdBlock hosts file is 'system/etc'/hosts in the downloaded zip and rename it to something just to be safe. I used adblockhost
  • cd to the 'system/etc' directory in the extracted zip folder
  • 'su cat adblockhost >> /etc/hosts'

I am repeating myself. Be very careful as a slight typo has a chance to ruin your phone. I will not be held responsible for that. This is just a quick fix till the repo author's scripts are fixed

4W4I5 avatar Feb 22 '24 14:02 4W4I5

i wanted to add that testing the new hosts file however gave a 70ish % score on toolz figured someone might want to know how good it works

4W4I5 avatar Feb 22 '24 14:02 4W4I5