yashsingh1/xdaforums huggingface dataset:
[Magisk] rfgamaral:
Does anyone have issues using the Unified Hosts Manager? For me it never stops checking for a new version, looking at logcat I get "D/UHM (21587): Invalid input. Don't use any spaces between letters" being printed indefinitely. Instead, I did "adb shell" followed by "su" and "hosts" and made my choice. After that typed "q" to quit and when I pressed enter, got the same message above "Invalid input. Don't use any spaces between letters". Looking at the source file (https://github.com/Magisk-Modules-Repo/Unified-Hosts-Adblock/blob/master/system/bin/hosts#L156) this should happen only if I typed "q ", for instance, but I didn't. Am I the only one with this issue?
[Magisk] smohanv:
Hi OP

I flashed ver 3.7 in magisk few weeks ago with my Oreo 8.1 (OP5 customised OOS). Yesterday I updated to Customised OOS (xXX No Limits ROM) of OB12 (Open Beta 12). Now I could not see you app's UI. I remvoed this module and reflashed several times in magisk and no luck. Any reason why I am not able to see the app UI in App drawer.

1. I can see Unified Hosts Adblock listed in my magisk module which means that it is installed

2. Using Teminal, I entered su and the hosts in command line. This shows up error as "sh: hosts: not found

Could you please help how to make it to work again. Thanks.
[Magisk] Didgeridoohan:
For some reason Magisk isn't mounting things to /system. Sometimes this means there's some script running in post-fs-data that is causing issues. One or more of your modules might be the culprit... Try disabling them (except Unified Hosts) and then enable one by one (rebooting in-between) until you see the issue again. The Magisk log and/or magisk_debug.log could prove useful as well.
[Magisk] smohanv:
Thanks for your response. At the moment, I have busybox, xXx No Limit ROM Essential and Unified Hosts Adblock are installed. I removed other modules. Even after several restarts, I am not seeing GUI for Unified Hosts Adblock. I can confirm that "Systemless hosts" is enabled in magisk manager.
[Magisk] Fubarovic:
I had the same issue, because I always combined the master list (m) with other lists. But apparently, the master list is implied so you shouldn't specify it anymore. See https://xdaforums.com/showpost.php?p=72485326&postcount=163
[Magisk] rfgamaral:
But the problem existed even before I selected anything. When I first installed this I opened the Unified Hosts Manager and noticed that it ketp checking for new versions indefinitely, that's when I looked at logcat to see the error message. I didn't select the master list at all and this started to happen immediately. How did you fix the issue?
[Magisk] Fubarovic:
I installed meefik's Busybox from F-Droid. Now the script doesn't complain about the input anymore, but it fails because GitHub refuses my connection:

sagit:/ $ su -c hosts fpgs
Unified Hosts Adblocker
wget: can't connect to remote host (151.101.36.133): Connection refused
grep: /cache/uhatreadme: No such file or directory
grep: /cache/uhatreadme: No such file or directory
No updates available

Connecting to raw.githubusercontent.com (151.101.36.133:443)
wget: can't connect to remote host (151.101.36.133): Connection refused
grep: /cache/uhatreadme: No such file or directory

Looks like GitHub is blocking my phone's user-agent, because I can open the target URL just fine on my laptop: https://raw.githubusercontent.com/S...lternates/fakenews-gambling-porn-social/hosts .
[Magisk] davidzam:
I have busybox module from magisk installed and this problem, that you mention guys happened to me as well. Some comands don't work as the OP indicates on install instructions using terminal. So I use the APP that it's installed after you install your module. White and black list commands work fine.

Enviado desde mi SM-G550T1 mediante Tapatalk
[Magisk] amn1987:
Tested as suggested. It still keeps creating a new tab on the first visit(but the tab doesn't seem to load any malicious content anymore, mostly fails to load) but the 2nd issue of a new tab opening on clicking any link seems to be resolved. Thanks.

---------- Post added at 09:22 AM ---------- Previous post was at 09:17 AM ----------

I recently upgraded to 8.1 Oreo and ads in a few apps (Ampere, iFonts) aren't blocked anymore. Rebooted a few times as well but the issue persists.
[Magisk] kewinhw:
Hey just installed this on my two devices, my oneplus one and Samsung galaxy s4, Worked flawlessly. But I tried to block ads in the Instagram app by creating a blacklist file in internal storage (oneplus one) and wrote the line Instagram.com saved and ticked the blacklist switch in the unified GUI. It didn't work, I still see all the sponsored ads in Instagram :/ did I do something wrong? Maybe I need to add something else? It works wonders in chromium and chrome though browsing websites :D

And what happens when I tick the boxes under adware-malware?
[Magisk] Didgeridoohan:
https://xdaforums.com/showpost.php?p=76840038&postcount=1317

That won't work... It might make Instagram stop working for you on the next reboot though, since you're adding "instagram.com" to the list of domains that can't be used on your device. About in-app ads: https://xdaforums.com/showpost.php?p=76840038&postcount=1317

And about the tick-boxes: Do you mean Fakenews, Gambling, Porn and social? They'll just add more stuff to the hosts file (fake news sites, gambling pages, porn pages and different social media sites). Check out Steven Black's GitHub for more info: https://github.com/StevenBlack/hosts
[Magisk] kewinhw:
Aah okey thank you for clarifying that :) I deleted the blacklist file switched of the blacklist switch. Until next time hehe

The social button will it disable Facebook buttons and stuff like that in webbrowsers?
[Magisk] Didgeridoohan:
A ton of stuff related to Facebook, Twitter, Instagram, etc, will be blocked. If you use a lot of social media, don't use that hosts option...
[Magisk] kewinhw:
Okey hmm but if I do want to enable either of them do I tick it and install/update again? Or do I just tick and leave it? :cool:

And so I guess the social button disables the stuff in the apps IF it can like you said earlier about that DNS thing ? And also in webbrowser
[Magisk] Didgeridoohan:
Tick and update. Untick and update to change back.
[Magisk] kewinhw:
Ah okey thanks again! :)
[Magisk] stanlin salu:
I have turned my whitelist on & added the lines "0.0.0.0 s.youtube.com"

