yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] Mike B.:
Yes, they are separate options. Leave them both at their default state. Ignore the "allow whitelisting" option. Only enable "allow redirection" if you're absolutely positive that you know what you are doing and need to somehow substitue one host for another. For the overwhelming majority of users who simply need to block/blacklist or whitelist various hosts, there is no need to change those options. Lasciare abbastanza bene da solo! ;)
[Android Apps and Games] mj.scintilla:
Adaway not working with Facebook AdChoices

Hi Guys,

Is this only me or are you guys are facing the same issue?? Seems like Adaway is not working with AdChoices. Its blocking all the ads on my android 6.0 but AdChoices. I tried to log DNS requests and found that AdChoices is being served by Facebook graph API. Blocking the graph.facebook.com serves the purpose but this is not the permanent solution.

May somebody please verify if they are facing the same issue or am i doing something wrong?

Handset configuration:

Moto G 3rd Gen

RAM: 2 GB

SuperSU: Free 2.62 (Systemless)

Country: India

Please let me know

Thanks and Regards,

- MJ
[Android Apps and Games] alessio89g:
It was only curiosity :) :

If an address isn't in the hosts file, it's already in "whitelist"

and if this option doesn't affect the custom whitelist, I don't understand what is its use.
[Android Apps and Games] Mike B.:
It is a remnant from an older version. Ignore it! ;)

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

I'm not sure what you mean by "AdChoices". All I can think of is the program by that name used by a large group of companies (Google, Yahoo, Microsoft, etc.) to push browser ads based on location and browsing history. Ads from the AdChoices group can come from a variety of hosts and you have to block each of one those hosts individually. Most common source files block many such hosts but if you need more you simply have to blacklist them as you have apparently started doing. There is no universal "AdChoices" host!

If you are referring to ads displayed within the Facebook app, keep in mind that some of those ads are served through external scripts and CSS and may not be using local DNS resolution, meaning that nothing in you hosts file could stop them. Accessing Facebook through anything but the official overwhelming "official app is often a much wiser way to go.
[Android Apps and Games] alessio89g:
Oh, okay!

Only another question :) :

This options make a bigger hosts file?

I've read (and experimented) that a bigger hosts file can to cause memory drain.

For this purpose I also disabled the IPv6 option.
[Android Apps and Games] Mike B.:
The only option that makes the generated file bigger is IPV6 since it causes two entries to be created per host. At this time it's mostly experimental and effectively useless for most users until IPV6 ads become widespread. Also try to avoid those huge pointless source files, such as the "mother" one. Not only do they contain very little useful material, but their sheer size tends to slow down many devices for no clear benefit.
[Android Apps and Games] alessio89g:
I enabled only all the default sources + one custom entry on whitelist.

Do you think so it's properly configured for that purpose?
[Android Apps and Games] Namoi:
Hmm, could you be more specific about the "mother" one? Is it the first in the list? :D
[Android Apps and Games] Mike B.:
It depends entirely on what apps you use and which sites you visit. If you only see very few or no ads during your usual online travels, then you're OK. The default sources are usually more than sufficient for most users, and don't even need to be updated very often. If AdAway is happy and you're happy, then we're happy! ;)

---------- Post added at 01:50 PM ---------- Previous post was at 01:43 PM ----------

There's a huge list called the "Mother Of All Ad Blockers" or some similar name floating around the net that contains many many obsolete or useless hosts and is so large that it causes many devices to run out of RAM. If you see it online, stay away from it! The default source files suggested by AdAway are all reasonable choices for most users.
[Android Apps and Games] Namoi:
Oh ok, thanks, but I stick with the default provided in the app and add on a per basis mine in the blacklist.

Btw just a related thought : I can't download some kind of mms received from apple phones. Could it be related to adaway blocking them ?

I am sure my blacklist doesn't deal with those and I tried to disable adaway but I never rebooted after.

