yashsingh1/xdaforums huggingface dataset:
[Magisk] Didgeridoohan:
First of all, my auto correct completely screwed up... It's supposed to be

line

endings, not

file

ending...

Second: The difference in line endings is basically how the OS reads that one line ends and a new one begins. They're not always transferable... Since we're using Android, we need to go with the Unix type line ending. There's tons of info on this online if you want to know more about it.
[Magisk] The Lord Vader:
Good to know, thanks. When editing such whitelist file, can you recommend some app? I've been using Solid Explorers built in, but I guess it's not the right one.
[Magisk] Didgeridoohan:
There'll probably be a setting in there for line endings. I always use either FX File Explorer's built-in editor or Jota+. There are many others...
[Magisk] The Lord Vader:
I tried FX File Explorer but at first glance I don't see any difference in comparison to Solid Explorer when opening my whitelist file.

Jota+ on the other hand looks different, like this, when opening whitelist on my S8+
[Magisk] neekless:
This is the basic explanation for the differences in line endings. I don't really edit code on my phone that much, but if you use windows on your computer, I recommend using Notepad++
[Magisk] pwag:
This needs a gui. Very good app
[Magisk] KOLIOSIS:
Look no further than the Google Play Store:

https://play.google.com/store/apps/details?id=ru.dixl0f0s.unifiedhostsmanager&hl=en_US
[Magisk] jenslody:
It will be automatically installed, if you install the module, it's included in the zip.

But you still have to create white- and blacklist-files manually.
[Magisk] pwag:
Oh geeze
[Magisk] KOLIOSIS:
I admit, I jumped the gun there, thinking the app had more functionality than what is currently available...... ::o
[Magisk] lazostat:
Guys I think after installing this module and running host command, I can't visit Facebook and Instagram doesn't work.. I Uninstalled module, wipe cache, still nothing. Any ideas?

I opened hosts file and it has over 1 million entries! All coming from this module? Do I have to remove them all? And why they didn't removed after module uninstallation?

###

OK now it works.. Why this module has to disable Facebook? I don't understand..
[Magisk] Didgeridoohan:
Did you use the "Social" option? That's designed to block Facebook, Twitter, Instagram, etc...

Solution to your problem - Don't use the "Social" option.
[Magisk] cocogendut:
Can anyone upload old version of this module? version 1 to 29. Or module version with system/etc not system/bin folder. Thanks
[Magisk] Didgeridoohan:
There are a couple of older releases available here: https://github.com/Zackptg5/Unified-Hosts-Adblock/releases

But what do you mean: "with system/etc not system/bin folder"? The /system/bin folder has always been there, and there's never been a /system/etc folder in the module (it's always edited the hosts file directly).
[Magisk] Wesley_NL:
Hi guys i have a question , i have a s9+ sm g-965f with magisks root and dr ketan root methode but i try this ad blocks but it dont work

I installed the app via magisks

Pressed install in the adblock and reboot

Enabled systemless hosts in magisks

But somehow it dont work

Care to help out abit ?
[Magisk] Didgeridoohan:
Here's your issue... You need to

first

enable systemless hosts.
[Magisk] Wesley_NL:
Its enabled on default in magisks

But i can give it another try
[Magisk] Didgeridoohan:
Then why did you need to enable it? If you toggled it off and on, that means you deleted the hosts file that you had just created, which would explain why it seems like it didn't work.
[Magisk] Wesley_NL:
I gave it nother try

I removed adblock via magisks and reboot

Then i disabled systemless hoats nd enabled again and installed the adblocker and reboot again then after i pressed install/update again and it seems to work now

Thx for poitning it out
[Magisk] jenslody:
That's not correct.

Systemless host gets enabled if "/sbin/.core/img/.core/hosts" exists on MagiskManager start, but the bind-mount only happens on boot, so without a reboot it does nothing.

