yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] zgfg:
Cannot you just copy the patched hosts file to:

c:\Windows\System32\Drivers\etc\hosts

Followed by a CMD command:

ipconfig /flushdns

Ofc, as a local Admin on your PC
[Android Apps and Games] DiamondJohn:
Window's version makes a difference.
[Android Apps and Games] Heat84:
Where else would I put it?

How often would I have to do it? What would that do? Would the hosts file still block ads?
[Android Apps and Games] Heat84:
What is the difference? Even if there's nothing I can do about it, I'm really curious.
[Android Apps and Games] DiamondJohn:
Its not for you to do something about, it was more to help others know what can be done to advise you.

PS: A host file built using sources targeted for Android is probably not the best for windows anyway.
[Android Apps and Games] Heat84:
I just wanna know why the problem only happens in Windows.

What Android specific commands or whatever is in Adaway's hosts file? I thought hosts files were supposed to be universal because TCP/IP is universal.
[Android Apps and Games] DiamondJohn:
its the host sources. The technology is the same ie host to ip mapping. I can only assume you are using the default host sources. Just as an example, on your desktop, you may block coin miners. I dont think its as big a concern on android phones.

There are also windows specific forums here on XDA with people more likely to be able to help you. Your issue is not an AdAway issue. You are aski8ng a window specific question, not an Adaway question. Nowhere I remember in the app does it suggest the host file is to be used on windows.

https://xdaforums.com/f/12517/
[Android Apps and Games] zgfg:
As often as you update hosts file on Android

I don't want to drain battery by running AdAway in root mode in the background (no use of, it will only update the hosts file), hence I have disabled all automatic updates and I manually update every couple of days - and I don't have issues with ads.

Itherwise, you should theoretically constantly trigger updates, since you don't know which hosts source will be updated and when - but they are usually updated once a day or every few days, some even once a month - so it depended which hosts sources you use and how up-to-date you want to be

There are users here who run scripts on the PC that periodically update their hosts file directly on the PC, independenty of the phone, search back through the thread to find
[Android Apps and Games] dafank:
How can I modify the hosts file once adway is enabled? I have a banking app which doesnt work when adaway is enabled, i want to make some tests modifying the hosts file, but the files in /data partitions dont make a difference, but I can't modify the one in /system, how is this file being overwritten/overlied ?
[Android Apps and Games] zgfg:
Add hosts you don't want to block to Allowlist

Just look few posts back, same was answered to somebody else few days ago

That's better than manually changing hosts file because if you delete a host from the file, AdAway will add it again if the host is blocked by some of the hosts sources you use

Hence that's exactly why the Allow icon in the middle of top of the main AdAway screen

Btw, if you have root explorer, like MiXplorer, then you can manually edit the (Systenless) hosts file

/data/adb/modules/hosts/system/etc/hosts

You even don't need that, just open Preferences, you will find the icon to manually open the hosts file

But as said above, you should better use Allow list

You have also link from AdAway to the help and tips, so start also from there

And don't modify hosts on the System:

- if your System is read-only (modern phones) YOU CANNOT

- if you had enabled Systemless hosts in Magisk, then Magisk will mount over the hosts file modified by AdAway from /data

That's why you have Systemless hosts
[Android Apps and Games] dafank:
First of all, thank you for taking your time answering.

Yes, I whitelisted the domains I managed to intercept with adaway (I even used another app for this), but it didnt work. I suspect this app (which it has been quite picky detecting root since years ago) is checking something else that adaway is doing, that's why I want to play with the hosts file by myself.

Let me read the last 3 pages to see if there is something useful for me.
[Android Apps and Games] Nergal di Cuthah:
Also try turning off adaway's webserver, that plays havoc with some apps
[Android Apps and Games] zgfg:
If you are using AdAway in root mode than AdAway only puts lines into the hosts file like:

0.0.0.0 AAA bbb CCC

or

127.0.0.1 AAA bbb.ccv

to block AAA.bbb.ccc site (URLs are not case sensitive)

And automatically updates the hosts file if you enable that

PS: Disable AdAway's Web server in Preferences (I always assume it was disabled, that's first thing to do)

---

If you use AdAway in non-root mode than AdAway does not modify hosts file (it cannot without root) but uses DNS resolutions over a virtual VPN so again to resolve eg AAA.bbb.ccc to the non-routable IP address 0.0 0.0