Thanks
[Android Apps and Games] Mike B.:
Your MMS problem is extremely unlikely to have anything to do with AdAway. Make sure your APN settings are correct, but it's possible that the iPhone is sending a multimedia file in an unrecognized format. I'm a Mac user but have never owned or wanted an iPod/iPad/iPhone. I'm afraid I have no special insight on iOS matters, sorry.
[Android Apps and Games] DsturbD:
just upgraded and rooted my LG G4 to MM and trying to install Adaway 3.1 from the OP, every time i try to install it, it fails and says the file is corrupt. i have downloaded it from 3 different mirrors on androidfilehost and copied it to different folders on my phones internal sd, always the same result, and yes each time i would check the md5sum and it was correct. any ideas?
[Android Apps and Games] Mike B.:
Did you remember to check the "Allow installation from unknown sources" (or similar wording) option in your settings? It's usually under "Security".
[Android Apps and Games] mj.scintilla:
Hi Mike,

Thanks for the response. Apologies for the confusion caused. Let me explain further about the issue.

AdChoices: Ads served in the android application. Not the browser. I didn't know that the AdChoices ads can come from the variety of hosts. Thanks for explaining this. There are few applications which are serving ads through facebook (this is what I believe but not sure.). The reason behind this belief is when I tap on those ads, on browser, it navigates to facebook and then to the end url. Blocking graph.facebook.com in the AdAway blocklist blocks these ads. As I'm new use, I'm not authorised to post the links. Please find the link below to the shared folder.

"dropbox(dot)com/sh/o9ty4lxs1g42euc/AAASGrKiLkMmbC13HLuiNWhsa?dl=0"

Apologies for the inconvenience caused.

I guess, particularly screen_7 and screen_8 may be of your interest. Clicking on "AdChoides" button on the top right of the ad in screen_7 opens screen_8.

Thanks and Regards,

- MJ
[Android Apps and Games] Mike B.:
Thanks for trying to explain, but I'm still unsure of what specific problem you face. Ad URLs (any kind of ads) are either accessed by name, in which case their host can be blocked in the hosts file (with or without AdAway), or they are accessed directly by IP, in which case nothing in the hosts file can stop them. Apps can also serve ads "internally" by using scripts and other methods that don't go though local DNS and can't be conveniently blocked.

Apparently you have discovered that for you blocking "graph.facebook.com" stops some of your ads, but the Facebook apps uses a variety of hosts, many for mixed contents of both ads and relatively relevant material. As documented, you should use the AdAway DNS Request log to see which of these hosts, if any, can be blocked, but it's unlikely that you can identify them all in that manner. Blocking some of those hosts may get rid of ads but also block some material that you want to see. As pointed out earlier, the Facebook app is a known extremely intrusive behemoth with many processes and nearly impossible to tame. If you want to use it, you may have to expect to see ads in there. Even accessing the Facebook site from a browser tends to bring in a lot of unavoidable ads.

Your original posts said that blocking "graph.facebook.com" was not a permanent solution. What did you mean by that? Blacklisting hosts that are not already blocked by your source files is the correct and proper way to go.
[Android Apps and Games] buffal0b1ll:
Still works on rooted N preview N6. Yay!
[Android Apps and Games] mj.scintilla:
Thanks Mike. for the response. What I meant by "blocking "graph.facebook.com" was not a permanent solution is that I'll not be able to access facebook or facebook messenger or any other apps which are dependendent on facebook for login etc. by blocking graph.facebook.com. I'm 100% sure that blocking fb graph api blocks ads in this particular application and content works fine. Or I guess I may be missing something.

Problem statement points:

This particular app shows content + ads

Ads served in this app are through facebook. Because blocking graph.facebook.com in AdAway blocks ads in this app.

Unblocking graph.facebook.com again serves ads in this app.

That's all. No IP, No other host. This is all I know right now. The google play id for this app is com . mobilesrepublic . appy if you need to regenerate the issue by disabling adaway. Also, I'm so so curious to know why is it only me who is facing this issue. I googled a lot about this but nothing found. Guess, no one but me is facing this thing.

Thanks and Regards,

- MJ
[Android Apps and Games] Mike B.:
Your problem is that you are blocking a host that delivers all sorts of content and not just the ads. This is not an issue with AdAway but simply a matter of selecting which hosts, if any, can be blocked to disable only the ads and not the rest of the contents. If your DNS request log doesn't show any culprit other than "graph.facebook.com", it might be that you simply can't do what you want with that app.