And still my youtube watch hisory is not being updated :(

Any help?
[Magisk] MrHellRider:
Use regex form.

.*youtube.*
[Magisk] jbm76:
Can't get whitelist working

.*google.*

is in my whitelist file and google services won't work with the ads in google search.

I've used su, hosts, wr in terminal

and tried the app to do it.

Rebooted each time...

What am I doing wrong?

EDIT- figured it out. Had to allow 3 urls on the whitelist to get it to work!!

This is awesome, an ad blocker that allows google ads - this is what I have always looked for!
[Magisk] TomDeW:
Care to share which URL's? ?
[Magisk] jbm76:
.*googleadservices.*

.*.clickserve.dartsearch.*

.*ad.doubleclick.*
[Magisk] Fubarovic:
I found the issue and it was my own mistake: I'm also running AFWall+ (firewall) and I only allow certain apps and processes. I wasn't allowing the "(root) - Apps running as root" process. After whitelisting it, everything worked as expected.
[Magisk] davidzam:
I have noticed something. I hve mede some purchases on play store, but since I began to use unified, for some reason, the purchases are no longer registered on my account, the apps show like they where never purchased. I notice this after unistalkling one of them by mistake. Is there a way to put the store, the play store on whitelist? I mean, what is the host? Is something like the issue with youtube. Thanks in advance.
[Magisk] Didgeridoohan:
Not a hosts issue...

https://www.xda-developers.com/latest-play-store-breaks-license-verification-paid-apps/
[Magisk] davidzam:
Thanks again for the information.

Enviado desde mi SM-G550T1 mediante Tapatalk
[Magisk] gianmaxfactor:
What is the difference using "[Magisk][Module] Unified Hosts Adblocker" vs overwriting /etc/hosts with one of the StevenBlack?
[Magisk] guest4711:
1. The module does it systemless (without changing the system partition, by mounting the file)

2. You may apply your special black- and whitelists. You do not need to edit your host file after every update to make your changes...
[Magisk] tokoam:
I just ran the malware option in the script, what does UnifiedHostsAdblock Update Automate Flow.zip do ? I just installed the advice unified one how does it automatically update ?
[Magisk] neekless:
After applying whitelist and blacklist, are the entries supposed to appear inside the hosts file itself? Because suddenly they are not in my hosts file anymore and I find my youtube history not saving (tried whitelisting all the youtube domains including regex).

The thing is, it worked before. I didn't change my whitelist/blacklist. I just updated the hosts when the app says updates are available. I've tried disabling and enabling the whitelist+blacklist, didn't work. I turned off adblocking (by turning off systemless hosts) and turning it back on again and installing hosts again, didn't work.

EDIT: Nvm, reboot fixed it. But I was under the impression that tapping install/update would make the blacklist/whitelist take effect without rebooting.

EDIT 2: After rebooting, my blacklist is appended to the end of my hosts file. If I go to manager and tap install/update again (with blacklist turned on off course) my blacklist disappears from my hosts file again. Is this supposed to happen?
[Magisk] slgooding:
Anyone else having issues with license checks against the play store?

I wiped my phone the other day. Titanium backup would start just fine and the license would check. I installed adblocker again and now it fails to connect and check the license. I have fakenews and porn blocked in addition to default.

Thanks!
[Magisk] davidzam:
That's not related to unified. I used to think that myself. It's a Play store bug. But there's already a fix for that.

Enviado desde mi SM-G550T1 mediante Tapatalk
[Magisk] guest4711:
Yesterday YALP could not login - returning server errors (503, 5xy). Probably a problem on Google's side. Did not change anything, today everything is working again.
[Magisk] davidzam:
https://www.xda-developers.com/latest-play-store-breaks-license-verification-paid-apps/

Enviado desde mi SM-G550T1 mediante Tapatalk
[Magisk] slgooding:
This was the issue! Thanks!
[Magisk] alximiktik:
Do you can open the site aviasales.ru? I added it to the whitelist, but it does not help ...
[Magisk] pjy2017:
After successfully installing the hosts, does the host take effect immediately or restart the device?
[Magisk] abacate123:
A reboot in this case is nice. No harm done.
[Magisk] XXX-Man26:
Does not work for me

Sent from Redmi Note 5 Pro using Tapatalk
[Magisk] faddys123:
Does this disable ads in apps? For me it doesn't work
[Magisk] guest4711:
Yes, but not those directly accessed via IP address...
[Magisk] slickw:
Is it normal to see grey squares instead of adds ?
[Magisk] Didgeridoohan:
Yes. A purely hosts based ad-blocker will not remove the space where the ad was supposed to be.
[Magisk] NXUS:
What are other methods that remove the space? Either in browser only or system wide if possible?
[Magisk] Didgeridoohan:
Don't know actually... That feels like something you'd need Xposed for.
[Magisk] Zackptg5:
You'll need Xposed and minminguard
[Magisk] h_maharaj:
AdGuard can do that. Maybe other VPN based adblockers can as well. I think Minminguard can as well but you need Xposed for that.
[Magisk] guest4711:
To avoid breaking the encryption (by using fake certifikates/Man In The Middle Attacs) on an encrypted connection it must be done on browsers/applications side. If using firefox/aurora/fennec droid as browser you can use uBlock-origin for the cosmetics.
[Magisk] :
Thank you, for months i've been watching a lot of **** on youtube because of this....

In the process, i decided to give a try to clear my watch history, re-visit my google settings and none of them worked.

I thought it was because of youtube vanced, and then for months i gave up on it and decided to keep vanced as it more valuable than having a "watch history/recommendation"

Yesterday, i have an urge that i can't keep watching ****s and decided to uninstall vanced and try the official one.

Suprisingly the official version has the same problem UNTIL something whisper to me in the bathroom saying "it might be your ad-blocker"

Now i found this thread and have solve my biggest problem for months

Now please, do me a favor for another problem. I have search this thread and found none.

I can't read news within LINE app, i'm a 100% believe it's because of this, because It working fine in my grandma phone. What line should i add in the whitelist to make it work again?

[MENTION=6037748]Zackptg5[/MENTION] Just a recommendation, default block hosts should be a broken proof. But you might need to rebuild it by yourself.
[Magisk] Lownita:
Using this module made my YouTube history stop logging what videos I had watched. Is that intended?
[Magisk] Nevermindthelabel:
You'll need to whitelist *s.youtube.com in order for history to work I believe
[Magisk] Lownita:
Thank you! Why is that URL even in the list? Are there any more Google URLs one should whitelist?
[Magisk] ironman38102:
I installed this module however it caused Instagram not to load at all or even sign in. Kept saying Unknown Network Error. How can I fix this? I uninstalled Magisk to fix it but I still wanna use this module
[Magisk] Didgeridoohan:
Don't use the "social" option?
[Magisk] ironman38102:
Thats the only fix? Whats the point of the option if it doesnt work? ?
[Magisk] Didgeridoohan:
What do you mean "it doesn't work"? If you use the social option, you block all social websites (Facebook, Twitter, Instagram, etc).

Sounds to me like it was working as intend and you misunderstood it's purpose...
[Magisk] ironman38102:
If I understand correctly this module is an adblocker yes? Thats what I thought the option does honestly
[Magisk] abacate123:
Yep, but also to increase the privacy while you browse websites, the "social" option works like intended by blocking it (since social media services can track you this way too).
[Magisk] Lownita:
So I created an empty file called whitelist on sdcard, added the line .*youtube.* , enabled whitelist and regex in app, but YouTube history is still not working. Anything I did wrong?
[Magisk] Didgeridoohan:
You might have to reboot.

It's easy to test if the whitelist worked though. Just run this in a terminal emulator:

su -c cat /etc/hosts | grep youtube

If there are no YouTube entries, it worked.
[Magisk] Lownita:
It's working now, thanks!
[Magisk] P€πtex4869:
Do we really need the app? The terminal is enough to configure this right? If there a way to remove the app without damaging the module?
[Magisk] Didgeridoohan:
Terminal is enough.

You can easily remove the app from the module. Either you can repack the zip with the app removed, or just delete the module's /system/vendor folder and the symlink to it (sbin/.core/img/unifiedhosts) and reboot.
[Magisk] P€πtex4869:
Thank you so much. i think I will remove the module, repack and then reinstall.
[Magisk] The Lord Vader:
Where did you place whitelist file? I placed mine just straight on SD card, added YouTube as wildcard as below.

Doesn't work though rebooting.

Host file does not contain any whitelist entries..?

.*youtube.*

.*googleadservices.*

.*clickserve.dartsearch.*

.*ad.doubleclick.*
[Magisk] MaFi0s0:
I want to just add the lines myself on my desktop then sideload it back on to my phone, which file do I edit ( for a custom blacklist), I searched this whole thread and could not find any instructions on adding my own hosts apart from adding them to the whitelist.

Thanks for doing this by the way.
[Magisk] Zackptg5:
I don't have a blacklist feature atm, only whitelist. You'd have to just copy them into the hosts file. It's located in /magisk/.core/hosts
[Magisk] mashraf92:
Hi,

Still not able to block ads,

Magisk busybox is enabled, systemless hosts is enabled.

I'm attaching the logs from Magisk manager.
[Magisk] Zackptg5:
What steps did you do so far? Which hosts file did you try to apply?
[Magisk] mashraf92:
Installed. Applied fgps. Tried with busybox disabled & enabled. Magisk hide disabled & Enabled.
[Magisk] Zackptg5:
If you open the hosts file in magisk/.core/hosts, if it had content, the module script worked. That means the website you want blocked isn't in the hosts file. You'd be to add it yourself
[Magisk] sherindroid:
unable to update system read only error please help

how to disable unmounting of /system/etc/hosts

support adblock already enabled

EDIT:flash custom kernel now everything works fine
[Magisk] mashraf92:
I'm receiving ads, on all apps as well as on websites.
[Magisk] rignfool:
Have you rebooted...

Does your hosts file exist?

What options did you choose?

Did you run the script?
[Magisk] mashraf92:
Yes i rebooted

Yes my file exist in magisk/.core

Fgps

I ran the script
[Magisk] rignfool:
OEM ROM?

---------- Post added at 03:06 PM ---------- Previous post was at 03:04 PM ----------

Wait... Does it exist in /system/etc/hosts?

If not...

Magisk manager

Settings

Enable systemless hosts file
[Magisk] mashraf92:
Resurrection Remix 5.8.3 with April patches, yesterday i uninstalled Magisk & reinstalled it. But issue persists.
[Magisk] Didgeridoohan:
Yes, but do you have systemless hosts enabled and can you see that the file /system/etc/hosts has the proper contents?
[Magisk] mashraf92:
Yes systemless hosts enabled.

And I can see the proper contents also.
[Magisk] Didgeridoohan:
So in other words: Magisk and the module is working just as intended and you probably have some other issue...
[Magisk] rignfool:
Like an OEM ROM that has the hosts file disabled...
[Magisk] mashraf92:
Should I contact developer of my rom?
[Magisk] rignfool:
Truth be told... I don't care...

You can't answer simple questions... So helping you troubleshoot is pissing in the wind
[Magisk] mashraf92:
Hey buddy, I'm just asking the next step. I answered all the question which was asked. I didn't get the last statement, i thought you were asking me to disable the hosts file via developer
[Magisk] Knoth:
Nice!
[Magisk] Lownita:
That's what I did, also checked whitelist and regex in the app and it worked after reboot.
[Magisk] guest4711:
The hostfile should not contain any whitelist entries. It is a blacklist and all entries corresponding to your whitelist should be sortet out.

So you should not find any entry containing "youtube." in it...
[Magisk] The Lord Vader:
Thank you for clarifying!

But when I run "su -c cat /etc/hosts | grep youtube" in Termux after applying

.*youtube.*

.*googleadservices.*

.*clickserve.dartsearch.*

.*ad.doubleclick.*

I get this answer (I did reboot and Regex via app)
[Magisk] The Lord Vader:
Well, now it seems to work on my S8+... But not on my Mediapad M5 despite same settings. Tried to uninstall and install without success...
[Magisk] Didgeridoohan:
Try using the hosts command in a terminal emulator instead of the app. It might show if there is anything going wrong when applying the hosts file.
[Magisk] The Lord Vader:
I tried that with but without result. But what might have helped was to disable systemless hosts in Magisk. Rebooted, toggled back and now the "su -c cat /etc/hosts | grep youtube" responds in nothing. Let's see if it persists that way :)
[Magisk] Didgeridoohan:
Did you re-apply Unified Hosts again after enabling systemless hosts? Because if you didn't, the hosts file will be empty and it's no wonder that grep youtube returns nothing...
[Magisk] The Lord Vader:
Yes I did, thanks for the suggestion! Seemes to work now, so I'm happy ?
[Magisk] The Lord Vader:
Well, it seems that my happiness over the whitelist didn't last long.

It seems that Unified Hosts Manager doesn't see my whitelist file at all. On my Galaxy S8+ everything works, but on my Huawei Mediapad M5 - nope.

Tried various ways; via "su" then "root" and "wr", tried in manager to add whitelist but no success. Running

"su -c cat /etc/hosts | grep youtube"

Returns answer as posted before.

Any other ideas what to do?

I don't know if this has something to do with the issue, but on my S8+ I have a file on SD-card called "foo", don't know what it is or where it came from.
[Magisk] neekless:
Have tired pressing install/update in unified hosts manager THEN rebooting (while having the whitelist in your storage)?
[Magisk] The Lord Vader:
Interetsing! I did that, and added ".*facebook.*" to my whitelist (I'm blocking social as well).

Facebook returns no answer when running "su -c cat /etc/hosts | grep facebook"

Instagram returns a LOT of answers (should be blocked by social)

YouTube returns answers as well, despite being whitelisted.
[Magisk] neekless:
Instagram should return answers if you're blocking social. All entries in the hosts files are supposed to be blocked. Whitelisting removes it from the hosts file, thus unblocking it.

Facebook returns no answers because you whitelisted it (thus it should not be blocked).

Maybe try removing youtube from the whitelist, reboot, then repeat what you did to facebook but to youtube.
[Magisk] The Lord Vader:
Thanks, tried it but it did not work. YouTube generates answer when running the command as before.

I really can't figure it out... :rolleyes:

Using YouTube Vanced on both this Mediapad and my Samsung S8+, and as I wrote, it works well on my phone.
[Magisk] neekless:
Have you checked to see if youtube history is working? I have also whitelisted youtube. And I just checked that my youtube history is working. But when I ran

su -c cat /etc/hosts | grep youtube

it returns answers as well.

Edit: try whitelisting

0.0.0.0 s.youtube.com
0.0.0.0 s2.youtube.com

instead of .*youtube.* mine works this way
[Magisk] Didgeridoohan:
Apart from the above, could you upload the whitelist file from your Mediapad?
[Magisk] guest4711:
Try "*.youtube.*" (instead of ".*youtube.*") ....
[Magisk] neekless:
The "." substitutes for any character and the "*" makes the character before it (so the ".") repeat any number of times.

So .*youtube.* means [anything here]youtube[anything here] such as www.youtube.com or s2.youtube.com (meaning it will catch all urls containing the word youtube)

*.youtube.* will cause an error because there are no characters before the first "*".
[Magisk] The Lord Vader:
Sure! Here it comes.

.*googleadservices.*

.*clickserve.dartsearch.*

.*ad.doubleclick.*

.*facebook.*

.*youtube.*

---------- Post added at 10:16 AM ---------- Previous post was at 10:12 AM ----------

I can try that, but since I'm using regex I use wildcards instead. Or do you mean I should try "normal" whitelistning?

History works on my S8+ with ".*youtube.*"

---------- Post added at 10:28 AM ---------- Previous post was at 10:16 AM ----------

History not working despite adding 0.0.0.0 lines into whitelist...:crying:
[Magisk] Didgeridoohan:
You misunderstand... I asked for the file.
[Magisk] The Lord Vader:
Ok :cyclops:

Had to zip it first, didn't upload properly otherwise...
[Magisk] Didgeridoohan:
Try this file. I've changed it to Linux line endings (you were using Windows line endings).
[Magisk] The Lord Vader:
Well, this is funny... (not!) Removed 2 of YouTube S and S2 "0.0.0.0" entries in the whitelist file, rebooted, and now "su -c cat /etc/hosts | grep youtube" doesn't generate answer. But instead "su -c cat /etc/hosts | grep facebook" and my Googleadservices is blocked, but whitelisted. Trolls :confused:

---------- Post added at 11:08 AM ---------- Previous post was at 11:07 AM ----------

I didn't even see file endings using Solid Explorer. Thanks, I'll get back to you when I've tried!
[Magisk] The Lord Vader:
Well, I'll be darn and happy! Now it works! Can you please explain to me the difference in file endings?