And in non-root mode, you can whitelist apps for whom AdAway will disable its virtual VPN
[Android Apps and Games] blackbuffalo:
From file manager such as FX File Manager with root addon or Root Explorer
[Android Apps and Games] hjjiang:
FYI the above link 2.8 not 2.8.1. could someone re-upload the correct one
[Android Apps and Games] zigeddy:
So does anyone know why adaway leaves instead of blank spaces where used to be ads (in browser only) little android picture, and text "webpage not available" and text that u usualy get when page not available, which actualy makes me a lot of problem esspecialy when i zoom in the page. And after that if i won't to go with back button back, i must press it the amount of times of how many that places where ads where, so in between 3 and 6ish. Please some help with this :)
[Android Apps and Games] irishpancake:
Hi mrRobinson....

Is there any possibility at all that you could fix that "modified by d4rken" AdAway v2.8.1 apk link in your OP??

The link to Dev-Host is totally compromised, and there is no sign there of a modded 2.8.1.....

just some random Norton Security apk.

Is there anywhere else the modded AdAway 2.8.1 is hosted??

I found v2.8 from d4rken at github, but no mention at all of 2.8.1??

Thanks very much.
[Android Apps and Games] hjjiang:
For those people who are using the 2.8 modded version updated the first source with:

http://adaway.org/hosts.txt

instead of:

http://adaway.secure...

---------- Post added at 04:15 PM ---------- Previous post was at 03:47 PM ----------

Here's the link to an 2.8.1 version
[Android Apps and Games] sublimaze:
The unmodified version works great on Nexus 4 android L preview port.
[Android Apps and Games] mrRobinson:
Yea I'll re-upload it tmr
[Android Apps and Games] eyecon82:
thanks...the one in the OP doesn't work for the modified version since the regular version doesn't work on my rooted Sprint S5
[Android Apps and Games] mrRobinson:
The 2.8.1 with darken mod is re-hosted on AFH now.

OP Updated with link.
[Android Apps and Games] znhel:
Nexus 7 2013

This version is the only functioning

thank you :good:
[Android Apps and Games] irishpancake:
Thanks very much mrR....very much appreciated, the md5 is correct and file size too.

I will now try it again, as I have been using MoaAB since some time ago, but I like the control this app gives.

Thanks again.

IP.
[Android Apps and Games] swat4samp:
For me, original apk without darken mod worked fine. I'm on stock 4.4.4 :good: Didn't do anything. Just installed and everything's fine.
[Android Apps and Games] LucentBirch:
Is there a reason why the adaway suddenly stopped blocking YouTube ads? I've uninstalled, reinstalled, updated, and nothing works... I have no idea what's happening
[Android Apps and Games] xRedDroidx:
Same here.
[Android Apps and Games] Benny Bosser:
I had the same problem. Just install the xposed module YouTube AdAway and the ads will be blocked :D
[Android Apps and Games] Blizzard22:
Is there a way to fix crashing when adaway is enabled on websites like wikia?

Most wikia sites crash after a few seconds (all browsers except Opera).

It's definitely Adaway related but I couldn't find a solution for this problem.

Sometimes the site loads without crashing but as soon as I press a link which links to their on website my browsers crashes.

I mainly use boat browser HD but I tried it out on standard Boat browser, Dolphin and the stock browser.

Here are some websites which causes the crashes when viewed in Desktop mode:

http://tekken.wikia.com/wiki/Kazuya_Mishima

http://jormungand.wikia.com/wiki/Jormungand

http://streetfighter.wikia.com/wiki/Dudley

... and all other wikia.com sites.

And here is my logcat :

https://www.dropbox.com/s/0qnrjrapp4uiotu/Adawaycasuedbrowsercrash2014-08-02-00-46-38.txt

I appreciate any help and feedback =)

This error is really annoying and it bothers me more than a year.
[Android Apps and Games] FlanjeUK:
[MENTION=2636832]Blizzard22[/MENTION]

Those 3 example links you provided all worked no ptoblem for me...
[Android Apps and Games] nikon120:
Sigh... 2.8.1 modded version stopped working. Even adding more file permissions to the hosts file didn't resolve the problem.

Any others seeing ads on this version now?
[Android Apps and Games] _jis_:
AdAway works for me on CM11 4.4.4 and TW 4.1.2 without hitch.
[Android Apps and Games] :
+1

Gesendet von meinem A0001 mit Tapatalk
[Android Apps and Games] dafank:
Wow!! that was "the something else" that adaway was doing and the banking app was detecting.