Apparently you're using a free app named "News Republic – Breaking news". Don't the in-app purchases allow you to use it ads-free? Realistically, you can always expect to see some ads especially when using free dedicated apps instead of a plain browser. The bottom line is that you should probably either learn to live with those ads or simply use a different way of getting the information. From what I see, that app merely aggregate content from several popular sites, but produces little or no material of its own. You can probably configure Feedly or some similar aggregator to give you the same basic results with much less "noise".

A reminder that AdAway simply facilitates getting hosts into the hosts file. It neither knows nor cares about specific hosts, apps, or ads and you'd have the very same issues with your hosts file whether created by AdAway or not. You could try to contact the news-republic.com support people (if they exist) directly but it's unlikely that they'd be willing to help you bypass their ads. From the AdAway standpoint, I'm afraid there's nothing more we can do to help you in this thread, sorry.

EDIT:

I just now took the time to download that app and in its documentation under "Why am I seeing ads?", it specifically states:

"New Republic is an ad funded application, so you should expect to see ads as you read and watch.

...

It is possible to remove adverts by subscribing to the ad free version - this costs $2.99 (or equivalent) per year

..."​

I believe that nicely answers your concerns... ;)
[Android Apps and Games] HIckeydog:
I have the same problem as well (android MM) and untrusted sources are allowed.
[Android Apps and Games] Mike B.:
Are you also on a newly updated LG G4 MM? We know that AdAway has no trouble installing and running properly in a number of Marshmallow configurations. If you're positive you downloaded the correct file and its MD5 checks, then something in your system's installer or launcher is interfering. Does it install and not run or just not install at all? Can you successfully install other apps downloaded from external links? Have others reported similar problems with other apps wherever your ROM is supported? Did you look for clues in your logs?
[Android Apps and Games] mj.scintilla:
Thank you so much Mike, This very much clears my doubt. I didn't mean that this is adaway issue. I just wanted to be sure that this is the desirable behavior. Your explanation clears all kinds of confusions I had in mind.

Thank you so much again for your valuable time.

Have a great day ahead. God bless you :)

Regards

- MJ
[Android Apps and Games] granets:
Hello guys,

I have the latest version of the app, but it does not work - ads are not blocked anywhere. I tried changing the host target location - no difference. I downloaded the systemless root zip patch, but I can't flash it, in TWRP it shoots out an error and does not install. Any help is welcome.

I am using a Nexus 5X on the latest android 6.0.1 MHC19J

Edit: Sorry, it appears to work on some sites, and not on others. I guess everything is ok.
[Android Apps and Games] DsturbD:
Yeah i have that selected too. I will try an apk from another source to see if it installs, didnt think of that, thanks

UPDATE - i was able to install them via adb install, have adaway and f-droid installed now, thanks for your help!
[Android Apps and Games] mrRobinson:
OP Updated. New dev build just added https on the pgl.yoyo.org hosts source. added new zip which just reminds people at the end that they should leave the default target of /system/etc/hosts as some think they have to point to data after that. Also added sha1 sum's just in case AFH is ever compromised a root apk is a good place to put malware. And a compromise of AFH would allow them to change the md5. With 40k downloads over a couple months I just like having a sum somewhere else. That's it, continue on.

Edit: if you downloaded the systemless.zip from the time i posted this to the time it was edited you'll want to download again, it won't flash.
[Android Apps and Games] Mike B.:
I'm not sure why you mention F-droid but if you somehow used F-droid to try to install AdAway that might be the problem. While the F-droid site often contains AdAway versions that they compile themselves, those unsupported versions are incompatible with the "real" AdAway found in the links from the OP. Always grab AdAway from here and you'll be much less likely to have headaches... ;)
[Android Apps and Games] Cr4z33:
I know you need to root the device to have a better experience, but is it possible to use AdAway in a stock device like AdBlock Plus where you manually edit the proxy?

Sent from my Samsung Galaxy Note 5 (SM-N920C) using stock v6.0.1 Marshmallow firmware
[Android Apps and Games] m0han:
gonna flash a new rom. can you help me install the latest apk and systemless hosts file? i'd like to have the steps - in the order it should be done.

flash the rom and,

while still in recovery

, flash the hosts file, reboot, install apk, update the hosts file, reboot again - and go about my business?

