yashsingh1/xdaforums huggingface dataset:
[Magisk] shangostar:
Bit of a delay but I deleted temp from sdcard and whitelist applied, ads still blocked though on said website so guess i need to know the domain.

avforums isn't in my hosts file before applying whitelist, my host file doesn't contain anything relating to websites or domain names as far as I can see though, there isn't much content in it at all but ads are being blocked ok.
[Magisk] Zackptg5:
Hi everyone. Magisk v13.1 has been released! With this release comes a new template version for modules (v4).

I updated this module with the new template. However, there's no backwards compatibility (by design). This means that v2.1 is only compatible with magisk v13.1 (and newer versions down the road hopefully). So if you're on an older version of magisk (don't know why you would be), stick with v2.0. I'll leave it up on the OP indefinitely for those poor individuals :silly:

Otherwise, v2.1 is ready to go for the new magisk release!
[Magisk] Zackptg5:
Here's a list of domains on avforum.com

As you can see, there are quite a few other sites listed there including the infamous 'doubleclick.net'

Looks like that one may happen to be the ad server your looking for

There's actually a small section for doubleclick in the hosts file. So if you want to remove all variants of it (which I don't recommend but it's probably what you want in this case), it'd be:

.*doubleclick.net

And you would need to use the 'wr' option in the hosts script since this uses regex
[Magisk] Ch1ngl1ng:
Hi, I'm currently on the latest Magisk v13.1 and updated to the latest v2.1 of your module. After installing I rebooted and went to terminal, typed su and hosts and your script ran fine. I then typed in my presets fgp and it gives me this error:

"/magisk/.core/hosts: Read-only file system"

I currently have Magisk Hide and Systemless hosts enabled. The only other modules I have are Osmosis BusyBox and Viper4Android. Is this a Magisk problem? I've had this issue also with the previous v13 beta with the same configuration.

I tried going to that location in a file manager and I can access it just fine. I see the hosts file and can edit it.

Thank you for your help
[Magisk] klaberte:
Issues with 13.2

Just upgraded from 13.0->13.1->13.2 version of Magisk. From the downloads tab of Magisk Manager, when I try to download and install v 2.1 of your module, Magisk Manager seems to crash, "Magisk Manager has stopped."

However, if I download your module directly from this thread, then install it using Magisk Manager, it says that the installation is successful, and the "Module will be updated at next reboot". However, after the next reboot, the module listing in Magisk Manager says the same, "Module will be updated at next reboot", and at a terminal, hosts returns "not found"

Some new incompatibility?
[Magisk] Zackptg5:
Are you using the latest magisk manager from the magisk thread? They're not included in the release zips (only were in the betas)
[Magisk] Didgeridoohan:
The problem with the Manager crashing when downloading modules is a bug that hopefully will be addressed soon. No issues installing the module manually though, on my end...

No, it's included in the release zips as well.
[Magisk] yung40oz84:
Ok, so I tried mfgs, I think it was says invalid, no spaces, well there is no spaces. If I choose just fsg, will that include m? The adware and malware?
[Magisk] JERW28:
Yes
[Magisk] klaberte:
Yes, I was.

I also could not install v2.1 manually (directly in TWRP). Had to drop back to 2.0 with Magisk 12.0. Are others able to make 2.1 work?

On a Samsung Note 5 using stock Android 7.0.
[Magisk] Zackptg5:
Topjohnwu just dropped an update for Magisk manager. It works fine on my end so it's probably something with your device (samsungs are funky)
[Magisk] xXxNeXuSxXx:
Does this help in blocking YouTube ads?
[Magisk] Adi59:
With this on, I still get ads in youtube app. I used the command with all except "m" cuz I understood it is included already. Give it a try. It could be that you have less ads then normally...
[Magisk] xXxNeXuSxXx:
Will try it... thanks ?
[Magisk] biomech91:
I'm having this issue as well, on Magisk 13.2 with the latest version of the manager. Installation seemingly works fine, but both modules I use (including this one) now say "Module will be updated at next reboot" no matter what. :/

Android 7.0 on a Note5.
[Magisk] exodius48:
[MENTION=6037748]Zackptg5[/MENTION] Recently updated hosts file to July 18 2017, but i can't access facebook anymore (using app & browser). Does facebook blocked in this updated?

I'm using 'fps'
[Magisk] Didgeridoohan:
The "s" in "fps" stand for social... So yes, you will have issues with Facebook unless you add it to the whitelist.
[Magisk] exodius48:
Strange, on previous version i can access facebook w/o any issues. :confused:
[Magisk] Zackptg5:
I don't make the actual hosts file (website block lists). That's all done by stevenblack. But as [MENTION=4667597]Didgeridoohan[/MENTION] said, the social filter will block social network websites so you'll either need to whitelist facebook or just not use the social filter
[Magisk] exodius48:
Yes, i'm sure

Nah, its the culprit, hosts source has been updated, owner add facebook to blocked list.

Ok, if so, i'll select another source.
[Magisk] Zackptg5:
Okay, to whitelist all of that facebook stuff, you'll want to use the regex whitelist option ('wr'). So make a whitelist file on sdcard containing this:

.*facebook.*
.*fbcdn.*

That should remove almost all of the entries you listed for facebook. However, you may want to tailor it to your purposes as this is a very general whitelisting. Check the OP for usage on applying it :)
[Magisk] klaberte:
[/COLOR]