I have disabled the webserver and now the app works again. I have spent some few hours figuring out what the issue was. Thanks a lot!!
[Android Apps and Games] Nergal di Cuthah:
Glad it worked, i was going to give the same answer as @zgfg but suddenly remembered the webserver.
[Android Apps and Games] zgfg:
Yeah, I don't know why that Web Server (proxy) is not disabled by default (it's purpose is to remove the blank boxes where adds should go), but it causes more troubles than goods
[Android Apps and Games] dafank:
Guys, I'm back with a different issue. Since some time ago I switched from Magisk to KernelSU, the only thing I have to do is to grant root access to adaway, I dont have to install any module (systemless hosts etc...).

The application is working fine, I have been using the whitelist/forward list etc.. with no issues, but suddenly, it's not able to make changes, it shows the error "Failed to install new hosts file". It smells like ksu is not working, but it does for the rest of the applications, actually the current hosts file was generated by adaway.

I have tried to clean the storage, re-enable ksu etc... with no luck. I also have enabled the verbose logging, but I can't find any log in the filesystem.

Any idea/suggestion? I'm unsure if the issue is related with ksu, but I think i never happened in the past with Magisk.
[Android Apps and Games] SuperMaximus:
Same problem. Having Magisk Delta 26301 installed with Systemless hosts module. Adaway doesn't request root at all.
[Android Apps and Games] zgfg:
Using "Unmount modules by default"? Don't use if you don't know how to setup Delta - it's not the AdAway problem😁

If using that whitelist mode in Delta, you must put all root apps to the list, incl AdAway. Consult Delta thread.
[Android Apps and Games] SuperMaximus:
@zgfg

Yeah, you are 100% right! Thanks!
[Android Apps and Games] basily:
I'm not sure if this the correct thread to ask this on...

I have a pixel 6 pro, rooted with magisk 26.3, and systemless hosts enabled. Ad blocking worked fine until i installed the Android 14 update that came out a couple of days ago. Now I'm getting ads everywhere (holy crap, how do people live like this???)

Everything else is working fine. Got root. Wallet works, no complaints from any banking apps.