p.s.: many thanks for your detailed posts. they sure are pretty enlightening. keep up the good work.
[Android Apps and Games] Mike B.:
Without knowing any of the details of your configuration, the basic steps are:

Flash a functional

rooted

ROM

Verify that you have access to the Internet and that your browser and favorite apps work fine

If you use SuperSU's "systemless" root, go to your custom recovery and flash the "AdAway_systemless_hosts_v2" ZIP from the OP then reboot

install the latest AdAway apk from the link in the OP

launch AdAway and let it download/apply the source files

reboot

enjoy ;)

---------- Post added at 08:14 AM ---------- Previous post was at 08:02 AM ----------

You seem to grossly misunderstand what AdAway is and does. It's a tool to facilitate editing the /system/etc/hosts files. If you're not rooted, you can't do that, with or without AdAway. This has absolutely nothing to do with proxies (or AdBlock).
[Android Apps and Games] imran.khalil:
Its not working at all please help. M using it on my G2 F320K with Lollipop. It worked perfectly a few months back but not now.
[Android Apps and Games] ginore:
Please, which version should I download for my Galaxy Tab 2 10.1 P5110 [ROM] [P51xx] [6.x] CyanogenMod 13 (CM13.0)?

Thank you.
[Android Apps and Games] Mike B.:
First, please don't quote the entire first post to make a 1-line post.

Exactly what is "not working"? Did you successfully install and enable the current AdAway from the OP? Does your /system/etc/hosts contain the entries you want? What did you change just before your trouble started, such as a new or updated ROM? What makes you think "it's not working"? All ads come through? Some ads are blocked but others come through?

If your trouble is simply that ads are not blocked through mobile data but all's well under WiFi, and you recently updated your ROM, a common oversight is a forgotten proxy in the new APN. Check that first.

If you have other errors, such as inability to install or enable AdAway and you use a "systemless" root method, you may have to flash the ZIP mentioned in the very same OP you quoted. In fact, re-reading that OP carefully might help you solve your problem on your own.

Assuming none of that helps you, please tell us exactly what specific trouble you have and we can try to guide you.

---------- Post added at 09:02 AM ---------- Previous post was at 08:57 AM ----------

As for any device running Android 4.1/JB or newer, use AdAway 3.1 from the OP (the latest Dev build, for example). Read the OP for additional information.
[Android Apps and Games] imran.khalil:
Everything is configured properly and i have installed all the upadates. This worked properly before i upgraded to custom Rom that was MM now i have downgraded to custom Lp rom again it worked perfect beforehand but not now. And yes i dont use mobile data i use only wifi. It does not block ads from any apps not even on websites. I even flashed the zip you have uploaded but problem still persists let me mention a few apps that bring annoying ads e.g zedge,flashvpn,2lines for whatsapp
[Android Apps and Games] Mike B.:
The "systemless" ZIP is only relevant if you use SuperSU's systemless root. The main question is whether your /system/etc/hosts actually contains the hosts you wish to block. If it does, then AdAway is working. Note that blocking ads in apps is a separate issue depending on how the app gets its content. A better test is to simply use your browser. If ANY ads are blocked, then all's well and you simply need to find the correct hosts to deal with your apps.
[Android Apps and Games] imran.khalil:
Can you please explain how can i check that systems/etc/hosts contain the hosts i wish to block?
[Android Apps and Games] Mike B.:
By looking at it with any root-enabled tool you use to look at files, such as Root Explorer or a similar file manager. If the file is more than a few dozen bytes, you're OK.

You still haven't clarified if AdAway applies your chosen source files without any error. If in doubt, disable it, then reapply after verifying that you use the default settings, and remember to reboot afterwards then check your hosts file again.
[Android Apps and Games] imran.khalil:
It applies perfectly let me show u a snaphot

---------- Post added at 02:34 PM ---------- Previous post was at 02:28 PM ----------

And here see this if caught the right thing ?
[Android Apps and Games] Mike B.:
2.01Meg is about right if you use the default source files, and this suggests that AdAway is working fine. If your ads are not blocked, something in your system is interfering with local DNS resolution, such as possibly a forgotten "ad blocker" in your ROM . Try a simple test: from your browser (preferably with more than one browser), go to "https://googlesyndication.com" (a commonly blocked ad provider). If you see anything besides the google search pages, you're blocking ads as expected.
[Android Apps and Games] imran.khalil:
Ok let me see and then give you feedback