You can see this (either from the sources or) if you toggle systemless hosts off, check if it stays off, recreate the hosts-file with this module and reopen the Manager after closing it, either from recents, force-close from settings or restart the device.
[Magisk] Didgeridoohan:
That's right... Forgot about that. Good call.
[Magisk] el1seY:
Tell me please correct stings for vanced youtube whitelist (need watched history) this right?

.*youtube.*0.0.0.0 s.youtube.com0.0.0.0 s2.youtube.com

and need checkbox Regex ?
[Magisk] R324D:
Just add

.*youtube.*

to whitelist and update
[Magisk] BlackHoleSlam:
Wanted to see if anyone knew the URL to unblock for brawlstars. Can play the game fine but if you watch the ad you can't double rewards. Any idea on what url or needs to be whitelisted?
[Magisk] Zackptg5:
Hey everyone. It's a sad moment for me but all good thing must come to an end. I recently decided to check up on adaway again to see the progress and found that it's been updated to version 4 which has proper support for magisk systemless hosts. It goes without saying that adaway is far superior to this mod in every way (can do everything this can plus much more) so I'm discontinuing this mod since there's no need for it anymore. I've moved over this (and all mods I work on) to my personal site where I'll have the last build up if you want it.

I'll be updating the OP in the coming minutes with more information on adaway, how to enable systemless hosts for magisk, where to get the latest apk (the xda thread hasn't been updated yet), and how to add unified hosts to it.

This being my first magisk mod, I learned a lot and have come a long way since starting it so thank you all for your support :)
[Magisk] Nevermindthelabel:
Thank you, one of the first modules I installed and one of the best! Much appreciated
[Magisk] kingsmin:
Wow, weird coincidence cuz I just installed this in magisk.
[Magisk] Zackptg5:
Thanks for the kind words! I just updated the OP with the new adaway stuff. Another nice thing about adaway is that it can auto update the hosts for you
[Magisk] Didgeridoohan:
[MENTION=6037748]Zackptg5[/MENTION] So long and thanks for all the fish.

I learned a lot from this module as well. Thank you.
[Magisk] Zackptg5:
Haha, it'll stay up on the repo and will still work fine assuming no major changes to the magisk module template in the near future (haven't been any in a while). I haven't updated this in over a month anyways cause there's simply nothing else to do with it.

You could switch to adway or keep using this mod, either one works :)
[Magisk] bigsun:
after i added the hosts from to blacklist