How do i get AdAway to work again? (I didn't change anything)
[Android Apps and Games] xPaKe:
Poco F4, custom rom, custom recovery, Rooted with Magisk 26.3, systemless hosts enabled. Android 13.

Superuser granted to app, unable to copy hosts file to /system partition. have verified it is rw.

sidenote, app did not ask for permissions and only shows notification permission in settings, is it normal behaviour? First time adaway install has failed on me.
[Android Apps and Games] rodken:
Did you check the wiki to hopefully help solve any issues?
[Android Apps and Games] basily:
I hadn't, but now i did. Nothing applies to my situation in there, apart from possibly data saver mode on chrome. However, i can't find anywhere in the latest chrome where that can be toggled on or off.

Is adaway working for other people running rooted phones on stock Android 14?
[Android Apps and Games] zgfg:
Data saver mode in Chrome affect how Chrome works and uses DNS (but not present in Chrome anymore) - but it has nothing with AdAway's ability to use root and write to /data/adb/modules/hosts/system/etc/hosts

Btw, use some root explorer like MiXPlorer and check that file as above - is it almost empty (containing only localhost address) or was it patched by AdAway
[Android Apps and Games] Lughnasadh:
Working fine for me on both my Pixel 6 Pro and Pixel 7 Pro running A14 QPR1 Beta 2. Running Magisk Canary 26301 and Magisk Stable 26.3, respectively.
[Android Apps and Games] Nergal di Cuthah:
Systemless hosts plug-in for magisk ?
[Android Apps and Games] basily:
Maybe i need to try canary magisk. Why are you still on Android 14 beta?

Hosts is a big file, looks like it was patched. But the directory it's in is:

/data/adb/modules/hosts/system/etc
[Android Apps and Games] Lughnasadh:
I'm not on A14 beta. I'm on A14 QPR1 Beta 2.
[Android Apps and Games] zgfg:
If patched by AdAway, it should begin with like:

# This hosts file has been generated by AdAway on: 2023-10-10 22:31:04
# Please do not modify it directly, it will be overwritten when AdAway is applied again.
# This file is generated from the following sources:
# - AdAway official hosts:https://adaway.org/hosts.txt
# - Pete Lowe blocklist hosts:https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext

And further, you will see the blocked sites, like:

127.0.0.1 ad.yo88vn.com
127.0.0.1 ad.yo88vn.vip
127.0.0.1 ad.yonhapnews.co.kr

If so, it was generated, at least partially, so reboot and check do you see that same was mounted to /etc/hosts
[Android Apps and Games] basily:
Yes, the hosts file is definitely generated by adaway, and it's also mounted to /etc/hosts

I rebooted, and I'm still getting ads🤷🏻‍♂️

The only unusual thing that i can think of that i did was that i didn't remove my magisk modules and uninstall magisk, as i normally do, before flashing 14.0.0 (UP1A.231005.007, Oct 2023). I was worried it might hang after flashing the patched boot file but it didn't. I clearly have root as i can see the hosts file, and it was patched. I only have 3 magisk modules installed:

magisk's own systemless hosts,

Universal SafetyNet Fix

V2.4.0-MOD_1.2 by kdragOn modded by Displax,

volte-properties for Pixel 6 Pro 1 by foobar66
[Android Apps and Games] zgfg:
Yes, you have root, hosts file looks patched and the other modules are irrelevant

I just wonder, didn't you originally say that AdAway complained that it could not save the hosts file. So maybe it's incomplete

If AdAway shows eg that you have 20K blocked sites, then hosts file must have 20K lines, or 40K lines if you have enabled IPv6 in the AdAway Preferences

Btw, you can check the end of hosts file in Terminal Emulator (or with ADB, but then prepend the command with: adb shell).

Blocked hosts are sorted alphabetically, hence the tail should look like:

Spoiler content hidden.

Also, pause AdAway (it has a button on the main window, down in the middle

-/data/adb/modules/hosts/system/etc/hosts

will be 'empty', containing only record(s) for localhost (and maybe local domain)

Then start AdAway again and check does it complain that it could not save complete hosts file

PS: You can also count the lines in TE (or by ADB) with the wc command:

Spoiler content hidden.

So I have 33,5K blocked domains, IPv6 enabled and 67K lines hosts file.

Btw, in addition to the three default I configured a dozen of additional hosts sources

Screenshot attached (I later updated hosts sources hence the attached screenshot shows a little less, 33,1K Blocked domains)
[Android Apps and Games] DiamondJohn:
have you tried pinging a host within a shell, that is in your host file?
[Android Apps and Games] basily:
I just tried it and it returns from my localhost, so it's working

No, must have been someone else.

I must need more hosts sources, clearly the ads that are coming through are from hosts I have not blocked.

Thanks for your help
[Android Apps and Games] donmarkoni:
Hey guys! Any thoughts about this article and our future of ad blocking?

The End of DNS-based Site Blocking is near
[Android Apps and Games] zgfg:
Sometimes Chrome behaves weirdly by not resolving through the hosts file (hence the ads are not blocked)

Open AdAway, open Blocked, tap to one of the blocked domains to copy to your 'finger'

Or search on top in the Blocked tab for eg google, then tap on one of the blocked Google ad domains, like admob.google.com

Then paste to Chrome.

Depending on do you have Web browser enabled or not in AdAway (I suggest to turn it off), you should have results as on the screenshots - if not, Chrome ignores the hosts file

You can also press to the big + icon in the Blocked tab and add eg cnn.com to your Blocked domains.

Confirm Apply when it asks - you may also need to reboot

Then test does the Chrome open cnn.com

You can later experiment by toggling cnn.com in the Blocked tab - but you must always accept Apply and reboot (or test is it enough just to wait for eg half a minute)
[Android Apps and Games] zgfg:
True for ping but observe how nslookup from (NDK) BusyBox (internally installed with Magisk) bypasses the hosts file and goes directly for resolving to the Google DNS server:

Spoiler content hidden.
[Android Apps and Games] DiamondJohn:
whenever something is "not working as expected". I start from the most basic steps, THEN work my way up to the "failure point". Ping is not the be all and end all, its simply the easiest starting point.
[Android Apps and Games] basily:
Ok, so this test failed. Thanks for the tip. A supposedly blocked domain on AdAway opens in chrome. So chrome is bypassing the hosts file? Is there a workaround?
[Android Apps and Games] zgfg:
You can actually better test how Chrome resolves addresses if you copy/paste the following URL to the address bar:

chrome://net-internals/

Then tap to DNS and test resolving

Btw, I had a similar problem like 9 months ago. Problem was showing only on some WLAN networks, but always on the same ones (and never on the other ones)

Eventually, I found that it depended on the DNS servers that were pushed by DHCP

If it was Google DNS 8.8.8.8 or Cloudflare 1.1.1.1 (their primary servers, but also with the corresponding secondary servers) then Chrome was bypassing the local hosts file

First I didn't believe so I played with my WLAN at hone, and indeed, if I set that my WLAN.AP was pushing DHCP with those DNS servers, then Chrome was ignoring hosts file.

If I set for DHCP to push in DHCP my ISP DNS server or some other public DNS servers, then Chrome was properly resolving by looking first to the hosts file and ad-blocking by patched hosts file (by AdAway in root mode) worked fine

I found the workaround - eg, for the WLAN at my work (its DHCP was pushing Google secondary DNS server 8.8.4.4 causing ne to have ads in Chrome) I did the following:

- Native Setting's

- WiFi

- Open Details for the currently connected WLAN

- IP Settings, switch from DHCP to Static

- Redefine DNS1 (and DNS2)

- Apply,

Good thing, the phone remembered and next time when it automatically connected to the same WLAN, it automatically used the sane Static IP settings (with the 'custom' DNS server) as I configured previous time

So the workaround worked fine in the office and some malls/stores and coffee bars, for whom I had WLAN Connections saved in the phone

I browsed about, (wrote also here - some had similar problems but with Mobile connections and they had to manually set APN with proxy to force Chrome to obey the hosts file), but didn't find much, if anything, on the Net

I had that problem only on one of my two phones. Both phones were Xiaomi but diff models, running diff custom ROMs, diff Android versions (A11 without the problem on the older phone and A12 with the problem on the newer phone and ROM), diff Magisk forks and so - but both had the same/latest Chrome ibstalled, and Chromes were configured exactly the same way (believe me, I lost my eyes comparing details between the two phones)

Hence, after I struggled for a month and more with that problem and then enjoyed one month with the found workaround, I bricked that phone and then sized the opportunity to finally Factory reset it and to upgrade the ROM from A12 to A13.

After all that, the problem disappeared and since then, on both phones, Chromes properly resolve by looking to the hosts files, hence the ad-blocking by DNS works, no matter which DNS server is pushed by DHCP settings or set manually as Static IP Config

See the screenshots

PS: You can alternatively set the Private DNS to eg:

adblock.doh.mullvad.net

It will block ads and you shouldn't have problems with the Chrome
[Android Apps and Games] DiamondJohn:
A bit OT, but it was something I found interesting, and others may also; unless they already know, and/or its something everyone knows.

I build ROMs from source. One of the things generated is the default hosts file, which people are obviously replacing with adaway. I have a huuuuuge host source list, including AdAway defaults, and the following hosts are not included (just randomly checked the output today). BUT the following is the default hosts being blocked/mapped in my AlphaDroid A13 ROM. I am guessing its stopping people from downloading the default OTA's from google (for my google phone) instead of the ROM specific OTA's. But thats simply a guess.

I'll be adding the last three to my block list. Preferably if I can get to the original hosts file (and use as a source), before it is overlaid with my modified hosts file by the Magisk systemless hosts module

These are related hosts that ARE being blocked. And this is from a few months back with 3.2M hosts blocked. But NOT the ones above. And note, these clearly come down to two unique lines in the resultant host file. Its my log which also has which source host file contained them.

View attachment 6021064
[Android Apps and Games] MyNameIsGreat:
Hello everyone! I would like to redirect all requests from yt3.ggpht.com to yt3.googleusercontent.com Is it possible with AdAway? I know it has the "Redirected" tab, but it asks for the host name and the IP address, which I don't have.
[Android Apps and Games] zgfg:
Google for nslookup yt3.googleusercontent.com to obtain it's its IP address - screenshot

So open Redirect, +, yt3.ggpht.com, IP address as from nslookup, Add, Apply and if using AdAway in root mode, better reboot

At the end, test does ping to yt3.ggpht.com redirects as required
[Android Apps and Games] osm0sis:
Searching but can't seem to find whether anyone ever worked out what to put on the Allowed list to get the free Google One VPN on Pixel devices to work with root AdAway. Thought I recalled seeing that at some point, but perhaps I'm mistaken? 🧐🤔
[Android Apps and Games] asheroto:
@PerfectSlayer have you decided not to develop this app any more? I don't see any activity on the repo in some time now.

The ProblematicApps page was completely deleted in commit 72e9cd1 so I reverted that particular page.
[Android Apps and Games] zgfg:
After the last migration XDA (not the Forums) detects ad-blocking, try eg to open:

XDA

The world’s best source for computing news, reviews, editorials guides, and more.

www.xda-developers.com

Does anybody know is it possible to whitelist certain sites to get it working

NVM: Just enable Desktop site and it opens😁
[Android Apps and Games] m0han:
No issues with AdAway in VPN mode.
[Android Apps and Games] zgfg:
Interesting