yashsingh1/xdaforums huggingface dataset:
[Magisk] suvamroy:
Its not working i tried reinstalling it. I tried updating the host file manually but that also not working. Even used adaway thats too not working. What I'm doing wrong. Magisk version 16.0

Oneplus 5t ob6.
[Magisk] guest4711:
If you are using mobile data check your APNs for proxy entries (and disable or delete these proxies).

If you are using a VPN for your internet access host based solutions like AdAway or this module cannot work - they are simply ignored....
[Magisk] suvamroy:
Thers no proxy entries in apn and am not using any vpns.
[Magisk] guest4711:
Then please check your hostfile whether it contains more than the default entry (127.0.0.1 localhost)
[Magisk] aries77:
How to add a whitelist for connection from an app (eg: webnovel) in order to get point (stone) from watching ads while I don't know where it connect ?

already add

0.0.0.0 com.qidian.int.reader

.*qidian*

*qidian*

and tick on regex but doesn't work
[Magisk] fotjon:
How do you install the file "Unified-Hosts-Adblock-v3.7.zip"?
[Magisk] Zackptg5:
Replace all of that with:

.*qidian.*

And use the regex option
[Magisk] aries77:
Okay will try it, thank you
[Magisk] jsylvia007:
Looks like my hosts file (/etc/hosts) isn't being updated by the module. I'm running stock Android 8.1 on my Pixel 2xL with Magisk 16.3 and EX kernel.

Edit: this took a reboot after updating the hosts file to work.
[Magisk] powergo:
Thanks, work fine with my list.
[Magisk] vMAC:
Is there any way to troubleshoot why this module would be causing my Samsung Galaxy Tab S3 to not boot once loaded?

If I enable this module on next boot I will get stuck going from boot to recovery back to boot back to recovery. The only way it will stop is to disable this module.

I've checked the logs in /cache and /data/adb, but I don't see any errors just starts after the system boots?
[Magisk] mackeftw1:
Flash it in recovery.
[Magisk] 4llerbuntu:
Followed instructions to the letter and rebooted.

Module is loaded and all, hosts updated, but can't see any signs that ads are being blocked in any app or browser at all.

Is there some way to verify what's wrong?
[Magisk] Didgeridoohan:
In-app ads can many times not be blocked with a simple hosts update.

If you still see ads in webpages, you might have a proxy or something that's circumventing the hosts file.
[Magisk] Legend_dimebag:
thanks, on pixel xl 2 it works perfectly, I have activated "systemless host" in magisk manager, downloaded the host file and restarted the device! for my use for now I have not found bugs!

---------- Post added at 13:02 ---------- Previous post was at 12:57 ----------

with twrp or directly in magisk manager
[Magisk] kamilmirza:
can you guide me how to make AdAway to use systemless hosts for automatic updates?

because i have tried giving StevenBlack hosts in AdAway sources but it fails to update
[Magisk] Didgeridoohan:
Sorry... Haven't used AdAway since I discovered this glorious module, well over a year ago. And with the help of Tasker, I have automatic updates as well. :good:
[Magisk] shahadat_kauser:
Unable to whitelist a website

I need to allow the adds on savetodrive.net as it is blocking me from using its services.Now the problem is that I had tried both the whitelist and the regex whitelist mode but still i am unable to whitelist it. Can you help me out. Here's what I wrote in the whitelist file:

0.0.0.0 savetodrive(dot)net

and

*.savetodrive.* in case of regex.

Tell me what I am doing wrong.
[Magisk] Didgeridoohan:
Thing is that savetodrive.net isn't on the list of blocked domains. Easiest way to check is to run this in a terminal emulator:

su -c cat /etc/hosts | grep savetodrive

If it returns nothing, it's not in the hosts file...