after i added the basic hosts from neohosts to blacklist file, when i update the system hosts file using 'hosts m wr b', it lasts too long, sometime reboot system, and not all lines in blacklist are added. the blacklist is about 4000 lines.
[Magisk] Zackptg5:
I suggest switching to the new adaway (see OP for instructions). Then add neohosts to your hosts list in adaway (think this is what you're talking about: https://raw.githubusercontent.com/neoFelhz/neohosts/data/nadhost). If not, you get the idea
[Magisk] kingsmin:
Is there a way to revert to default host? My other phone is having problems
[Magisk] guest4711:
Disable "systemless hosts" in MagiskManager - settings, disable this module and reboot.
[Magisk] kalehrl:
I did everything written in the first post and magisk and adaway work fine but when I open hosts file in adaway, it lists entries starting with 127.0.0.1 instead of 0.0.0.0 and the header is different. It reads '... generated by adway...' which is different from https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts
[Magisk] Didgeridoohan:
You can change the redirection IP in the app settings.
[Magisk] kalehrl:
I think all the entries are there. They are just not listed in the same way.

What's the difference between 127.0.0.1 and 0.0.0.0?

I saw a security warning in the settings about ip redirecting which scared me.
[Magisk] Didgeridoohan:
On 127.0.01 vs 0.0.0.0

https://github.com/StevenBlack/hosts#we-recommend-using-0000-instead-of-127001

And you're talking about the "Allow redirects" option. That's different... Don't touch that. But, it's perfectly safe to change the "Redirection IP" from 127.0.0.1 to 0.0.0.0.
[Magisk] kalehrl:
I changed the redirection ip to 0.0.0.0, rebooted and still all entries are 127.0.0.1.

Why doesn't adaway just use the provided file instead of changing it?
[Magisk] Didgeridoohan:
You need to update the hosts file after changing the redirection IP.

AdAway does use the provided file, but you can add a whole bunch of different sources and AdAway merges them automatically into one hosts file. That's just how it works...
[Magisk] kalehrl:
I updated it just now and no change. Rebooted afterwards but still the same. I'm using magisk 16.7 and latest adaway 4.0.x from August.
[Magisk] kalehrl:
I disabled ad blocking and then reenabled it and now 127.0.0.1 is replaced by 0.0.0.0. ?

I guess updating host file wasn't enough.
[Magisk] Zackptg5:
I completely missed that, I'll add this to the op when I get the chance. Thanks!

Edit: added to op
[Magisk] Lownita:
What would I have to whitelist in adaway to make YouTube history work? .*youtube.* doesn't get accepted in the whitelist.
[Magisk] MrHellRider:
Use *youtube* i used this only
[Magisk] Lownita:
Thanks, I'm using *youtube.* right now, also working :)
[Magisk] el1seY:
anyone know how to whitelist Blizzard Authenticator? https://play.google.com/store/apps/details?id=com.blizzard.bma&hl=en
[Magisk] Didgeridoohan:
You could probably use AdAway and the "Log DNS requests" feature to find out what you'll need to whitelist.
[Magisk] armujahid:
Latest Adaway apk should be published to XDA Labs
[Magisk] Zackptg5:
Should be but it's not
[Magisk] Sneeuwtijger:
[Magisk][Module] Unified Hosts Adblocker

Download your AdAway from the folder of PerfectSlayer on Android Filehost

Info in the OP of this thread - but who reads that [emoji853] and also in the XDA AdAway Thread [emoji6]
[Magisk] grantdb:
I just can't get this working!

Enabled systemless hosts in majisk 16.4

Installed Adaway 4.0.7

Enabled systemless option and changed redirect ip to 0.0.0.0

Set the only source to master list on github.

Enabled blocking and rebooted

No ads blocked.

Enabled/disabled/enabled/reboot and no ads blocked.

The hosts file looks right through Adaway.

system/etc/hosts is the path set in Adaway.

A bunch of errors in log attached.

Thank you
[Magisk] oski_58:
İ do a mistake. İ choose social and i dont Connect facebook Twitter instagram. Help me pls. İ uninstall but dont Change anything. Sorry my english. Help me:(
[Magisk] MrHellRider:
In the in the menu go to list options then go to whitelist n then add

*facebook*

*instagram*

*twitter*
[Magisk] The Lord Vader:
Since unified adhosts module for Magisk from now on is abandoned from dev, I've tried to install Adaway 4 since it has support for Magisk.

The problem is I can't install Adaway 4, installation failes every time. Adaway 3.2 is by default a part of my rom (Galaxy S8+ CARHDROM), tried to uninstall and freeze in TB, but every reboot it returns from the dead, stopping installation of the new version.

Need some help, please.
[Magisk] Zackptg5:
Delete adaway folder either in twrp, or in /sbin/.core/mirror/system
[Magisk] grantdb:
Ok. I figured out why the latest version of Adaway wasn't working.

What I found was that if your APN is using a proxy that causes ad blocking to fail.

I use a cheap provider that is a subsidiary of Bell in Canada called Lucky Mobile. I had the Bell APN as default and it was working fine but I couldn't get ad blocking to work at all.

Bell Mobility uses a proxy server address in the APN settings and that is where my problem was.

Found this solution in G+ comments here: https://plus.google.com/109795095467876797492/posts/d4umkHaVkHz

Now I am using the APN for Lucky that doesn't use a proxy in the APN settings.

Maybe this should be added to the OP or a FAQ.

Cheers!
[Magisk] Zackptg5:
Good to know! Added to OP :)
[Magisk] LeMoise:
Thanks for all your hard work man! Sorry to see you go, I've loved using your adblocker since it's appearance on Magisk.

What made you stop wanting to develop it if you don't mind me asking?

What does adaway do that makes it the better option if your module does everything it does, but easier?
[Magisk] grantdb:
Maybe change to

Thanks for adding the information because it drove me crazy trying to figure it out.

Cheers!
[Magisk] faizrob:
Go to Magisk Manager setting, and make sure looks like this (attachment)
[Magisk] The Lord Vader:
Tried Adaway as stated in thread, but Unified Hosts Manager is WAY BETTER for me.

Adaway doesn't block ads in certain apps, which Unified does. To bad the development is stopped, hope someone can pick it up. It's the best program in my S8+ and Huawei Mediapad M5.

Anyway, thanks for developing such a nice and easy to use way to block annoying ads!
[Magisk] guest4711:
If you use the same hostsources there should be no difference. Add Steven Black's hostlist to AdAway (apply hostfiles, reboot) and try again. https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
[Magisk] handers1234:
So its discontinued,anyone could give me what hostsources Unified Host use for adaway?
[Magisk] Didgeridoohan:
It's all explained in the OP.
[Magisk] neekless:
This app is easier to use than adaway imo
[Magisk] jbm76:
That's a big disappointment [MENTION=6037748]Zackptg5[/MENTION] that this module is being stopped in favour of adaway - I used adaway in the past, yes it blocks everything! That is why I started using this module because some ads I wanted to see and the whitelist worked great.

Does adaway 4 have an whitelist option?

EDIT- I installed adaway 4.07 and Yes it does have a whitelist option and allow google ads through - it works well. Thank you for the great module! I'm using the StevenBlack host with adway as per the op :)
[Magisk] handers1234:
Ah right,I just see the discontinued line,didn't realize OP has been edited.:good:
[Magisk] MrMarques01:
A few days ago I added unified hosts sources to Adaway, as described in OP. Today I checked in Adaway if there are updated hosts available, and it said that everything is up to date. So far so good, however, the Unified hosts app did find an update. Is there a reason why I can't update the hosts through Adaway? Thanks
[Magisk] Zackptg5:
If you follow the directions on steven black's page: https://github.com/StevenBlack/hosts

You can setup the hosts on pretty much any OS

It works fine for me. If you check the hosts file, it'll list the date. You can cross reference that with the host file on line by copying the url in your hosts sources list to make sure that you have the latest
[Magisk] The.Night.King:
[MENTION=6037748]Zackptg5[/MENTION], I couldn't find systemless hosts toggle in AdAway 4.0.8 preferences.

BTW I've it already enabled in magisk, is it the reason I'm unable to find?

I've set the hosts source as mentioned in op properly, but enabling AdAway is giving multiple notification channel warnings.
[Magisk] Zackptg5:
It's in the top section of Preferences (General Preferences). Did you disable all other host sources?
[Magisk] The.Night.King:
Didn't know what was happening. The main page's enable adblocking section was continuously showing the loading animation, disabling & re-enabling did nothing, so I pressed the check update button, the app crashed. After I resterted everything is fine now.

Hosts file updated, got applied. Now there's a green tick in place of loading animation. Systemless hosts toggle has now appeared in preferences. BTW yes I had already disabled the other hosts sources before. Sorry for bothering. Thanks a lot.

I've set redirection IP properly but is there any need to change target location or is the default one best?
[Magisk] Seagold:
Some of my apps stopped working after using this files. How do I whitelist
[Magisk] psydex:
Ampere app still manages to show ads just fine
[Magisk] muralimsir:
Goodness! I've been looking for a way to use AdAway without Xposed. I landed here by chance. Followed the instruction successfully and AdAway is working on my rooted LG V30 (stock Oreo 8.0 rom). But it's not blocking social sites' sharing links on web pages. The same hosts from GitHub - StevenBlack/hosts in NetGuard firewall could block all such links. No problem. Thanks.
[Magisk] kerpert:
Should I install only adaway or also Unified Host Adblock?

Does it block the ads in YouTube?
[Magisk] MrHellRider:
Install just adaway n follow instructions in the op
[Magisk] kerpert:
In my host source page there is NOT AVAILABLE for both local and remote.

I set and enable just this:

https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-social/hosts
[Magisk] guest4711:
Known issue with github. Github does not send the "last modified" header so no chance for AdAway to tell you whether the file is outdated or not. (Btw it could note the local update time ...)
[Magisk] kerpert:
Also local is not availabks.

The host list rests empty.

What I have to do?

Thanks
[Magisk] guest4711:
Perform "Download Files and apply ad blocking" (the first button in AdAway). Make sure you have a working Internet connection... Look for the result (in my case, 2 of 6 sources were not available). If you cannot reach github use at least the standard lists to have a basic protection (duplicate entries will be eliminated so your result is unified).
[Magisk] kerpert:
This time works with the only github list ticked, dunnot why before didnt work, maybe it needed a reboot.

Have a nice evening.
[Magisk] icysnowy:
Seems like github host doesn't works. It said only 3/4 hosts are applied. How to fix it?
[Magisk] guest4711:
Just checked it. When I select StevenBlack's list only I get a proper hostfile (≥ 3 Mb), but AdAway does not display the last time of local update.

So the problem is cosmetic (imho) ...
[Magisk] kalehrl:
It doesn't display the time because it doesn't really update it. You need to disable ad blocking and then reenable it. I think it's a bug.
[Magisk] guest4711:
Change to a non Github copy of the list as listed on https://github.com/StevenBlack/hosts , e.g. http://sbc.io/hosts/alternates/social/hosts
[Magisk] icysnowy:
Thank you, now it's applied but let me see the effects after 2 or 3 days. Btw, what categories are included in your second host. Is it only master or full.
[Magisk] madbat99:
Where do you find the non GitHub links? I see references, but can't find the links.
[Magisk] Nevermindthelabel:
It's in the table on the GitHub page, all the way to the right. Have to view on desktop I believe.(non GitHub mirror)
[Magisk] guest4711:
All flavors are on the given mirror. See also the screenshot in https://xdaforums.com/apps/magisk/magisk-unified-hosts-adblocker-t3559019/post77518850
[Magisk] madbat99:
Yeah, I'm a dope. Lol. Didn't scroll over to right. Thanks

---------- Post added at 09:05 PM ---------- Previous post was at 09:04 PM ----------

Same. Lol. Desktop view did it. Though I lost my mind...
[Magisk] grantdb:
Me too lol
[Magisk] madbat99:
Yep. Before scroll, and after. Doesn't look like it scroll, but it does. D'oh
[Magisk] dirtyreturn:
Hey there, does anyone know or is aware of if the dev would ever possibly allow the use of custom sources in his app/module?
[Magisk] guest4711:
Because this module is e.o.l. (end of life = no changes anymore, see opening post (OP)) he will not code it. But you may code it yourself or use AdAway (https://xdaforums.com/showthread.php?t=2190753&p=39144524 )
[Magisk] dirtyreturn:
Ahh, thanks for the link and kind answer! Much appreciated kind Sir!
[Magisk] tokoam:
Why does it stay stuck on checking for updates in adaway when you try to check for updates host status in updates never shows if or not it has been updated.
[Magisk] kalehrl:
You check for updates and then disable ad blocking for hosts to be updated. Just checking doesn't work. Must be a bug.
[Magisk] scoobwrx:
I have tried adding one of the unified hosts to adaway but it just seems to get stuck "downloading" forever. Tried the raw and mirror links and neither seem to work. I noticed other hosts that are working end in .txt vs the unified host url but it could just be coincidence.
[Magisk] NPOA556:
Stuck on Applying...

Regardless of which source I use, it always gets stuck at "Applying... Applying hosts file" with the spinning red circle to the right.

Pixel XL, Android 9.0, Magisk 17.1, AdAway 4.0.8-180822

Magisk and AdAway are both set to allow systemless hosts. Am I doing something wrong, or is this a bug? For what it's worth, this behavior did not change after I flashed the latest monthly patch (or reflashed it to fix another issue I was having). I feel like the Unified Hosts Magisk module was discontinued a bit prematurely, since AdAway does not appear to be ready for prime time. Or, like I suggested, maybe I'm doing something wrong. Thanks!
[Magisk] grantdb:
[MENTION=4419787]NPOA556[/MENTION] [MENTION=5610723]scoobwrx[/MENTION] [MENTION=518121]tokoam[/MENTION] I suggest you try the adaway threads for help. On a side note Adaway 4.0.8 is working fine for me on Nougat.

Cheers!

https://xdaforums.com/showthread.php?t=2190753
[Magisk] Lurien:
I'm currently using adaway and Ive followed the instructions here but it doesn't seem to be blocking stuff.
[Magisk] vandyman:
AdAway logic;

Stuff + things =???

Please define stuff.
[Magisk] Lurien:
Particularly when browsing internet. Lots of advertising and even porn pops up..
[Magisk] vandyman:
Have you tried the unified hosts?

hosts.cf

or

Steve Black's hosts on git hub.
[Magisk] Lurien:
Currently using Steve Blacks hosts. The one that's supposed to block everything except "social"..
[Magisk] vandyman:
Try https://hosts.cf

I am not sure about social, I have it blocked. I do not use Facebook, Tweeter,

Etc..

But if I had to guess, social has the worst content and if don't block it, you are going to get all that crap.

You can add content to the blacklist as you go along, but it will be pointless to do so.
[Magisk] guest4711:
When using chrome as browser make sure "data saving" is disabled in chrome. On newer versions of it xou dhould also disable "async. dns". Latest version of chrome is reported to be incompatible with all adblockets uding hostfiles.

Tey another browser, e.g. Fennec F-Droid (Browse the web) - https://f-droid.org/app/org.mozilla.fennec_fdroid

When browsing using mobile data connection mske sure you sre not using any proxy. Check your APN settings.
[Magisk] Jeff.angkasa:
i use energized module. can i join with this module? or only 1 i can use?
[Magisk] chikimonke:
Pretty sure Energized uses this list plus a bunch of others, no benefit to having both.
[Magisk] Jeff.angkasa:
if I use adaway does it also have no benefit? adaway app not module
[Magisk] chikimonke:
It all comes down to the list, Adaway is just one way to apply the list. Energized is another way to apply a list as well. So there will be no benefit to having both installed, pick one and stay with it.
[Magisk] Jeff.angkasa:
Sorry. not adaway but adguard. Is that the same as Adaway too?
[Magisk] muralimsir:
No. Adguard doesn't require root and it's a dedicated commercial company. The paid version is wonderful. Blocks ad everywhere on Android: browser and apps. It sets up its own vpn so you cannot use a firewall like Netguard because it also works through vpn it sets up. Android allows only one vpn working at a time.
[Magisk] Lurien:
Don't know what I'm doing wrong but Adaway isn't blocking anything on my phone..
[Magisk] guest4711:
See https://github.com/AdAway/AdAway/wiki/Solutions and there have a look for "AdAway is enabled but all Ads are getting through!"

BTW: Did you reboot your phone after applying the newest host files?
[Magisk] Lurien:
Will check it out, thanks. And yes, I did reboot? Would the magisik and magisik manager version have to do with it??
[Magisk] guest4711:
It should not. Onliest requirement is to enable systemless hosts in MagiskManager, then creating/updating the hostfile via AdAway from the sources and rebooting (not neccessary for all ROMs).
[Magisk] Lurien:
Ok. Yeah, I've done all that. Can't seem to identify the issue..