Actually, the issue appears to have been the zip file (although perhaps from the funkiness of Samsung). I fixed my issue by doing this (from the Tips and Tricks thread):

If the error states that it's not a Magisk zip, or invalid zip in TWRP, something's gone wrong while packing the zip. Open up the zip and you'll probably see a folder (probably named something like <nameofmodule>-master). Take all the contents of that folder and repack it to the root of the zip and try flashing it again.
[Magisk] Zackptg5:
Well I have them posted in the OP in case weird stuff like that happens with the magisk module repo (not the first time this has occurred). Not much I can do unfortunately but topjohnwu will fix it soon enough. Thanks for the report!
[Magisk] Narohuh:
magisk 13.3+this module can`t open magisk manager stuck in the logo
[Magisk] Zeuskk:
Ye, I can confirm that too, this module version probably break magisk manager, it stuck on logo.

Wysłane z mojego ONEPLUS A5000 przy użyciu Tapatalka
[Magisk] Zackptg5:
Problem isn't with the module or magisk, but with Magisk manager 5.1. roll back to 5.0.6 until topjohnwu fixes it. It happens with other modules randomly as well.

Clear app data, remove v5.1, then install 5.0.6
[Magisk] skdubg:
its not module related, use uninstaller, install magisk 13.3 and your modules --> all fine
[Magisk] Didgeridoohan:
Not quite true for all users and all modules...
[Magisk] skdubg:
its possible, yes :good:
[Magisk] 6hexanexz:
Same magisk manager stop working not open
[Magisk] Zackptg5:
Read my post a few above yours :)
[Magisk] realista87:
what's the difference with the MoaAB (Mother of All AD-BLOCKING) project? https://xdaforums.com/showthread.php?t=1916098

seems that BOTH are merging other lists to creare ONE BIG host file......

but basically, what is the difference, none? just 2 parallel projects... what have the same GOAL to merge all sources into one big host?
[Magisk] Zackptg5:
Different sources, similar goals. I don't make the host file for this project, I use steven blacks on github (https://github.com/StevenBlack/hosts). Read the readme there for information on that project. Some of the goals he has are to have a hosts file that only includes sources that are actively maintained and of high quality.

I couldn't find any source code for the moaab and the maintainer there keeps everything under lock and key so we have no idea where he's pulling the lists from. They could be high quality, they could be just everyone he could find. There's no real way of knowing (you're welcome to ask him). Based on the sheer size of that hosts file, I would assume that moaab includes more sources than uha but that's about all we know for certain.

What I like about uha is that it's open source, cross platform (on his github he has outlined how you can use them on pretty much any platform), and customizable (choose different filters). Of course hosts files are present on other OS's, but the cross-platform capability for the different hosts options and some of the tools bundled in are handy.

So the main take away from all of this is to try both and see which one you like better :)
[Magisk] realista87:
thank you for the long reply.

i tested your module and entered the commands to mod the host file, it does work.

and to "disable" everything i just toggled the magisk option that enable/disable systemless hosts... i think that in that way it's like if it erases all....right? from on to off to on = ERASE host modded file
[Magisk] Zackptg5:
Yup :) it deletes the host file and then generates a new one when you toggle it
[Magisk] earlycray:
I am unable to uninstall this module through Magisk Manager by clicking the bin icon. Can I simply disable it and systemless hosts and then delete the unifiedhosts folder from /magisk ?
[Magisk] Zackptg5:
Weird but ya, toggling systemless hosts will delete the unified hosts file and deleting the folder would delete the mod
[Magisk] realista87:
to update the host list, can i just do the full procedure again? will it automatically overwrite the previous host with the latest one with updated list?
[Magisk] Nevermindthelabel:
Yes
[Magisk] Legendary Cryptid:
I have Magisk 13.3 and Manager 5.1.1. I tried. Installing the module through Magisk twice, and it failed. Then I tried flashing it through TWRP and it still failed. Any suggestions?

LG K7 MS330

SDK22 5.1.1
[Magisk] ttydy:
It will also modify /system/etc/hosts. Is this normal?
[Magisk] Zackptg5:
Yes and no. The file actually modified is /magisk/.core/hosts

Magisk mounts it as /system/etc/hosts so the real hosts file isn't actually modified but reflects the changes in the Magisk one
[Magisk] ttydy:
May be my expression of a problem. if /magisk/.core/hosts size is 2MB, My file /system/etc/hosts will become 2MB. In fact, The file /system/etc/hosts should be the same, right?
[Magisk] Zackptg5:
Yup. Basically, if you want to manually modify it, do it only to the .core one
[Magisk] ttydy:
I used "Unified Hosts Adblocker" module, Open terminal and type: su -> hosts -> fs. "/system/etc/hosts" will changed. IIs this a bug?

magisk systemless host is on, magisk version is latest.
[Magisk] Zackptg5:
Nope, that's normal
[Magisk] ttydy:
Thx. Will it affect ota?
[Magisk] Legendary Cryptid:
I have Magisk 13.3 and Manager 5.1.1. I tried to install this module througy the manager twice and it failed both times. Then ai tried flashing it through recovery and it still failed. Any way to fix this?

LG K7 MS330

SDK22 5.1.1 firmware
[Magisk] Zackptg5:
Nope
[Magisk] Zackptg5:
Your getting weird errors unrelated to the module. Try uninstalling and reinstalling Magisk. If you still get errors install osm0sis's busybox (assuming your installing via twrp)
[Magisk] Legendary Cryptid:
So I need to install osm0sis's busybox via TWRP, right?
[Magisk] Zackptg5:
Yup
[Magisk] Legendary Cryptid:
As it is a module, there's no app to open is there?
[Magisk] Zackptg5:
Correct
[Magisk] Legendary Cryptid:
It still didn't work. It still failed via Magisk Manager. And this app still has errors sending attachments 75% of the time.
[Magisk] Zackptg5:
Use twrp
[Magisk] Legendary Cryptid:
Still failed. Worse still, it shows up as installed, saying it'll be updated next reboot. I rebooted, then went into terminal emulator, entered su, entered hosts, and it reported "hosts not found."
[Magisk] Zackptg5:
None of the files copied based on the logs. It's giving weird errors on basic commands such as mkdir that should work normally. Whatever the problem is, it's something weird with your device/rom
[Magisk] Legendary Cryptid:
Any suggestion on how to fix that?
[Magisk] R324D:
Hi, how do I apply mfgp?

When i hit enter nothing happen..
[Magisk] Nevermindthelabel:
Master is included in the others. Just use fgp
[Magisk] 4_Weasel:
You need to hit f then enter, p then enter, etc.
[Magisk] Zackptg5:
You actually want to follow what [MENTION=5996385]Nevermindthelabel[/MENTION] said :)
[Magisk] realista87:
why adaway uses the redirect to 127.0.0.1 ......instead the [MagiskModule] Unified Hosts Adblocker uses 0.0.0.0 ???

what's better in terms of performance or appearance? i noticed that using the unified host..... on chrome i see some "broken" ads.... i don't she the real ads BUT A BLANK SPACE with a little icon, indicating a corrupted download.

is the 127.0.0.1 redirect better in TERMS OF APPEARANCE?? using adaway i never facedthe problem of blank ads ....idem with icon of rorrupted images ecc
[Magisk] nathanchance:
https://github.com/StevenBlack/hosts#we-recommend-using-0000-instead-of-127001
[Magisk] realista87:
thanks.. but it is not clear if the 0.0.0.0 method makes some minor bad appearance within the emtpy space of the missed ad.....
[Magisk] Bewildered Wolf:
Activated the module from Magisk.

Flashed Module.

Have systemless hosts activated in Magisk Settings.

But whenever I type "hosts" in Terminal, it says "sh: hosts: not found"

Can anyone help where am I getting wrong.
[Magisk] 4_Weasel:
Did you first type su <enter>?
[Magisk] Bewildered Wolf:
Yes bro.

Not that noob ?
[Magisk] Didgeridoohan:
It wouldn't have been the first time someone made that mistake... :D

But, having said that... Noob enough not to provide any logs when asking for help. :laugh: At least a Magisk log and possibly a recovery log if installing the module from recovery.
[Magisk] Bewildered Wolf:
I'll provide the log. But can you help me with this thing.

I'm deleting a module. And then it shows Module will be uninstalled after the next reboot. So, I reboot the phone but the module is still there.

It's not getting uninstalled. Same with every module.
[Magisk] ToDream:
Hi!

Check the SafetyNet, if false, select "Re-install" and then "Install" (13.3.zip). Reboot and try again.
[Magisk] Bewildered Wolf:
No the Safety check passes.

Edit : reinstalling the module worked.

Though one doubt.

I can select only from one of the 5 presets ?

Or more the one.

And by the way, which preset will be good for me. ?

I just want to have no in-app ads.

Edit 2: Got it. I've to select combination of letter.

Can somebody explain the presets to me.

Like what is master. ? Gambling?
[Magisk] ToDream:
Yes, you can select as many as you want. Except the social, select everyone except what describes "social", because you could have problems with Facebook. I managed to select and apply one letter at a time.

The Adblock Plus 1.3 application also works by blocking ads with Magisk root.

https://downloads.adblockplus.org/devbuilds/adblockplusandroid/
[Magisk] Didgeridoohan:
If you select and apply one letter at a time, each time you select a new letter you'll overwrite the last selection. To make several selections, type all the letters at the same time. To get the the options master, fakenews, gambling and porn you would enter (master is always included):

fgp
[Magisk] Bewildered Wolf:
What's the point of adding one more app bro ? Is there something which this module will not do and can be done with the help of the app ?

Figured that out already.

Thank you.
[Magisk] tamamma:
hi there and thank you in advance, one question, does Masters option includes adware+malware(like m option)?
[Magisk] Zackptg5:
The m option is the master option. So type 'm' and you'll get adware+malware
[Magisk] Zackptg5:
Updated to version 2.2

Changelog: added blacklist option. See OP for usage. Now you can block whatever you want in addition to normal lists :)
[Magisk] atarek:
Sites not opening

Hello,

Magisk v13.3

Dirty flashed over version 2.1

I apply master filter only and whitelist.

Alot of sites don't open as "samsung.com"

hosts and screenshots

Any advice.

Regards,

Ahmed
[Magisk] Zackptg5:
Those sites aren't blocked by the master hosts file so it's something else going on
[Magisk] atarek:
Ok.

I downgraded to version 2.1 then applied same filters and everything working flawlessly as before.

I've not changed anything during upgrade or downgrade. That's why i reported cause this module is the only changed factor.

Thanks for ur reply.

Regards,

Ahmed
[Magisk] CypherMK:
This is working great! Thank you!

Does anyone know how to whitelist the Google shopping results that are on the top of the page after I search for a product?
[Magisk] jenslody:
It's most likely a Samsung specific issue, see: https://xdaforums.com/showpost.php?p=73073713&postcount=16589 .

Flashing through TWRP should work or you use the attached (slightly modified in updater-script) zip (not signed).
[Magisk] biomech91:
Yup, I ended up trying a flash of each module through recovery and that fixed it.
[Magisk] Bewildered Wolf:
Why this is add is not getting blocked ?

I've used 'fpg'
[Magisk] Didgeridoohan:
In-app ads can't always be blocked by modifying hosts.
[Magisk] oux:
why do I have ads? didn't have it before. tried update and reapply a couple of times but didn't help. Magisk 13.3 with Magisk manager 5.1.1. tried search but couldn't find anything. both in chrome and opera.

I have fgp enabled
[Magisk] klaberte:
Can you rerun su, hosts, but just try the default 'm', and report your results?
[Magisk] Zackptg5:
Did you enable systemless hosts in Magisk manager settings?
[Magisk] oux:
still the same result

yes I have that enabled

edit: idk what can trigger ads, but had no problem before and haven't done anything special.. flashed some modules yesterday trying to get v4a to working..can it be related?
[Magisk] jenslody:
Just to be sure, can you check the content of /etc/hosts ? Or at least the size, should be several kB (depending on your choice).

And of course: did you reboot ? Sorry for this question, but in nearly 30 years in programming and computer service, I saw so many simple errors.
[Magisk] rignfool:
The command to put into tasked to update hosts:

su -c wget -O /magisk/.core/hosts --no-check-certificate https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts
[Magisk] Didgeridoohan:
That's the exact syntax I was trying to use, with no luck. Had to use Taskers HTTP Get instead...
[Magisk] Zackptg5:
Updated to v1.4, see OP for changelog (added whitelist feature)
[Magisk] stylemessiah:
Why would you need it to run every 12 hours, none of the sources are updated anywhere near that often....

I have my own self made batch file on windows to update hosts from many lists for use with Acrylic DNS server (dont try adding the massive host list i use with normal windows DNS) and Squid, and i only update it once a week....
[Magisk] Cheeky_Fink:
Aside from trying to demean someone else's work that doesn't impact you in any way and bragging about your Windows accomplishments in an Android thread, do you have anything useful to contribute?
[Magisk] stylemessiah:
I was asking a legitimate question and pointing out that the sources updated enough (and deomonstrating a reasonable update schedule by referencing my own schedule on windows, based on the same sources the script uses) to warrant forcing updates every 12 hours...it tells you the update schedule on his website....trying to save the guy some wasted effort and battery, tis you who is trolling, i fear...

So, i think you need to ask yourself the question you posed to me, friend
[Magisk] Cheeky_Fink:
Forgive me, I'm a rather grumpy person when I first wake up. I replied to that while I was still half asleep, and reading it now, I was an ass. As far as the 12 hours thing goes, I like to be totally up-to-date, and it has no measurable effect on my phone's performance or battery life, as it takes less than 3 seconds to run.
[Magisk] stylemessiah:
All good, im less than useless when i first wake up :)
[Magisk] Zackptg5:
Version 1.5 released. See OP for changelog (updated for magisk 11.5)
[Magisk] Zackptg5:
Verison 1.6 released. Quick update to magisk 11.6
[Magisk] android_smater:
how to add facebook app in whitelist plz help i am nokbs in this matter plz
[Magisk] Zackptg5:
Facebook is blocked? It shouldn't be. Follow the instructions in the op for making a whitelist and add the proper entry. For example:

0.0.0.0 Facebook.com
[Magisk] Nomelas:
Don't block social media sites! When you run hosts, make sure that you don't select the 's' option
[Magisk] Zackptg5:
Exactly, but I'm pretty sure Facebook isn't blocked in the social filter (or any of them for that matter)
[Magisk] android_smater:
thanks
[Magisk] Nomelas:
It was for me, at least partly. Messenger was acting funny
[Magisk] android_smater:
but after updating hosts my Facebook not connecting even there is networl i tried both mobile data as well as wifi i have high speed internet connection too :confused:
[Magisk] Zackptg5:
As [MENTION=5999829]Nomelas[/MENTION] mentioned, have you tried it without the social filters?
[Magisk] android_smater:
i already apply s there now dont know how to remove it.....
[Magisk] Zackptg5:
Just run the hosts program again. It'll remove the current hosts file and replace it
[Magisk] oux:
1.05mb. and yes I've rebooted.. I did not install the hosts module now, just suddenly got ads..before I worked fine
[Magisk] gunner6643:
I'm also getting 'sh: hosts: not found'.

Safetynet passes, magisk hide and systemless hosts enabled.

Rebooted a couple times and tried to uninstall the module and reinstall it.

If anyone could check out the log I'd appreciate it: magisk.log

I think I'm supposed to see the hosts script mounted to /system/bin in the log right?
[Magisk] oux:
today my ads is gone..this is weird
[Magisk] Zackptg5:
Yup. You something wonky going on with magisk

Maybe it was a cache thing. That Is weird
[Magisk] jefffisher:
I'm having a problem latest magisk systemless hosts enabled I did restart phone is Huawei honor 8
[Magisk] Zackptg5:
Did you read the OP? The script needs superuser permissions so you need to type

su

Before running the script
[Magisk] jefffisher:
yes i did that it has been SU'd
[Magisk] gunner6643:
My issue may be pixel related. Seems some modules just don't work on the pixel atm.
[Magisk] Zackptg5:
This mod should support pixels. Can you post a recovery log immediately after flashing the module?
[Magisk] gunner6643:
Sorry I'm pretty new to magisk. Is there a difference in flashing the zip in recovery vs installing in the magisk manager?
[Magisk] Zackptg5:
In theory, no. But sometimes installing it via the manager is wonky. Also, in order to get the logs, you have to flash it in twrp. So boot into recovery/twrp, flash the zip, go to advanced -> copy logs

Then post the recovery.log file on root of sdcard
[Magisk] gunner6643:
Here's the recovery.log

! /system could not be mounted!

:(
[Magisk] Zackptg5:
Check your pm :)
[Magisk] eoh7678:
Getting the same error here on Pixel XL with Magisk 13.3b4. Did you have a solution?

Thanks!
[Magisk] Zackptg5:
Can you try this test build? I'll need recovery log after flashing, and magisk log after booting. Also, what folders/files are present in /magisk/unifiedhostsadblock
[Magisk] eoh7678:
Here are the logs. Using adb as root, the /magisk folder is empty- no files listed except lost+found
[Magisk] Zackptg5:
Can you flash osm0sis's busybox from here: https://xdaforums.com/showthread.php?t=2239421

And then try again?
[Magisk] eoh7678:
Installed UPDATE-Busybox.Installer.v1.27.1-ALL-signed.zip from the link provided and ran the install again- failed again and logs attached.

This time in /magisk I have busybox-ndk as well as lost+found