You'll likely need to whitelist whatever ad-domains they're using. Not the actual site.
[Magisk] shahadat_kauser:
Thanks for auch a quick response. I get it now. So What if I use a different browser just for browsing this site then is it possible to whitelist that specific app?Will it work or do i have to block the ad-domain being used by them as I don't actually know what the ad-domain is.
[Magisk] aohus:
wasted hour of my time on this. it doesn't work anymore like others are posting

- enabled systemless hosts

- ran su / hosts

- installed app.

- opened app and updated

- still seeing ads
[Magisk] Didgeridoohan:
Yes it does... I'm using it without issue.

Check and confirm that your hosts file gets updated (/system/etc/hosts), and also make sure you don't have a proxy or something else that's interfering.
[Magisk] powergo:
No way to block ads in app,

App use built in proxy for ads,

Only you can edit the app and remove the code or use lucky patcher .
[Magisk] Sneeuwtijger:
You have to boot your phone once to get the system less hosts file active ;)
[Magisk] TheMDJ:
1. adm and mx player still shows ads .

2. how can I add other hosts sources ?

pls update app and make it as good as Adaway
[Magisk] hinguparth23:
Can someone please tell me how to block youtube app ads. Unfortunately I unable to ignore those annoying ads.
[Magisk] Elder Lyons:
Why don't you just download Youtube Vanced from within the magisk "download" tab inside the app? Be sure to remove youtube first though, and disably automatic updates in your playstore.
[Magisk] criticallife:
what's the difference of UnifiedHostsAdblock_Update_Automate_Flow and Unified-Hosts-Adblock?
[Magisk] Didgeridoohan:
It's an Automate profile. Read the bottom part of the OP ("Bonus").
[Magisk] criticallife:
i tried to install the UnifiedHostsAdblock_Update_Automate_Flow using magisk but it says that "this zip is not a magisk module " . i also tried to install it using TWRP but Twrp can't also install the zip . how can i install it ?
[Magisk] Didgeridoohan:
No... That's for the app Automate. You don't install it in either the Manager or TWRP, but import it into the app.
[Magisk] criticallife:
thank you sir , already imported the profile :):):)
[Magisk] ajay.b311:
Hi guys... I am using an app that doesn't work when the hosts are enabled. Is there any way I could make this app to not consider this app while blocking. Thanks
[Magisk] Didgeridoohan:
Grab a logcat to figure out what domain the app expects to be able to connect to. Then you can whitelist that domain.
[Magisk] ajay.b311:
I am trying to use logcat but I don't think it's working or may b I am doing it wrong. Do we have any video that explains the process of doing it ?
[Magisk] ajay.b311:
Okay .. so the log file is attached
[Magisk] Didgeridoohan:
There you go!

Now you make a whitelist, as described in the OP. You can try to only add the domain that shows a request error in your log, that would look like this:

0.0.0.0 agl-intl.hotstar.com

Or if that doesn't work, use the regex option to remove all hotstar references, like this:

.*hotstar.*
[Magisk] DAusRon:
Can i use this module to remove spotify ads?
[Magisk] guest4711:
No, spotify includes the adds in the stream - there are no special addresses we can block.

But Ad-Free (AdBlocker for Spotify) - https://f-droid.org/app/ch.abertschi.adfree is doing a great job on my phone...
[Magisk] criticallife:
where should i input the white listed sites "0.0.0.0 facebook.com " ? in the whitelist file ? or should i input the "0.0.0.0 facebook.com " into the terminal ?
[Magisk] ajay.b311:
Worked like a charm..Thank you
[Magisk] ndori:
How can I uninstall this module? Simply disabling it or removing from magsik doesn't do the trick, it still block a lot of sites which drives me crazy...
[Magisk] guest4711:
Disable "systemless hosts" in setting of MagiskManager...
[Magisk] ndori:
Not working the host file is still the same and blocking....
[Magisk] jenslody:
Did you restart your device after disabling systemless hosts ?
[Magisk] ndori:
Yep
[Magisk] guest4711:
So replace it by a standard host file containing