---------- Post added at 03:24 PM ---------- Previous post was at 03:16 PM ----------

This is what comes up
[Android Apps and Games] Mike B.:
Perfect, AdAway is working fine! To avoid that type of error on blocked sites, simply enable the webserver. If some of your apps show ads, it's because either they serve ads directly or they use a host you haven't blocked. Read the documentation or search this thread for hints on how to deal with those issues which are not AdAway-specific. I'm not sure there is more to address at this point.
[Android Apps and Games] Ja_som:
Does not work on Android N :(

Can´t create host file or shortcut to other folder.
[Android Apps and Games] Mike B.:
Since others have reported

success

, it might have something to do with either your specific configuration or how you installed AdAway. Are you using SuperSU's "systemless" root? If so, make sure to flash the ZIP mentioned in the OP first then run AdAway pointing to the default /system/etc/hosts. Without any details, I'm afraid that’s the best I can suggest for now unless you want to send me a Nexus! ;)
[Android Apps and Games] Ja_som:
Sorry my bad :)

I think buffal0b1ll use other than Chainfires root, which was released only today.

So, I used Chainfires CFAR on my N5X, I´m not sure if is systemless or not. But on my N7, I never needed to flash zip from fist post to use AdAway, I also don´t know how to flash that zip, when TWRP does not work on N. Installed AdAway Build-Mar.11.2016 and tried to enable AdAway, when it tries to create host file I get an error window.

I also can´t install busybox, and I can´t write to system with TotalCommander, but I can uninstall system apps with Titanium Backup. Maybe there is some issue with root, I will report it to Chainfire.
[Android Apps and Games] Mike B.:
What exactly does your error window say? No usable custom recovery makes everything challenging, especially backing up! If you have sufficient root access you could try to emulate what the ZIP file does to create a permanent bind mount. If you can't write to /system with common root-enabled apps, it's no surprise that AdAway couldn’t either, especially if you don't have a busybox! That’s the price you have to pay for being a pioneer. Maybe "N" stands for "nebezpečný"? ;)
[Android Apps and Games] Ja_som:
N and also Chainfires CFAR are first releases, so I expect issues :)

I will wait for new release of CFAR, maybe he can do something with it, fingers crossed :)
[Android Apps and Games] cocchiararo:
Is there any special step for using the latest dev apk and the systemless zip?

I am trying with the N preview and chainfire supersu 2.69 release candidate.

There is a user claiming success, but I flashed the zip from twrp 3.0.0.0 (fastboot boot twrp.IMG), using adb sideload, since it can't decrypt /data (twrp 3.0.0.1 would not boot), adaway is freshly installed, pointed to /system/etc/hosts, but it says it can't copy the file.

Enviado desde mi Nexus 6P mediante Tapatalk
[Android Apps and Games] m0han:
some comfort(?) :):good:

---------- Post added at 09:39 AM ---------- Previous post was at 09:34 AM ----------

almost the same as what i usually do, except for step 3. will try that with my next rom installation. thanks a lot.
[Android Apps and Games] cocchiararo:
Do I need the apk to NOT be installed when I flash the zip?

That would be the only difference in what I did.

Enviado desde mi Nexus 6P mediante Tapatalk
[Android Apps and Games] Mike B.:
The ZIP simply attempts to establish a permanent bind mount for the hosts file. You can look at its contents yourself if you want. It's merely a workaround for those incomplete "systemless" roots but not directly related to AdAway. Whether AdAway is installed or not doesn't affect the bind/symlink.

You say it can't copy the file, but it would be useful to determine why. Wrong permissions (use bind/symlink)? Wrong or misplaced busybox (should be in /system/bin)? System reported as full (try the special build)? For details on any of those, search this thread.

If you experience any error, report the exact message you receive and/or look at your logs which probably already have all the answers. ;)
[Android Apps and Games] yaatzek:
Did you allowed modifications for twrp at first launch?
[Android Apps and Games] HIckeydog:
My apologies. It appears to be a problem with the ROM I'm using. I was able to load Adaway using adb.
[Android Apps and Games] mrRobinson:
You need to use the twrp that can decrypt data. The systemless zip is using data not system partition.