127.0.0.1 localhost
::1 localhost
[Magisk] Didgeridoohan:
If you disable systemless hosts in the Manager settings and the hosts doesn't change, there's something wrong.

After disabling the setting, you can confirm if it worked or not by looking in /sbin/.core/img/.core. If there's a hosts file there, it didn't work. If there isn't, Magisk is working like it should and you've got something else going on.
[Magisk] w0rdie:
Not working with dp2?
[Magisk] lauralbaby:
Hi, I am having similar problems with the read only hosts file. This is my mount output grep sbin

https://pastebin.com/U7UY6s4G

Most of the files are mounted properly, except for the unified hosts directory.
[Magisk] Didgeridoohan:
Looks like you have more issues than just systemless hosts. Your Magisk image is mounted read-only:

/dev/block/loop0 on /sbin/.core/img type ext4 ([COLOR="Red"]ro[/COLOR],seclabel,relatime,data=ordered)

You shouldn't be able to install any Magisk modules at all...

Haven't seen that in a while, but I believe some users have been able to fix that by changing to a custom kernel.
[Magisk] veez21:
How about mounting it to rw

mount -o remount,rw /sbin/.core/img

Would probably end up with "Device or resource busy" :3
[Magisk] lauralbaby:
yes, but a reboot solved it.
[Magisk] Legend_dimebag:
works perfectly!!! thanks [MENTION=6037748]Zackptg5[/MENTION]
[Magisk] ian.ex:
Hi!

Is it normal that with parameters "mfg" (I also tried with "mfgps") I still see ads in the apps (by instance Youtube)?

I checked /etc/hosts file and the rules are present.

My ROM is LineageOS 14.1 (Android 7.1.2) and the smartphone is a Galaxy S6 SM-G920F.

Thanks!
[Magisk] Didgeridoohan:
Yes, that's normal. Hosts based adblocking doesn't work well on in-app ads. For YouTube you've got the YouTube Vanced module you can use (it's in the Magisk repo).
[Magisk] Irfanpatelgm:
How to make white list
[Magisk] Didgeridoohan:
There are instructions for that in the OP.

If you can't get it to work, at least post some details on what you've done, and possibly also your whitelist file.
[Magisk] Irfanpatelgm:
"Whitelist Instructions:

Create an empty file on sdcard card called "whitelist"

What's the extension of file?
[Magisk] Didgeridoohan:
There is no extension. It's just named "whitelist", nothing else.
[Magisk] eleete0712:
I noticed an issue when using this Adblock. Spotify app is not able to discover Sonos speakers for Spotify Connect when Adblock is enabled. As soon as I disable Adblock everything works just fine.

Any idea what should be whitelisted to get this working again?
[Magisk] madbat99:
Just searching the word "Spotify" in this thread yields at least 10 posts discussing this.
[Magisk] madbat99:
Forgot the SS
[Magisk] eleete0712:
I do appreciate your reply but I also did the search before posting and all those posts are about the Spotify app not functioning at all or at least the main or radio screen which doesn't work. That isn't the issue I described and the whitelist options discussed in those posts unfortunately doesn't help fixing my issue.

Also please see this post which clearly states that the problems you are referring to are gone from the hosts file itself:

With Wireshark I somewhat pinpointed it down to missing MDNS queries to '224.0.0.251' containing '_spotify-connect._tcp.local'
[Magisk] Didgeridoohan:
[MENTION=1800465]eleete0712[/MENTION] I'm just wildly guessing here, but checking the hosts file (only the master option applied), there's a Sonos entry:

OnePlus3T:/ # cat /etc/hosts | grep sonos
0.0.0.0 msmetrics.ws.sonos.com

Maybe try whitelisting that...
[Magisk] missmajestic:
Hi,

create whitelist file .....

How do I create those?

Create a folder with the name * whitelist *?

I do not get it.:crying:
[Magisk] Kurogane Jan:
Create an empty file named whitelist without a file extension on your SD card/internal storage

See OP for further information
[Magisk] Didgeridoohan:
Create an empty file in the root of your internal storage. Name it "whitelist" without a file extension.

Put the domains you want to whitelist in it, either the exact line or with regex (look at the examples in the OP).

Update your hosts file with the whitelist option enabled.
[Magisk] eleete0712:
Unfortunately that doesn't help. I also tried removing the '127.0.0.1 local' line which seemed promising because of the '_spotify-connect._tcp.local' but it also didn't change anything.

Edit: I found the line that is causing the trouble. It's '::1 localhost' - commenting out just that single line makes Spotify Connect detect the Sonos speakers again. Is there any way to remove it with a whitelist rule or should I contact the person making the list?
[Magisk] madbat99:
For example, open a file explorer app, navigate to root of internal storage, tap new (see screenshot), tap file (next shot), name it whitelist (next shot) then open the file as a text file and add your whitelist, then save.
[Magisk] Zackptg5:
You can remove any line with whitelisting :)

I think those lines are default in android hosts though so that's an interesting discovery

You're so nice it hurts :)
[Magisk] eleete0712:
How would I remove '::1 localhost' by whitelisting without breaking '127.0.0.1 localhost' for example. Would be glad if you could help me out on that.

On my Android device (LG G6) default limes are only:

127.0.0.1 localhost

::1 ip6-localhost

Not including:

::1 localhost
[Magisk] Zackptg5:
It's literally copy/paste. Follow the instructions on the op for making a whitelist and then apply it (don't use regex for this, just copy and paste the lines you want removed into the whitelist files)
[Magisk] eleete0712:
Thank you for the hint. But it doesn't work on '::1 localhost' although it works perfectly fine on '127.0.0.1 local' for example. Neither with or without regex enabled.
[Magisk] Didgeridoohan:
Are you sure you've entered it into the whitelist exactly as written in the hosts file? I just tested, and it works perfectly fine...
[Magisk] eleete0712:
Well now this is embarrassing. My mistake. I don't know what went wrong on my end.

You are right - it works. Thank you for your time.
[Magisk] madbat99:
Too much? I was in a good mood. Got off work early. I'm probably the only person left that uses the old file explorer in rom toolbox pro. Been using it for years and, well, I'm an old dog. :cool:
[Magisk] sxHeavy:
Just a hint :

After updating phone OS. I spent days looking for the reason why I couldn't make the thing work. Module installation was fine, but never could make it work (in terminal command) anyway I find today by doing something else that BUSYBOX wasn't correctly installed/up to date on my device! Then I realized that this could be the problem with Systemless Hosts problem I've got. This WAS the problem!

Short version : make sure to keep Busybox running updated on your device.

---------- Post added at 05:25 PM ---------- Previous post was at 05:22 PM ----------

Nag my friend I still using this version. Wayyyy more better to use. No "design" bull****. Pure toolbox. Efficient and lightweight.
[Magisk] R324D:
Hi guys need some help here, some sites like Apkmirror or Elsfile still detect that I'm using an adblocker apps, even I've already added it to whitelist.. Any thought?
[Magisk] sxHeavy:
Not a solution but does turning off systemless host in Magisk's settings help ? Just the time you need to browse these websites
[Magisk] jenslody:
If you switch off systemless hosts, the (systemless) host file gets deleted and you need to rerun "hosts" or the companion app.
[Magisk] Didgeridoohan:
If you mean the wait time that apkmirror gives you (or other messages that websites give when you adblock) if you have an adblocker, you'll have to whitelist whatever ad-provider they're using, not apkmirror themselves (or whichever site you want).
[Magisk] mariomtes:
Hi guys,

I don't know what I installed but I'm getting pop-ups opening randomly now so I found this module and I installed it but the pop-ups keep showing up.

Pages like this one and many other keep showing.

Any way to block them with this module?

Thanks for the help!

newstarads. com/afu.php?zoneid=1328435
[Magisk] S4turno:
Those pop ups are displayed when using a browser/website or other apps?
[Magisk] mariomtes:
I've noticed them popping up when I open apps or even when I unlock the phone. I haven't used any browser long enough to tell if it also happens when browsing.

Update: I found a nameless app and uninstalled it and seems like that was the issue. Don't know wich module installed it, since that was the only change I made.

Will update if I find out wich one was it.

Thanks!
[Magisk] sirderp:
Noob question, do you need to re enable this app in the emulator after dirty flash to a new nightly?
[Magisk] n.praveen13:
Does the latest version work on S7 edge Oreo?
[Magisk] spectkiller:
please help me to add www.googleadservices.com to whitelist
[Magisk] Didgeridoohan:
Follow the instructions in the OP, for using regex, and just replace "facebook" with "googleadservices" from the example.

.*googleadservices.*
[Magisk] spectkiller:
sir please see in screenshot that my process is correct or not. and after this what should i do
[Magisk] jenslody:
The OP states clearly that the file should not have an ending, so remove the .txt and it should work.
[Magisk] Didgeridoohan:
Apart from the above advice, if you need to whitelist the subdomains of googleadservices as well, use the regex I posted earlier rather than "0.0.0.0 googleadservices.com".
[Magisk] amn1987:
I am still getting ads while using Chrome for ex in 1337x.st. The moment you tap on the search bar or any link it wil open a new tab which takes over the whole screen with a warning about "your device is infected" etc. In FF with uBlock Origin this doesn't happen.
[Magisk] guest4711:
Disable "data compression" in chrome... (and test it in FireFox with uBlock Origin disabled - if ads coming through you probably have to blacklist some (more) hosts.
[Magisk] davidzam:
Ads inside apps

This module does block adds inside apps? Also:

Does this

https://play.google.com/store/apps/details?id=ru.dixl0f0s.unifiedhostsmanager

It's an "official" app to manage this? Thank you for your support.
[Magisk] Nevermindthelabel:
Blocks some/most in app ads, and that is the gui app. Bundled inside the module now
[Magisk] davidzam:
Thanks. Great! Module. At last!!!

Enviado desde mi SM-G550T1 mediante Tapatalk
[Magisk] Euphorion:
Does this module works with the latest version of Magisk (16.4)? I can't test it for the moment.
[Magisk] J_R_X:
Thanks OP, works great. Was using v3.7 and GUI only, and managed to get it to work only after installing busybox. Perhaps worth adding it to prerequisites.

* Three Razer Phone, 8.1.0, Magisk v16.3,
[Magisk] davidzam:
Hi. I have an issue, is it possible, that after activating the module, some apps could stop working? After installing, and activating all the host aviable, the app Al Jazeera news in English, and messenger of Facebook are Mel functioning, the news app simply force close, doesn't even start and messenger, won't connect to the network, Wi-Fi or mobile. Facebook app woks great, no more ads, and everything else. Thanks

Enviado desde mi SM-G550T1 mediante Tapatalk
[Magisk] davidzam:
Fixed. Deactivating the module on systemless hosts setting, testing apps they did work normal again, cleaned cache, and then did a reboot, activated the module again on systemless hosts again. Everything is normal now, thanks. No more ads... In apps and browsers.

Enviado desde mi SM-G550T1 mediante Tapatalk
[Magisk] nurps:
It seems to block freebitco.in, it shouldn't since it's not blocking similar sites.
[Magisk] Didgeridoohan:
Take that up with Steven Black...

It's quite easy to whitelist it though. Instructions in the OP.
[Magisk] davidzam:
It also blocks Twitter. It looks that the sudden blocking of apps navigation its random, it was working OK. It could be related with the magisk manager? I'm using the 16 v. Anyone?
[Magisk] Didgeridoohan:
That depends on what hosts file you use and how it is updated. It has nothing to do with either Magisk or this module really...

If the hosts file suddenly starts blocking apps or services that it shouldn't, Steven Black's GitHub is the place to go for info and bug reporting.
[Magisk] Euphorion:
So is Busybox needed to make this module works?
[Magisk] Didgeridoohan:
Shouldn't be necessary, but sometimes if things don't work it can be fixed by installing Busybox.
[Magisk] ainurrofiq:
After updating the host via GUI is it need to be rebooted?
[Magisk] bobbob1016:
DISREGARD I FORGOT TO REBOOT FIRST

Trying to block the malware+adware and JUST Facebook. Created "blacklist" without quotes on my emulated sdcard root. Was working, but now if I do Facebook.com on my browser it loads. blacklist file just has *.facebook.com and a few other Facebook URLs. Any idea why it's not working? Blacklist is orange on the gui and even did hosts from terminal and "mb" there.
[Magisk] ainurrofiq:
When trying to add whitelist regex,

Whitelist already made in internal storage
[Magisk] Fahrilubis:
Bro why adblock not work? Ur module conflict with cloudflare dns?

http://imageshack.com/f/pnFjB0Jsp][/URL]

I mean still see some ad in xda thread
[Magisk] Didgeridoohan:
Usually that's a good idea.

What does your whitelist file look like?

Could be several reasons... The hosts file hasn't installed properly, a proxy is interfering, Chrome's data saving, etc. You can easily test it it's another module that's interfering by disabling that module...
[Magisk] ainurrofiq:
.*instagram.*
.*google.*
.*facebook.*
[Magisk] davidzam:
Again. Randomly, after updating the host files using Unified Host app, Twitter, Al Jazeera, and now Instagram and Facebook messenger, doesn't work, the don't connect to the network. On magisk manager settings got them (the apps) to get them working again, I uncheck the "systemless option" support and activate again, then they begging to work and connect normally. After a reboot from the device the bug presents itself again, having to do the mentioned procedure again to get the apps working again. Also when they begin to navigate, the adds ARE blocked. So it's not a problem with the host files, it's something on the module or magisk itself under 6.0.1 Samsung stock Rom.

Enviado desde mi SM-G550T1 mediante Tapatalk
[Magisk] davidzam:
Updated to magisk 16.4. No luck either, so what I did was to whitelist regex Twitter. Working now. Next random app affected. I'll do te same.

Update: Definetly, social hosts have issues. I do nor recommend to activate them.

Enviado desde mi SM-G550T1 mediante Tapatalk
[Magisk] guest4711:
Social networks (faceb., twitter, etc.) are know to trace your activities. So you could block them using this hostfile. But it should be clear that you can not block them and use them at the same time...
[Magisk] davidzam:
Done. What I was looking for was to block adds inside the social apps. I thought that the social hosts where also to block any adds from of them on browser and news apps and such. I guess those are for people that doesn't use social applications, I do, so I stopped using the social hosts. Thanks anyway. I know now how to use this module at least now. Maybe I'll install it in the future. It block news apps randomly and google apps also. I guess you have to use only master hots and malware hosts to get some blocking done, but it's not blocking as much as it did when all where active. I miss xposed adbloking module [emoji58]. Thanks guys for your input. As I said before, this is on my "wish" list, along with some sort of mudule to manage adoptable storage.

Enviado desde mi SM-G550T1 mediante Tapatalk
[Magisk] nandakalyan:
Hey I have a question. I am getting banner ads only in one app, words with friends, and I can't seem to figure out a way to block them. Does anyone have info on how I can block it, thanks
[Magisk] MrHellRider:
Will it work with magisk 16.x because in op its given compatibility 15.x
[Magisk] guest4711:
Yes, it does.

---------- Post added at 10:45 AM ---------- Previous post was at 10:41 AM ----------

Start the dnslogger in AdAway (settings - log dns requests), then start the app. Add suspicious hosts to your blacklist, apply the blacklist, clear the cache for this app, reboot and retry.
[Magisk] jenslody:
Only ads that use a dns-requests before download can be blocked. In-app ads often use ip's directly and can not be blocked with this module.